Synopsis
Description
capy agents adds a marked Secrets (Capy) section to the repository’s existing AGENTS.md and CLAUDE.md. If neither file exists, it creates AGENTS.md. The section tells an agent to use capy help --json, use error codes rather than message text, and avoid printing or passing secret values as command arguments.
The command finds the Git repository root. Outside a Git repository, it uses the current directory. It updates an existing Capy section in place and preserves content outside the markers.
Use --print to inspect the block without writing. Use --remove to remove only the marked Capy section. If removal leaves a file exactly empty, Capy removes that file.
Writing or removing asks for confirmation in a terminal. In automation, pass --yes; --non-tty prevents prompts and therefore requires --yes for either operation. --dry-run calculates the changes without writing and never prompts.
Flags
--dry-run is a global option, so use either capy --dry-run agents or capy agents --dry-run.
See also
Last modified on October 2, 2026