title: Commands Reference description: Complete CLI reference for rustledger
Commands Reference
rustledger provides several commands for working with beancount ledgers.
Commands
| Command | Description |
|---|---|
| check | Validate ledger files |
| query | Run BQL queries |
| report | Generate financial reports |
| format | Auto-format beancount files |
| extract | Import from bank statements |
| price | Fetch commodity prices |
| doctor | Debugging and diagnostic tools |
Global Options
These options work with all commands:
-h, --help Print help information
-V, --version Print version informationSpecifying the Ledger File
Most commands require a beancount file:
bash
# Explicit file path
rledger check ledger.beancount
# Use RLEDGER_FILE environment variable
export RLEDGER_FILE="~/finances/main.beancount"
rledger check
# Use profile from config
rledger check -P personalExit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Error (validation errors, file not found, etc.) |
| 2 | Invalid usage (bad arguments) |
Bean-* Aliases
For compatibility with Python beancount, rustledger can install wrapper scripts:
bash
rledger compat install # installs to same directory as rledger
rledger compat install --prefix ~/bin # or a custom directory
rledger compat uninstall # removes them| Wrapper | Equivalent |
|---|---|
bean-check | rledger check |
bean-query | rledger query |
bean-format | rledger format |
bean-doctor | rledger doctor |
bean-extract | rledger extract |
bean-price | rledger price |