AI-Ready Code Sharing for Developers

Copy your project to the clipboard — structured for AI.

CopyTree is a simple CLI that exports any codebase as XML, JSON, or a tree view — perfect for Claude, ChatGPT, Grok, or Gemini.

Terminal
Open-source (MIT) Works with popular AI assistants No account required

Install, then copy your codebase

Watch how CopyTree transforms your workflow. From installation to your first AI-ready code copy with ease.

CopyTree Getting Started

Short demo: installation and first run in under a minute · Watch on YouTube

Quick highlights:

  • Rapid Installation Global NPM package for instant access
  • Intelligent Defaults Works out-of-the-box with no config
  • Broad Compatibility Supports any project, any framework

Core Features

Tools to make sharing codebases with AI simpler

Intelligent file copying feature showing code selection interface

Smart File Selection

Automatically picks essentials while respecting .gitignore, saving you hours of manual curation.

File transformation capabilities showing various file types

15+ Transformers

Supports PDFs, images, code summaries, and more for AI compatibility.

AI-friendly output formats displayed in terminal

AI-Friendly Output

Generates XML/JSON ready for large context windows in tools like Claude or GPT-4.

Default and custom profile configuration

Flexible Profiles

Default profile for quick starts, with easy custom creation via YAML.

Also includes:

  • Smart .gitignore parsing
  • Token counting
  • Custom transformers
  • CLI & API access

Install in three simple steps

From installation to AI-ready code in minutes

01

Install CopyTree

Get started with a simple npm install command

bash
npm install -g copytree
02

Copy Your Codebase

Run copytree in your project directory to copy it to your clipboard

bash
copytree
03

Paste & Plan

Your codebase is now copied to clipboard in AI-ready format. Simply paste it into Claude, ChatGPT, Grok, or any AI assistant to start building.

Works with GitHub Repos

CopyTree works great with GitHub repos and integrates into workflows like pasting into AI for planning (as I do in my video):

bash
copytree https://github.com/gregpriday/copytree
Background decoration
Background decoration

Ship context to AI in seconds

Install CopyTree and start sharing AI-ready codebases in seconds.

Prefer GitHub? View the repo

Free and open-source CLI tool