npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@centry-digital/bukku-cli

v2.0.4

Published

Bukku accounting CLI - manage invoices, contacts, and accounting from the command line

Readme

@centry-digital/bukku-cli

npm version

A command-line interface for Bukku, a Malaysian accounting platform. Manage invoices, contacts, products, and more from your terminal.

What can it do?

The CLI exposes 169 commands across 9 categories, covering the full Bukku API:

| Category | Commands | What you can do | |----------|----------|-----------------| | Sales | 42 | Quotes, orders, delivery orders, invoices, credit notes, payments, refunds | | Purchases | 36 | Purchase orders, bills, credit notes, goods received notes, payments, refunds | | Banking | 18 | Money in, money out, bank transfers | | Contacts | 12 | Customers, suppliers, contact groups | | Products | 18 | Products, bundles, product groups | | Accounting | 13 | Chart of accounts, journal entries | | Files | 3 | Upload and manage file attachments | | Control Panel | 21 | Locations, tags, tag groups | | Reference Data | 10 | Tax codes, currencies, payment methods, terms, and more |

Every list/get/create/update/delete operation available in the Bukku web UI is available from the command line.

Quick Start

Try it without installing:

npx @centry-digital/bukku-cli --help

Or install globally:

npm install -g @centry-digital/bukku-cli
bukku --help

Configuration

The CLI needs two things: your API token and company subdomain. There are three ways to provide them, listed in order of precedence:

1. CLI flags (highest precedence)

bukku --api-token YOUR_TOKEN --company-subdomain YOUR_SUB sales invoices list

2. Environment variables

export BUKKU_API_TOKEN=your-token-here
export BUKKU_COMPANY_SUBDOMAIN=your-subdomain
bukku sales invoices list

3. Config file (~/.bukkurc)

bukku config set api_token your-token-here
bukku config set company_subdomain your-subdomain

Verify your configuration:

bukku config show

This shows the resolved value for each field and where it came from (flag, environment variable, or config file).

Using with AI Tools

The CLI works great as a tool for AI assistants. Since it outputs structured JSON by default and writes errors to stderr, AI tools can parse the output directly.

Claude Code

First, configure your credentials:

bukku config set api_token your-token-here
bukku config set company_subdomain your-subdomain

Then ask Claude Code to use the CLI. For example:

  • "Use bukku to list my unpaid invoices"
  • "Create a sales invoice for RM 5,000 to contact 123 using bukku"
  • "Show me last month's bank transactions with bukku"

Claude Code can run bukku commands via its Bash tool, read the JSON output, and take follow-up actions.

Tip: For AI-assisted accounting with richer integration, see also @centry-digital/bukku-mcp — an MCP server that exposes Bukku as native AI tools.

Usage Examples

Sales

# List recent invoices
bukku sales invoices list --limit 5

# Get a specific invoice
bukku sales invoices get 123

# Create an invoice
bukku sales invoices create --data '{
  "contact_id": 1,
  "date": "2025-01-15",
  "currency_code": "MYR",
  "exchange_rate": 1,
  "tax_mode": "exclusive",
  "payment_mode": "credit",
  "status": "draft",
  "form_items": [{"account_id": 100, "description": "Consulting", "amount": 5000}],
  "term_items": [{"payment_due": "100%", "date": "2025-02-15"}]
}'

# List quotes in table format
bukku sales quotes list --format table

Purchases

# List bills
bukku purchases bills list --format table

# Get a specific bill
bukku purchases bills get 456

# List purchase orders
bukku purchases orders list --limit 10

Banking

# List money-in transactions
bukku banking money-in list --limit 10

# List money-out transactions
bukku banking money-out list --format table

# List bank transfers
bukku banking transfers list

Contacts

# List all contacts
bukku contacts contacts list --format table

# Get a specific contact
bukku contacts contacts get 789

# List contact groups
bukku contacts contact-groups list

Products

# List products
bukku products products list --format table

# Get a specific product
bukku products products get 123

# List product groups
bukku products product-groups list

Accounting

# List journal entries
bukku accounting journal-entries list

# Search chart of accounts
bukku accounting accounts list --format table

Files

# Upload a file
bukku files upload /path/to/receipt.pdf

# List uploaded files
bukku files files list

Control Panel

# List locations
bukku control-panel locations list

# List tags
bukku control-panel tags list --format table

# List tag groups
bukku control-panel tag-groups list

Reference Data

# List tax codes
bukku ref-data tax-codes

# List currencies
bukku ref-data currencies

# List payment methods
bukku ref-data payment-methods

# List classification codes (Malaysia e-Invoice)
bukku ref-data classification-codes

Input Formats

For create and update commands, provide JSON data in one of these ways:

Inline with --data flag:

bukku sales invoices create --data '{"contact_id": 1, "date": "2025-01-15", ...}'

Piped from a file:

cat invoice.json | bukku sales invoices create

Dry run (preview without sending):

bukku sales invoices create --data '{"contact_id": 1, ...}' --dry-run

Dry run shows the HTTP method, URL, and request body that would be sent, without making the API call.

Output Formats

JSON (default): Machine-readable output, easy to pipe to jq:

bukku sales invoices list | jq '.[0].total'

Table: Human-readable table format:

bukku sales invoices list --format table

Errors are written to stderr as structured JSON, so they don't interfere with piped output.

Exit Codes

| Code | Meaning | |------|---------| | 0 | Success | | 1 | General error | | 2 | Authentication error (missing or invalid credentials) | | 3 | API error (Bukku returned an error) | | 4 | Validation error (invalid input or config) |

Getting Your API Token

  1. Log into your Bukku account
  2. Go to Control Panel > Integrations > API Access
  3. Generate a new API token (or copy your existing one)
  4. Note your company subdomain from the URL (e.g. mycompany from mycompany.bukku.my)

Uninstalling

npm uninstall -g @centry-digital/bukku-cli

To also remove your saved configuration:

rm ~/.bukkurc

Related

License

MIT