copit
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 create <source> <dir>
Starts a new project from a template folder. Its contents are copied into <dir> (new or
empty) as your own code, untracked. A template can ship its own copit.toml, so
copit add works right away.
copit create github:owner/repo@v1.0.0/templates/api my-app
copit create ../templates/api my-app # a local folder, skipping what git ignores
As with registries, a template is data: copit copies it and never runs anything.
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.origcopy 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.origcopy 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 setlicenses_dirin config--no-dir— Move licenses back to side-by-side and removelicenses_dirfrom 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 duringupdateandupdate-all.no_license: Skip copying license files for this source (set via--no-licenseonadd, respected byupdate/update-all).overwrite/skip/backup: Per-source overrides.
See Configuration for full details.
License
MIT
Release files for copit 0.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| copit-0.7.0.tar.gz | 164.7 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| copit-0.7.0-py3-none-win_arm64.whl | Python 3 | none | Windows ARM64 | Details |
| copit-0.7.0-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| copit-0.7.0-py3-none-musllinux_1_2_x86_64.whl | Python 3 | none | Linux musl 1.2+ x86-64 | Details |
| copit-0.7.0-py3-none-musllinux_1_2_aarch64.whl | Python 3 | none | Linux musl 1.2+ ARM64 | Details |
| copit-0.7.0-py3-none-manylinux_2_28_armv7l.whl | Python 3 | none | Linux glibc 2.28+ ARMv7l | Details |
| copit-0.7.0-py3-none-manylinux_2_28_aarch64.whl | Python 3 | none | Linux glibc 2.28+ ARM64 | Details |
| copit-0.7.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | Python 3 | none | Linux glibc 2.17+ x86-64 | Details |
| copit-0.7.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl | Python 3 | none | Linux glibc 2.17+ x86-32 | Details |
| copit-0.7.0-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details |
| copit-0.7.0-py3-none-macosx_10_12_x86_64.whl | Python 3 | none | macOS 10.12+ x86-64 | Details |
Total release size: 41.5 MB
Release files / copit-0.7.0.tar.gz
| Download URL | copit-0.7.0.tar.gz |
|---|---|
| Size | 164.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bee10a2db702efd1d52c1d3845432bc1225d7dcf7f54183b5e5b1bb7067ee06e
|
|
BLAKE2b-256 checksum How to use checksums |
21795aeef7e93c44303b547c9295445e0d5b89bdb297606ee0306a24e31c6633
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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.7.0-py3-none-win_arm64.whl
| Download URL | copit-0.7.0-py3-none-win_arm64.whl |
|---|---|
| Size | 4.0 MB |
| Tags | Python 3 Windows ARM64 |
|
SHA-256 checksum How to use checksums |
98b84d9a25f3517257ff1b862a2c22ea5f18c64767116a06eb0a80acae13a0a6
|
|
BLAKE2b-256 checksum How to use checksums |
ec266a349230e87ea53684e40ef593e0334f68bce7b1868d75de63b6f9028a6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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.7.0-py3-none-win_amd64.whl
| Download URL | copit-0.7.0-py3-none-win_amd64.whl |
|---|---|
| Size | 4.1 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
b0810f7ec2cffb4f76967ec27ee5f01e7068753c74aead7639fa6cd88e3a81b2
|
|
BLAKE2b-256 checksum How to use checksums |
cdb72aaa4056eae9986d6abafa7ba9df516b5948fb00621c2b9b1e0e48931b06
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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.7.0-py3-none-musllinux_1_2_x86_64.whl
| Download URL | copit-0.7.0-py3-none-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 4.5 MB |
| Tags | Linux musl 1.2+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
79e299746c16ffe4cccd5320ba25eca2f0b43619df011d9a0fdd01d25867e4f7
|
|
BLAKE2b-256 checksum How to use checksums |
c6c1f9377cad55d3336258750ec8ebb988be9540f9f96385cfe60f872986de4c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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.7.0-py3-none-musllinux_1_2_aarch64.whl
| Download URL | copit-0.7.0-py3-none-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 4.1 MB |
| Tags | Linux musl 1.2+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
e8ad4ae17b7883460615b089e0e382b2272db8420413964589b28ed4d95ffb38
|
|
BLAKE2b-256 checksum How to use checksums |
5e6778ef7c3f36bae9036f6bee8a948a0f885c331878a91abe5dd29002489aeb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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.7.0-py3-none-manylinux_2_28_armv7l.whl
| Download URL | copit-0.7.0-py3-none-manylinux_2_28_armv7l.whl |
|---|---|
| Size | 3.6 MB |
| Tags | Linux glibc 2.28+ ARMv7l Python 3 |
|
SHA-256 checksum How to use checksums |
48f6d6f1c1c7eb7569af8d878192e9d0e6d0e60840ba94d0286c5cfc9c59162b
|
|
BLAKE2b-256 checksum How to use checksums |
581a9904ddfeb82f6bbffd6e6056ec5c7c15176c356b6efb22476b473f39b2f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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.7.0-py3-none-manylinux_2_28_aarch64.whl
| Download URL | copit-0.7.0-py3-none-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 4.0 MB |
| Tags | Linux glibc 2.28+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
0ff56cf8614a876201125f515e9f86d62e30040d2de70256e66c9e21424a97af
|
|
BLAKE2b-256 checksum How to use checksums |
498def413335e7a6e0b7a5d398b34ec6b3de3edf599fb82624b8df81373389ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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.7.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | copit-0.7.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 4.4 MB |
| Tags | Linux glibc 2.17+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
6eaa7f2ed65181d7895476689891a719c3c66c6d8069f36f147d5e115ac039f4
|
|
BLAKE2b-256 checksum How to use checksums |
b84ee65bea41bbad8655860560c81954f34aa4bc3e2f579e4973a5c3a5c651b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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.7.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
| Download URL | copit-0.7.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl |
|---|---|
| Size | 4.2 MB |
| Tags | Linux glibc 2.17+ x86-32 Python 3 |
|
SHA-256 checksum How to use checksums |
13259e33dcbf009f4ffc710d04068e620c971e7eb636ffff3b467971b243655a
|
|
BLAKE2b-256 checksum How to use checksums |
b8c986da6f1e462fab893bc3c60ae1dcc2d34c0485e394d0abb2d16d96aeaac9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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.7.0-py3-none-macosx_11_0_arm64.whl
| Download URL | copit-0.7.0-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 4.1 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
829d22cfec579fc1014435a1fe73a820c5c1c333cb271ce02e5a947c97f4c8f5
|
|
BLAKE2b-256 checksum How to use checksums |
a0ae55becbb1faeee52db92691ea494ef01fa2ad9498e5ab9079f090ef5aa919
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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.7.0-py3-none-macosx_10_12_x86_64.whl
| Download URL | copit-0.7.0-py3-none-macosx_10_12_x86_64.whl |
|---|---|
| Size | 4.3 MB |
| Tags | Python 3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
088ed4354144637ab50e8762c59edea6f06930890e49d49135c9ac3b98c3efa0
|
|
BLAKE2b-256 checksum How to use checksums |
437ab062a33550a0aaff3c3d7a395f32daa5b4205a3bb23146e51cb56a89c6eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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}
|