Bat

Log and search local text entries from the command line. Use when adding quick notes, searching past entries, or exporting a simple activity log.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "Bat" with this command: npx skills add xueyetianya/bat

Bat

A lightweight, multi-purpose command-line utility for logging, searching, and managing text entries. All data stays local in plain-text log files — no cloud, no dependencies.

Commands

CommandDescription
run <arg>Execute the main function — prints the argument and logs the action.
configShow the config file path ($DATA_DIR/config.json) and log the action.
statusPrint current status ("ready") and log the check.
initInitialize the data directory — confirms creation at $DATA_DIR.
listPrint all entries from the main data log (data.log). Shows "(empty)" if no entries exist.
add <text>Append a timestamped entry to the log. Format: YYYY-MM-DD <text>.
remove <text>Mark an entry as removed and log the removal action.
search <term>Case-insensitive search through all logged entries. Shows "Not found" if no matches.
exportOutput the full data log to stdout. Pipe to a file for backups: bat export > backup.txt.
infoShow version number and data directory path.
helpShow full usage information with all available commands.
versionPrint version number (v2.0.2).

Data Storage

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

  • data.log — Main log file (one entry per line, date-prefixed via add)
  • history.log — Command history with timestamps (auto-maintained by every command)
  • config.json — Configuration file path (shown by bat config)

Set the BAT_DIR environment variable to change the storage location. Alternatively, XDG_DATA_HOME is respected if BAT_DIR is not set.

Requirements

  • Bash 4+ (uses local variables, set -euo pipefail)
  • Standard Unix utilities (grep, date, wc, cat)
  • No external dependencies or API keys required

When to Use

  1. Quick note-taking from the terminal — Use bat add to jot down thoughts, meeting notes, or TODO items without leaving the shell.
  2. Maintaining a running activity log — Every add creates a dated entry, building a chronological record of activities over time.
  3. Searching past entries by keyword — Use bat search <term> to find specific entries with case-insensitive matching.
  4. Exporting and backing up notes — Use bat export > backup.txt to dump all entries for backup, sharing, or migration.
  5. General-purpose CLI data management — Use run, init, config, and status as building blocks for scripted workflows and automation pipelines.

Examples

# Add a note about a meeting
bat add "Met with client about Q2 targets"

# Add another entry
bat add "Sent follow-up email to vendor"

# List all logged entries
bat list

# Search for entries mentioning "client"
bat search "client"

# Export log to a backup file
bat export > ~/bat-backup.txt

# Check version and data directory
bat info

# Initialize (or verify) the data directory
bat init

# Check operational status
bat status

# Show config file path
bat config

Output

All commands print results to stdout and log actions to history.log. The add command confirms each save with the added text. The list and export commands output raw log content suitable for piping and redirection.


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

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

Sync Obsidian

Turn every Claude Code session into a beautiful Obsidian note — automatically. Generates dual output: structured Markdown reports + interactive Canvas visual...

Registry SourceRecently Updated
2370Profile unavailable
Coding

Find Skills

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express...

Registry SourceRecently Updated
2440Profile unavailable
Coding

Clawhub

Notion via notion-cli — a Rust CLI + MCP server for Notion API 2025-09-03+. Three-tier agent integration (read-only default, opt-in runtime writes, opt-in ad...

Registry SourceRecently Updated
1220Profile unavailable
Coding

Liubo's TickTick CLI

ticktick, dida365, 滴答清单, 任务管理, 新建任务, 完成任务, 创建任务, 列出任务, 查看任务, 更新任务, 删除任务, 放弃任务, 批量放弃, 任务提醒, 任务优先级, 任务标签, 任务到期, 任务开始时间, 滴答项目, 滴答列表, 创建项目, 更新项目, 滴答附件, 上传附件, tic...

Registry SourceRecently Updated
810Profile unavailable