Skip to main content

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

Project description

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

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

Project details


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.3.0.tar.gz (112.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.3.0-py3-none-win_arm64.whl (3.6 MB view details)

Uploaded Python 3Windows ARM64

copit-0.3.0-py3-none-win_amd64.whl (3.6 MB view details)

Uploaded Python 3Windows x86-64

copit-0.3.0-py3-none-musllinux_1_2_x86_64.whl (4.1 MB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

copit-0.3.0-py3-none-musllinux_1_2_aarch64.whl (3.7 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

copit-0.3.0-py3-none-manylinux_2_28_armv7l.whl (3.2 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ ARMv7l

copit-0.3.0-py3-none-manylinux_2_28_aarch64.whl (3.7 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ ARM64

copit-0.3.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.0 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

copit-0.3.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl (3.8 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ i686

copit-0.3.0-py3-none-macosx_11_0_arm64.whl (3.7 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

copit-0.3.0-py3-none-macosx_10_12_x86_64.whl (3.9 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: copit-0.3.0.tar.gz
  • Upload date:
  • Size: 112.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","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.3.0.tar.gz
Algorithm Hash digest
SHA256 c51c25f328d3b1bae10d38d7d7102e8b94f2c26d2b92bfce0f89e7d644b789ca
MD5 dbeb1c31825e1889a4b5a15269e65c22
BLAKE2b-256 97a40d18c882a359f5bca816d226d60b359fae5c2caa0fa63a55ed19325e180d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.3.0-py3-none-win_arm64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: Python 3, Windows ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","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.3.0-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 9d6f2dcafa6e042bbd0e64d5442e27830f94b311eda87a0365cdd91024de7c87
MD5 2bf7c5aef867b20044bf60ee405f0a74
BLAKE2b-256 e55c357ac1af01dcd4b5e2087299995b3e68f9a793ccdc9d5cfa7a886e01786b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.3.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","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.3.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 9028c99be8d9ccb44d776470e0bef2ba42594c9633a13221b79dfec2f6bfa197
MD5 4731018dfb38875c1890d07b4058fb90
BLAKE2b-256 fe46ae422baedd303e192bab93047c8d41ce4338f8338876b136e9cf40dbf3c5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.3.0-py3-none-musllinux_1_2_x86_64.whl
  • Upload date:
  • Size: 4.1 MB
  • Tags: Python 3, musllinux: musl 1.2+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","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.3.0-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 82a5b1f32b74aa6109e7b3552215cbff098d7b21799abaa828bdaa1c625765af
MD5 a34745e311f534b5e6fbd644c910512b
BLAKE2b-256 8a6793b55ffaa23af8c00f0d34c5dea3a403020a687c1c91e8c5d3150dde5ba4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.3.0-py3-none-musllinux_1_2_aarch64.whl
  • Upload date:
  • Size: 3.7 MB
  • Tags: Python 3, musllinux: musl 1.2+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","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.3.0-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 ded0cdb48368243cb8ede9f90c1abeb55b02c60b292c56532e6a59afc036e4fd
MD5 1ecb7e0d1d4de20d7823c8ddf4fc4220
BLAKE2b-256 f8637dda2f27d680b6551c291b0f69a543887cd7f965c341bd26eee440611c72

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.3.0-py3-none-manylinux_2_28_armv7l.whl
  • Upload date:
  • Size: 3.2 MB
  • Tags: Python 3, manylinux: glibc 2.28+ ARMv7l
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","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.3.0-py3-none-manylinux_2_28_armv7l.whl
Algorithm Hash digest
SHA256 0b69a30fd702ba0cfffca8c82c26f4e0283214ddc2031131c966681b8ad4bdae
MD5 4a1e8d6a3aeebe05c54df38ee761b541
BLAKE2b-256 42b795a790ceb80d1eca717e4302523f2ee7d398e8ad28b48e06594a504ce562

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.3.0-py3-none-manylinux_2_28_aarch64.whl
  • Upload date:
  • Size: 3.7 MB
  • Tags: Python 3, manylinux: glibc 2.28+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","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.3.0-py3-none-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 a699546d1cb06a5548710c947d90e5013c2f8bc1ed9f1af478a5e0599226b12a
MD5 5f3f2da7c2157538dbaae44ccabcd577
BLAKE2b-256 58b827ecace1f081e79ac095d95a1e89ee41a9f0f32254c54485499b320dd4dd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.3.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 4.0 MB
  • Tags: Python 3, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","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.3.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e676ef76607343b631ed26145e72883bdd1fff28e3bcb50b8b9cbc4d8b52e4fa
MD5 623155a76023041845fd27efc1a3040b
BLAKE2b-256 2c28bdfee1995d8065c2d4061808a09d9b0e8ad0b227854caef59ffa1a33a72b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.3.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
  • Upload date:
  • Size: 3.8 MB
  • Tags: Python 3, manylinux: glibc 2.17+ i686
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","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.3.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 b61db28b3335e1df85ebb90a086b09ff538ce8cee358e4f74a775325e187ea0d
MD5 fe4fdbdf8c98177d2f42bba2d38deb69
BLAKE2b-256 eedb6e593ab4e29ef0472f077e6b425114024776a1f5c3e56fc2d8c6488b5d33

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.3.0-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 3.7 MB
  • Tags: Python 3, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","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.3.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 af9d8da16112faac5d61e8221ab62b8ab559646a83c5188d0cd24c2754054fd5
MD5 a6e172e9f8bdd71c76455e2e8af878e8
BLAKE2b-256 114d53af8207352a70b7f7414f5f4f86ba4c68146a1b96c4b1bdb87a40911d5f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.3.0-py3-none-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: Python 3, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","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.3.0-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 9514fe44a20591910315948420605b9c3f62b8eee46b4f4a929a188dc687f275
MD5 e60f13be96658b95f6e555365bb5daeb
BLAKE2b-256 0399edfaa26045415f0ee802b833936cf6abff940a9a90edd9cbbffcfaf7b82b

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 Pingdom Monitoring Sentry Error logging StatusPage Status page