# Awesome Beancount

Beancountエコシステムへの厳選されたガイド。Beancountは、複式簿記の厳密さを備えた、シンプルでテキストベースの形式で財務を管理するための強力なオープンソース会計システムです。このページでは、コミュニティが厳選したリストとエコシステムの概要を1つの包括的なリソースにまとめています。

## なぜプレーンテキスト会計なのか？

プレーンテキスト会計（PTA）は、シンプルなテキストファイルと強力なコマンドラインツールを使用して財務を管理する手法です。このアプローチにより、データの完全な所有権が得られ、長期的な保存が保証され、自動化や分析における比類のない柔軟性が提供されます。

- **公式PTAハブ:** [Plain Text Accounting](https://plaintextaccounting.org/)
- **やさしい入門書:** [Accounting for the simple minds with plain text accounting](https://dustri.org/b/accounting-for-the-simple-minds-with-plain-text-accounting.html)
- **WebアプリからCLIへ:** [Command line accounting: From mint.com to Ledger](https://muehe.org/posts/command-line-accounting/)

***

## Beancountエコシステム

Beancountエコシステムは、コアエンジンを中心に構築されたツール、プラグイン、リソースの集まりです。各コンポーネントは、完全な財務管理ワークフローを作成する上で特定の役割を果たします。

### 1. コアエンジンと公式リソース

これらはBeancountの基盤となる要素であり、作成者および公式コントリビューターによって維持されています。

| リソース               | 説明                                                                                                                                                        |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Beancount (コア)** | 元帳ファイルを読み取り、複式簿記のルールを適用し、レポートを生成するエンジン。`bean-check`や`bean-format`などの主要なコマンドラインユーティリティを提供します。他のすべてのツールはこの上に構築されています。                                       |
| **ホームページ**         | [beancount.github.io](https://beancount.github.io/)                                                                                                       |
| **ソースコード**         | [github.com/beancount/beancount](https://github.com/beancount/beancount)                                                                                  |
| **ドキュメント**         | [GitHub Pages](https://beancount.github.io/docs/) および [Google Docs](https://docs.google.com/document/d/1RaondTJCS_IUPBHFNdT8oqFKJjVJDsfsn6JEjBG04eA/edit) |
| **外部の貢献**          | [コミュニティによる寄稿の公式リスト](https://beancount.github.io/docs/external_contributions.html)                                                                         |
| **Beanquery**      | 元帳に対して高度なクエリ（例：`SELECT ... FROM ... WHERE ...`）を実行し、カスタム分析を生成するための強力なSQLライクなクエリツール（`v3`）。                                                                 |

### 2. ユーザーインターフェース

これらのツールは、財務データの探索や編集のための視覚的なインターフェースを提供します。

| ツール                        | 説明                                                                                                    |
| -------------------------- | ----------------------------------------------------------------------------------------------------- |
| **Fava**                   | Beancountのための決定版となるフル機能のWebダッシュボード。インタラクティブなチャート、ドリルダウンテーブル、ブラウザ内編集、および予算管理などの機能を追加するための拡張システムを提供します。 |
| **Fava-GTK**               | Favaをラップし、シームレスなデスクトップ体験を提供するネイティブなGNOMEデスクトップアプリケーション。                                               |
| **Beancount Mobile**       | 外出先で取引を追加するためのモバイルデータ入力アプリ。                                                                           |
| **Beancount Telegram Bot** | チャット経由で元帳に取引を素早く追加するためのTelegramボット。                                                                   |

### 3. 取引のインポート

インポートとは、金融機関のデータ（銀行のCSVやPDFなど）をBeancountの入力データに変換するプロセスです。

| ツール                         | 説明                                                                                         |
| --------------------------- | ------------------------------------------------------------------------------------------ |
| **Beangulp (v3)**           | インポーターを構築するためのモダンでスタンドアロンなフレームワーク。Pythonスクリプト（プラグイン）を介して外部ファイルを処理し、Beancountディレクティブを生成します。 |
| **Smart Importer**          | 機械学習を使用してインポーターを拡張し、カテゴリーを自動的に予測して割り当てるツール。                                                |
| **Beancount Reds Ingestor** | CSVおよびOFXファイルを処理するための共通ライブラリを備えたインポーターのコレクション。                                             |
| **double-entry-generator**  | Alipay（アリペイ）やWeChat Pay（ウィーチャットペイ）などの中国のサービスに焦点を当てた、ルールベースのインポーター。                         |

#### コミュニティ・インポーター（国別）

コミュニティによって維持されている、特定の銀行やサービスに対応した膨大なスクリプトのコレクション。

- **中国**

  - Alipay / 支付宝: [deb-sig/double-entry-generator](https://github.com/deb-sig/double-entry-generator), [wzyboy/importer](https://github.com/wzyboy/awesome-beancount/blob/master/importers/alipay_acclog.py)
  - 招商銀行 (CMB): [デビットカード](https://github.com/wzyboy/awesome-beancount/blob/master/importers/cmb_debit_cards.py), [クレジットカード](https://github.com/wzyboy/awesome-beancount/blob/master/importers/cmb_credit_cards.py)
  - WeChat Pay / 微信支付: [deb-sig/double-entry-generator](https://github.com/deb-sig/double-entry-generator)

- **フランス**

  - Caisse d'Epargne: [beancount-ce](https://github.com/ArthurFDLR/beancount-ce)
  - Boursorama, Amex: [Beancount-myTools](https://github.com/grostim/Beancount-myTools)

- **ドイツ**

  - コメルツ銀行: [beancount-commerzbank](https://github.com/siddhantgoel/beancount-commerzbank)
  - ドイツ・クレジット・バンク (DKB): [beancount-dkb](https://github.com/siddhantgoel/beancount-dkb)
  - ING: [beancount-ing](https://github.com/siddhantgoel/beancount-ing)
  - N26: [beancount-n26](https://github.com/siddhantgoel/beancount-n26)
  - フォルクスバンク & GLS銀行: [beancount-importer-volksbank](https://github.com/Fjanks/beancount-importer-volksbank)

- **インド**
  - SBI, BOI, Paytm, HSBC, ICICI: [beancount-importers-india](https://github.com/dumbPy/beancount-importers-india)

- **オランダ**
  - ABNアムロ銀行: [beancount-abnamro](https://github.com/deepakg/beancount-abnamro)

- **スイス**

  - 全般: [tariochbctools](https://tariochbctools.readthedocs.io/) (BCGE, Neon, Raiffeisen, ZKB, Fidelity)
  - Finpension: [drnuke-bean](https://github.com/Dr-Nuke/drnuke-bean?tab=readme-ov-file#finpension-importer)
  - PostFinance: [tariochbctools](https://github.com/tarioch/beancounttools/blob/master/src/tariochbctools/importers/postfinance/importer.py), [drnuke-bean](https://github.com/Dr-Nuke/drnuke-bean?tab=readme-ov-file#postfinance-importer-swiss)

- **イギリス**

  - Monzo, Revolut, Wise: [Evernight/beancount-importers](https://github.com/Evernight/beancount-importers/)
  - Revolut, Wise: [tariochbctools](https://tariochbctools.readthedocs.io/en/latest/importers.html#revolut)

- **アメリカ**

  - Amex, Chase, Citi, Schwab: [mterwill/gist](https://gist.github.com/mterwill/7fdcc573dc1aa158648aacd4e33786e8#file-importers-amex-py)
  - Capital One: [mtlynch/beancount-capitalone](https://github.com/mtlynch/beancount-capitalone)
  - Chase: [mtlynch/beancount-chase-bank](https://github.com/mtlynch/beancount-chase-bank), [ArthurFDLR/beancount-chase](https://github.com/ArthurFDLR/beancount-chase)
  - Clipper: [beancount-clipper](https://git.sr.ht/~goorzhel/beancount-clipper)
  - Mercury: [mtlynch/beancount-mercury](https://github.com/mtlynch/beancount-mercury)

- **ブロックチェーン**
  - [tariochbctools](https://tariochbctools.readthedocs.io/en/latest/importers.html#blockchain)

### 4. エディタのサポートとツール

Beancountを開発環境に統合し、編集やメンテナンスを効率化するツール。

- **IDEのサポート：** 構文ハイライト、自動補完、リアルタイムの残高確認機能を提供するプラグイン。

  - [VSCode](https://marketplace.visualstudio.com/items?itemName=Lencerf.beancount)
  - [Emacs](https://github.com/beancount/beancount-mode)
  - [Vim](https://github.com/nathangrigg/vim-beancount)
  - [Zed](https://github.com/zed-extensions/beancount)
  - [Sublime Text](https://github.com/norseghost/sublime-beancount)
  - [Atom](https://atom.io/packages/beancount)
  - [Beancount Language Server](https://github.com/polarmutex/beancount-language-server)（LSP互換エディタ全般用）

- **自動化とユーティリティ：**

  - `bean-add`: コマンドラインから対話形式で取引を追加。
  - `beancount-black`: Beancountファイル向けの構成の強い（opinionated）コードフォーマッター。
  - `beancount-categorizer`: 正規表現ルールを使用して取引を自動的に分類。
  - `beanahead`: 将来の取引を管理・予測。

- **データ移行ツール：** 他の会計システムからデータを変換するためのユーティリティ。

  - GnuCashから: [henriquebastos/gc-to-bc](https://github.com/henriquebastos/gnucash-to-beancount/), [dtrai2/gc-to-bc](https://github.com/dtrai2/gnucash-to-beancount/)
  - Ledger/hledgerから: [travisdahlke/gist](https://gist.github.com/travisdahlke/71152286b0a8826249fe), [zacchiro/ledger2beancount](https://github.com/zacchiro/ledger2beancount)
  - YNABから: [hoostus/beancount-ynab](https://github.com/hoostus/beancount-ynab)

### 5. プラグイン（元帳拡張）

処理中に実行される元帳内Pythonモジュールで、カスタムルールの適用、取引の自動化、新機能の追加などを行います。

- **予算管理：**
  - [fava-envelope](https://github.com/polarmutex/fava-envelope): 封筒方式の予算管理のためのFava拡張。

- **自動化とチェック：**

  - [autobean.share](https://github.com/SEIAROTg/autobean/tree/master/autobean/share): 費用の分割と債務管理。
  - [autobean.sorted](https://github.com/SEIAROTg/autobean/tree/master/autobean/sorted): 取引が時系列順に並んでいることを確認。
  - [beancount-checkclosed](https://github.com/daniel-wells/beancount_checkclosed): 閉鎖された口座の残高がゼロであることを自動的にチェック。

- **データ操作：**

  - [autobean.narration](https://github.com/SEIAROTg/autobean/tree/master/autobean/narration): 取引の摘要（narration）を自動生成。
  - [beancount-lazy-plugins.filter\_map](https://github.com/Evernight/beancount-lazy-plugins/tree/main?tab=readme-ov-file#filter_map): フィルタリングされた取引グループに操作を適用。

### 6. 価格ソース

投資価値を追跡するために、コモディティ、株式、通貨の過去および現在の価格を取得するスクリプト。

- [beancount-exchangerates](https://github.com/xuhcc/beancount-exchangerates): `frankfurter.dev` などの API を介した法定通貨用。
- [pricehist](https://gitlab.com/chrisberkhout/pricehist): マルチソース価格取得ツール。
- [beancount-cryptoassets](https://github.com/xuhcc/beancount-cryptoassets): 暗号資産の価格取得用。
- [tariochbctools](https://tariochbctools.readthedocs.io/): Interactive Brokers 用の価格ソースが含まれています。

***

## 学習 & コミュニティ

### 書籍 & 詳細ガイド

- **Tracking Personal Finances using Python:** Beancount を使用して個人資産管理システムを構築するための包括的なガイドを提供する書籍。 ([ウェブサイト](https://personalfinancespython.com/))
- **中国語ブログシリーズ (BYVoid):** [第1部：なぜ？ (Why?)](https://byvoid.com/zhs/blog/beancount-bookkeeping-1)、[第2部：借方と貸方 (Debits & Credits)](https://byvoid.com/zhs/blog/beancount-bookkeeping-2)

### 厳選ブログ記事

- **英語**

  - [Counting beans - and more - with Beancount](https://lwn.net/Articles/751874/)
  - [Managing Personal Finances using Python](https://sgoel.dev/posts/managing-personal-finances-using-python/)
  - [No-Bullshit Beancount Introduction](https://web.archive.org/web/20221119110728/https://blog.leononame.dev/2019/08/beancount/)

- **フランス語**
  - [Beancount ou la comptabilité pour les hackers](https://cyril.deguet.com/fr/2015/09/03/beancount-comptabilite-pour-hackers/)

- **中国語**
  - [Beancount —— 命令行复式簿记](https://wzyboy.im/post/1063.html)

### コミュニティ

- **メーリングリスト:** [Google Groups](https://groups.google.com/g/beancount) (主要なディスカッションフォーラム)
- **ライブチャット (IRC):** [web.libera.chat の #beancount](https://web.libera.chat/gamja/?channels=%23beancount)
- **Telegram (中国語):** [t.me/beancount\_zh](https://t.me/beancount_zh)

***

## 商用サービス & アプリ

インフラを自分で管理することなく、Beancount のパワーを活用したいユーザー向け。

| サービス             | 説明                                                                                                                                                                                                                                  |
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Beancount.io** | Beancount と Fava のインスタンスをすぐに使える状態で提供する SaaS (Software as a Service) プラットフォーム。 [iOS](https://apps.apple.com/app/id1527950512) および [Android](https://play.google.com/store/apps/details?id=io.beancount.android) 用の専用モバイルアプリも提供しています。 |

## プレーンテキストを活用しよう。

Beancountで帳簿を作成するか、ガイドに沿って自分の環境を構築しましょう。

[無料で始める](https://beancount.io/sign-up/?next=%2Fledger%2F) [はじめ方ガイド](https://beancount.io/ja/docs/getting-started)

## Where to look next

- [Sitemap](https://beancount.io/sitemap.xml) - all pages with hreflang alternates
- [LLMs index](https://beancount.io/llms.txt) - curated links for AI agents (also /llms-full.txt for full docs)
- [Documentation](https://beancount.io/docs) - every doc is also available as text/markdown via .md suffix or Accept negotiation
- [REST API reference](https://beancount.io/docs/api-reference) - interactive endpoints, schemas, authentication, and code samples
- [OpenAPI spec](https://beancount.io/openapi.json) - OpenAPI 3.1 spec for this website's public content endpoints; the product contract for ledger operations is at https://beancount.io/api-gateway/v1/openapi.json
- [GraphQL](https://beancount.io/graphql) - public, read-only content API over the blog and research logs (no credentials, no ledger data): 12 query fields over 23 types
- [MCP server](https://beancount.io/mcp) - Model Context Protocol at https://beancount.io/api-gateway/mcp
