Team-wide access policies and visibility for AI coding agents.
Note
Upgrading from any version before v0.6.x may require deleting ~/.cordon/repos/ and/or cordon uninstall && cordon init in a repository to reset legacy databases.
Database migrations and installation improvements are to be included from v0.6.x onward.
Quick install:
curl -fsSL cordon.sh/install.sh | shFrom GitHub directly:
curl -fsSL https://raw.githubusercontent.com/cordon-co/cordon-cli/main/scripts/install.sh | shInstall a specific version:
curl -fsSL https://raw.githubusercontent.com/cordon-co/cordon-cli/main/scripts/install.sh | CORDON_VERSION=v0.1.0 shWith Go (requires ~/go/bin on PATH):
go install github.com/cordon-co/cordon-cli/cmd/cordon@latestInitialise Cordon in your repository:
cd your-repo
cordon initThe interactive setup will detect installed agents and let you select which ones to enforce policies on.
cordon init [-y|--yes] [--agent]
cordon uninstall
cordon status
cordon version
cordon log [-i|--interactive]
[-f|--follow]
[--export csv]
[--since] [--until] [--date] [--limit]
[--agent] [--file] [--allow] [--deny] [--granted] [--pass]
cordon file list
cordon file add <pattern/path/folder/glob> [--allow] [--prevent-read]
cordon file remove <pattern/path/folder/glob>
cordon command list
cordon command add <command-pattern> [--allow]
cordon command remove <command-pattern>
cordon pass list [--all]
cordon pass issue <pattern/path/folder/command> [--duration 60m|24h|7d|1w|indefinite]
cordon pass revoke <pass-id>
-
All commands accept
--jsonfor structured output. Schemas not finalised at this time. -
<pattern>can be a file path, folder path, glob pattern, or command pattern. Examples:src/main.go,src/,**/*.env,git push *--force*. -
File globs support recursive
**matching. -
Command rules evaluate direct commands and common wrapped forms (for example
sh -candbash -lc).
./scripts/dev-install.sh
# installs to ~/.local/bin/cordon by default
# override with INSTALL_DIR=/usr/local/bin ./scripts/dev-install.sh# current platform
make build
# all release targets (darwin/linux/windows, arm64/amd64)
make build-all VERSION=1.0.0- Binaries are written to
build/. - Cordon CLI is being built against Go 1.22+.
./scripts/test.shRuns both store-level unit tests and CLI integration tests.
When running cordon interactively (without --json and not in --mcp mode), the CLI performs a quick GitHub release check at most once every 24 hours.
~/.cordon/config.jsonsupports:skip_update_check(true/false) to disable daily checkslast_update_check(RFC3339 timestamp), updated automatically after a check attempt
- If a newer release is detected, Cordon prompts:
A new version of cordon-cli is available on github, install the update? [Y/n]:Y(or Enter) runs the installer scriptnprints a reminder aboutskip_update_check
1. Remove Cordon from a repository:
cd your-repo
cordon uninstallThis removes the .cordon/ directory and any agent hook configurations that were added by cordon init.
2. Remove app data (optional):
rm -rf ~/.cordon/This removes credentials, cached policies, audit logs, and other local data.
3. Remove the binary:
If installed via the install script:
rm ~/.local/bin/cordon
# or /usr/local/bin/cordon if that's where it was installedIf installed via go install:
rm ~/go/bin/cordonBusiness Source License 1.1 — see the LICENSE file for details.