A command-line client for the Fiken.no accounting API. Manage your Norwegian business accounting from the terminal.
- 🏢 List and manage companies
- 📊 Chart of accounts and balances
- 🛒 View purchases and expenses
- 📥 EHF inbox management
- 🏦 Bank account overview
- 📋 Dashboard with key metrics
- 🔄 JSON output for scripting
- ⚡ Built-in rate limiting and pagination
git clone https://github.com/jakoblind/fiken-cli.git
cd fiken-cli
make installmake build
./fiken --helpGo to Fiken API Settings and create a Personal API Token.
fiken auth token <your-token>fiken companiesfiken companies default <company-slug>fiken statusfiken auth token <token> # Save API token
fiken auth token # Show token status
fiken auth status # Verify token works
fiken auth logout # Remove stored tokenfiken companies # List all companies
fiken companies default # Show default company
fiken companies default <slug> # Set default companyfiken accounts # List chart of accounts
fiken accounts --from 1000 --to 2000 # Filter by account rangefiken balances # List account balancesfiken bank list # List bank accountsfiken inbox # List all inbox documents
fiken inbox --status pending # Filter by statusfiken purchases list # List purchasesfiken status # Overview of pending items| Flag | Description |
|---|---|
--json |
Output as JSON (default: table) |
--no-input |
Non-interactive mode |
--company <slug> |
Select company (auto-detected if only one) |
--keyring-backend <backend> |
Keyring backend (default: auto) |
Credentials (API token, default company) are stored securely using your OS keyring via 99designs/keyring.
| Backend | OS | Flag value |
|---|---|---|
| Secret Service (GNOME Keyring / KDE Wallet) | Linux | secret-service |
| Keychain | macOS | keychain |
| Windows Credential Manager | Windows | wincred |
| pass | Linux/macOS | pass |
| Encrypted file | Any (fallback) | file |
By default (auto), the best available backend is used. The encrypted file backend is the last-resort fallback and will prompt for a password.
# Use a specific backend
fiken --keyring-backend file auth token <token>
# Or set via environment variable
export FIKEN_KEYRING_BACKEND=file
fiken auth token <token>If you previously stored your token in ~/.config/fiken/token, it will be automatically migrated to the keyring on first use. The plaintext file is deleted after successful migration.
- Base URL:
https://api.fiken.no/api/v2 - Auth: Bearer token (Personal API Token)
- Amounts are in cents (øre):
100000=1 000,00 kr - Rate limit: max 4 requests/second (enforced by client)
- Pagination: automatic for large result sets
fiken companies --jsonfiken accounts --json | jq '.[].code'fiken purchases list --company my-company-slugfiken status --json | jq '.inbox_count'make build # Build binary
make test # Run tests
make fmt # Format code
make lint # Run linter
make clean # Clean build artifactsMIT – see LICENSE.