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, 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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

copit-0.4.0.tar.gz (145.9 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

copit-0.4.0-py3-none-win_arm64.whl (3.9 MB view details)

Uploaded Python 3Windows ARM64

copit-0.4.0-py3-none-win_amd64.whl (3.9 MB view details)

Uploaded Python 3Windows x86-64

copit-0.4.0-py3-none-musllinux_1_2_x86_64.whl (4.3 MB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

copit-0.4.0-py3-none-musllinux_1_2_aarch64.whl (3.9 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

copit-0.4.0-py3-none-manylinux_2_28_armv7l.whl (3.4 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ ARMv7l

copit-0.4.0-py3-none-manylinux_2_28_aarch64.whl (3.9 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ ARM64

copit-0.4.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.2 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

copit-0.4.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl (4.0 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ i686

copit-0.4.0-py3-none-macosx_11_0_arm64.whl (3.9 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

copit-0.4.0-py3-none-macosx_10_12_x86_64.whl (4.2 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file copit-0.4.0.tar.gz.

File metadata

  • Download URL: copit-0.4.0.tar.gz
  • Upload date:
  • Size: 145.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","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}

File hashes

Hashes for copit-0.4.0.tar.gz
Algorithm Hash digest
SHA256 f30139db87eca02189d1e882fdf3209fc7286028e5347662a9047c408d46cc0e
MD5 ccc1de3b5539dc7f986cf9d71ccc5595
BLAKE2b-256 6e87dffc52839221852092fa0f418cc0edba25698902a3ee1df7928f0f0e917a

See more details on using hashes here.

File details

Details for the file copit-0.4.0-py3-none-win_arm64.whl.

File metadata

  • Download URL: copit-0.4.0-py3-none-win_arm64.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: Python 3, Windows ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","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}

File hashes

Hashes for copit-0.4.0-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 bac0a15b5180199853b668d41e90838d8afc45cb8591f70097800e84fa144086
MD5 31711917d68fc9e75276fdc17c0b7b8d
BLAKE2b-256 14630b198bb8f6898537850f20d5497b58a19b00c9fc2ea8d5082792f4e8743b

See more details on using hashes here.

File details

Details for the file copit-0.4.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: copit-0.4.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","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}

File hashes

Hashes for copit-0.4.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 6020e131cdceb6be713b7ed5ca2c7c139f2fb15e0e7493b4bd4c5cfb452fc124
MD5 3580cdefeb313023c8d8b9af2b542f97
BLAKE2b-256 1d52775ac6843147b60869fda3666f7744c979cb4d29e3285c02002a85c4e614

See more details on using hashes here.

File details

Details for the file copit-0.4.0-py3-none-musllinux_1_2_x86_64.whl.

File metadata

  • Download URL: copit-0.4.0-py3-none-musllinux_1_2_x86_64.whl
  • Upload date:
  • Size: 4.3 MB
  • Tags: Python 3, musllinux: musl 1.2+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","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}

File hashes

Hashes for copit-0.4.0-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e0e73724525ad4b4feba793bd70a897677dc185f5605a6bd2a9105a00c089eef
MD5 7097ba084aa3b7dc83a5ea656784f301
BLAKE2b-256 fa27a59e9d910fe12a312da6c0e7b304aa55473c8867db9be9982b889684246e

See more details on using hashes here.

File details

Details for the file copit-0.4.0-py3-none-musllinux_1_2_aarch64.whl.

File metadata

  • Download URL: copit-0.4.0-py3-none-musllinux_1_2_aarch64.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: Python 3, musllinux: musl 1.2+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","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}

File hashes

Hashes for copit-0.4.0-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 0f409df33e412b1edd68ebede9e389e21fa979a4ca9df7c5c1ca5070eda1ff75
MD5 5d0715da0e7f2de12a7ee34b38b44d5f
BLAKE2b-256 23c90f10b64f37cd5c073492804a87f8214909010f245a2a5ae7839f79a95300

See more details on using hashes here.

File details

Details for the file copit-0.4.0-py3-none-manylinux_2_28_armv7l.whl.

File metadata

  • Download URL: copit-0.4.0-py3-none-manylinux_2_28_armv7l.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: Python 3, manylinux: glibc 2.28+ ARMv7l
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","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}

File hashes

Hashes for copit-0.4.0-py3-none-manylinux_2_28_armv7l.whl
Algorithm Hash digest
SHA256 ade05effb226a6886bc1b2888ba530b9cae60726a85567ed3763095ed547ee19
MD5 0da0f06610dacc0ddfd1862517103f1b
BLAKE2b-256 4aed125c358343f28f07a95487ed92ac7050a59ac76fc466f5e39d7251aa6bcd

See more details on using hashes here.

File details

Details for the file copit-0.4.0-py3-none-manylinux_2_28_aarch64.whl.

File metadata

  • Download URL: copit-0.4.0-py3-none-manylinux_2_28_aarch64.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: Python 3, manylinux: glibc 2.28+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","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}

File hashes

Hashes for copit-0.4.0-py3-none-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 e3cc038e99adabf4b3c009644760e19777f9885ea015fd15a3fbbcb1799797ed
MD5 4ca1e9e13730e2f28a38e72d3771c959
BLAKE2b-256 288ed84b9039b1e30fb7ab276545af766d8a776574962905eb24e81434d227da

See more details on using hashes here.

File details

Details for the file copit-0.4.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

  • Download URL: copit-0.4.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 4.2 MB
  • Tags: Python 3, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","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}

File hashes

Hashes for copit-0.4.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 357d81907ee073d738f5dd5e020c58fdeb6648bdf8aac5f67462eba4aa499b8f
MD5 034850c7d5a42059d407e1e6ea5260fb
BLAKE2b-256 b5a6b3fb61aeaaf9e786670401d8a0178f7ad432236d21f5fdd0219b5a1eb055

See more details on using hashes here.

File details

Details for the file copit-0.4.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

  • Download URL: copit-0.4.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
  • Upload date:
  • Size: 4.0 MB
  • Tags: Python 3, manylinux: glibc 2.17+ i686
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","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}

File hashes

Hashes for copit-0.4.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 4d2e1c3221f62fd31232aede60385bda05400b662f9bfe58672ccf2d9b07a88c
MD5 1ba6fbcf5b0087124e1c32a71d3bd9e2
BLAKE2b-256 1886e0caea9605f2c2a0e9821dca7837be89f7453a1435ade5dd3fa91c8f04b9

See more details on using hashes here.

File details

Details for the file copit-0.4.0-py3-none-macosx_11_0_arm64.whl.

File metadata

  • Download URL: copit-0.4.0-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: Python 3, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","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}

File hashes

Hashes for copit-0.4.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fffe456948cc59d0d03c7b0be63630450f2440a203eb5a8c7a9a7847a245bebe
MD5 131870b520e9769eec956acec381f007
BLAKE2b-256 c49da8561fd4282a3637ffd93bf0ff379a730ea16fb4276b8c47ebb62500d0cf

See more details on using hashes here.

File details

Details for the file copit-0.4.0-py3-none-macosx_10_12_x86_64.whl.

File metadata

  • Download URL: copit-0.4.0-py3-none-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 4.2 MB
  • Tags: Python 3, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","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}

File hashes

Hashes for copit-0.4.0-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 0fed52275f68b7074d3412b302f360e284963172eadae45fc85db0ca0b70cfe6
MD5 407d9943369a55d5e3256cb6118ff650
BLAKE2b-256 cd7de15bcc5cc785db645c5b72fe528e115682c1b44c8cf8067047347b7f899d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page