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

Uploaded Python 3Windows ARM64

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

Uploaded Python 3Windows x86-64

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

Uploaded Python 3musllinux: musl 1.2+ x86-64

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

Uploaded Python 3musllinux: musl 1.2+ ARM64

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

Uploaded Python 3manylinux: glibc 2.28+ ARMv7l

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

Uploaded Python 3manylinux: glibc 2.28+ ARM64

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

Uploaded Python 3manylinux: glibc 2.17+ i686

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

Uploaded Python 3macOS 11.0+ ARM64

copit-0.4.1-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.1.tar.gz.

File metadata

  • Download URL: copit-0.4.1.tar.gz
  • Upload date:
  • Size: 146.8 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.1.tar.gz
Algorithm Hash digest
SHA256 6146bf679753397a17c83da1d908c8c2575470c5f1f709310a20edf828dbd821
MD5 92cc73078dd494a6020981190c06720f
BLAKE2b-256 1937cdf0c458219eeaef5752a3dd42041d8b5fe86b131b92ffe9467159ade3e1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.4.1-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.1-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 7ea07683a490f2068e1520e5021d92a11cfe753c9281e3ba8b90a9ef50f4196f
MD5 73ddda44dcf43b3c804c9f9afec25c4a
BLAKE2b-256 17e244a769f614ab03376d63d4baaf4a29809dbce0bb243a396047d0da2c4af5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.4.1-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.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 ea0a89c6a733280476df58e4d7f8f0fe87e1a02502a12848f75d03e07e3f5cbc
MD5 ea41df74b358d3f5d504100ad89c7ad4
BLAKE2b-256 b3d5b9b35a2b2adad9306dc4854bb66036815d96fa7d00d96ee4f6e603a3db43

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.4.1-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.1-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 046e69d1fce530c9bac378d1257641abf3406626b4b64d6b9e1000d6f0ec7d8a
MD5 baa755ad796c0c03940bde3cea7d9f3f
BLAKE2b-256 3486b87a26d887e63d0f5e2516040d17fef4026e777562e25514139e1448f973

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.4.1-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.1-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 de59714367bcb094e5ebdf9636189d83b7a16c47354bcdf6e98c784563b6f91e
MD5 5cbdd335f8f6ac02531d7ef900448465
BLAKE2b-256 ff72d4a624e87a9fd352495bdf8bc3da7412981f1ed04d33ddfd4d4b0ae17d5c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.4.1-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.1-py3-none-manylinux_2_28_armv7l.whl
Algorithm Hash digest
SHA256 4c0a87fd607e714fc943127666f3ce5d11fcaf7820136d5c7151d9a4a40fc67b
MD5 46a9dd08339d514ca7a689e60284f806
BLAKE2b-256 fefde48201daed626018167163eec3ad7b9266adc9a845441b68ccd7d4ecd6a5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.4.1-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.1-py3-none-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 32e8c8afee6c2512b77a240d9e6fde6c4b3249a3dc5792a643a16ee44a7d7f79
MD5 ccca264c4dfa6688fb93a85cede1003b
BLAKE2b-256 4e3bdf36af4e6990614625139989fab9046c57bc076e5cebc5047949d1c4e5bc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.4.1-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.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a55488d7766b9512b486fa886e65642a3bc720c65f3692d7e9c5dbd19544f8be
MD5 bdbb97c51939ced007e7309292cd8486
BLAKE2b-256 a7f373d5f927c8551657ca2121aae09f3e37dc112ba5c33f7b17c6effe02dbca

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.4.1-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.1-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 3ff01dac154c53d3e947fa302c1f82e467267ace18c2dddf8586039d2870b21e
MD5 ea973e9d94dbc38a64a5022366c08d79
BLAKE2b-256 6a3fe27a95e6a32219206a3dd948eae32736559be84a112ac59b5fd5fbc85342

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.4.1-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.1-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 be807afdbd5cfb7063eb6c5fed54650b5283a5b95ff2aafbf5294e76a6474655
MD5 55504209e06f748e2e0cc600dde450ea
BLAKE2b-256 1e73fbc5caf04617e1edfffa067f4f5d965f486c9a2a14b4de2a2291127e8a81

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.4.1-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.1-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 2b4c1dc0001f6b16e391b5ae8db581de37ae939646dacd8a0ebbbfa3cfce525a
MD5 5455d644e62ac4b2de280274f8ef296a
BLAKE2b-256 95bf4427c2a6c97ef42a0ee7dddf2c3086874bc52b121c0ef1e8f0c3d86a7fe9

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