Skip to main content

First commands

1. Install and sign in​

curl -fsSL https://raw.githubusercontent.com/universokobana/kobana-cli/main/scripts/install.sh | bash
kobana billing auth login

Check that it worked with me, which shows who the token belongs to (person and organization), its scopes and expiry, without exposing the token:

kobana billing me

If it fails, see Troubleshooting.

2. Find out what exists​

The whole surface shows up in --help, at any level:

kobana --help # the products
kobana billing --help # the Automatic Billing resources
kobana billing invoices --help # the invoice commands

Everything the CLI accepts is also in the Manual.

3. Read data​

kobana billing subscriptions list --fields "id,status,plan_id"
kobana billing invoices get INVOICE_ID

Output is JSON by default. For a table: --output-format table. See Output.

4. Filter and paginate​

kobana billing subscriptions list --params '{"status": "active"}'
kobana billing subscriptions list --page-all --fields "id,status"

--page-all walks through all the pages and prints one JSON line per record. See Pagination.

5. Change data safely​

Before writing, look at the request that would be sent:

kobana billing invoices finalize INVOICE_ID --dry-run

Only then remove --dry-run. See Safe writes.

6. Ask the schema​

kobana schema billing.subscriptions.create

It shows parameters, required fields and responses, without leaving the terminal. See Schema.

Next steps​