Browse documentation

AI agents

Use the Anectico CLI

Investigate and operate Anectico from a terminal or coding agent.

The Anectico CLI provides scriptable access to customer timelines, Issues, logs, traces, alerts, and the rest of the public platform surface.

Install

go install github.com/anectico/anectico/cli/cmd/anectico@latest
anectico version --output table

Use @main only when testing the current source before a tagged CLI release. For automation, anectico version --output json returns the installed executable’s name and injected release version without loading a profile or credentials. The conventional anectico --version flag remains available as plain text.

Authenticate

Humans can use the browser device flow:

anectico login
anectico whoami

For CI or an AI agent, use a narrowly scoped API key:

export ANECTICO_API_KEY="an_..."
anectico doctor

The managed service uses https://app.anectico.com for REST commands and https://api.anectico.com for telemetry sent by anectico send. Use ANECTICO_API_URL and ANECTICO_INGEST_URL to set those origins explicitly. For local development, the corresponding defaults are http://localhost:8081 and http://localhost:4318. anectico doctor checks both origins without writing telemetry.

Select a project

anectico projects use my-app

Commands use that project until you override it with a flag or profile.

Investigate a customer

anectico persons search [email protected]
anectico persons timeline <person-id>
anectico issues list --status new
anectico issues affected <issue-id>
anectico logs query --level error --since 1h
anectico logs query --since 2026-08-02T21:58:18Z --until 2026-08-02T22:07:15Z
anectico incidents watch <incident-id> --timeout 30m --output json

Commands whose help exposes the shared --since / --until window accept a positive duration such as 30m, 6h, or 7d, or an exact RFC 3339 timestamp for either bound. Exact timestamps require Z or a numeric offset and are normalized to UTC before the request. Numeric offsets make repeated or skipped daylight-saving wall times unambiguous; named local time zones are not accepted. --until must resolve to an instant after --since.

Pipe output to another process to receive JSON. Interactive terminals receive readable tables. Full-surface passthrough commands render a lossless PATH / TYPE / VALUE tree in table mode, including nested and empty containers; use --output json whenever another program consumes the result. Non-interactive failures are one JSON object on standard error with error, message, and exit_code. API failures also include the real HTTP status; local failures omit status. For anectico send, throttled responses also preserve the server’s Retry-After value as retry_after so automation can back off without parsing message text. Unknown commands, bad flags, invalid local values, and missing or extra arguments exit with code 2.

anectico incidents watch writes newline-delimited JSON: one current snapshot, then each newly appended timeline event with an opaque cursor. Restart it with the last successfully processed cursor to resume without replaying accepted events. The cursor is bound to the incident and project and is verified against the event ID and database sequence returned by the case-file API; a missing or changed resume point stops with an error. Temporary transport, HTTP 408/429, and 5xx state is reported only on stderr as reconnecting/connected records. Use --timeout, --max-polls, --max-events, and --max-transient-errors to bound an automated observation window. Existing timeline history is skipped unless --include-existing is set. --include-existing starts a fresh replay and cannot be combined with --cursor.

Give the CLI to an agent

anectico skill install claude
anectico skill install codex
anectico skill install cursor
anectico docs

The generated command manifest lets an agent discover the installed CLI instead of relying on a copied command list.

Look up commands and flags

Every command supports --help. Use it at the group or leaf level:

anectico issues --help
anectico incidents create --help

The CLI command reference lists all current commands with their positional arguments, aliases, command-specific flags, defaults, and behavior. It is generated from the same command tree as anectico docs, so it is not a manually maintained shortlist.

Writes and automation

Destructive CLI commands require an explicit --yes. In CI, use a dedicated key, a fixed project, and JSON output. Never give an automation a human administrator key.

Exact telemetry deletion uses the active project from --project, ANECTICO_PROJECT, or the selected profile:

anectico traces delete <trace-id> --yes
anectico logs delete <32-character-uppercase-log-id> --yes

The log command accepts only the canonical log ID; timestamp, trace, and span coordinates are not a deletion identity. Both commands preserve the server’s idempotent, durable-suppression contract.