Integrations

NQD CLI installation and commands

Install nqd, authenticate with OAuth or an API key, and manage NQD resources with native commands.

The CLI site publishes install scripts, native downloads, checksums, and machine-readable help. The installer and native downloads remain on the CLI origin. The Docs site links to them but does not proxy binary files.

Open the CLI landing page to choose macOS, Linux, or Windows. Use ?platform=macos, ?platform=linux, or ?platform=windows to override platform detection. Use ?lang=en or ?lang=ar to choose the page language.

Install

Use the install command published by the CLI site for your platform. The Unix installer is:

Shell
curl -fsSL https://cli.nqd.app/install.sh | sh

The Windows PowerShell installer is:

powershell
irm https://cli.nqd.app/install.ps1 | iex

The installers verify SHA256SUMS before placing nqd on your PATH. The release archives target macOS ARM64 and x64, Linux ARM64 and x64, and Windows ARM64 and x64. Set NQD_CLI_VERSION to select a release. Set NQD_CLI_RELEASE_BASE to use another HTTPS release host or a local development host.

The Unix installer uses $NQD_INSTALL_DIR or $HOME/.local/bin. It persists the path for zsh and bash, and prints a PATH command for other shells. The PowerShell installer uses $NQD_INSTALL_DIR or $env:LOCALAPPDATA\NQD, then updates the user and current-process Path values.

Sign in with OAuth

Shell
nqd login

The command opens the Auth origin, uses S256 PKCE and a state value, receives the callback on a loopback listener, and stores the token in the native credential manager. The token response includes the consented workspace_id. It checks that the issuer and API resource match the configured origins. Use nqd logout to revoke the stored grant and remove the local credential.

Use an API key

Shell
NQD_API_KEY=nqd_live_... nqd invoices --limit 25

API keys are suitable for automation. Store them in the runtime secret manager. Do not commit them or place them in a URL.

Use native resource commands

Native commands follow the resource hierarchy. nqd invoices lists invoices with the API defaults. nqd invoices <id> retrieves one invoice, and nqd invoices get <id> is an explicit equivalent. Every published REST operation has a native command generated from the same API contract, so you do not need an operation ID for normal work.

Shell
nqd invoices
nqd invoices get invoice_01J...
nqd invoices create --body @invoice.json
nqd invoices update invoice_01J... --body @invoice-update.json
nqd invoices delete invoice_01J...

Use the same form for expenses, income, payouts, assets, clients, vendors, contacts, projects, currencies, entries, modifiers, tags, units, bank accounts, webhooks, API keys, and other published resources. Use nqd help <resource> for a resource, or nqd help <resource> <action> for an action. The generated help lists only commands and fields that the API provides.

Nested resources keep the parent ID in the command path:

Shell
nqd invoices invoice_01J... transactions
nqd invoices invoice_01J... transactions create --id transaction_01J... --signed-amount 250.00 --currency-id currency_01J...
nqd invoices templates

Manage party contacts

Clients and vendors expose contacts as child resources. List contacts without an operation name. Add or remove a contact with its positional ID.

Shell
nqd clients CLIENT_ID contacts
nqd clients CLIENT_ID contacts add CONTACT_ID
nqd clients CLIENT_ID contacts remove CONTACT_ID
nqd vendors VENDOR_ID contacts
nqd vendors VENDOR_ID contacts add CONTACT_ID
nqd vendors VENDOR_ID contacts remove CONTACT_ID

Manage applied entries and modifiers

Invoices, expenses, income, assets, payouts, and their recurring templates use the same child workflow. The source ID comes first, followed by entries or modifiers.

Shell
nqd invoices INVOICE_ID entries
nqd invoices INVOICE_ID entries add CATALOG_ENTRY_ID --if-match UPDATED_AT --name Hosting --quantity 2 --price-per-unit 100
nqd invoices INVOICE_ID entries update APPLIED_ENTRY_ID --if-match UPDATED_AT --quantity 3
nqd invoices INVOICE_ID entries remove APPLIED_ENTRY_ID --if-match UPDATED_AT
nqd invoices INVOICE_ID entries reorder APPLIED_ENTRY_ID OTHER_APPLIED_ENTRY_ID --if-match UPDATED_AT

