← 返回
效率工具 中文

Cashflow

Track personal cash flow with simple terminal commands and local storage. Use when logging daily expenses, reviewing balance, or exporting records.
通过简单的终端命令和本地存储追踪个人现金流。适用于记录日常开支、查看余额或导出记录。
ckchzh
效率工具 clawhub v2.0.1 2 版本 99843.8 Key: 无需
★ 0
Stars
📥 639
下载
💾 2
安装
2
版本
#latest

概述

CashFlow

CashFlow is a multi-purpose utility tool for tracking and managing data entries from the terminal. It provides a simple log-based system for adding, listing, searching, and exporting entries with timestamped records.

Commands

CommandDescription
----------------------
cashflow run Execute the main function with given arguments
cashflow configShow configuration file location (config.json)
cashflow statusShow current status (ready/not ready)
cashflow initInitialize the data directory
cashflow listList all entries in the data log
cashflow add Add a new dated entry to the data log
cashflow remove Remove an entry
cashflow search Search entries (case-insensitive grep)
cashflow exportExport all data to stdout
cashflow infoShow version and data directory path
cashflow helpShow all available commands
cashflow versionShow version number

How It Works

CashFlow uses a flat-file approach. All entries are stored in data.log as dated lines (YYYY-MM-DD ). Every command also appends a timestamped record to history.log for auditing.

  • add appends a new line with today's date
  • list prints the full data log
  • search performs case-insensitive matching via grep
  • export dumps the raw data log to stdout for piping/redirection

Data Storage

All data is stored locally in ~/.local/share/cashflow/ by default:

  • data.log — Main data file with all entries (one per line, date-prefixed)
  • history.log — Timestamped audit trail of every command executed
  • config.json — Configuration file (referenced by cashflow config)

Override the storage location by setting the CASHFLOW_DIR environment variable:

export CASHFLOW_DIR="$HOME/my-data/cashflow"

Alternatively, XDG_DATA_HOME is respected if CASHFLOW_DIR is not set.

Requirements

  • bash 4+ (uses set -euo pipefail for strict mode)
  • Standard Unix tools (grep, date, cat)
  • No API keys needed
  • No external dependencies

When to Use

  1. Quick data logging — Use cashflow add to rapidly log entries (expenses, tasks, notes) with automatic date stamps
  2. Reviewing stored entries — Run cashflow list to see everything you've logged, or cashflow search to find specific entries
  3. Exporting data for analysis — Use cashflow export > data.csv to dump all entries for import into spreadsheets or other tools
  4. Project initialization — Run cashflow init to set up the data directory on a new machine or project
  5. Checking tool status — Use cashflow status and cashflow info to verify the tool is ready and see version/path information

Examples

# Initialize the data directory
cashflow init

# Add entries
cashflow add "Monthly rent payment 2500"
cashflow add "Freelance invoice received 8000"
cashflow add "Grocery shopping 350"

# List all entries
cashflow list
# Search for specific entries
cashflow search rent
cashflow search invoice

# Export data to a file
cashflow export > my-records.txt

# Check status and info
cashflow status
cashflow info
# Run a custom operation
cashflow run process-monthly

# View configuration location
cashflow config

# Remove an entry
cashflow remove "old entry"

# Show version
cashflow version

Output

All command output goes to stdout. The history log is always written to $DATA_DIR/history.log. Redirect output as needed:

cashflow list > all-entries.txt
cashflow export | grep "2026-03" > march-data.txt

Configuration

VariablePurposeDefault
----------------------------
CASHFLOW_DIROverride data/config directory~/.local/share/cashflow/
XDG_DATA_HOMEFallback base directory~/.local/share/

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

版本历史

共 2 个版本

  • v2.0.1 当前
    2026-03-29 17:43 安全 安全
  • v1.0.5
    2026-03-19 06:20

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

productivity

Nano Pdf

steipete
使用nano-pdf CLI通过自然语言指令编辑PDF
★ 275 📥 114,861
productivity

Word / DOCX

ivangdavila
创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。
★ 439 📥 147,717
developer-tools

Legal Advisor

ckchzh
生成劳动、消费、租赁及交通纠纷法律模板,适用于撰写纠纷信函、审查租户权利、准备索赔等。
★ 4 📥 4,009