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

cli-invoice

v0.1.6

Published

Generate professional PDF invoices, manage clients, and track payments from the terminal

Readme

CLI Invoice

Generate professional PDF invoices, manage clients, and track payments — entirely from the terminal. Offline, scriptable, and version-control friendly.

$ inv create --client "Acme Corp" --item "Web development" --qty 40 --rate 150
  Invoice INV-0001 created. Total: $6,000.00. Due: Apr 13, 2026.

$ inv export INV-0001
  Exported to ./INV-0001-acme-corp.pdf

Quick Install

npm install -g cli-invoice

Requires Node.js 18 or later.

Quick Start

# 1. Set up your business details
inv init

# 2. Add a client
inv client add --name "Acme Corp" --email "[email protected]"

# 3. Create an invoice
inv create --client "Acme Corp" \
  --item "Web development" --qty 40 --rate 150 \
  --item "Code review" --qty 5 --rate 150

# 4. Export to PDF
inv export INV-0001

# 5. Track payment
inv status INV-0001 sent
inv status INV-0001 paid

Command Reference

Setup

| Command | Description | |---------|-------------| | inv init | Interactive setup wizard for your business profile | | inv config set <key> <value> | Update a config value (e.g., defaults.currency EUR) | | inv config show | Display current configuration |

Client Management

| Command | Description | |---------|-------------| | inv client add --name <n> --email <e> | Add a new client | | inv client list | List all clients with invoice counts and totals | | inv client edit <name> [--email <e>] | Edit client details | | inv client remove <name> | Remove a client |

Invoicing

| Command | Description | |---------|-------------| | inv create --client <name> [options] | Create a new invoice | | inv show <id> | Display full invoice details | | inv edit <id> [options] | Edit a draft invoice | | inv delete <id> | Delete a draft invoice | | inv list [--status <filter>] | List invoices (filter: draft, sent, paid, overdue) | | inv status <id> <status> | Update status (sent, paid) | | inv export <id> | Generate PDF | | inv summary [--year YYYY] | Revenue summary |

Line Items

Line items can be provided in two ways:

Repeated flags:

inv create --client "Acme" \
  --item "Development" --qty 40 --rate 150 \
  --item "Code review" --qty 5 --rate 150

From a JSON file:

inv create --client "Acme" --from items.json

Where items.json is:

[
  { "description": "Development", "quantity": 40, "unit_price": 150 },
  { "description": "Code review", "quantity": 5, "unit_price": 150 }
]

License & Pro

| Command | Description | |---------|-------------| | inv upgrade | Show Pro tier info and pricing | | inv activate <key> | Activate a Pro license key |

Free vs Pro

| Feature | Free | Pro | |---------|------|-----| | Clients | 3 | Unlimited | | Invoices per month | 5 | Unlimited | | PDF export | Yes | Yes | | Revenue summaries | Yes | Yes | | Priority support | -- | Yes |

Data Storage

All data is stored locally in ~/.config/cli-invoice/ (XDG-compliant):

~/.config/cli-invoice/
  config.toml        # Business profile and preferences
  data/
    clients.json     # Client records
    invoices.json    # Invoice records
    counter.json     # Invoice number counter

No cloud. No accounts. Your data stays on your machine.

Environment Variables

| Variable | Description | |----------|-------------| | XDG_CONFIG_HOME | Override config base directory (default: ~/.config) |

No API keys or secrets required.

Development

# Install dependencies
npm install

# Run in development mode
npx tsx bin/inv.ts --help

# Type check
npx tsc --noEmit

# Run tests
npx vitest run

# Build
npx tsup

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes with tests
  4. Run npx tsc --noEmit && npx vitest run to verify
  5. Submit a pull request

Disclaimer

CLI Invoice is a billing tool, not accounting software. Generated invoices are for informational purposes. Consult a qualified accountant for tax and financial matters. CLI Invoice is not responsible for errors in invoices or their legal enforceability in any jurisdiction.

License

MIT