@invoiceleaf/cli
v0.1.0
Published
Official command-line interface for InvoiceLeaf
Downloads
11
Maintainers
Readme
InvoiceLeaf CLI
Official command-line interface for InvoiceLeaf.
Features
- Authenticate with API key or bearer token
- List and inspect spaces, organizations, documents, categories, and tags
- Human-friendly table output and JSON output mode
- Local configuration and session management
Installation
From npm:
npm install -g @invoiceleaf/cliFrom source:
git clone https://github.com/InvoiceLeaf/invoiceleaf-cli.git
cd invoiceleaf-cli
npm install
npm run build
npm linkQuick Start
invoiceleaf --help
invoiceleaf auth apikey --set il_your_key
invoiceleaf auth status
invoiceleaf spaces list
invoiceleaf profile showAuthentication
You can authenticate using any of:
--api-keyflagINVOICELEAF_API_KEYenvironment variableinvoiceleaf auth apikey --set <key>(stored session)--tokenflagINVOICELEAF_ACCESS_TOKENenvironment variableinvoiceleaf auth token --set <token>(stored session)
Commands
invoiceleaf auth ...: manage credentials and check auth statusinvoiceleaf config ...: show/set CLI configinvoiceleaf profile show: show current user profileinvoiceleaf spaces ...: list/show spacesinvoiceleaf documents ...: list/show documentsinvoiceleaf organizations ...: list organizationsinvoiceleaf categories list: list categories for a spaceinvoiceleaf tags list: list tags for a space
Output Modes
- Default TTY output: formatted tables and key-value blocks
--json: machine-readable JSON output- Pipe mode (non-TTY): plain output suitable for scripts
Example:
invoiceleaf auth status --json
invoiceleaf documents list --space <spaceId> --jsonConfiguration
Show current config:
invoiceleaf config showSet values:
invoiceleaf config set apiUrl https://api.invoiceleaf.com/v1/
invoiceleaf config set defaultSpaceId <spaceId>Use INVOICELEAF_CONFIG_DIR to override the local config directory.
