{"id":40519027,"url":"https://github.com/Leon2xiaowu/fava_budget_freedom","last_synced_at":"2026-01-29T19:00:38.070Z","repository":{"id":327408363,"uuid":"1106601325","full_name":"Leon2xiaowu/fava_budget_freedom","owner":"Leon2xiaowu","description":" a Fava extension plugin designed to provide flexible and powerful budget management and visualization features","archived":false,"fork":false,"pushed_at":"2026-01-18T10:26:07.000Z","size":100,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-18T19:07:53.842Z","etag":null,"topics":["beancount","budget","fava"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Leon2xiaowu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-29T15:18:01.000Z","updated_at":"2026-01-18T10:26:30.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Leon2xiaowu/fava_budget_freedom","commit_stats":null,"previous_names":["leon2xiaowu/fava_budget_freedom"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Leon2xiaowu/fava_budget_freedom","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leon2xiaowu%2Ffava_budget_freedom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leon2xiaowu%2Ffava_budget_freedom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leon2xiaowu%2Ffava_budget_freedom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leon2xiaowu%2Ffava_budget_freedom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Leon2xiaowu","download_url":"https://codeload.github.com/Leon2xiaowu/fava_budget_freedom/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leon2xiaowu%2Ffava_budget_freedom/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28882598,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T16:41:59.663Z","status":"ssl_error","status_checked_at":"2026-01-29T16:39:39.641Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["beancount","budget","fava"],"created_at":"2026-01-20T21:00:34.167Z","updated_at":"2026-01-29T19:00:38.063Z","avatar_url":"https://github.com/Leon2xiaowu.png","language":"Python","funding_links":[],"categories":["Plugins"],"sub_categories":["Fava"],"readme":"# Fava Budget Freedom\n\nEnglish | [简体中文](README_zh-CN.md)\n\nFava Budget Freedom is a [Fava](https://beancount.github.io/fava/) extension plugin designed to provide flexible and powerful budget management and visualization features. It supports wildcard-based account matching, multiple budget periods, and budget rollover mechanism to help you achieve better financial freedom.\n\n## Key Features\n\n- **Flexible Budget Definitions**: Define budgets using custom directives with wildcard support (e.g., `Expenses:Food:*`).\n- **Multiple Period Support**: Supports `monthly`, `weekly`, `quarterly`, and `yearly` budget periods.\n- **Budget Rollover**: Monthly budgets support rollover functionality - unused amounts accumulate to the next month, while overspending reduces next month's budget.\n- **Amortization Support**: Intelligently handles transactions generated by the `beancount_periodic.amortize` plugin, counting lump-sum expenses in budgets while automatically ignoring periodic amortization entries, with amortization details displayed as sub-items.\n- **Visual Progress Bars**: Intuitively displays budget usage progress with ideal reference lines based on time progress (year-to-date view only).\n- **Smart Time Ranges**: Supports Fava's time filtering, defaulting to year-to-date (YTD) budget execution.\n- **Interactive Reports**: Click on account patterns to jump directly to the corresponding account detail page.\n\n## Screenshot\n\n![Budget Freedom Screenshot](assets/screenshot.png)\n\n## Usage\n\n### 1. Install the Plugin\n\nYou can install directly from GitHub using pip:\n\n```bash\npip install git+https://github.com/Leon2xiaowu/fava_budget_freedom.git\n```\n\nOr, if you have downloaded the source code, install from the source directory:\n\n```bash\npip install .\n```\n\nEnsure that `fava_budget_freedom` is available in your Python environment after installation.\n\n### 2. Configure Beancount\n\nLoad the plugin in your `.beancount` file:\n\n```beancount\n2025-01-01 custom \"fava-extension\" \"fava_budget_freedom\"\n```\n\n### 3. Define Budgets\n\nDefine budgets using the `custom \"budget\"` directive.\n\n**Syntax:**\n\n```beancount\nYYYY-MM-DD custom \"budget\" \"AccountPattern\" \"Period\" \"Amount Currency\" [\"rollover\"]\n```\n\n- **AccountPattern**: Account name or wildcard pattern (e.g., `Expenses:Food` or `Expenses:Food:*`).\n- **Period**: Budget period, valid values: `monthly`, `weekly`, `quarterly`, `yearly`.\n- **Amount Currency**: Budget amount and currency (e.g., `2000 CNY`).\n- **rollover**: (Optional) Only applicable to `monthly` budgets, enables budget accumulation.\n\n**Examples:**\n\n```beancount\n; Monthly food budget of 2000 USD with rollover enabled\n2025-01-01 custom \"budget\" \"Expenses:Food:*\" \"monthly\" 2000 USD \"rollover\"\n\n; Weekly books budget of 20 EUR\n2025-01-01 custom \"budget\" \"Expenses:Books\" \"weekly\" 20.00 EUR\n\n; Annual holiday budget of 2500 EUR\n2025-01-01 custom \"budget\" \"Expenses:Holiday\" \"yearly\" 2500.00 EUR\n```\n\n### 4. Amortization Support\n\nThe plugin works seamlessly with the `beancount_periodic.amortize` plugin to intelligently handle amortization transactions.\n\n**How it works:**\n\n1. **Lump-sum expenses count toward budget**: One-time large expenses using `Equity:Amortization:*` accounts are automatically converted to corresponding `Expenses:*` accounts and counted in the budget\n2. **Auto-ignore amortization entries**: Monthly amortization transactions automatically generated by the `amortize` plugin won't be counted twice\n3. **Detail visualization**: In the budget report, amortization items are displayed as sub-items under the corresponding expense category\n\n**Example:**\n\n```beancount\n; Configure the amortize plugin\nplugin \"beancount_periodic.amortize\" \"{'generate_until':'today'}\"\n\n; Define rent budget\n2025-01-01 custom \"budget\" \"Expenses:Home:Rent\" \"yearly\" 12000 USD\n\n; One-time annual rent payment, amortized over 12 months\n2025-10-03 * \"Landlord\" \"Annual Rent Payment\"\n  Liabilities:CreditCard:0001     -12000 USD\n  Equity:Amortization:Home:Rent\n    amortize: \"1 Year /Monthly\"\n```\n\n**Budget tracking behavior:**\n\n- The `Expenses:Home:Rent` budget will track the full 12000 USD lump-sum expense\n- Auto-generated monthly 1000 USD amortization entries (`Equity:Amortization:Home:Rent` → `Expenses:Home:Rent`) are automatically ignored\n- In the report, a sub-item `↳ Equity:Amortization:Home:Rent` will be displayed under the `Expenses:Home:Rent` row, showing the amortization amount\n\n**Important notes:**\n\n- Amortization detection rule: If a transaction contains an income account (negative amount) starting with `Equity:Amortization:*`, it's identified as an amortization-generated transaction and skipped\n- In lump-sum expense transactions, `Equity:Amortization:*` expenses (positive amounts) are converted to `Expenses:*` for budget matching\n- Click on the `Equity:Amortization:*` account name in sub-items to view detailed transaction records for that account\n\n## Development \u0026 Running\n\n### Environment Setup\n\nIt's recommended to use a Python virtual environment for development to avoid polluting your system environment.\n\n1.  **Create a virtual environment**\n\n    ```bash\n    python3 -m venv venv\n    ```\n\n2.  **Activate the virtual environment**\n\n    - macOS / Linux:\n      ```bash\n      source venv/bin/activate\n      ```\n    - Windows:\n      ```bash\n      venv\\Scripts\\activate\n      ```\n\n3.  **Install dependencies**\n\n    ```bash\n    pip install fava beancount\n    ```\n\n### Running the Project\n\nYou can test the plugin using the provided example file in your local development environment.\n\n1.  Set `PYTHONPATH` to the current directory so Fava can load the plugin.\n2.  Start Fava.\n\n```bash\n# Set PYTHONPATH and start Fava\nexport PYTHONPATH=$PWD\nfava example.beancount\n```\n\nOr run directly:\n\n```bash\nPYTHONPATH=. fava example.beancount\n```\n\nVisit `http://localhost:5000` and find the \"Budget Freedom\" extension page in the sidebar.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLeon2xiaowu%2Ffava_budget_freedom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLeon2xiaowu%2Ffava_budget_freedom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLeon2xiaowu%2Ffava_budget_freedom/lists"}