Cette page est affichée en anglais. Une traduction française est en cours.
ConfigsMay 20, 2026·3 min de lecture

Ledger — Double-Entry Accounting via the Command Line

A powerful plain-text accounting system that uses a simple text file format for double-entry bookkeeping, budgeting, and financial reporting from the terminal.

Prêt pour agents

Cet actif peut être lu et installé directement par les agents

TokRepo expose une commande CLI universelle, un contrat d'installation, le metadata JSON, un plan selon l'adaptateur et le contenu raw pour aider les agents à juger l'adaptation, le risque et les prochaines actions.

Native · 98/100Policy : autoriser
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
Ledger CLI Accounting
Commande CLI universelle
npx tokrepo install 0413334e-5426-11f1-9bc6-00163e2b0d79

Introduction

Ledger is a command-line accounting tool that reads plain-text journal files and produces financial reports. It implements full double-entry bookkeeping without requiring a database, GUI, or proprietary file format, making it ideal for developers and power users who prefer text-based workflows.

What Ledger Does

  • Parses plain-text journal files with double-entry transaction records
  • Produces balance reports, registers, budgets, and custom queries from the command line
  • Supports multiple currencies, commodities, and automatic currency conversion
  • Handles lot tracking for stocks and other investments with cost basis calculations
  • Integrates with version control for complete audit history of financial changes

Architecture Overview

Ledger is written in C++ for performance and reads journal files in a simple indentation-based format. Each transaction must balance to zero across its postings. The reporting engine applies filters, groupings, and format expressions to produce customizable output. The parser supports includes, automated transactions, and periodic entries.

Self-Hosting & Configuration

  • Install via package managers on Linux, macOS, or build from source
  • Store journal entries in plain text files managed by any text editor
  • Use version control (Git) to track changes and maintain an audit trail
  • Configure default file paths and display options via environment variables
  • Automate imports from bank CSVs using companion tools like ledger-autosync

Key Features

  • Plain-text storage that is human-readable, greppable, and version-control friendly
  • Extremely fast report generation even with years of transaction history
  • Flexible reporting with custom format strings and expression-based filters
  • Multi-currency and commodity tracking with automatic lot matching
  • No lock-in: data is portable text that can be processed by any tool

Comparison with Similar Tools

  • GnuCash — GUI-based with database storage; Ledger is text-based and terminal-native
  • Beancount — Similar plain-text approach in Python; Ledger is faster (C++) with different syntax
  • hledger — Haskell reimplementation with web UI; Ledger is the original with C++ performance
  • YNAB — Commercial budgeting SaaS; Ledger is free, private, and infinitely customizable

FAQ

Q: Is the plain-text format standardized? A: The format originated with Ledger and has influenced hledger and Beancount, though each has variations.

Q: Can Ledger handle business accounting? A: Yes, it supports invoicing workflows, tax reporting, and multi-entity tracking through accounts.

Q: How do I import bank transactions? A: Use tools like ledger-autosync or reckon to convert CSV/OFX bank exports into Ledger format.

Q: Does Ledger have a GUI? A: No, but Emacs ledger-mode and other editor integrations provide syntax highlighting and completion.

Sources

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires