Skip to main content

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

Project description

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

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

copit sync

Re-fetches all tracked sources in copit.toml.

# Re-fetch all tracked sources
copit sync

# Re-fetch all with backup for excluded modified files
copit sync --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

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:

[project]
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"
exclude_modified = ["Cargo.toml", "src/lib.rs"]
  • ref: The user-specified version string (branch/tag/sha)
  • commit: Resolved commit SHA from GitHub API (optional, GitHub sources only)
  • exclude_modified: List of relative paths (within source folder) to skip on re-add. With --backup, the new version is saved as <file>.orig.

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.2.1.tar.gz (103.4 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.2.1-py3-none-win_arm64.whl (3.2 MB view details)

Uploaded Python 3Windows ARM64

copit-0.2.1-py3-none-win_amd64.whl (3.1 MB view details)

Uploaded Python 3Windows x86-64

copit-0.2.1-py3-none-musllinux_1_2_x86_64.whl (3.6 MB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

copit-0.2.1-py3-none-musllinux_1_2_aarch64.whl (3.2 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

copit-0.2.1-py3-none-manylinux_2_28_armv7l.whl (2.8 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ ARMv7l

copit-0.2.1-py3-none-manylinux_2_28_aarch64.whl (3.2 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ ARM64

copit-0.2.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.5 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

copit-0.2.1-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl (3.3 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ i686

copit-0.2.1-py3-none-macosx_11_0_arm64.whl (3.3 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

copit-0.2.1-py3-none-macosx_10_12_x86_64.whl (3.4 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: copit-0.2.1.tar.gz
  • Upload date:
  • Size: 103.4 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.2.1.tar.gz
Algorithm Hash digest
SHA256 a8304d88228be21f8f41c8610d0cce812ad1f6575eb033c909a9c059e502b29d
MD5 e318754139b29beaad5825e8d2e1e022
BLAKE2b-256 ff0e732dc9680f7a0fc2fa3fef3cb477d1442ddf4cafb3272122e4b2622d8e8a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.2.1-py3-none-win_arm64.whl
  • Upload date:
  • Size: 3.2 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.2.1-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 5e284a9fcee611524033199174cad49071e25511fd1bc47734c0df8cd1cce818
MD5 82155aff033db2ed5ea3376f2a4d4d35
BLAKE2b-256 78280d94b2f79677ddb256adb2da14262e6fc5cf6bfae34827017f5b63b6d9d2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.2.1-py3-none-win_amd64.whl
  • Upload date:
  • Size: 3.1 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.2.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 39d856e59adead53ff2fe30cc049de0280b8b88d0318be7feaa5cf340bf7d041
MD5 1f7acfdf8cb4c77d3641d5220e95bc5d
BLAKE2b-256 d0374e05a89989c43ad7a10a2a398028713c7b8d08cf6fed6b9b7a8c99545e2a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.2.1-py3-none-musllinux_1_2_x86_64.whl
  • Upload date:
  • Size: 3.6 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.2.1-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 7a0a894c659f7dadb5970ddf8d07283073bcf77793ce6992a0ba04794af308e3
MD5 6488033c41e38ebd96f4fb6742a08b7d
BLAKE2b-256 c65833b0a5b7a48726f96da186644372b597d227d53b3cd0259fe40c48aece69

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.2.1-py3-none-musllinux_1_2_aarch64.whl
  • Upload date:
  • Size: 3.2 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.2.1-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 f9ffcf232a4e1c3718a13967c08acd76e25ea85eb39f157a0b0704a67a84eb66
MD5 d6cadd04cb67f1d360a0c3aa0508a1c4
BLAKE2b-256 3f4858c5a061fb506d48a688b5812a538df688081a433af5ac539d928b593038

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.2.1-py3-none-manylinux_2_28_armv7l.whl
  • Upload date:
  • Size: 2.8 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.2.1-py3-none-manylinux_2_28_armv7l.whl
Algorithm Hash digest
SHA256 ed2b636b4661632e2ce3a91b09c155169fa26feae93465062a408db312c72209
MD5 619c1ec22e44368d8a6261bf0236a825
BLAKE2b-256 ddd6506527ab8c2c089b4b070390de7a20bac0232a78a37e77cf1233c9b35c5d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.2.1-py3-none-manylinux_2_28_aarch64.whl
  • Upload date:
  • Size: 3.2 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.2.1-py3-none-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 99e7b2d2a640dc5635130479bb87411267b03fb31fbb6030713e95d393b1796c
MD5 b7d9eb24928fecaca49df97840e96a20
BLAKE2b-256 1f5456bb8b99028f45040cfb80ec6057cc6567e49677af5223e076b2f23c5d43

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.2.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 3.5 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.2.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 75569a79c1c593a8ede60b33e1ea518b5cc7d111423c3fa98ad44dfa9fd3e7cb
MD5 9fb65ffc33baf60d6ed6ff554e2726de
BLAKE2b-256 e0a75f6f5d5fed59afa35dabc8b369a9b081d716f99d3dccedafd1ee867d431e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.2.1-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
  • Upload date:
  • Size: 3.3 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.2.1-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 56dd1416276c4caf3f949d7c925caac84c4f4066e4cff1a35bedb310c20a8628
MD5 d01499c99a40a80cca5c01f80de07e29
BLAKE2b-256 15a44c23f1a8db64e8e5e3f385a3e41f3bb0e6e3eb3fe50ef4bcba98d715b082

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.2.1-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 3.3 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.2.1-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7f9e445735f8ed53ff6fcbafc0fefcf0cb1b9bdff6465bd716d24465d9d98d0f
MD5 25853560a30d361300e67df7e9433cca
BLAKE2b-256 17c48a5e4bfa3b5474b4e3b2c44d90cd6cf83f0ced4eb736e9abd3e51f1de380

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.2.1-py3-none-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 3.4 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.2.1-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 2fa699da94bd2892d8e91e52d285eb8c26d035c3016196953653115014455bf9
MD5 888cdf95585c17d8bc9bbff231ccbb30
BLAKE2b-256 c41c5ed0069e253aa9f615f4b4e2338dd9ae03663201a9159549ba555fc2f21a

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