Beancount Ledger

by mkshp-dev
5
4
3
2
1
Score: 54/100

Description

Transform your vault into a plain-text accounting dashboard with net worth tracking, balance sheets, interactive charts, and real-time financial metrics. Embed live BQL queries inline, create validated transactions with account autocomplete, and auto-fetch commodity prices into your Beancount files.

Reviews

No reviews yet.

Stats

26
stars
2,144
downloads
3
forks
45
days
1
days
7
days
157
total PRs
0
open PRs
11
closed PRs
146
merged PRs
105
total issues
9
open issues
96
closed issues
603
commits

Latest Version

7 days ago

Changelog

  • Unified Inter-Tab Dashboard Connections & Navigation API — Built a centralized navigation contract (NavRequest, NavigationFilters) allowing cross-tab linking and filter synchronization across the entire dashboard:

    • Journal Tab: Click any posting account name on a TransactionCard or BalanceCard to open the Transactions tab pre-filtered to that account (#263).
    • Income Statement Chart: Click any month/week column in the Income Statement trend chart to jump to the Transactions tab pre-filtered to that date range, with a pointer cursor on hover (#264).
    • Income Statement Table: Click any leaf account row (or Ctrl/Cmd click category headers) in the Income/Expenses table to view transactions for that account (#265).
    • Balance Sheet Table: Click any leaf account row (or Ctrl/Cmd click category headers) in Assets/Liabilities/Equity tables to jump to the Transactions tab pre-filtered to that account (#266).
    • Overview Tab: Click KPI summary cards (Income, Expenses, Total Balance, Savings Rate) to open Transactions tab pre-filtered to that period & account type. Added a "→ View" button and clickable account chips on Budget and Target indicator cards (#267).
    • Sunburst Charts: Click any arc segment on Sunburst charts across Income Statement and Balance Sheet tabs to navigate to Transactions for that account, featuring cursor pointer styling and enhanced tooltip hints (#268).
    • Transactions ↔ Journal: Click any payee name in the Transactions tab table to jump to the Journal tab pre-filtered to that payee, and click the "↗" link or payee name on Journal TransactionCard headers to jump back to the Transactions tab (#269).
    • Journal Tab Tags: Click any #tag chip on a TransactionCard header to jump to the Transactions tab pre-filtered to that tag.
    • Ctrl/Cmd+Click for Journal: All account/tag/date-range/KPI clickables that navigate to Transactions now also support Ctrl/Cmd+click to open the Journal tab pre-filtered instead — Journal card account & tag chips, Overview KPI cards and Budget/Target indicators, Income Statement chart columns, and leaf account rows and Sunburst arcs on the Balance Sheet and Income Statement tabs. Category header rows on the Balance Sheet/Income Statement tables keep their existing Ctrl/Cmd+click behavior (jump to Transactions for that category) unchanged. Also fixed a bug where Sunburst arc clicks (#268) were never actually wired to navigation (segment-click had no listener), so that connection now works for the first time.
  • Transactions Tab: Clear filters button — Added a "Clear" button next to Refresh, matching the Journal tab.

  • Commodities: "Update Prices" reflects real availability — The button is now disabled (with an explanatory tooltip) when no bean-price command is configured, instead of failing silently on click. Also removed bean-price's live auto-detect fallback so it always runs the exact command shown in Settings → Connection, matching bean-query's existing behavior.

  • Settings: Clearer command verification feedback — Fixed the Verify button's success/error box, which was rendering a duplicate checkmark/✕ with low-contrast text; redesigned with a tinted background and left border accent.

  • Currency-aware decimal precision — Amounts across the dashboard now use each currency's actual precision (inferred from how it's written in the ledger), instead of a hardcoded 2 decimals everywhere. Fixes crypto/low-value commodity prices that were being rounded to 0.00, and zero-decimal currencies (e.g. JPY) that were getting a padded .00.

README file from

Github

Beancount Ledger

Plugin Logo

CI Check Docs Portal License: MIT Obsidian Plugin

A comprehensive Beancount integration for Obsidian that transforms your vault into a powerful plain-text accounting dashboard.

📘 Full Documentation Portal — Read the complete guide for features, configuration, and usage.


🔧 Requirements

This plugin integrates with your existing Beancount setup:

  1. Python 3.8+
  2. Beancount v3+: Install via pip install beancount
  3. bean-query: Command-line tool for querying Beancount files (pip install beanquery)
  4. bean-price (optional): For automatic commodity price fetching (pip install beanprice)
  5. WSL Support (optional): Full compatibility for Windows users running Beancount in WSL

Note: bean-query and bean-price are separate packages from Beancount itself and require their own pip install commands. See the Requirements Documentation for more details.


📦 Installation

Install from community store

  1. Open Obsidian Settings and go to Community plugins.
  2. Click Browse and search for Beancount Ledger.
  3. Click Install, then Enable the plugin.

Manual Installation

  1. Download the latest release from GitHub Releases
  2. Extract files to <vault>/.obsidian/plugins/beancount-finance/
  3. Enable the plugin in Obsidian Settings → Community Plugins

BRAT Beta Installation

For beta testers who want to try the latest development version:

  1. Install BRAT Plugin:

  2. Add Beta Plugin:

    • Open Command Palette (Ctrl/Cmd + P)
    • Run: "BRAT: Add a beta plugin for testing"
    • Enter repository: mkshp-dev/obsidian-finance-plugin
    • Select branch: dev (or master for stable)
  3. Enable Plugin:

    • Go to Settings → Community Plugins
    • Find "Beancount Ledger" and enable it

BRAT will automatically check for updates and notify you of new versions. This is the recommended way to test beta features before official releases.

Note: Beta versions may have bugs. Always keep backups of your Beancount files and vault data.


🔒 Permissions & Privacy

Beancount Ledger is a local-first plugin. It does not send ledger data, account names, query results, or prices to a project server.

Access Current use Direction
Vault file access Reads/writes Beancount files stored inside the current Obsidian vault, including generated prices.beancount output. All file I/O operations (reading, writing, backups, migration) are fully migrated to use the Obsidian Vault API.
Filesystem access (fs) None. Direct filesystem access via the Node.js fs module has been completely eliminated from the codebase. Eliminated. Resolves community-plugin security warnings regarding direct filesystem access.
Shell execution (child_process) Runs local Beancount tools such as bean-query, bean-check, and bean-price. Required to run the local Python packages (beancount, beanquery, beanprice). These CLI commands are executed safely via parameterized spawn calls bypassing the shell, and all user input is strictly whitelisted and sanitized to eliminate shell injection vulnerabilities.
Vault enumeration Finds configured BQL/template files in the vault. Required for plugin features.
Clipboard access Copies query results or transaction text when the user clicks a copy action. User-initiated only.

Vault-only ledger requirement

For compatibility with Obsidian community plugin reviews and security standards, the plugin strictly requires your main ledger and included Beancount files to live inside the current vault. If your ledger currently lives outside the vault, move it into the vault and update the plugin settings to point to the vault-local file. The plugin strictly uses vault-local file access using the Obsidian Vault API, and direct filesystem writes outside the vault are not supported.

Security and Command Execution

Beancount is a Python library with no native JavaScript/WebAssembly counterpart. Therefore, to compute balances, render interactive charts, validate ledger files, and fetch prices, this plugin must interface with your local Python installation via child_process.spawn.

To ensure maximum security and privacy:

  • No shell parsing: Commands are executed directly as process spawns without spawning shell instances (shell: false), which prevents shell-injection exploits.
  • Strict Parameterization: Query strings, file paths, and options are passed as raw array parameters to the executable and are never parsed as part of a shell command line.
  • Input Sanitization: User-configured parameters (such as price metadata sources) are whitelisted and sanitized using strict regular expressions before being processed.
  • Zero Remote Access: All operations execute completely locally on your machine.

🤝 Contributing

We welcome contributions! Please see our CONTRIBUTING.md for details.

Development Setup

# Clone the repository
git clone https://github.com/mkshp-dev/obsidian-finance-plugin.git
cd obsidian-finance-plugin

# Install dependencies
npm install

# Start development build
npm run dev

# Build for production
npm run build

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

If this project helps your workflow, consider supporting its development with a ☕