← 返回
开发者工具 中文

Mortgage Calculator

Calculate mortgage payments with equal-principal and equal-interest comparisons. Use when comparing loans, calculating payments, evaluating prepayment.
计算等额本金与等额本息按揭付款,用于贷款比较、付款计算及提前还款评估。
ckchzh
开发者工具 clawhub v2.0.1 4 版本 100000 Key: 无需
★ 0
Stars
📥 889
下载
💾 5
安装
4
版本
#latest

概述

Mortgage Calculator

Multi-purpose utility tool for managing structured data entries related to mortgage and financial calculations. Add, list, search, remove, and export data items — all stored locally in a simple log-based format with full history tracking.

Commands

All commands are invoked via mortgage-calculator [args].

CommandDescription
----------------------
run Execute the main function — logs and confirms execution of the specified operation
configShow the configuration file path ($DATA_DIR/config.json)
statusShow current status (reports "ready" when the tool is operational)
initInitialize the data directory (creates the data folder if it doesn't exist)
listList all data entries from the data log file
add Add a new dated entry to the data log (auto-prefixed with YYYY-MM-DD)
remove Remove an entry and log the removal
search Search the data log for a keyword (case-insensitive match via grep -i)
exportExport all data from the data log to stdout
infoShow current version number and data directory path
helpShow the built-in help message with all available commands
versionPrint version string (mortgage-calculator v2.0.0)

Data Storage

  • Location: ~/.local/share/mortgage-calculator/ (override with MORTGAGE_CALCULATOR_DIR environment variable, or XDG_DATA_HOME)
  • Data log: data.log — stores all entries added via add, one per line, prefixed with YYYY-MM-DD
  • History: history.log — every command execution is recorded with a timestamp (MM-DD HH:MM command: details) for auditing
  • Format: Plain text, one entry per line, human-readable

Requirements

  • Bash 4+
  • Standard Unix utilities (date, grep, cat, echo)
  • No external dependencies, no API keys, no network access needed

When to Use

  1. Financial record keeping — Use mortgage-calculator add to log mortgage-related events (payments made, rate changes, lender communications) and build a local history
  2. Payment tracking — Record monthly payments, extra payments, or escrow changes with add, then review the full log with list
  3. Comparison notes — Store notes from different loan scenarios or lender quotes using add, then search to find specific terms or rates
  4. Data export for spreadsheets — Use mortgage-calculator export to dump all entries to stdout and redirect to a file for import into Excel or Google Sheets
  5. Automation and scripting — Integrate mortgage-calculator add and mortgage-calculator export into shell scripts or cron jobs for automated financial logging workflows

Examples

# Initialize the data directory
mortgage-calculator init

# Add a mortgage payment record
mortgage-calculator add "Monthly payment: ¥4,235.00 — principal ¥2,100 + interest ¥2,135"

# Add a rate change note
mortgage-calculator add "Rate adjusted from 3.85% to 3.50% effective 2025-01-01"

# Add a prepayment record
mortgage-calculator add "Prepayment: ¥50,000 applied to principal, new balance ¥680,000"

# List all entries
mortgage-calculator list

# Search for entries about rate changes
mortgage-calculator search "rate"

# Search for prepayment records
mortgage-calculator search "prepayment"

# Export all data to a file
mortgage-calculator export > mortgage-history.txt

# Check current status
mortgage-calculator status

# Show version and data path
mortgage-calculator info

# Run a custom operation
mortgage-calculator run "quarterly review"

Output

All command output goes to stdout. Redirect to save:

mortgage-calculator list > all-records.txt
mortgage-calculator export > backup.txt

Configuration

Set the MORTGAGE_CALCULATOR_DIR environment variable to change the data directory:

export MORTGAGE_CALCULATOR_DIR="$HOME/my-mortgage-data"
mortgage-calculator init

Default location: ~/.local/share/mortgage-calculator/


Powered by BytesAgain | bytesagain.com | hello@bytesagain.com

版本历史

共 4 个版本

  • v2.0.1 当前
    2026-03-29 08:57 安全 安全
  • v2.3.4
    2026-03-27 21:02
  • v1.1.1
    2026-03-26 22:19
  • v1.0.2
    2026-03-14 01:40

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 668 📥 323,849
content-creation

Short Drama Writer

ckchzh
短剧剧本生成器。竖屏短剧、微短剧、剧情设计、角色塑造。Short drama script generator for vertical video dramas, plot design, character building. 短剧脚本
★ 8 📥 3,496
developer-tools

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 921 📥 185,742