Skip to main content

Use the CLI

Initialize and refresh repository guidance

Connect a Git repository to an accessible alterac.ai project and refresh its local guidance.

Initialize a Git repository once to select its alterac.ai project and create the repository-local configuration.

Initialize the repository

Run this from the repository root.

alterac-ai init

The command signs you in when authentication is missing, lets you select an accessible project when needed, asks for a coding-agent trust mode and managed instruction files, then writes .alterac-ai/config.yaml. It also installs or refreshes the repository-local alterac.ai guidance. The managed root block tells AGENTS.md or CLAUDE.md readers that a literal task-work-run-id=[GUID] marker identifies an alterac.ai work run, routes it through .alterac-ai/process.md before implementation, and tells the agent not to route it through another task system. When both files are selected, CLAUDE.md imports the managed AGENTS.md rule.

Before queueing work, prepare the repository for task worktrees. Ignored dependencies, secrets, and other machine-local inputs do not automatically appear in a linked worktree.

Refresh local guidance

Use this after alterac.ai publishes updated repository guidance.

alterac-ai docs-update

docs-update keeps the existing managed instruction-file choice. Use --force when you need to refresh even when the installed version appears current.

The alterac.ai-managed section in each selected instruction file ends with <!-- alterac.ai-managed guidance. Repository-specific instructions below. -->. Put your repository instructions below that marker. init and docs-update may replace the managed section, but preserve content below it.

Recover from setup problems

If you do not have access to a project, create or join one in alterac.ai and run init again. If the repository was not initialized, run init before commands that need a selected project. See CLI command reference for exact behavior.