Skip to main content

copit

GitHub release PyPI Crates.io Docs License: MIT CI codecov

Copy reusable source code from GitHub repos, HTTP URLs, and ZIP archives into your project.

Inspired by shadcn/ui — instead of installing opaque packages, copit copies source code directly into your codebase. The code is yours: readable, modifiable, and fully owned. No hidden abstractions, no dependency lock-in. Override anything, keep what you need.

Use cases

  • Quickly copy and own code — Pull files from GitHub repos, HTTP URLs, or ZIP archives directly into your project. No forks, no submodules — just your own copy to read, modify, and maintain.

  • Build frameworks with injectable components — Create a core library as a traditional package, then offer optional components that users copy into their projects via copit. Think of how shadcn/ui is built on top of Tailwind and Radix UI: the base libraries are installed as dependencies, while UI components are copied in and fully owned. Apply the same pattern to any ecosystem — a LangChain-style core as a library, with community integrations (OpenAI, Anthropic, etc.) as injectable source code that users can customize freely.

Installation

Standalone (recommended)

# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/huynguyengl99/copit/main/install.sh | bash

You can specify a version or install directory:

COPIT_VERSION=v0.1.0 curl -fsSL https://raw.githubusercontent.com/huynguyengl99/copit/main/install.sh | bash

# Custom install location
INSTALL_DIR=/usr/local/bin curl -fsSL https://raw.githubusercontent.com/huynguyengl99/copit/main/install.sh | bash

From PyPI

pip install copit
# or
uv pip install copit

From Cargo

cargo install copit

Uninstall

If installed via the standalone script:

curl -fsSL https://raw.githubusercontent.com/huynguyengl99/copit/main/uninstall.sh | bash

If installed to a custom directory:

INSTALL_DIR=/usr/local/bin curl -fsSL https://raw.githubusercontent.com/huynguyengl99/copit/main/uninstall.sh | bash

For PyPI: pip uninstall copit. For Cargo: cargo uninstall copit.

Quick start

# Initialize a copit.toml in your project
copit init

# Copy a file from a GitHub repo
copit add github:serde-rs/serde@v1.0.219/serde/src/lib.rs

# Copy a file from a raw URL
copit add https://raw.githubusercontent.com/serde-rs/serde/refs/heads/master/LICENSE-MIT

# Copy from a ZIP archive
copit add https://example.com/archive.zip#src/utils.rs

Usage

copit init

Creates a copit.toml config file in the current directory with a default target directory (vendor).

copit add <source>...

Fetches source code and copies it into your project.

Usage: copit add [OPTIONS] [SOURCES]...

