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 login.
Project tokensikaru login --with-token, reading the token from standard input.
sikaru login
sikaru doctor
sikaru logout

sikaru login starts device sign-in in your browser (--no-browser prints the link instead):

  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 sikaru logout. sikaru login warns when SIKARU_API_KEY is set; remove an injected environment variable separately when needed. sikaru doctor checks that the active credential can reach your project.

Discover and validate a request

sikaru agent runs start --schema
sikaru agent 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 agent runs get --project-id PROJECT --run-id RUN --format json
sikaru agent runs get --project-id PROJECT --run-id RUN --query status --format json
sikaru agent 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 sikaru agent run’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 agent stop RUN 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 agent run AGENT -p PROJECT --compute local -C /absolute/workspace "Review this project"

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

Next steps