Bookshelf
A personal productivity toolkit for managing books, reading plans, progress tracking, reviews, and reading habits — all from the command line with timestamped local logging, tagging, archiving, and weekly review workflows.
Commands
| Command | Description |
|---|
| INLINECODE0 | Add a book or item to your shelf. Without args, shows recent add entries |
| INLINECODE1 |
Record a reading plan or goal. Without args, shows recent plans |
|
bookshelf track <input> | Track reading progress. Without args, shows recent tracking entries |
|
bookshelf review <input> | Log a book review or assessment. Without args, shows recent reviews |
|
bookshelf streak <input> | Record a reading streak or consistency milestone. Without args, shows recent streaks |
|
bookshelf remind <input> | Set a reading reminder note. Without args, shows recent reminders |
|
bookshelf prioritize <input> | Record a prioritization decision. Without args, shows recent priorities |
|
bookshelf archive <input> | Archive a finished or dropped book. Without args, shows recent archives |
|
bookshelf tag <input> | Tag or categorize a book. Without args, shows recent tag entries |
|
bookshelf timeline <input> | Record a reading timeline entry or milestone. Without args, shows recent timeline entries |
|
bookshelf report <input> | Generate and log a reading report. Without args, shows recent reports |
|
bookshelf weekly-review <input> | Record a weekly reading review summary. Without args, shows recent weekly reviews |
|
bookshelf stats | Show summary statistics across all entry types |
|
bookshelf search <term> | Search across all log entries for a keyword |
|
bookshelf recent | Show the 20 most recent activity entries |
|
bookshelf status | Health check — version, data dir, entry count, disk usage, last activity |
|
bookshelf export <fmt> | Export all data in json, csv, or txt format |
|
bookshelf help | Show all available commands |
|
bookshelf version | Print version (v2.0.0) |
Each command (add, plan, track, etc.) works the same way:
- - With arguments: saves the entry with a timestamp to its dedicated
.log file and records it in activity history - Without arguments: displays the 20 most recent entries from that command's log
Data Storage
All data is stored locally in plain-text log files:
CODEBLOCK0
Each entry is stored as YYYY-MM-DD HH:MM|<value> for easy parsing and export.
Requirements
- - Bash 4.0+ (uses
set -euo pipefail) - Standard UNIX utilities:
date, wc, du, grep, head, tail, INLINECODE28 - No external dependencies or API keys required
- Works offline — all data stays on your machine
When to Use
- 1. Reading list management — Use
add to build your to-read list, prioritize what to pick up next, and archive books once finished or dropped - Reading habit tracking — Track daily pages or chapters with
track, maintain reading streaks with streak, and review progress in INLINECODE34 - Book review journaling — After finishing a book, use
review to log your thoughts, ratings, and key takeaways for future reference - Annual reading goals — Set yearly targets with
plan, track progress with stats, and generate periodic reports with report to stay on pace - Genre and tag organization — Use
tag to categorize books by genre, topic, or mood, then search to find the right book for any occasion
Examples
Add books and start reading
CODEBLOCK1
Track reading progress
CODEBLOCK2
Review, report, and archive
CODEBLOCK3
Search and export
CODEBLOCK4
Output
All commands print confirmation to stdout. Data is persisted in ~/.local/share/bookshelf/. Use bookshelf stats for an overview, bookshelf search <term> to find specific entries, or bookshelf export <fmt> to extract all data as JSON, CSV, or plain text.
Powered by BytesAgain | bytesagain.com | hello@bytesagain.com
书架
一款个人生产力工具包,用于管理书籍、阅读计划、进度追踪、书评和阅读习惯——全部通过命令行操作,支持带时间戳的本地日志记录、标签分类、归档和每周回顾工作流。
命令
| 命令 | 描述 |
|---|
| bookshelf add <输入> | 将一本书或项目添加到书架。无参数时显示最近添加的条目 |
| bookshelf plan <输入> |
记录阅读计划或目标。无参数时显示最近的计划 |
| bookshelf track <输入> | 追踪阅读进度。无参数时显示最近的追踪条目 |
| bookshelf review <输入> | 记录书评或评估。无参数时显示最近的书评 |
| bookshelf streak <输入> | 记录阅读连续天数或坚持里程碑。无参数时显示最近的连续记录 |
| bookshelf remind <输入> | 设置阅读提醒笔记。无参数时显示最近的提醒 |
| bookshelf prioritize <输入> | 记录优先级决策。无参数时显示最近的优先级 |
| bookshelf archive <输入> | 归档已读完或放弃的书籍。无参数时显示最近的归档 |
| bookshelf tag <输入> | 为书籍添加标签或分类。无参数时显示最近的标签条目 |
| bookshelf timeline <输入> | 记录阅读时间线条目或里程碑。无参数时显示最近的时间线条目 |
| bookshelf report <输入> | 生成并记录阅读报告。无参数时显示最近的报告 |
| bookshelf weekly-review <输入> | 记录每周阅读回顾总结。无参数时显示最近的每周回顾 |
| bookshelf stats | 显示所有条目类型的汇总统计 |
| bookshelf search <关键词> | 在所有日志条目中搜索关键词 |
| bookshelf recent | 显示最近20条活动条目 |
| bookshelf status | 健康检查——版本、数据目录、条目数量、磁盘使用、最近活动 |
| bookshelf export <格式> | 以json、csv或txt格式导出所有数据 |
| bookshelf help | 显示所有可用命令 |
| bookshelf version | 打印版本号(v2.0.0) |
每个命令(add、plan、track等)的工作方式相同:
- - 带参数时:将条目连同时间戳保存到专用的.log文件中,并记录到活动历史
- 无参数时:显示该命令日志中最近的20条条目
数据存储
所有数据本地存储在纯文本日志文件中:
~/.local/share/bookshelf/
├── add.log # 添加的书籍和项目
├── plan.log # 阅读计划和目标
├── track.log # 进度追踪条目
├── review.log # 书评和评估
├── streak.log # 阅读连续记录
├── remind.log # 提醒笔记
├── prioritize.log # 优先级决策
├── archive.log # 已归档/已读完的书籍
├── tag.log # 标签和体裁分类
├── timeline.log # 阅读时间线里程碑
├── report.log # 阅读报告和总结
├── weekly-review.log # 每周阅读回顾总结
└── history.log # 带时间戳的统一活动日志
每个条目存储为YYYY-MM-DD HH:MM|<值>格式,便于解析和导出。
系统要求
- - Bash 4.0+(使用set -euo pipefail)
- 标准UNIX工具:date、wc、du、grep、head、tail、cat
- 无需外部依赖或API密钥
- 支持离线使用——所有数据保留在本地机器上
使用场景
- 1. 阅读清单管理——使用add构建待读清单,用prioritize决定下一本读什么,读完或放弃后用archive归档
- 阅读习惯追踪——用track追踪每日页数或章节,用streak保持阅读连续记录,在weekly-review中回顾进度
- 书评日记——读完一本书后,用review记录想法、评分和关键收获,供日后参考
- 年度阅读目标——用plan设定年度目标,用stats追踪进度,用report生成定期报告以保持节奏
- 体裁和标签组织——用tag按体裁、主题或心情分类书籍,然后用search找到适合任何场合的书籍
示例
添加书籍并开始阅读
bash
将书籍添加到书架
bookshelf add 《原子习惯》詹姆斯·克利尔著——凯莉推荐
bookshelf add 《深度工作》卡尔·纽波特著——生产力经典
bookshelf add 《火星救援》安迪·威尔著——科幻娱乐
按体裁添加标签
bookshelf tag 《原子习惯》: #自我提升 #习惯 #生产力
bookshelf tag 《深度工作》: #生产力 #专注 #职业发展
bookshelf tag 《火星救援》: #科幻 #小说 #冒险
确定下一本读什么
bookshelf prioritize 《原子习惯》——本周开始,章节简短
追踪阅读进度
bash
追踪每日阅读
bookshelf track 《原子习惯》——读完第1-3章,45页
bookshelf track 《原子习惯》——第4-6章,基于身份的习惯部分
记录连续阅读
bookshelf streak 连续第7天每天至少阅读20页
bookshelf streak 第30天——连续一个月!🎉
设置提醒
bookshelf remind 4月20日前归还《深度工作》图书馆副本
记录时间线里程碑
bookshelf timeline 2024-04-01:开始《原子习惯》阅读挑战
书评、报告和归档
bash
撰写书评
bookshelf review 《原子习惯》——5/5分。最大收获:习惯叠加。改变了我的晨间习惯。
每周阅读回顾
bookshelf weekly-review 第15周:读完《原子习惯》(5/5分),开始读《深度工作》。共阅读180页。
生成月度报告
bookshelf report 4月:读完2本书,1本在读。阅读620页。按计划完成24本书的目标。
设定阅读计划
bookshelf plan 第二季度目标:读完6本书——2本非虚构、2本科幻、2本技术类
归档已读完的书籍
bookshelf archive 《原子习惯》——2024-04-10完成,书评已保存
查看整体统计
bookshelf stats
bookshelf recent
搜索和导出
bash
搜索书籍或主题
bookshelf search 生产力
以JSON格式导出整个图书馆
bookshelf export json
以CSV格式导出,用于电子表格
bookshelf export csv
健康检查
bookshelf status
输出
所有命令在标准输出中打印确认信息。数据持久化存储在~/.local/share/bookshelf/中。使用bookshelf stats查看概览,bookshelf search <关键词>查找特定条目,或bookshelf export <格式>以JSON、CSV或纯文本格式导出所有数据。
由BytesAgain提供技术支持 | bytesagain.com | hello@bytesagain.com