Command-Line Help for copit
This document contains the help content for the copit command-line program.
Command Overview:
copit↴copit init↴copit add↴copit remove↴copit update↴copit update-all↴copit licenses-sync↴copit registry↴copit registry add↴copit registry list↴copit search↴copit info↴
copit
Copy reusable source code into your project
Usage: copit <COMMAND>
Subcommands:
init— Initialize a new copit.toml config fileadd— Add source code from GitHub, HTTP URLs, or ZIP archivesremove— Remove previously copied source filesupdate— Re-fetch specific tracked source(s) by pathupdate-all— Re-fetch all tracked sourceslicenses-sync— Reorganize license files (centralize or restore side-by-side)registry— Configure and inspect component registriessearch— Search a registry's componentsinfo— Show what a component installs
copit init
Initialize a new copit.toml config file
Usage: copit init
copit add
Add source code from GitHub, HTTP URLs, or ZIP archives
Usage: copit add [OPTIONS] [SOURCES]...
Examples: # Copy a single file from GitHub copit add github:owner/repo@v1.0.0/src/utils.rs
# Same, using the short alias copit add gh:owner/repo@v1.0.0/src/utils.rs
# Copy an entire folder from GitHub copit add gh:owner/repo@main/src/helpers
# Copy a raw file from a URL copit add https://example.com/LICENSE-MIT
# Copy a file from a ZIP archive copit add https://example.com/archive.zip#src/utils.rs
# Copy to a specific directory copit add gh:owner/repo@v1.0.0/src/lib.rs --to vendor/
# Install a component from a configured registry, with its dependencies copit add @my-kit/auth copit add @my-kit/cache -y
Arguments:
<SOURCES>— Source(s) to add
Supported formats: github:owner/repo@ref/path - file or folder from a GitHub repo (alias: gh:) https://example.com/file.txt - raw file from a URL https://...archive.zip#path - file or folder inside a ZIP archive
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-y,--yes— Accept the install plan without prompting--dry-run— Show what would be installed and exit--no-deps— Install only the named components, not what they require--no-packages— Do not install package dependencies--variant <VARIANTS>— Registry variant to select, overriding copit.toml (repeatable)--with <WITH>— Also copy an optional file group, e.g.--with tests(repeatable)
copit remove
Remove previously copied source files
Usage: copit remove [OPTIONS] [PATHS]...
Examples: # 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
Arguments:
<PATHS>— Path(s) to remove (as shown in copit.toml)
Options:
--all— Remove all tracked sources
copit update
Re-fetch specific tracked source(s) by path
Usage: copit update [OPTIONS] [PATHS]...
Examples: # 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
Arguments:
<PATHS>— Path(s) to update (as shown in copit.toml)
Options:
--ref <VERSION_REF>— Override the version ref for this update--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-fetch all tracked sources
Usage: copit update-all [OPTIONS]
Examples: # Re-fetch all tracked sources copit update-all
# Re-fetch all with backup for excluded modified files copit update-all --backup
Options:
--ref <VERSION_REF>— Override the version ref (only valid with a single source)--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
Reorganize license files (centralize or restore side-by-side)
Usage: copit licenses-sync [OPTIONS]
Examples: # Move licenses 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:
--no-dir— Move licenses back to side-by-side (remove licenses_dir)-l,--licenses-dir <LICENSES_DIR>— Move licenses into a centralized directory--dry-run— Preview what would be moved without making changes
copit registry
Configure and inspect component registries
Usage: copit registry <COMMAND>
Subcommands:
add— Configure a registry so its components can be installed by idlist— List configured registries
copit registry add
Configure a registry so its components can be installed by id
Usage: copit registry add [OPTIONS] <NAME> <SOURCE>
Examples: # Configure a registry, then install by id copit registry add my-kit github:owner/repo@v1.0.0 --to app/components --variant postgres copit add @my-kit/auth
# Develop a registry locally, before publishing it copit registry add my-kit ../my-registry
Arguments:
<NAME>— Name used in@name/component<SOURCE>— Where the registry lives:github:owner/repo@ref, or a local directory
Options:
--to <TO>— Target directory for this registry's components--index <INDEX>— Index filename within the source; defaults tocopit-registry.json--variant <VARIANTS>— Registry-defined variant to select (repeatable)--package-manager <PACKAGE_MANAGER>— Package manager to use; detected when omitted. Usenoneto never install
copit registry list
List configured registries
Usage: copit registry list
copit search
Search a registry's components
Usage: copit search <REGISTRY> [QUERY]
Examples: copit search @my-kit cache copit search @my-kit # list everything
Arguments:
<REGISTRY>— Registry to search, as@name<QUERY>— Text matched against ids, titles, descriptions and tags
copit info
Show what a component installs
Usage: copit info <COMPONENT>
Examples: copit info @my-kit/auth
Arguments:
<COMPONENT>— Component to describe, as@registry/component
This document was generated automatically by
clap-markdown.