Design Tool
Design Tool v2.0.0 — a utility toolkit for logging, tracking, and managing design-related entries from the command line.
Commands
All commands accept optional input arguments. Without arguments, they display recent entries from the corresponding log. With arguments, they record a new timestamped entry.
| Command | Description |
|---|
| INLINECODE0 | Record or view run entries |
| INLINECODE1 |
Record or view check entries |
|
convert <input> | Record or view convert entries |
|
analyze <input> | Record or view analyze entries |
|
generate <input> | Record or view generate entries |
|
preview <input> | Record or view preview entries |
|
batch <input> | Record or view batch entries |
|
compare <input> | Record or view compare entries |
|
export <input> | Record or view export entries |
|
config <input> | Record or view config entries |
|
status <input> | Record or view status entries |
|
report <input> | Record or view report entries |
|
stats | Show summary statistics across all log files |
|
search <term> | Search all log entries for a keyword (case-insensitive) |
|
recent | Display the 20 most recent history log entries |
|
help | Show usage information |
|
version | Print version (v2.0.0) |
Data Storage
All data is stored locally in ~/.local/share/design-tool/:
- - Per-command logs — Each command (run, check, convert, etc.) writes to its own
.log file with pipe-delimited timestamp|value format. - history.log — A unified activity log recording every write operation with timestamps.
- Export formats — The
export utility function supports JSON, CSV, and TXT output, written to ~/.local/share/design-tool/export.<fmt>.
No external services, databases, or API keys are required. Everything is flat-file and human-readable.
Requirements
- - Bash (v4+ recommended)
- No external dependencies — uses only standard Unix utilities (
date, wc, du, tail, grep, sed, basename, cat)
When to Use
- - When you need to log and track design-related activities from the command line
- To maintain a searchable history of design decisions and iterations
- For batch recording of design tasks with timestamps
- When you want to export design logs in JSON, CSV, or TXT format
- As part of a larger design workflow automation pipeline
- To get quick statistics and summaries of past design activities
Examples
CODEBLOCK0
How It Works
Each command follows the same pattern:
- 1. With arguments — Timestamps the input, appends it to the command-specific log file, prints confirmation, and logs to
history.log. - Without arguments — Shows the last 20 entries from that command's log file.
The stats command iterates all .log files, counts entries per file, and reports totals plus disk usage. The search command performs case-insensitive grep across all log files. The recent command tails the last 20 lines of history.log.
Powered by BytesAgain | bytesagain.com | hello@bytesagain.com
设计工具
Design Tool v2.0.0 — 一个用于从命令行记录、追踪和管理设计相关条目的实用工具包。
命令
所有命令均可接受可选输入参数。无参数时,显示对应日志中的最近条目;有参数时,记录一条带时间戳的新条目。
| 命令 | 描述 |
|---|
| run <输入> | 记录或查看运行条目 |
| check <输入> |
记录或查看检查条目 |
| convert <输入> | 记录或查看转换条目 |
| analyze <输入> | 记录或查看分析条目 |
| generate <输入> | 记录或查看生成条目 |
| preview <输入> | 记录或查看预览条目 |
| batch <输入> | 记录或查看批量条目 |
| compare <输入> | 记录或查看比较条目 |
| export <输入> | 记录或查看导出条目 |
| config <输入> | 记录或查看配置条目 |
| status <输入> | 记录或查看状态条目 |
| report <输入> | 记录或查看报告条目 |
| stats | 显示所有日志文件的汇总统计信息 |
| search <关键词> | 在所有日志条目中搜索关键词(不区分大小写) |
| recent | 显示最近20条历史日志条目 |
| help | 显示使用信息 |
| version | 打印版本号(v2.0.0) |
数据存储
所有数据本地存储在 ~/.local/share/design-tool/ 目录下:
- - 按命令分类的日志 — 每个命令(run、check、convert等)写入各自的 .log 文件,采用管道分隔的 时间戳|值 格式。
- history.log — 统一的活动日志,记录每次写入操作及其时间戳。
- 导出格式 — export 工具函数支持 JSON、CSV 和 TXT 输出,写入 ~/.local/share/design-tool/export.<格式>。
无需外部服务、数据库或 API 密钥。所有内容均为平面文件且人类可读。
系统要求
- - Bash(建议 v4+)
- 无外部依赖 — 仅使用标准 Unix 工具(date、wc、du、tail、grep、sed、basename、cat)
适用场景
- - 需要从命令行记录和追踪设计相关活动时
- 维护可搜索的设计决策和迭代历史时
- 批量记录带时间戳的设计任务时
- 需要以 JSON、CSV 或 TXT 格式导出设计日志时
- 作为更大规模设计工作流自动化流程的一部分时
- 需要快速获取过往设计活动的统计数据和摘要时
示例
bash
记录新的运行条目
design-tool run 更新了首页线框图v3
查看最近的运行条目(无参数 = 显示历史)
design-tool run
检查某事项并记录
design-tool check 色彩对比度通过WCAG AA标准
分析并记录
design-tool analyze 用户流程有5个步骤,目标为3个
预览并记录
design-tool preview 375px下的移动端布局
比较设计
design-tool compare v2与v3头部布局对比
在所有日志中搜索
design-tool search 线框图
查看汇总统计
design-tool stats
显示所有命令的近期活动
design-tool recent
显示工具版本
design-tool version
显示完整帮助
design-tool help
工作原理
每个命令遵循相同模式:
- 1. 有参数时 — 为输入添加时间戳,追加到命令专属日志文件,打印确认信息,并记录到 history.log。
- 无参数时 — 显示该命令日志文件中最近20条条目。
stats 命令遍历所有 .log 文件,统计每个文件的条目数,并报告总数及磁盘使用量。search 命令在所有日志文件中执行不区分大小写的 grep 搜索。recent 命令显示 history.log 的最后20行内容。
由 BytesAgain 提供支持 | bytesagain.com | hello@bytesagain.com