Skip to navigation

CLI configuration and automation

Sign in or inject credentials, validate requests, format output for scripts, configure connections, generate completions and skills, and run the CLI in your workspace.
View as Markdown

Install the CLI using CLI. Use sikaru --help for top-level options, and an operation’s --help or --schema for exact arguments.

Set up credentials

UseCredential source
AutomationInject SIKARU_API_KEY through your secret manager.
Interactive, personalOperating-system keyring via sikaru auth login.
Project tokenauth login --with-token, reading the token from standard input.
sikaru auth login
sikaru auth status
sikaru auth logout

sikaru auth login starts device sign-in:

  1. Open the displayed verification URL.
  2. Enter the code if requested.
  3. Approve with your Sikaru account.

The CLI stores the resulting user credentials in its credential store and refreshes them automatically. This signed-in identity can connect your personal apps and secrets.

SIKARU_API_KEY takes precedence when present, so unset it for interactive personal access. Do not put a literal token in shell history. If sign-in expires or is denied, start login again. If refresh is revoked, sign in again.

An environment credential can stay active after keyring logout. Use auth status to identify credential sources, and remove an injected environment variable separately when needed.

Discover and validate a request

sikaru runs start --schema
sikaru runs start --project-id PROJECT --harness-id support --dry-run --json '{"tenant_id":"customer-42","user_id":"user-7","input":{"text":"Analyze this case"},"product_context":{},"policy":{}}'

PROJECT and support stand for your project ID and active agent slug. A dry run validates the request locally. It does not prove that credentials, permissions, resources, or hosted execution are available.

Format output for scripts

sikaru runs get --project-id PROJECT --run-id RUN --format json
sikaru runs get --project-id PROJECT --run-id RUN --query status --format json
sikaru execution-sessions list --project-id PROJECT --format yaml
OptionPurpose
--format jsonStructured output for programs.
--format table or --humanHuman-readable terminal output.
--format yaml or --format csvAlternative serialization for compatible response shapes.
--format jsonlOne compact JSON value per line; arrays are flattened.
--format rawUnmodified response bytes; use for downloads.
--format httpHTTP status, headers, and body.
--query EXPRApply a JMESPath projection before formatting structured output.
--quietSuppress successful stdout output while retaining errors.

Raw output bypasses structured formatting. Use --query status --format json when you extract a field. Scripts should check the process exit status and handle stderr separately.

Configure connection settings

SettingPurpose
SIKARU_BASE_URL or --base-urlThe intended API environment.
SIKARU_TIMEOUT_SECSBounds one HTTP request. Separate from a hosted run’s lifetime and from the native sikaru exec workflow’s --timeout.
SIKARU_PROXY or standard proxy variablesProxy, when needed.
SIKARU_CA_BUNDLEAdditional trusted certificate authorities.
--debugIncludes HTTP diagnostic data. Inspect and redact it before you share logs.

Only GET and HEAD may retry automatically. Mutation commands require reconciliation after uncertain responses. A CLI timeout does not cancel a hosted run: call sikaru runs cancel explicitly when you intend to cancel.

Generate shell completions and the manual

sikaru completion zsh > ./_sikaru
sikaru completion bash > ./sikaru-completion.bash
sikaru man > ./sikaru.1

Install the generated file using your shell’s completion setup. Supported shells are bash, zsh, fish, PowerShell, and elvish.

Integrate with other agents

sikaru generate-skills --output-dir ./sikaru-skills
sikaru --schema

Skill generation writes local instructions for using the public CLI. It does not create a hosted managed agent, deploy a release, or export the hosted agent’s instructions. Review the output before you add it to another agent’s tool environment. For machine execution, use Local compute.

Run in your workspace

sikaru exec --project PROJECT --agent AGENT --workspace /absolute/workspace --prompt "Review this project"

Fresh calls create fresh sessions. Resume only with the returned state_dir and the original workspace. See Local compute for scoped workers, containers, approval parking, and structured exit outcomes.

Next steps