cli/assets/skills/cli/SKILL.md
Use this skill when running Clio CLI commands, building shell scripts with Clio, debugging auth issues, understanding --json output, paginating results, or chaining multi-step accounting workflows from the terminal. Covers all 48 command groups, auth precedence, output formats, entity resolution, and common workflow patterns. Also use when the user asks how to use clio, what commands are available, or how to automate accounting tasks from the command line. Covers all 55 command groups and 274 agent tools.
npx skillsauth add teamtinvio/jaz-ai jaz-cliInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Audience note: for power users and CI/automation. Load this skill only when you're scripting from a terminal, building shell pipelines, or debugging from
clio --jsonoutput. For day-to-day accounting inside Claude Desktop / Cowork, the MCP tools cover the common flows without dropping to the CLI.
You are working with Clio (jaz-clio) — the CLI for the Jaz accounting platform. 55 command groups, 13 calculators, 12 job blueprints, 274 agent tools. Also fully compatible with Juan Accounting (same API, same endpoints).
clio commands from the terminal--json output structure for piping into jq or downstream tools--all, --limit, --offset, --max-rows)| Need | Skill | |------|-------| | CLI command syntax, flags, output | jaz-cli (this skill) | | API field names, error codes, 141 gotchas | jaz-api | | IFRS transaction recipes (depreciation, leases, loans) | jaz-recipes | | Month-end close, bank recon, GST filing workflows | jaz-jobs | | Migration from Xero/QuickBooks/Sage | jaz-conversion |
Use jaz-cli when running commands. Use jaz-api when debugging API errors or understanding field mappings.
Resolution stops at the first match. Higher priority wins silently.
| Priority | Source | How to set |
|----------|--------|------------|
| 1 | --api-key <key> | Per-command flag |
| 2 | JAZ_API_KEY env | export JAZ_API_KEY=jk-... |
| 3 | --org <label> flag | Per-command profile lookup |
| 4 | JAZ_ORG env | export JAZ_ORG=acme-sg (pinned session) |
| 5 | Active profile | clio auth switch <label> (stored in ~/.config/jaz-clio/credentials.json) |
Critical gotcha: If JAZ_API_KEY is set in your shell, it overrides --org and the active profile. Run unset JAZ_API_KEY before switching tenants with clio auth switch.
Auth subcommands:
clio auth add <key> # Validate key + save profile (auto-slugifies org name)
clio auth add <key> --as prod-sg # Save with custom label
clio auth switch <label> # Set active profile
clio auth list # Show all saved profiles
clio auth whoami # Show current org + auth source
clio auth remove <label> # Delete a profile
clio auth clear # Remove all profiles
clio auth shell-init # Print shell exports (for eval)
clio auth unpin # Unset JAZ_ORG from current shell
Every command supports --json. Most list commands also support --format <type>.
| Flag | Format | Use case |
|------|--------|----------|
| (default) | table | Human-readable, colored, truncated at 500 rows |
| --json | json | Structured JSON envelope for piping/scripting |
| --format csv | csv | Spreadsheet import |
| --format yaml | yaml | Config files, readable structured output |
JSON envelope for list commands:
{ "totalElements": 142, "totalPages": 2, "truncated": false, "data": [...] }
When truncated: true, a _meta object appears with fetchedRows and maxRows.
Single-record commands (get, create) output the raw object in --json mode.
Stderr vs stdout: Resolution feedback (e.g., "Contact: Acme Corp (abc1234-...)") goes to stderr. Only data goes to stdout. This means clio invoices list --json | jq . works cleanly.
Flags like --contact, --account, --bank-account, and --tax-profile accept either a UUID or a human-readable name. Resolution order:
Examples:
clio invoices create --contact "Acme" # Fuzzy-resolves to "Acme Corp Pte Ltd"
clio invoices create --contact abc12345-... # UUID passthrough, no API call
clio journals create --account "Bank - SGD" # Resolves by account name
clio journals create --account "1000" # Resolves by account code
IMPORTANT for agents: Fuzzy matching works for
--contactand top-level--accountflags. It does NOT work inside--linesJSON arrays. Line itemaccountResourceIdmust be a UUID or exact account name.
All list/search commands support pagination. Two modes:
Single-page mode (default):
clio invoices list # First 100 results
clio invoices list --limit 50 # First 50 results
clio invoices list --offset 2 # Page 3 (0-indexed)
Auto-paginate mode (--all):
clio invoices list --all # Fetch all pages (concurrent, progress on stderr)
clio invoices list --all --max-rows 500 # Cap at 500 rows
clio invoices list --all --json # Full dataset as JSON (progress suppressed)
Rules:
--all and --offset cannot be combined (throws error)--max-rows is 1,000 (lowered from 10,000 in 2026-04 — fan-out lookups like attachment counts in bills draft list could spiral on busy accounts). Pass --max-rows N explicitly when you need more.--max-rows now caps the FETCH, not just the slice (early-stop in paginatedFetch). Previously it pulled every page then sliced — multi-minute hangs on large datasets.--format json for full output)--json and pipes)bills draft list / invoices draft list / customer-credit-notes draft list / supplier-credit-notes draft list fan out one attachment lookup per draft (5 in flight). On accounts with hundreds of drafts, this is slow even with --max-rows. Pass --max-rows 10 for spot checks; expect 30s+ wall time at higher counts.| Flag | Scope | Purpose |
|------|-------|---------|
| --api-key <key> | All online commands | Override auth for this command |
| --org <label> | All online commands | Use a specific saved profile |
| --json | All commands | Structured JSON output |
| --format <type> | List commands | table, json, csv, yaml |
| --limit <n> | List/search commands | Max results per page |
| --offset <n> | List/search commands | Page offset (0-indexed) |
| --all | List/search commands | Auto-paginate all pages |
| --max-rows <n> | With --all | Cap total rows (default 10,000) |
| --finalize | Create commands | Approve immediately (skip draft) |
| --date <YYYY-MM-DD> | Create/update commands | Transaction date |
| --due <YYYY-MM-DD> | Create/update commands | Due date |
| --query <expression> | Search commands (14 entities) | Jaz search expression (see below) |
| --filter <json> | Search commands | Raw API filter JSON (merged with flags; flags win) |
| --status <status> | Search commands | Filter by status |
| --from / --to | Search/report commands | Date range filter |
| --contact <name> | Transaction commands | Fuzzy-resolve contact |
| --account <name> | Transaction commands | Fuzzy-resolve account |
| --ref <reference> | Search/create commands | Reference string |
| --tag <name> | Search/create commands | Tag filter or assignment |
| --input <file> | Create/update commands | Read full JSON body from file |
| --plan | Recipe commands | Offline plan mode (no auth) |
--query)14 entity search commands accept --query <expression> for human-readable filtering using Jaz search operators. Supported: invoices, bills, customer-credit-notes, supplier-credit-notes, journals, cashflow, bank records, contacts, items, capsules, fixed-assets, subscriptions (scheduled), accounts, tax-profiles.
# Status
clio invoices search --query "status:unpaid"
clio invoices search --query "status:unpaid AND $500+"
clio invoices search --query "(status:paid OR status:partial) AND date:this month"
# Amounts — bare $, ranges, suffixes (k=1k, m=1M, b=1B)
clio invoices search --query '$100-500'
clio invoices search --query 'amount:>2m'
clio invoices search --query 'amount:4k-5k'
# Absolute value — for mixed-sign fields (cashflow, journals)
clio cashflow search --query 'abs:1000+'
# Dates
clio invoices search --query "date:-30d" # last 30 days
clio invoices search --query "due:overdue" # past due + unpaid/partial
clio invoices search --query "date:jan-mar 2025"
clio invoices search --query "date:this quarter"
clio invoices search --query "submitted:last week"
clio invoices search --query "lastpayment:-7d"
# String fields
clio invoices search --query "customer:acme AND ref:INV-*"
clio invoices search --query 'ref:/INV-\d{8}/' # regex
clio invoices search --query '=ref:INV-20260314' # exact match (= prefix)
clio contacts search --query "customer:yes"
clio contacts search --query 'name:"Sakura Trading"'
# Blank / empty
clio invoices search --query "ref:blank"
clio invoices search --query "tag:!blank"
# Negation (never use - for negation)
clio invoices search --query "!status:void"
clio invoices search --query "NOT (status:paid OR status:void)"
# Multi-value (comma = OR)
clio invoices search --query "status:unpaid,partial"
clio invoices search --query "currency:SGD,USD,EUR"
# Combine --query with named flags (named flags win on conflict)
clio invoices search --query "date:this year" --status UNPAID
# Inline sort
clio invoices search --query "status:unpaid sort:amount:desc" --limit 10
Gotchas:
--query "status:BADVALUE") return empty results silently — no error.query_not_understood).--query flag (background-jobs, tags, contact-groups, etc.).- for negation — it means negative amount (e.g. $-500 = amount is -500). Use ! or NOT.See references/search-reference.md for the full syntax spec.
Create/update commands accept payloads three ways (priority order):
--input <file> — read JSON from a fileecho '{"contact":...}' | clio invoices create--contact "Acme" --date 2026-01-15 --lines '[...]'When --input or stdin provides a body, CLI flags are ignored.
For invoices and bills, there are TWO bulk-upsert commands per entity:
clio invoices bulk-upsert / clio bills bulk-upsert) — ONE line per row. Each row carries itemDescription + totalAmount + invoiceAccountResourceId (or billAccountResourceId) at the top level. Use for CSV-like imports where each row = one transaction with a single line.clio invoices bulk-upsert-line-items / clio bills bulk-upsert-line-items) — multi-line per row. Each row carries nested lineItems[] with per-line itemDescription + quantity + unitPrice + accountResourceId. Use when each transaction needs multiple lines.Sending lineItems[] to the FLAT endpoint silently ignores them and creates a $0 transaction. Sending the FLAT shape to the NESTED endpoint creates an empty lineItems array and 422s. Match the variant to your data shape.
Transactions: invoices, bills, customer-credit-notes, supplier-credit-notes, journals, cash-in, cash-out, cash-transfer, payments, cashflow
Contacts & Configuration: contacts, contact-groups, accounts, items, tags, currencies, currency-rates, tax-profiles, custom-fields, bookmarks, nano-classifiers
Bank & Reconciliation: bank (accounts, get, records, add-records, import, auto-recon), bank-rules
Fixed Assets & Inventory: fixed-assets (alias: fa), inventory (alias: inv)
Subscriptions & Schedulers: subscriptions (alias: subs), schedulers
Reports & Exports: reports (16 report types), exports
AI & Automation: magic (create, status, search, split), quick-fix, capsules, capsule-transaction (alias: ct, 13 recipe types)
Calculators: calc (loan, lease, depreciation, prepaid-expense, deferred-revenue, fx-reval, ecl, provision, fixed-deposit, asset-disposal, accrued-expense, leave-accrual, dividend)
Jobs: jobs (month-end, quarter-end, year-end, bank-recon, gst-vat, payment-run, credit-control, supplier-recon, audit-prep, fa-review, document-collection, statutory-filing) + tools (match, outstanding, ingest, sg-cs, sg-ca)
Organization: org (info), org-users, auth
Introspection: schema (list groups, inspect tools, show params), health (version, connectivity, environment checks)
Utilities: help-center (alias: hc), context, mcp, serve, init, versions, update
See references/command-catalog.md for the full catalog with subcommands and flags.
Offline commands (no auth needed): calc, jobs (blueprints only), capsule-transaction --plan, help-center, init, versions, update
Everything else requires authentication (API key).
CLI commands exit with standard codes:
Error messages go to stderr. When --json is set, the error is still on stderr so stdout stays parseable. Common errors:
# Missing required flag
Error: missing required option(s): --contact, --lines
# Fuzzy resolution ambiguity
Multiple contacts match "Acme":
Acme Corp Pte Ltd (92%)
Acme Holdings (87%)
Be more specific, or use the full billingName.
# Auth not configured
No API key configured. Run `clio auth add <key>`, set JAZ_API_KEY, or pass --api-key.
# API validation error (422)
API error 422: lineItems[0].accountResourceId is required when saveAsDraft is false
Transaction create commands (invoices, bills, customer-credit-notes, supplier-credit-notes, journals) perform client-side draft validation before hitting the API. The validation:
--finalize is set, validates that every line item has accountResourceIdThis catches mistakes before the API call, saving round-trip time and providing clearer error messages.
The capsule-transaction (alias: ct) command group is the most powerful CLI feature. Each subcommand:
clio calc)Two entry paths:
--input (account mapping) or let it auto-resolve from your chart of accounts--existing-txn <id> to skip the initial transaction and create only the delta (e.g., attach depreciation to an existing purchase bill)Plan mode (--plan) is offline and shows what accounts are needed and what steps will be created, without making any API calls.
# Plan mode — see what's needed (offline)
clio ct loan --principal 100000 --rate 5 --term 60 --plan
# Execute with auto-resolve (uses fuzzy matching against your chart of accounts)
clio ct loan --principal 100000 --rate 5 --term 60 --start-date 2026-01-01 --ref LOAN-001
# Execute with explicit account mapping
clio ct loan --principal 100000 --rate 5 --term 60 --start-date 2026-01-01 \
--input account-mapping.json --bank-account "Bank - SGD" --contact "HSBC"
clio invoices list --json | jq '.data[] | {ref: .reference, amount: .totalAmount}'clio contacts list --all --format csv > contacts.csvclio invoices list --org acme-sg --json && clio invoices list --org acme-ph --jsonsaveAsDraft: false). Use --finalize to create a finalized transaction immediately. Note: cash entries (cash-in, cash-out) do NOT override — they follow the API default (saveAsDraft: false, i.e. finalized).--input with the same JSON to get consistent results. The API dedup guards catch duplicate contacts, items, and accounts.--json | jq length before piping IDs into quick-fix.clio calc commands need no auth -- use them to explore scenarios before committing with clio ct.clio hc "how to reconcile" searches the full Jaz help center locally (hybrid: embeddings + keyword).See references/common-workflows.md for end-to-end multi-command patterns.
get afterward for full data.See references/agent-gotchas.md for the full list of 15 gotchas. See references/output-shapes.md for --json output structures. See references/error-recovery.md for 30+ error patterns with fixes.
tools
Use this skill whenever an accounting practitioner is doing client work in Jaz — closing the books, filing GST, year-end statutory, onboarding a new client. Covers the practitioner workspace at ~/Documents/Jaz Practice (clients/<slug>/CLIENT.md and engagements/<slug>/ENGAGEMENT.md), engagement routing (monthly-close | quarterly-gst | annual-statutory | onboarding | adhoc), and how the agent loads client context before invoking jaz-jobs blueprints, jaz-recipes recipes, and jaz-api tools. Triggers on intent like "close the books for X", "file GST for Y", "onboard new client Z", "what's outstanding for Acme this month". Pair with jaz-jobs (workflow blueprints), jaz-recipes (IFRS recipes + calculators), jaz-api (REST gotchas), and jaz-conversion (data migration during onboarding).
tools
Use this skill when answering ad-hoc data questions that aren't covered by download_export (canonical reports — anomaly, audit, aging, P&L, BS, GL, statement of account) or search_* tools (entity listings with structured filters). Pseudo-SQL is a read-only DSL against Jaz's curated reporting schema — single SELECT statement, ≤100 row sync preview or full async CSV export. Tools: get_pseudo_sql_schema (call FIRST — returns live catalog + downloadable jaz-pseudo-sql.md skill body), preview_pseudo_sql, export_pseudo_sql, get_pseudo_sql_export, run_pseudo_sql_and_download.
tools
Use this skill when answering ad-hoc data questions that aren't covered by download_export (canonical reports — anomaly, audit, aging, P&L, BS, GL, statement of account) or search_* tools (entity listings with structured filters). Pseudo-SQL is a read-only DSL against Jaz's curated reporting schema — single SELECT statement, ≤100 row sync preview or full async CSV export. Tools: get_pseudo_sql_schema (call FIRST — returns live catalog + downloadable jaz-pseudo-sql.md skill body), preview_pseudo_sql, export_pseudo_sql, get_pseudo_sql_export, run_pseudo_sql_and_download.
tools
Use this skill whenever an accounting practitioner is doing client work in Jaz — closing the books, filing GST, year-end statutory, onboarding a new client. Covers the practitioner workspace at ~/Documents/Jaz Practice (clients/<slug>/CLIENT.md and engagements/<slug>/ENGAGEMENT.md), engagement routing (monthly-close | quarterly-gst | annual-statutory | onboarding | adhoc), and how the agent loads client context before invoking jaz-jobs blueprints, jaz-recipes recipes, and jaz-api tools. Triggers on intent like "close the books for X", "file GST for Y", "onboard new client Z", "what's outstanding for Acme this month". Pair with jaz-jobs (workflow blueprints), jaz-recipes (IFRS recipes + calculators), jaz-api (REST gotchas), and jaz-conversion (data migration during onboarding).