Scripts and AI agents
kobana was designed to be called by programs: structured output, errors with codes, introspection and simulation.
In scripts and CI​
#!/usr/bin/env bash
set -euo pipefail
export KOBANA_BILLING_TOKEN="$BILLING_TOKEN"
kobana billing invoices list --params '{"status": "open"}' --page-all --fields "id,total" \
| jq -r '[.id, .total] | @tsv'
- The result goes to stdout, everything else to stderr.
- The exit code says what went wrong:
1API error,2authentication,3validation,4schema,5internal. - Use
KOBANA_<PRODUCT>_TOKENinstead of interactive login, and--env sandboxto test. - Fix
--idempotency-keyon calls that may be retried. - A
.envin the current folder cannot define tokens or credentials: the CLI warns and ignores them. See Environment variables.
With AI agents​
An agent finds out what to do without reading long documentation:
kobana schema --list— which resources exist.kobana schema billing.subscriptions.create— what the endpoint asks for.kobana billing subscriptions create --json '…' --dry-run— the request, with no effect.- The same command without
--dry-run.
Prefer --fields and --page-all to avoid filling the context, and treat every value from outside as untrusted: the CLI validates identifiers against ../, control characters and URL injection, but the decision to send is yours.
Skills​
The repository ships ready-made skills per product (kobana-billing, kobana-finance, kobana-kadu…) for agents that support them.
Documentation for machines​
- Every page is available as Markdown by appending
.mdto the URL. /en/llms.txtis the index;/en/llms-full.txthas everything in a single read.- The Documentation MCP lets the agent search and read pages on its own.