# Billing from yourterminal

Create invoices, manage bills, record payments, and generate reports — all from the command line. Perfect for automation, scripting, and AI-powered workflows.

## Quick Install

```bash
$ curl -fsSL https://billingnow.com/cli/install.sh | bash
```

### Getting Started

## Installation

Install the BillingNow CLI in seconds. Works on macOS and Linux with Node.js 18 or higher.

1. ### Run the installer
   The installer downloads the CLI and sets up everything automatically.
   
   ```bash
   $ curl -fsSL https://billingnow.com/cli/install.sh | bash
   ```

2. ### Add to PATH (if prompted)
   If the installer shows a PATH warning, add this line to your shell profile:
   
   ```bash
   export PATH="$HOME/.local/bin:$PATH"
   ```
   Then restart your terminal or run `source ~/.zshrc` (or `~/.bashrc`).

3. ### Authenticate
   Log in to connect the CLI to your BillingNow account. This opens your browser for secure OAuth authentication.
   
   ```bash
   $ bn login
   ```

4. ### Verify installation
   Check that everything is working by viewing your current user:
   
   ```bash
   $ bn whoami
   ```

#### Requirements
- Node.js 18 or higher
- macOS or Linux (Windows via WSL)
- curl or wget
- BillingNow account

#### Alternative: API Key Login
For CI/CD or headless environments, authenticate with an API key:

```bash
$ bn login --key YOUR_API_KEY
```
Generate API keys from Settings in your BillingNow dashboard.

## Command Reference
Complete list of available commands. All commands support `-f json` for machine-readable output.

### Invoices

- `bn invoice list` — List all invoices
- `bn invoice list --status sent` — Filter by status
- `bn invoice get <id>` — Get invoice details
- `bn invoice find INV-001` — Find by number or ID
- `bn invoice create --relation <id> --items '[{"name":"Service","quantity":1,"netPrice":100}]'` — Create new invoice
- `bn invoice update <id> --due-date 2025-02-28` — Update invoice
- `bn invoice status <id> sent` — Change status
- `bn invoice delete <id>` — Delete invoice
- `bn invoice generate-number <relation-id>` — Generate invoice number

## AI Agent Integration
Use the BillingNow CLI skill with Claude Code or any AI agent that supports custom skills. Let AI manage your invoices through natural language.

### Example Prompts
You say:
- "Create an invoice for Acme Inc for 10 hours of consulting at $150/hour"  
- "Show me all unpaid invoices from this month"  
- "Record a $500 payment for invoice INV-042"  
- "Generate a sales report for Q4 2024"

### Setup for Claude Code
The skill is automatically available when you install the CLI:

```bash
$ bn skill status
```

### Your Privacy Matters

We use cookies to enhance your browsing experience, analyze site traffic, and personalize content. You can customize your preferences or accept all cookies.
