Configs2026年5月20日·1 分钟阅读

Hledger — Robust Plain-Text Accounting Tool

A cross-platform accounting program for tracking money, time, or any quantity using plain-text journal files, with terminal, web, and API interfaces.

Agent 就绪

这个资产可以被 Agent 直接读取和安装

TokRepo 同时提供通用 CLI 命令、安装契约、metadata JSON、按适配器生成的安装计划和原始内容链接,方便 Agent 判断适配度、风险和下一步动作。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
Hledger Accounting
通用 CLI 安装命令
npx tokrepo install 2468a83a-5426-11f1-9bc6-00163e2b0d79

Introduction

Hledger is a plain-text accounting tool inspired by Ledger, rewritten in Haskell for reliability and extended with a web interface and additional reporting capabilities. It reads simple text-based journal files and produces financial reports via CLI, web browser, or JSON API.

What Hledger Does

  • Reads plain-text journal files and generates balance sheets, income statements, and cash flow reports
  • Provides a web interface (hledger-web) for browsing accounts and adding transactions
  • Supports multi-currency transactions with automatic and manual price conversion
  • Tracks time as well as money, useful for freelancers and consultants
  • Offers a JSON API for integrating with custom dashboards and tools

Architecture Overview

Hledger is built in Haskell with separate packages for the core library, CLI, web UI, and API server. The core parses journal files into a transaction stream, applies account aliases and valuation rules, and produces report data structures. The web interface uses the Yesod framework and can run as a local or networked server.

Self-Hosting & Configuration

  • Install via OS package managers, Haskell Stack, or pre-built binaries
  • Store journal files as plain text in any directory, optionally under version control
  • Configure account aliases, default commodity, and display formats in the journal file header
  • Run hledger-web for a browser-based interface with add/edit capabilities
  • Use environment variable LEDGER_FILE to set the default journal path

Key Features

  • Compatible with Ledger file format while adding stricter error checking
  • Built-in web UI for non-technical users to browse reports and enter transactions
  • Comprehensive date and period filtering for custom report ranges
  • CSV import rules engine for automated bank statement conversion
  • Time tracking mode for logging billable hours alongside financial data

Comparison with Similar Tools

  • Ledger — The C++ original; hledger adds a web UI, stricter parsing, and CSV import rules
  • Beancount — Python-based with Fava UI; hledger uses Ledger-compatible syntax and Haskell reliability
  • GnuCash — Desktop GUI with database; hledger is text-first with version-control integration
  • Actual Budget — Web-based envelope budgeting; hledger is a general accounting tool with more flexibility

FAQ

Q: Is hledger compatible with Ledger files? A: Mostly yes. Hledger reads Ledger-format journals with minor syntax differences documented in the manual.

Q: Can I use hledger without the command line? A: Yes, hledger-web provides a full web interface for viewing reports and adding transactions.

Q: Does hledger support budgeting? A: Yes, it supports periodic budget declarations and can report actuals vs. budget.

Q: Is Haskell required to use hledger? A: No, pre-built binaries are available. Haskell is only needed if building from source.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产