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

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.5.0.tar.gz (149.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.5.0-py3-none-win_arm64.whl (3.9 MB view details)

Uploaded Python 3Windows ARM64

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

Uploaded Python 3Windows x86-64

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

Uploaded Python 3musllinux: musl 1.2+ x86-64

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

Uploaded Python 3musllinux: musl 1.2+ ARM64

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

Uploaded Python 3manylinux: glibc 2.28+ ARMv7l

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

Uploaded Python 3manylinux: glibc 2.28+ ARM64

copit-0.5.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.5.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl (4.0 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ i686

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

Uploaded Python 3macOS 11.0+ ARM64

copit-0.5.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.5.0.tar.gz.

File metadata

  • Download URL: copit-0.5.0.tar.gz
  • Upload date:
  • Size: 149.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","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.5.0.tar.gz
Algorithm Hash digest
SHA256 b33fbc1660373737eea1f7dafd535b91509410e51be36317abf79c423d514b66
MD5 1cbb29e35416a0cb57d0b31ce808f8c8
BLAKE2b-256 6dbd731aa0760602716626d930c231af11b6484080d4e5802bedf74e38edc9e2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.5.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.3 {"installer":{"name":"uv","version":"0.12.3","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.5.0-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 1c4fea990a91aef552b1beeba895d07d1f75a7b3972a6f15290e1d68b88d1a8c
MD5 6569f9fee2e3ddfd042542cf63ca8cee
BLAKE2b-256 4996702d1ebe75fa398e03347a44f73758dd47beb4e8ec989166b776c09fcb20

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.5.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.3 {"installer":{"name":"uv","version":"0.12.3","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.5.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 571152b2f6cf450d85e2a08197f61b76355cb4c367924db6aff90d441e5d76a1
MD5 a05294980ac3531eb560ce1e89da64e3
BLAKE2b-256 a0ece713c7f0cac33cd11529f795f0c9d5d32c19e1a4d5ab6d3a43719d482c65

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.5.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.3 {"installer":{"name":"uv","version":"0.12.3","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.5.0-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 aabab4ec1b11d0bd3f6df27658aec05117889618ebf1b70747aa1b6eb1663fe9
MD5 0e6478fb283693d30b2025acd79c64f9
BLAKE2b-256 b351752fb1c3c7c9a165abd59e776829953061efc7ef6d12317b4346dc907a29

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.5.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.3 {"installer":{"name":"uv","version":"0.12.3","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.5.0-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 6b60cc3a0e1c345c7c2de2a3a800a07003dddfa35a29584c69cc0229f3fd184c
MD5 7e2bbee545782445c4b96923b6365ddd
BLAKE2b-256 4aa2df33811ca4d1e83018c8713f6c0f56ad286d0756986f9e2916ad3cf3753f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.5.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.3 {"installer":{"name":"uv","version":"0.12.3","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.5.0-py3-none-manylinux_2_28_armv7l.whl
Algorithm Hash digest
SHA256 f13d7e96b6e92ffe6db750aa864d1207578f35d61ebacb8e3185b67736a4fe44
MD5 4edd18385cf2cde12a2600a3624e780f
BLAKE2b-256 bb98ba43a256fa648a158fe9686fb25dc417fa3a39b338404af2ab665cecc5e6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.5.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.3 {"installer":{"name":"uv","version":"0.12.3","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.5.0-py3-none-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 2b50559f222443d71119818ae5db0c67a48e2ad19bb8dffc68c4078b273689b1
MD5 02e723c3d3a913ad21624341c2d0b77e
BLAKE2b-256 9344968d4e0d1ae372f258463a4fde28b5336eae29209024ddfbf396504e951d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.5.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.3 {"installer":{"name":"uv","version":"0.12.3","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.5.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1caf30bad78a55380dc6ee4af71fc3f2858c8b0c4606338753b9fb26375e3dae
MD5 a221a22a876ae827b76430ce071a05e0
BLAKE2b-256 014a2911297eb9fad60ab93dc8f3bd0cb0227ae077ef3a6d910869fbf60cce8f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.5.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.3 {"installer":{"name":"uv","version":"0.12.3","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.5.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 8eb8f126a54da33bfe8f3fef3ce5ac84de5886022953b286b2a1efc96d5dc9f3
MD5 bafb6e6d636082b6c068048f4725c947
BLAKE2b-256 38a1ed5da09ce5a624ccb65897976c535738dd4bb8de052fdc770db0910c0e09

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.5.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.3 {"installer":{"name":"uv","version":"0.12.3","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.5.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 10c597f00cedef018671421a437d354f756eb289aa490aa4552cfe951d4ff28f
MD5 7a5f02cefcbef49ff9c89430d1196801
BLAKE2b-256 e185c2ed338af55766ca23f2a167e11caf14f030d119c45c72010640fc629e79

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.5.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.3 {"installer":{"name":"uv","version":"0.12.3","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.5.0-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 925ecba0c04f2e69ebfe5d7bb8968d960c468b6a9bb8f47994a8010a4f537138
MD5 65d85e9b9484125f6331197af5b5d4cd
BLAKE2b-256 41d79c4941faeec476f08d9e5bd4678d00064a19a17f15e8b81fa603923f104b

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