@usefin/plugin-accounting
v0.1.0
Published
Accounting provider plugins for fin CLI
Readme
@usefin/plugin-accounting
Accounting provider plugins for the fin CLI. Only supported (GA) providers are exposed (Xero, QuickBooks, FreshBooks, Zoho Books). Adds list, get, create, update, and delete commands using the shared command grammar. When authenticated, commands use the real provider API; use --data '{"key":"value"}' for create and update.
Installation
The plugin is included when you install the main usefin CLI. To use it as a dependency:
pnpm add @usefin/plugin-accounting @usefin/cliOr from the monorepo: the core package already lists @usefin/plugin-accounting in oclif.plugins.
Auth setup
Accounting providers use either OAuth2 or API key depending on the provider.
- API key:
usefin auth:login <provider> --api-key YOUR_KEY(e.g. Wafeq, Tripletex, RealBooks, TrulySmall, Built Accounting). - OAuth2:
usefin auth:login <provider> --interactive(browser-based flow; implementation may vary per provider).
Check status:
usefin auth:status
usefin doctorUsage
All commands support --json, --csv, --jsonl, --filter, --limit, --interactive, --dry-run, --audit, and --verbose.
Providers (supported — exposed in CLI)
| Provider | Topic | Auth |
|----------|-------|------|
| QuickBooks Online | quickbooks | OAuth2 |
| Xero | xero | OAuth2 |
| FreshBooks | freshbooks | OAuth2 |
| Zoho Books | zohobooks | OAuth2 |
Base objects (all providers)
List: usefin <provider>:<object>:list [--status ...] [--limit N]
Get: usefin <provider>:<object>:get <id>
Create: usefin <provider>:<object>:create --data '{"key":"value"}'
Update: usefin <provider>:<object>:update <id> --data '{"key":"value"}'
Delete: usefin <provider>:<object>:delete <id>
The --data flag is required for create and update; pass a JSON object as the request body.
| Object | Example list | Example get |
|--------|--------------|-------------|
| accounts | usefin xero:accounts:list | usefin xero:accounts:get ac_xxx |
| invoices | usefin quickbooks:invoices:list --status overdue | usefin quickbooks:invoices:get inv_xxx |
| bills | usefin xero:bills:list | usefin xero:bills:get bill_xxx |
| contacts | usefin xero:contacts:list --type customer | usefin xero:contacts:get c_xxx |
| payments | usefin xero:payments:list | usefin xero:payments:get pay_xxx |
| credit-notes | usefin xero:credit-notes:list | usefin xero:credit-notes:get cn_xxx |
| journals | usefin xero:journals:list | usefin xero:journals:get j_xxx |
| items | usefin xero:items:list | usefin xero:items:get item_xxx |
| tax-rates | usefin xero:tax-rates:list | usefin xero:tax-rates:get tx_xxx |
Provider-specific objects (e.g. Xero quotes, purchase-orders; QuickBooks estimates, vendors) are available when supported. Run usefin <provider> --help for the full list.
When not authenticated, commands use mock data. When authenticated, they call the provider API where implemented. For providers with a real API client (Xero, QuickBooks, FreshBooks, Zoho Books), create/update/delete are available for supported objects.