nqd invoices INVOICE_ID modifiers
nqd invoices INVOICE_ID modifiers add CATALOG_MODIFIER_ID --if-match UPDATED_AT --name ServiceFee --kind percentage --stage price --effect increase --value 15
nqd invoices INVOICE_ID modifiers update APPLIED_MODIFIER_ID --if-match UPDATED_AT --value 20
nqd invoices INVOICE_ID modifiers remove APPLIED_MODIFIER_ID --if-match UPDATED_AT
nqd invoices INVOICE_ID modifiers reorder APPLIED_MODIFIER_ID OTHER_APPLIED_MODIFIER_ID --if-match UPDATED_AT

Use the same child paths with expenses, income, assets, payouts, invoices templates, expenses templates, and payouts templates. Replace the source ID with the record or recurring-template ID. The positional catalog ID is optional. When supplied, it links the new applied record to a catalog definition. The catalog ID and applied record ID remain separate.

For recurring templates, place the template collection and template ID before the child resource, such as nqd invoices templates TEMPLATE_ID entries or nqd expenses templates TEMPLATE_ID modifiers.

Pass the source response’s current updatedAt value to --if-match. Stale mutations fail instead of overwriting a newer edit. Entry prices are authored net prices and exclude VAT. Applied modifier value uses percentage points: 15 means 15%, while fixed modifiers use the amount in the source currency. Generic catalog modifiers use the stage allowed for that source, such as price in the example. For invoices, tax-stage applications use the configured workspace tax modifier; use its catalog ID (for example TAX_MODIFIER_ID). Other sources validate modifier stages according to their source rules. Catalog changes do not rewrite saved applied facts, and child edits do not replace recorded payments.

Reports use readable names:

Shell
nqd reports income-statement --start 2026-01-01 --end 2026-12-31
nqd reports balance-sheet --start 2026-01-01 --end 2026-12-31

Use --limit, --search, --order, --cursor, and resource-specific filter flags for list commands. Use API order syntax such as --order createdAt.desc. Use a resource ID filter such as --filter-vendor-id eq.vendor_01J... when the endpoint exposes it. Body fields use kebab-case flags. The CLI converts them to API field names and validates their types from the API contract. Use nqd help <resource> <action> to see the accepted flags and any short aliases.

Use help as a command word when you want command details:

Shell
nqd help invoices create
nqd invoices create help

Common short flags include -n for --name, -d for --description, -l for --limit, -s for --search, -o for --order, -c for --cursor, -w for --workspace, -j for --json, -b for --body, -q for --query, and -t for --type. Use command help for the flags supported by each operation. -h and --help remain available as option-style help aliases.

Use --body '<json>' for a complete request body. Use --body @request.json to read JSON from a file. Use --entries '<json-array>' only when the operation exposes an entries field. Do not combine --body with individual body-field flags. Invoice creation requires currencyId, entries, and modifiers; each invoice entry requires id, name, description, quantity, unit, and pricePerUnit. Recurring template creation requires its complete contract payload, so use --body @template.json rather than --name alone.

When replacing a full invoice modifiers array, preserve each returned appliedId for an existing applied modifier, including repeated applications of the same catalog modifier. appliedId is the saved child snapshot ID; catalogModifierId identifies the catalog definition. Child modifier commands use APPLIED_MODIFIER_ID for the saved child.

Use --json for scripts. Workspace lists preserve the API envelope and add selectedWorkspaceId plus a selected flag on each record.

Select a workspace once

Shell
nqd workspaces
nqd workspaces use workspace_01J...
nqd workspaces current

The selection is saved under ~/.nqd, or under the directory named by an absolute NQD_HOME value. Later workspace-scoped commands use that selection. The list marks the current workspace. The use command validates access before saving. Pass --workspace <id> for a one-command override. NQD_WORKSPACE_ID remains available for automation. The per-call flag takes precedence over the environment variable and the saved selection.

The selection is stored separately for each API origin. OAuth tokens stay in the operating system credential manager. The CLI never writes tokens into ~/.nqd.

The CLI exposes the published REST operations through native resource commands. Use help at the root, resource, or action level to discover the commands and fields available in the current contract.

One-time webhook signing secrets

CLI responses redact one-time signing secrets by default. Pass --reveal-secrets only with webhook creation or rotation when you need the new signingSecret in inline output. The option is rejected for other operations, and NQD never stores webhook secrets in workspace files.