Skip to main content
ancha init prepares the current directory for ancha run. It writes files only; it installs no dependencies, starts no agent and makes no network calls.

Example

Output
Here package.json had a start script and depended on @slack/web-api and @octokit/rest, so the starter covers Slack and GitHub. The last line is the next command.

The start command

Without --agent, init reads the first of these that names a command, and never runs anything: --agent "<command>" overrides them. When nothing names a command, ancha.yaml has no agent and the output ends with next: set agent.command in ancha.yaml, then ancha run.

The tools it detects

init reads package.json, requirements.txt, pyproject.toml and Pipfile for known SDKs: @slack/web-api, @slack/bolt, slack_sdk and slack-bolt for Slack; @octokit/rest, octokit and PyGithub for GitHub; @datadog/datadog-api-client and datadog-api-client for Datadog; @pagerduty/pdjs, pdpyras and pagerduty for PagerDuty. The starter scene covers the tools it finds, so any agent that reaches each of them passes it. With no recognized SDK it covers all four, and the output says so. The detected language also sets the default for ancha connect --lang.

Files it writes

Both instruction files tell a coding agent to run the CLI as npx -y @ancha-labs/cli <command> until it is installed, and as ancha <command> afterwards. See For coding agents. Running init again keeps every existing file and reports it as preserved.

The starter scene

The starter checks that your agent can reach each tool, with any HTTP method and a path only that tool serves. It is meant to be replaced with checks of real work. The world is static and the time limit is 10 seconds. The reference companions show what passing and failing look like. Never configure them as the agent under test, and never show them to it.

Incident scenes

ancha init --template incidents writes 31 files: the same instructions plus five living-world incident scenes under scenes/incidents/, each with reference companions, a shared fixtures folder and a README. Each has a 10-minute time limit.

JSON output

detection.agentSource is explicit, package.json, Procfile, pyproject.toml, Dockerfile or unconfigured. updated lists files init appended to, and skipped the files it preserved with the reason.

Exit codes

0 on success. 2 for an unknown template, an empty --agent, or an unsafe destination.