exactcli
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
Command-line interface for the Exact Online REST API.
exactcli gives you raw, host-locked access to every Exact Online resource with OData
filters and paging, plus typed commands for the accounting ledgers. JSON output,
deterministic exit codes and a --jq filter make it a clean way to drive Exact Online
from scripts, CI pipelines and AI agents.
Not affiliated with Exact. Exact Online is a trademark of Exact Group B.V.
Documentation: wavyx.github.io/exactcli.
Install
Node.js 22 or newer. Tokens go to the OS keychain (macOS Keychain, Windows Credential
Manager, libsecret on Linux); exactcli refuses to write them to disk.
--jq needs the jq binary. npm install -g @wavyx/exactcli may skip the download of
node-jq, so install jq (brew install jq, apt install jq,
winget install jqlang.jq) and set JQ_PATH=/path/to/jq, or run
npm rebuild node-jq inside a project install. Every other command works without jq.
Authenticate
Exact Online supports the OAuth 2.0 authorization code flow only, and it requires a
public HTTPS redirect URI (localhost is rejected). exactcli runs a local callback
server and exposes it through an ngrok static domain.
1. Claim a static domain in your ngrok account and install ngrok.
2. Run exactcli auth login. The command prints the redirect URI,
https:// /callback.
3. Register an app with the printed redirect URI. Copy the Client ID and the Client
Secret. The route depends on your subscription:
- A customer subscription registers an internal app in Exact Online: Company name >
Import/Export > Other: App registrations > New. It needs the Manage apps role and
serves only the users of that subscription.
- A developer subscription has no such menu. Register the app in the App Store:
Manage my apps > Demo apps. A demo app serves only the users of the developer
subscription.
The authentication guide
shows every step.
4. Run exactcli auth login again, paste the Client ID and the Client Secret, and sign
in in the browser that opens. The command stores the tokens in the keychain and
remembers your division.
No running tunnel? Use exactcli auth login --manual. It still needs the HTTPS redirect
domain of your app. Open the printed URL yourself and paste the redirected URL (or the
code) back into the terminal.
Tokens refresh automatically. A refresh token that stays unused for 30 days expires:
run any command at least once a month, or log in again.
Quick start
Any resource from the
REST API reference works
with list, get and api: pass the service/Resource path, for example
salesentry/SalesEntries, financial/GLAccounts, documents/Documents.
Commands
| Topic | Commands |
| -------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| auth | login, logout, status |
| profile | list, use, current |
| config | get, set, list, unset |
| division | list (--scope), use, current |
| account, contact, item | list, create, update, delete |
| gl-classification, item-group, currency | list |
| address, bank-account, exchange-rate | list, create, update, delete |
| gl-account, journal, vat-code, payment-condition, cost-center, cost-unit | list, create, update, delete (payment-condition: list, create) |
| financial-period, balance, budget, revenue, profit-loss | list |
| aging-receivable, aging-payable, aging-overview, receivables-list, payables-list | list |
| sales-entry, purchase-entry | list, lines, create (with --file), update, delete, line-add, line-update, line-delete |
| journal-entry | list, lines, create, delete |
| bank-entry | list, lines, create, delete, line-add |
| cash-entry | list, lines, create, delete, line-add |
| transaction-line, opening-balance | list |
| mandate | list, create, update, delete |
| sales-invoice | list, lines, update, delete, print, line-add, line-update, line-delete |
| invoice | create |
| purchase-invoice, purchase-order | list, lines, create, update, delete (purchase-order adds line-add, line-update, line-delete) |
| quotation | list, lines, create, update, delete, accept, reject, reopen, review, print, email, line-add, line-update, line-delete |
| sales-order | list, lines, create, update, delete, invoice, invoice-result, complete, complete-line, print, line-add, line-update, line-delete |