Loading...
Loading...
Queries, creates, updates, and manages QuickBooks Online data via the qbo CLI. Use when working with QBO entities (invoices, customers, bills, payments, vendors, accounts, items, estimates), running reports, or setting up install, auth, sandbox, and company switching.
npx skill4agent add voska/qbo-cli qbo# macOS / Linux
brew install voska/tap/qbo
# Scoop (Windows)
scoop bucket add voska https://github.com/voska/scoop-bucket && scoop install qbo
# Go (any platform)
go install github.com/voska/qbo-cli/cmd/qbo@latest
# Binary: https://github.com/voska/qbo-cli/releaseshttp://localhost:8844/callbackqbo auth loginhttps://auth.yourdomain.com--redirect-uriQBO_REDIRECT_URIhttps://yourdomain.com?code=...&realmId=...&state=...qbo auth loginexport QBO_CLIENT_ID=your_client_id
export QBO_CLIENT_SECRET=your_client_secret
# Sandbox — uses localhost callback automatically
qbo auth login --sandbox
# Production — specify your redirect URI
qbo auth login --redirect-uri https://yourdomain.com
# Or set it as env var / config so you don't need the flag every time
export QBO_REDIRECT_URI=https://yourdomain.com
qbo auth login
# Print the URL without opening a browser (useful for agents/remote)
qbo auth login --manualqbo auth login~/.config/qbo/tokens/qbo auth status
qbo company info --sandbox --jsonexport QBO_COMPANY_ID=<realm_id>qbo company switch <realm_id>| Problem | Fix |
|---|---|
| |
| Use |
| OAuth state mismatch | Restart |
| Token expired | |
listquery{"QueryResponse": {"Invoice": [...], "startPosition": 1, ...}}--results-onlyget{"Invoice": {...}}qbo get invoice 123 --json | jq '.Invoice'createupdategetreport{"Header": {...}, "Rows": {...}}--json# List with filtering — --results-only gives you the array directly
qbo list customers --sandbox --json --results-only
qbo list invoices --where "Balance > '0'" --sandbox --json --results-only
# Get by ID — drill into entity key with jq
qbo get invoice 145 --sandbox --json | jq '.Invoice'
qbo get customer 58 --sandbox --json | jq '.Customer | {Id, DisplayName, Balance}'
# Create from stdin
echo '{"DisplayName":"Acme Corp"}' | qbo create customer -f - --sandbox --json
# Create from file
qbo create invoice -f invoice.json --sandbox --json
# Record a payment against an invoice
echo '{"CustomerRef":{"value":"58"},"TotalAmt":500,"Line":[{"Amount":500,"LinkedTxn":[{"TxnId":"145","TxnType":"Invoice"}]}]}' | qbo create payment -f - --sandbox --json
# Sparse update (partial)
echo '{"Id":"58","SyncToken":"0","DisplayName":"New Name"}' | qbo update customer 58 --sparse -f - --sandbox --json
# Reports
qbo report profit-and-loss --start-date 2026-01-01 --end-date 2026-12-31 --sandbox --json
qbo report balance-sheet --sandbox --json
# Raw query
qbo query "SELECT Id, DisplayName, Balance FROM Customer WHERE Active = true" --sandbox --json --results-only# 1. Create customer
echo '{"DisplayName":"New Client","PrimaryEmailAddr":{"Address":"client@example.com"}}' \
| qbo create customer -f - --sandbox --json | jq '.Customer.Id'
# 2. Create item (service)
echo '{"Name":"Consulting","Type":"Service","IncomeAccountRef":{"value":"1"},"UnitPrice":150}' \
| qbo create item -f - --sandbox --json | jq '.Item.Id'
# 3. Create invoice (use IDs from above)
echo '{"CustomerRef":{"value":"CUSTOMER_ID"},"Line":[{"Amount":1500,"DetailType":"SalesItemLineDetail","SalesItemLineDetail":{"ItemRef":{"value":"ITEM_ID"},"Qty":10,"UnitPrice":150}}]}' \
| qbo create invoice -f - --sandbox --json | jq '.Invoice | {Id, DocNumber, TotalAmt}'
# 4. Record payment
echo '{"CustomerRef":{"value":"CUSTOMER_ID"},"TotalAmt":1500,"Line":[{"Amount":1500,"LinkedTxn":[{"TxnId":"INVOICE_ID","TxnType":"Invoice"}]}]}' \
| qbo create payment -f - --sandbox --jsonqbo schema --json # Full CLI tree, all entities, all flags
qbo schema get --json # Schema for a specific command
qbo exit-codes --json # Exit codes as JSON