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.

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

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

Uploaded Python 3Windows ARM64

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

Uploaded Python 3Windows x86-64

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

Uploaded Python 3musllinux: musl 1.2+ x86-64

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

Uploaded Python 3musllinux: musl 1.2+ ARM64

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

Uploaded Python 3manylinux: glibc 2.28+ ARMv7l

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

Uploaded Python 3manylinux: glibc 2.28+ ARM64

copit-0.2.0-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.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl (3.3 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ i686

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

Uploaded Python 3macOS 11.0+ ARM64

copit-0.2.0-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.0.tar.gz.

File metadata

  • Download URL: copit-0.2.0.tar.gz
  • Upload date:
  • Size: 102.5 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.0.tar.gz
Algorithm Hash digest
SHA256 87bef4b914c01eb3cbd8098ba21ef4a664c106166f106f431207c90ed3dac7da
MD5 3a6128a9470a32837f8cbfe07a53eaee
BLAKE2b-256 4a2d81df3888cae3206f8a43face47e7d9c8676687c4f73089c84163c11ce254

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.2.0-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.0-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 466c9e3d63110328ceb6d415d28494285f77eed8af39761fd28178ee469b4846
MD5 7960f46aa411f52b66323dd932e21df3
BLAKE2b-256 17d0aa4d2b91aff6d8506d2fa093beb22d0d5fdd87088c8939698ab5bfd79b9f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.2.0-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.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 f023208ed3731ac51b82a53fa5832f6904c8c5b4ac177403fe6f77d67ff193cf
MD5 92e0ecd428d7dd0d312f0a2bb54bb821
BLAKE2b-256 31ee15c151d43ffa96c9c736f73ff745b05e6ee847975e38960f7d65bd4bd36a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.2.0-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.0-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 618ca554f0f50475834ec34f7f62cacd3f5da99603701aa27f49b614693c3be9
MD5 5b5e610245f3a599b5e0c3be929a231c
BLAKE2b-256 8d4d4bd5a904b3dcfbed01e2537d5058aed1deebb9337ade43246b947ea73c71

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.2.0-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.0-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 e263d7575478e497714eae8eb6726af30b11e3d3c2db67b5448ffe5ff5f309b7
MD5 64477f804dbb5cf01f86d7d73828d5b9
BLAKE2b-256 84c46e664ed6bdfca513e81d85c927221143693e90b084f6b84eefbd7022fe48

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.2.0-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.0-py3-none-manylinux_2_28_armv7l.whl
Algorithm Hash digest
SHA256 779459d7ef79afdd1f8f93e7967e4edc4f97e9a06c31627da4bbf6f751f0d8ce
MD5 f2385b82235bb6dee0d5e2beaf0b4166
BLAKE2b-256 91b9102c82491bc60b5586d7e97eb2b2625726118a5a4adb62e2521e7e15b0ee

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.2.0-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.0-py3-none-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 95eb163d875774e8f83d721c04b360f68b1fc9b69f86b44e83adb7808ee600ce
MD5 00f66677116ff147110f64ea5fc6c66c
BLAKE2b-256 efceee67fc071bfb65a4ca8f51d9a6735633697814ddaa62252ece3306d4cd62

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.2.0-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.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d28e9784457311501d895f87c95a32ea814d3e99768414486dfd37090f65fa1c
MD5 a3daba0e3c8802515434c489eeba9e7a
BLAKE2b-256 208710bae3f7d44d2025ca0548b3a0e60a3579d1bdd1c47df0cfc9b0faa41a8c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.2.0-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.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 af6b1f6d9d075c1cbf03f8879c839406362d25f6d750d210eec7580636a80215
MD5 7ab33bd58641ba0d3486772ec6c8fe40
BLAKE2b-256 4d55b2e182bd91ddf206d173374bd2320d9fa207e460466a996e4a155be6e967

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.2.0-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.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 edd3563e3db1eb60a1de9ba73bca09866fdfea5c8f209b9d5418693958ab0515
MD5 8e52c9c210a3c6d636b17b47ac67d3ee
BLAKE2b-256 d44527b461c87407aa44eec8315e3115ff874b6209502a37068a72f0851123dd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: copit-0.2.0-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.0-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 1fb01f20db3f699dcdf83d9c68e7b658914771b4052d3c61c37d20a7cd5ee771
MD5 8fbc8050ce07b7373ae5d662ac874527
BLAKE2b-256 7a6aad30b1d58adeff644dc64980cdd29791cac0c0800acefb729c988881e9eb

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