Single-binary terminal tool for installing Copy4AI architectures and workflows into your project. Same auth and project model as the VSCode Extension.
curl (macOS / Linux):
curl -sSL https://copy4ai.xyz/install.sh | shCargo (Rust toolchain):
cargo install copy4aiManual: download a binary from GitHub Releases and put it on your PATH.
copy4ai completions install # Enable tab-completion (one-time)
copy4ai init # Sign in + pick project + install in one shot
copy4ai status # Show what's installedcopy4ai init is the guided onboarding: it signs you in if you aren't, picks your project (interactively if you have more than one), and either runs sync from an existing .copy4ai.json or scaffolds a new one. For manual control, use copy4ai login && copy4ai project setup <slug> instead.
copy4ai completions install auto-detects your shell and writes a single eval line into your profile (~/.bashrc, ~/.zshrc, PowerShell $PROFILE, etc.). Re-running it is safe — the block is replaced in place. Restart your shell to activate.
copy4ai # Context-aware welcome — shows what's relevant
copy4ai architectures search # Browse the marketplace from the terminal
copy4ai workflow list # ...same for workflows
copy4ai sync # Reinstall everything pinned in .copy4ai.json
copy4ai update # Bump pinned versions to latest
copy4ai update --check # Preview the update plan, write nothing
copy4ai workflow remove <slug> # Uninstall a workflow (deletes its files)
copy4ai doctor # API + auth + workspace diagnosticssync is the team-onboarding command — clone the repo, run copy4ai sync, get the exact same .copy4ai/ state your teammates have. The lock file pins SHAs, so installs are reproducible.
Generate a session token in the dashboard (Settings > CLI Access), then:
COPY4AI_TOKEN=<token> copy4ai project setup my-saas-appThe CLI never writes the token to disk in CI mode — it reads it straight from the environment.
Auth & profile
copy4ai login [--token <t>] [--provider github|google]copy4ai logoutcopy4ai whoami [--json]copy4ai teams list [--json]— show all teams you belong tocopy4ai teams use <slug>— switch the active team
Project lifecycle
copy4ai init— sign in + pick project + install (guided)copy4ai project setup [<slug>] [--dir <path>] [--dry-run]copy4ai status [--check-updates] [--json]— pass--check-updatesto flag pending bumps inline.copy4ai sync [--dry-run] [--force] [--json]— install everything from.copy4ai.json. Skips items whose on-disk SHA already matches the lock; pass--forceto re-install.copy4ai update [<slug>] [--check] [--json]— bump pinned versions; pass a slug to update one.--checkprints the upgrade plan and the recent changelog entries for each item without writing.
Marketplace
copy4ai architectures search [-q|--query <q>] [--stack <csv>] [--type <t>] [--category <c>] [--pricing free|paid] [--min-rating <n>] [--limit <n>] [--sort relevance|popularity|rating|newest] [--json|--plain] [--quiet]copy4ai architectures info <id> [--version <semver>] [--docs] [--json|--plain]copy4ai architectures compare <id-a> <id-b> [--json|--plain]copy4ai architectures check-update [--json|--plain]copy4ai architectures suggest --desc <text> [--stack <csv>] [--limit <n>] [--json|--plain]copy4ai architectures scaffold <id> [--pin-version <semver>] [--project <slug>] [--dir <path>] [--options <json>] [--dry-run] [--json|--plain]copy4ai workflow list [--query <q>] [--category <c>] [--limit <n>] [--json]copy4ai workflow info <slug> [--json]copy4ai workflow install [<slug>] [--version <semver>] [--project <slug>]copy4ai workflow remove <slug> [--keep-files]
Agent-friendly architecture flow
copy4ai architectures search --query "saas monorepo" --json
copy4ai architectures info turborepo-saas-fullstack --docs --json
copy4ai architectures compare turborepo-saas-fullstack nextjs-api --json
copy4ai architectures scaffold turborepo-saas-fullstack --pin-version 2.3.1 --options '{"database":"postgresql"}' --json
copy4ai architectures check-update --json--json emits parseable JSON only on stdout. --plain emits compact numbered text with id: <slug> on every search or suggestion result line. These modes are mutually exclusive.
Diagnostics & shell
copy4ai doctor [--json]— API reachability, auth, lock, workspacecopy4ai self-update [--check] [--json]— upgrade the binary from GitHub Releasescopy4ai completions install [--shell <shell>]
Run copy4ai <command> --help for full flag listings. Run copy4ai with no arguments for a context-aware welcome.
~/.copy4ai/config.toml— user config (active team, output preferences).copy4ai.json— per-project lock file with the architecture/workflow versions and SHAs (commit this to git so teammates install the same content)
| Variable | Purpose |
|---|---|
COPY4AI_TOKEN |
Bypass keychain. Required on headless systems where the OS keychain is not available. |
COPY4AI_TEAM |
Override active team from config. |
COPY4AI_API_URL |
Override API base URL (for local development against a non-production backend). |
COPY4AI_AUTH_PAGE |
Override the OAuth callback page URL (defaults to https://app.copy4ai.xyz/login). |
NO_COLOR |
Disable colored output (standard convention). |
cargo build --release
./target/release/copy4ai --versionTests:
cargo testMIT