A unified interface for Bkper. Use bkper in two complementary modes:
- Interactive mode — run
bkper agentto open the Bkper Agent TUI - Command mode — run
bkper <command>for explicit CLI workflows, scripts, and automation
With one tool, you can build and deploy Bkper apps, and manage financial data -- books, accounts, transactions, and balances.
- Node.js >= 18
bun add -g bkpernpm i -g bkperpnpm add -g bkperyarn global add bkperbkper auth loginThis is the only command that opens the browser OAuth flow.
Other commands:
- use stored credentials when available
- otherwise return an authentication error instead of starting login automatically
- can also work behind an external proxy that injects auth headers
When you are done working in a sandbox, run bkper auth logout to revoke the stored refresh token and clear local credentials.
# Show CLI help
bkper# Interactive mode (agent TUI)
bkper agent# Command mode (explicit command)
bkper book listPick a book and create your first transaction:
bkper transaction create -b <bookId> --description "Office supplies 123.78"Run
bkper --helporbkper <command> --helpfor built-in documentation on any command.
Use the access token for direct API calls from any tool.
This requires a prior bkper auth login, and bkper auth token does not start a browser login flow:
# Print the current access token
TOKEN=$(bkper auth token)
# Use it with curl, httpie, or any HTTP client
curl -s -H "Authorization: Bearer $TOKEN" \
https://api.bkper.app/v5/books | jq '.items[].name'Run bkper agent to start the embedded Bkper Agent TUI. Running bkper with no arguments shows CLI help.
Bkper's agent mode is intentionally a thin wrapper around Pi:
- Pi provides the core agent runtime and TUI
- bkper adds Bkper-specific domain context and startup maintenance behavior
On each agent startup, bkper performs a background CLI auto-update check (same behavior as command mode).
Use Pi CLI features directly through bkper:
bkper agent <pi-args>If no Pi arguments are provided, bkper agent starts the interactive Bkper Agent experience.
If Pi arguments are provided, everything after bkper agent is passed through to Pi.
Examples:
bkper agent -p "Summarize this repository"
bkper agent --model openai/gpt-4o -c
bkper agent install <pi-package-source>
bkper agent --helpbkper agent keeps Bkper defaults (including the Bkper system prompt) unless you explicitly pass --system-prompt.
Use bkper help agent for the Bkper CLI command help, and bkper agent --help for Pi help.
For all available passthrough flags and commands, see the Pi CLI reference: https://github.com/badlogic/pi-mono/tree/main/packages/coding-agent#cli-reference
Pi-specific extensions are loaded from Pi extension folders (for example .pi/extensions and ~/.pi/agent/extensions).
Manage books, accounts, transactions, and balances.
bkper book list
bkper account list -b <bookId>
bkper transaction list -b <bookId> -q 'on:2025' --format csv
bkper balance list -b <bookId> -q 'on:2025-12-31' --format csv→ Full Data Management reference
Build, deploy, and manage Bkper apps.
bkper app init my-app
bkper app dev
bkper app sync && bkper app deploy→ Full App Management reference
The getOAuthToken function returns a Promise that resolves to a valid OAuth token, for use with the bkper-js library:
import { Bkper } from 'bkper-js';
import { getOAuthToken } from 'bkper';
Bkper.setConfig({
oauthTokenProvider: async () => getOAuthToken(),
});