Arguments:
  [SOURCES]...  Source(s) to add (e.g., github:owner/repo@ref/path, https://...)

Options:
      --to <TO>      Target directory to copy files into
      --overwrite    Overwrite existing files without prompting
      --skip         Skip existing files without prompting
      --backup       Save .orig copy of new version for excluded modified files
      --freeze       Pin this source so update and update-all skip it
      --no-license   Skip copying license files

Source formats

Format Example
GitHub github:owner/repo@ref/path/to/file (alias: gh:)
HTTP URL https://example.com/file.txt
ZIP archive https://example.com/archive.zip#inner/path
Registry component @registry/component

Registries

A registry publishes named components you install by id, resolving what they require and installing their package dependencies:

copit registry add my-kit github:owner/repo@v1.0.0 --to app/components
copit add @my-kit/auth
  logger  0.1.0  (core)  (required)
  auth    0.1.0  (core)

  Files -> app/components/
    logger/  (6 files)
    auth/    (6 files)

  Packages (via uv): my-runtime>=0.1

Dependencies are copied before the components that need them, and packages go to whichever manager the project already uses: uv, poetry, pdm, pip, pnpm, yarn, npm or cargo, chosen by the registry's declared ecosystem.

See Registries for the index format, copit-registry.json, and how to publish one.

copit update <path>...

Re-fetches specific tracked source(s) by path (as shown in copit.toml). Always overwrites non-excluded files.

# Re-fetch a specific tracked source
copit update vendor/mylib

# Re-fetch with a new version
copit update vendor/mylib --ref v2.0

# Re-fetch with backup for excluded modified files
copit update vendor/mylib --backup

Options:

  • --ref <version> — Override the version ref for this update (updates the source string and ref field)
  • --backup — Save .orig copy of new version for excluded modified files
  • --overwrite — Overwrite existing files without prompting
  • --skip — Skip existing files without prompting
  • --freeze — Pin this source so update and update-all skip it
  • --unfreeze — Unpin this source so it can be updated again

copit update-all

Re-fetches all tracked sources in copit.toml.

# Re-fetch all tracked sources
copit update-all

# Re-fetch all with backup for excluded modified files
copit update-all --backup

Options:

  • --ref <version> — Override the version ref (errors if multiple sources are tracked)
  • --backup — Save .orig copy of new version for excluded modified files
  • --overwrite — Overwrite existing files without prompting
  • --skip — Skip existing files without prompting

copit licenses-sync

Reorganizes license files to match the current (or a new) licenses_dir configuration — moving between centralized and side-by-side layouts.

# Move all license files into a centralized directory
copit licenses-sync --licenses-dir licenses

# Move licenses back to side-by-side (next to each source)
copit licenses-sync --no-dir

# Re-sync based on current config
copit licenses-sync

Options:

  • --licenses-dir <DIR> — Move licenses into a centralized directory and set licenses_dir in config
  • --no-dir — Move licenses back to side-by-side and remove licenses_dir from config
  • --dry-run — Preview what would be moved without making changes

copit remove <path>... (alias: rm)

Removes previously copied files from disk and their entries from copit.toml.

# Remove a specific file
copit remove vendor/lib.rs

# Remove multiple files
copit rm vendor/lib.rs vendor/utils.rs

# Remove all tracked sources
copit rm --all

Config file

copit.toml tracks your project's target directory and all copied sources:

target = "vendor"

[[sources]]
path = "vendor/prek-identify"
source = "github:j178/prek@master/crates/prek-identify"
ref = "master"
commit = "abc123def456..."
copied_at = "2026-03-07T08:46:51Z"
excludes = ["Cargo.toml", "src/lib.rs"]

Root-level fields:

  • overwrite/skip/backup: Project defaults. Priority: CLI flags > per-source > root-level > false.
  • licenses_dir: Centralized directory for license files. When set, licenses go to {licenses_dir}/{relative_path}/ (mirroring the target structure) instead of next to the source.

Per-source ([[sources]]) fields:

  • ref: The user-specified version string (branch/tag/sha)
  • commit: Resolved commit SHA from GitHub API (optional, GitHub sources only)
  • excludes: List of relative paths (within source folder) to skip on re-add. With --backup, the new version is saved as <file>.orig.
  • frozen: Pin this source so it's skipped during update and update-all.
  • no_license: Skip copying license files for this source (set via --no-license on add, respected by update/update-all).
  • overwrite/skip/backup: Per-source overrides.

See Configuration for full details.

License

MIT

Release files for copit 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for copit 0.6.0
File Size Uploaded
copit-0.6.0.tar.gz 156.6 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for copit 0.6.0
File
copit-0.6.0-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details
copit-0.6.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
copit-0.6.0-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details
copit-0.6.0-py3-none-musllinux_1_2_aarch64.whl Python 3 none Linux musl 1.2+ ARM64 Details
copit-0.6.0-py3-none-manylinux_2_28_armv7l.whl Python 3 none Linux glibc 2.28+ ARMv7l Details
copit-0.6.0-py3-none-manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64 Details
copit-0.6.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details
copit-0.6.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl Python 3 none Linux glibc 2.17+ x86-32 Details
copit-0.6.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details
copit-0.6.0-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details

Total release size: 40.1 MB

Release files / copit-0.6.0.tar.gz

Download URL copit-0.6.0.tar.gz
Size 156.6 kB
Tags Source
SHA-256 checksum
How to use checksums
723588a50259f7bb1efd27a14ea2aa688fa6080b28a155278accca8ffb4963f9
BLAKE2b-256 checksum
How to use checksums
4d82ea96eadf265b3d7bc7aa467dd28718c87e635e1fbd533b85346026e8c9c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / copit-0.6.0-py3-none-win_arm64.whl

Download URL copit-0.6.0-py3-none-win_arm64.whl
Size 3.9 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
726dff885ce97435d3d9b60cecf80d7384823f8f6a06e8278b10620a3d7cf1ab
BLAKE2b-256 checksum
How to use checksums
07b11a7a979bbf7b7652fe88bbc3eafb1fb570df8bcc7e9a2f486b6f1e16da28
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / copit-0.6.0-py3-none-win_amd64.whl

Download URL copit-0.6.0-py3-none-win_amd64.whl
Size 3.9 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
4ff2b0e3bfb3810bf56b8b49d6921f494beffdebd0e2eef2912e904df852751e
BLAKE2b-256 checksum
How to use checksums
e9c1c87ac3d62ae0a00a393feaca5fa573b7c5ddc24412998ed66859347a7366
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / copit-0.6.0-py3-none-musllinux_1_2_x86_64.whl

Download URL copit-0.6.0-py3-none-musllinux_1_2_x86_64.whl
Size 4.3 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
957d00e9501b9e5f18a039c52f6326a378baeb531b93085617a2c8eee7e4e59e
BLAKE2b-256 checksum
How to use checksums
739c43998d223ae70fe30f6a498489036b8ce00eaa0dc216787e1c24129a40f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / copit-0.6.0-py3-none-musllinux_1_2_aarch64.whl

Download URL copit-0.6.0-py3-none-musllinux_1_2_aarch64.whl
Size 3.9 MB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
0c6935b508c1522daf8adde0d337e93ebfd67b0311f40bd7ddb6626c80623d15
BLAKE2b-256 checksum
How to use checksums
4f3f4dfa2fb3fbfe8cd1565b57b1c313ec8ca9abeff3f48d28747d5874025d80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / copit-0.6.0-py3-none-manylinux_2_28_armv7l.whl

Download URL copit-0.6.0-py3-none-manylinux_2_28_armv7l.whl
Size 3.4 MB
Tags Linux glibc 2.28+ ARMv7l Python 3
SHA-256 checksum
How to use checksums
99bf12ee3552a03e90dc6c7bf3a4d2788e227dbf477167d24dfc5b7c0837c706
BLAKE2b-256 checksum
How to use checksums
4dd37b32b8da7c672473e0bc1fe012986cd9bb1fb67f5deffcab2010aa9ba388
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / copit-0.6.0-py3-none-manylinux_2_28_aarch64.whl

Download URL copit-0.6.0-py3-none-manylinux_2_28_aarch64.whl
Size 3.9 MB
Tags Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
0162f184cff31b5928eab4a7a8790b1ba78d91594c679ccb2c6c77e6064fdcef
BLAKE2b-256 checksum
How to use checksums
0dc730e80a4e12a13a576f75872099eab8cdd40c8df60d97b87c7531e460b875
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / copit-0.6.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL copit-0.6.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 4.3 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
28815a1e529ce3ca0b12f3b2af0915360524f211a96164eb7711e4cc1468be2d
BLAKE2b-256 checksum
How to use checksums
e075f1a57ba848114ff9d9c99e4fb2eeac2182bbdf703fb09263b4e563b1e70c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / copit-0.6.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl

Download URL copit-0.6.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Size 4.1 MB
Tags Linux glibc 2.17+ x86-32 Python 3
SHA-256 checksum
How to use checksums
684eafc674c43d7bd1609db5bab35bd3817a8774d6dfe6a7a562c73fe249976d
BLAKE2b-256 checksum
How to use checksums
5716f32da841312a5fd8e2c3117422c689da0f585e8103e0ba500b3d2f6e9c00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / copit-0.6.0-py3-none-macosx_11_0_arm64.whl

Download URL copit-0.6.0-py3-none-macosx_11_0_arm64.whl
Size 3.9 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
47a06441f2a0eded9419993b2b274c807e63010c23a7cbdf14bc5eba8d842fdb
BLAKE2b-256 checksum
How to use checksums
1990e6e8a6918ea8de5b385aed5c4c69bb7edc8717721976e8d5bf41edcebb5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / copit-0.6.0-py3-none-macosx_10_12_x86_64.whl

Download URL copit-0.6.0-py3-none-macosx_10_12_x86_64.whl
Size 4.2 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
af5c054ce33f157b09b15cbf29276a05e635b571dd1be3894c14a50c1ed2474b
BLAKE2b-256 checksum
How to use checksums
9db98606b510f2269461b352925870e3f3ac74353832f9e27979ed54a03ac296
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

0.9.1

11 release files

0.9.0

11 release files

0.8.0

11 release files

0.7.0

11 release files

0.6.2

11 release files

0.6.1

11 release files

This release

0.6.0 This release

11 release files

0.5.0

11 release files

0.4.1

11 release files

0.4.0

11 release files

0.3.0

11 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page