Safety & guardrails
koban is designed so that destructive or externally visible operations are hard to trigger by accident.
Dry-run previews and confirmation gates
--dry-runpreviews the exact request koban would send — method, URL, and body — without contacting the API. Nothing leaves your machine.--yesis required to actually perform a guarded mutation.
Generic resource create / update / delete / bulk / upload / action commands require --yes unless --dry-run is used.
koban invoices delete <id> --dry-run # preview
koban invoices delete <id> --yes # confirm and sendInvoice create / update keep a lighter workflow for ordinary draft edits, but still require --yes when they cause externally visible state changes — for example marking sent, sending email, marking paid, cancelling, saving default footer/terms, or retrying e-send.
Read-only by default for risky surfaces
- Inspect-only resources —
activities,system-logs, andcompany-ledger— expose only safe reads. Import/preimport endpoints are not listable resource families and need a dedicated guarded workflow before they become first-class commands. template/edit-templateuse Invoice Ninja's read-onlyGET /createandGET /{id}/editroutes. They return schema/default payloads and never create or update records.- Custom endpoint overrides (
--endpoint) are read-only and only sendGETrequests. Use first-class resource commands for mutations. - PDF downloads use read-only
GETroutes and write to explicit file paths. Existing files are not overwritten unless--forceis set.
Token redaction
Tokens are read from the environment and never printed by default — not in output, errors, traces, fixtures, or docs.
Live smoke testing
Read-only live smoke tests should use the public demo endpoint (https://demo.invoiceninja.com, token TOKEN) by default. Live write smoke tests must be explicit and should target the public demo API. High-risk endpoints — purges, refunds, merges, imports, scheduler, and admin utility routes — should only be exercised by a dedicated smoke helper that creates and cleans up its own demo data. Production or personal accounts should only be used for intentional checks.