@clawhub-bytesagain3-5bff6becb8
Manage Comment data right from your terminal. Use when you need comment.
--- name: "Comment" description: "Manage Comment data right from your terminal. Use when you need comment." version: "2.0.0" author: "BytesAgain" homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills tags: ["tool", "terminal", "cli", "utility", "comment"] --- # Comment Manage Comment data right from your terminal. Built for people who want get things done faster without complex setup. ## Why Comment? - Works entirely offline — your data never leaves your machine - Simple command-line interface, no GUI needed - Export to JSON, CSV, or plain text anytime - Automatic history and activity logging ## Getting Started ```bash # See what you can do comment help # Check current status comment status # View your statistics comment stats ``` ## Commands | Command | What it does | |---------|-------------| | `comment run` | Run | | `comment check` | Check | | `comment convert` | Convert | | `comment analyze` | Analyze | | `comment generate` | Generate | | `comment preview` | Preview | | `comment batch` | Batch | | `comment compare` | Compare | | `comment export` | Export | | `comment config` | Config | | `comment status` | Status | | `comment report` | Report | | `comment stats` | Summary statistics | | `comment export` | <fmt> Export (json|csv|txt) | | `comment search` | <term> Search entries | | `comment recent` | Recent activity | | `comment status` | Health check | | `comment help` | Show this help | | `comment version` | Show version | | `comment $name:` | $c entries | | `comment Total:` | $total entries | | `comment Data` | size: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1) | | `comment Version:` | v2.0.0 | | `comment Data` | dir: $DATA_DIR | | `comment Entries:` | $(cat "$DATA_DIR"/*.log 2>/dev/null | wc -l) total | | `comment Disk:` | $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1) | | `comment Last:` | $(tail -1 "$DATA_DIR/history.log" 2>/dev/null || echo never) | | `comment Status:` | OK | | `comment [Comment]` | run: $input | | `comment Saved.` | Total run entries: $total | | `comment [Comment]` | check: $input | | `comment Saved.` | Total check entries: $total | | `comment [Comment]` | convert: $input | | `comment Saved.` | Total convert entries: $total | | `comment [Comment]` | analyze: $input | | `comment Saved.` | Total analyze entries: $total | | `comment [Comment]` | generate: $input | | `comment Saved.` | Total generate entries: $total | | `comment [Comment]` | preview: $input | | `comment Saved.` | Total preview entries: $total | | `comment [Comment]` | batch: $input | | `comment Saved.` | Total batch entries: $total | | `comment [Comment]` | compare: $input | | `comment Saved.` | Total compare entries: $total | | `comment [Comment]` | export: $input | | `comment Saved.` | Total export entries: $total | | `comment [Comment]` | config: $input | | `comment Saved.` | Total config entries: $total | | `comment [Comment]` | status: $input | | `comment Saved.` | Total status entries: $total | | `comment [Comment]` | report: $input | | `comment Saved.` | Total report entries: $total | ## Data Storage All data is stored locally at `~/.local/share/comment/`. Each action is logged with timestamps. Use `export` to back up your data anytime. ## Feedback Found a bug or have a suggestion? Let us know: https://bytesagain.com/feedback/ --- Powered by BytesAgain | bytesagain.com | [email protected] FILE:scripts/script.sh #!/usr/bin/env bash # Comment — utility tool # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail DATA_DIR="HOME/.local/share/comment" mkdir -p "$DATA_DIR" _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } _version() { echo "comment v2.0.0"; } _help() { echo "Comment v2.0.0 — utility toolkit" echo "" echo "Usage: comment <command> [args]" echo "" echo "Commands:" echo " run Run" echo " check Check" echo " convert Convert" echo " analyze Analyze" echo " generate Generate" echo " preview Preview" echo " batch Batch" echo " compare Compare" echo " export Export" echo " config Config" echo " status Status" echo " report Report" echo " stats Summary statistics" echo " export <fmt> Export (json|csv|txt)" echo " search <term> Search entries" echo " recent Recent activity" echo " status Health check" echo " help Show this help" echo " version Show version" echo "" echo "Data: $DATA_DIR" } _stats() { echo "=== Comment Stats ===" local total=0 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) local c=$(wc -l < "$f") total=$((total + c)) echo " $name: $c entries" done echo " ---" echo " Total: $total entries" echo " Data size: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1)" } _export() { local fmt="-json" local out="$DATA_DIR/export.$fmt" case "$fmt" in json) echo "[" > "$out" local first=1 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) while IFS='|' read -r ts val; do [ $first -eq 1 ] && first=0 || echo "," >> "$out" printf ' {"type":"%s","time":"%s","value":"%s"}' "$name" "$ts" "$val" >> "$out" done < "$f" done echo "\n]" >> "$out" ;; csv) echo "type,time,value" > "$out" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) while IFS='|' read -r ts val; do echo "$name,$ts,$val" >> "$out"; done < "$f" done ;; txt) echo "=== Comment Export ===" > "$out" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue echo "--- $(basename "$f" .log) ---" >> "$out" cat "$f" >> "$out" done ;; *) echo "Formats: json, csv, txt"; return 1 ;; esac echo "Exported to $out ($(wc -c < "$out") bytes)" } _status() { echo "=== Comment Status ===" echo " Version: v2.0.0" echo " Data dir: $DATA_DIR" echo " Entries: $(cat "$DATA_DIR"/*.log 2>/dev/null | wc -l) total" echo " Disk: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1)" echo " Last: $(tail -1 "$DATA_DIR/history.log" 2>/dev/null || echo never)" echo " Status: OK" } _search() { local term="?Usage: comment search <term>" echo "Searching for: $term" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local m=$(grep -i "$term" "$f" 2>/dev/null || true) if [ -n "$m" ]; then echo " --- $(basename "$f" .log) ---" echo "$m" | sed 's/^/ /' fi done } _recent() { echo "=== Recent Activity ===" tail -20 "$DATA_DIR/history.log" 2>/dev/null | sed 's/^/ /' || echo " No activity yet." } case "-help" in run) shift if [ $# -eq 0 ]; then echo "Recent run entries:" tail -20 "$DATA_DIR/run.log" 2>/dev/null || echo " No entries yet. Use: comment run <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/run.log" local total=$(wc -l < "$DATA_DIR/run.log") echo " [Comment] run: $input" echo " Saved. Total run entries: $total" _log "run" "$input" fi ;; check) shift if [ $# -eq 0 ]; then echo "Recent check entries:" tail -20 "$DATA_DIR/check.log" 2>/dev/null || echo " No entries yet. Use: comment check <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/check.log" local total=$(wc -l < "$DATA_DIR/check.log") echo " [Comment] check: $input" echo " Saved. Total check entries: $total" _log "check" "$input" fi ;; convert) shift if [ $# -eq 0 ]; then echo "Recent convert entries:" tail -20 "$DATA_DIR/convert.log" 2>/dev/null || echo " No entries yet. Use: comment convert <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/convert.log" local total=$(wc -l < "$DATA_DIR/convert.log") echo " [Comment] convert: $input" echo " Saved. Total convert entries: $total" _log "convert" "$input" fi ;; analyze) shift if [ $# -eq 0 ]; then echo "Recent analyze entries:" tail -20 "$DATA_DIR/analyze.log" 2>/dev/null || echo " No entries yet. Use: comment analyze <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/analyze.log" local total=$(wc -l < "$DATA_DIR/analyze.log") echo " [Comment] analyze: $input" echo " Saved. Total analyze entries: $total" _log "analyze" "$input" fi ;; generate) shift if [ $# -eq 0 ]; then echo "Recent generate entries:" tail -20 "$DATA_DIR/generate.log" 2>/dev/null || echo " No entries yet. Use: comment generate <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/generate.log" local total=$(wc -l < "$DATA_DIR/generate.log") echo " [Comment] generate: $input" echo " Saved. Total generate entries: $total" _log "generate" "$input" fi ;; preview) shift if [ $# -eq 0 ]; then echo "Recent preview entries:" tail -20 "$DATA_DIR/preview.log" 2>/dev/null || echo " No entries yet. Use: comment preview <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/preview.log" local total=$(wc -l < "$DATA_DIR/preview.log") echo " [Comment] preview: $input" echo " Saved. Total preview entries: $total" _log "preview" "$input" fi ;; batch) shift if [ $# -eq 0 ]; then echo "Recent batch entries:" tail -20 "$DATA_DIR/batch.log" 2>/dev/null || echo " No entries yet. Use: comment batch <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/batch.log" local total=$(wc -l < "$DATA_DIR/batch.log") echo " [Comment] batch: $input" echo " Saved. Total batch entries: $total" _log "batch" "$input" fi ;; compare) shift if [ $# -eq 0 ]; then echo "Recent compare entries:" tail -20 "$DATA_DIR/compare.log" 2>/dev/null || echo " No entries yet. Use: comment compare <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/compare.log" local total=$(wc -l < "$DATA_DIR/compare.log") echo " [Comment] compare: $input" echo " Saved. Total compare entries: $total" _log "compare" "$input" fi ;; export) shift if [ $# -eq 0 ]; then echo "Recent export entries:" tail -20 "$DATA_DIR/export.log" 2>/dev/null || echo " No entries yet. Use: comment export <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/export.log" local total=$(wc -l < "$DATA_DIR/export.log") echo " [Comment] export: $input" echo " Saved. Total export entries: $total" _log "export" "$input" fi ;; config) shift if [ $# -eq 0 ]; then echo "Recent config entries:" tail -20 "$DATA_DIR/config.log" 2>/dev/null || echo " No entries yet. Use: comment config <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/config.log" local total=$(wc -l < "$DATA_DIR/config.log") echo " [Comment] config: $input" echo " Saved. Total config entries: $total" _log "config" "$input" fi ;; status) shift if [ $# -eq 0 ]; then echo "Recent status entries:" tail -20 "$DATA_DIR/status.log" 2>/dev/null || echo " No entries yet. Use: comment status <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/status.log" local total=$(wc -l < "$DATA_DIR/status.log") echo " [Comment] status: $input" echo " Saved. Total status entries: $total" _log "status" "$input" fi ;; report) shift if [ $# -eq 0 ]; then echo "Recent report entries:" tail -20 "$DATA_DIR/report.log" 2>/dev/null || echo " No entries yet. Use: comment report <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/report.log" local total=$(wc -l < "$DATA_DIR/report.log") echo " [Comment] report: $input" echo " Saved. Total report entries: $total" _log "report" "$input" fi ;; stats) _stats ;; export) shift; _export "$@" ;; search) shift; _search "$@" ;; recent) _recent ;; status) _status ;; help|--help|-h) _help ;; version|--version|-v) _version ;; *) echo "Unknown: $1 — run 'comment help'" exit 1 ;; esac
Lightweight Dividend tracker. Add entries, view stats, search history, and export in multiple formats.
--- name: "Dividend" description: "Lightweight Dividend tracker. Add entries, view stats, search history, and export in multiple formats." version: "2.0.0" author: "BytesAgain" tags: ["planning", "dividend", "budget", "personal-finance", "accounting"] --- # Dividend Lightweight Dividend tracker. Add entries, view stats, search history, and export in multiple formats. ## Why Dividend? - Works entirely offline — your data never leaves your machine - Simple command-line interface, no GUI needed - Export to JSON, CSV, or plain text anytime - Automatic history and activity logging ## Getting Started ```bash # See what you can do dividend help # Check current status dividend status # View your statistics dividend stats ``` ## Commands | Command | What it does | |---------|-------------| | `dividend record` | Record | | `dividend categorize` | Categorize | | `dividend balance` | Balance | | `dividend trend` | Trend | | `dividend forecast` | Forecast | | `dividend export-report` | Export Report | | `dividend budget-check` | Budget Check | | `dividend summary` | Summary | | `dividend alert` | Alert | | `dividend history` | History | | `dividend compare` | Compare | | `dividend tax-note` | Tax Note | | `dividend stats` | Summary statistics | | `dividend export` | <fmt> Export (json|csv|txt) | | `dividend search` | <term> Search entries | | `dividend recent` | Recent activity | | `dividend status` | Health check | | `dividend help` | Show this help | | `dividend version` | Show version | | `dividend $name:` | $c entries | | `dividend Total:` | $total entries | | `dividend Data` | size: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1) | | `dividend Version:` | v2.0.0 | | `dividend Data` | dir: $DATA_DIR | | `dividend Entries:` | $(cat "$DATA_DIR"/*.log 2>/dev/null | wc -l) total | | `dividend Disk:` | $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1) | | `dividend Last:` | $(tail -1 "$DATA_DIR/history.log" 2>/dev/null || echo never) | | `dividend Status:` | OK | | `dividend [Dividend]` | record: $input | | `dividend Saved.` | Total record entries: $total | | `dividend [Dividend]` | categorize: $input | | `dividend Saved.` | Total categorize entries: $total | | `dividend [Dividend]` | balance: $input | | `dividend Saved.` | Total balance entries: $total | | `dividend [Dividend]` | trend: $input | | `dividend Saved.` | Total trend entries: $total | | `dividend [Dividend]` | forecast: $input | | `dividend Saved.` | Total forecast entries: $total | | `dividend [Dividend]` | export-report: $input | | `dividend Saved.` | Total export-report entries: $total | | `dividend [Dividend]` | budget-check: $input | | `dividend Saved.` | Total budget-check entries: $total | | `dividend [Dividend]` | summary: $input | | `dividend Saved.` | Total summary entries: $total | | `dividend [Dividend]` | alert: $input | | `dividend Saved.` | Total alert entries: $total | | `dividend [Dividend]` | history: $input | | `dividend Saved.` | Total history entries: $total | | `dividend [Dividend]` | compare: $input | | `dividend Saved.` | Total compare entries: $total | | `dividend [Dividend]` | tax-note: $input | | `dividend Saved.` | Total tax-note entries: $total | ## Data Storage All data is stored locally at `~/.local/share/dividend/`. Each action is logged with timestamps. Use `export` to back up your data anytime. ## Feedback Found a bug or have a suggestion? Let us know: https://bytesagain.com/feedback/ --- Powered by BytesAgain | bytesagain.com | [email protected] FILE:scripts/script.sh #!/usr/bin/env bash # Dividend — finance tool # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail DATA_DIR="HOME/.local/share/dividend" mkdir -p "$DATA_DIR" _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } _version() { echo "dividend v2.0.0"; } _help() { echo "Dividend v2.0.0 — finance toolkit" echo "" echo "Usage: dividend <command> [args]" echo "" echo "Commands:" echo " record Record" echo " categorize Categorize" echo " balance Balance" echo " trend Trend" echo " forecast Forecast" echo " export-report Export Report" echo " budget-check Budget Check" echo " summary Summary" echo " alert Alert" echo " history History" echo " compare Compare" echo " tax-note Tax Note" echo " stats Summary statistics" echo " export <fmt> Export (json|csv|txt)" echo " search <term> Search entries" echo " recent Recent activity" echo " status Health check" echo " help Show this help" echo " version Show version" echo "" echo "Data: $DATA_DIR" } _stats() { echo "=== Dividend Stats ===" local total=0 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) local c=$(wc -l < "$f") total=$((total + c)) echo " $name: $c entries" done echo " ---" echo " Total: $total entries" echo " Data size: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1)" } _export() { local fmt="-json" local out="$DATA_DIR/export.$fmt" case "$fmt" in json) echo "[" > "$out" local first=1 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) while IFS='|' read -r ts val; do [ $first -eq 1 ] && first=0 || echo "," >> "$out" printf ' {"type":"%s","time":"%s","value":"%s"}' "$name" "$ts" "$val" >> "$out" done < "$f" done echo "\n]" >> "$out" ;; csv) echo "type,time,value" > "$out" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) while IFS='|' read -r ts val; do echo "$name,$ts,$val" >> "$out"; done < "$f" done ;; txt) echo "=== Dividend Export ===" > "$out" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue echo "--- $(basename "$f" .log) ---" >> "$out" cat "$f" >> "$out" done ;; *) echo "Formats: json, csv, txt"; return 1 ;; esac echo "Exported to $out ($(wc -c < "$out") bytes)" } _status() { echo "=== Dividend Status ===" echo " Version: v2.0.0" echo " Data dir: $DATA_DIR" echo " Entries: $(cat "$DATA_DIR"/*.log 2>/dev/null | wc -l) total" echo " Disk: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1)" echo " Last: $(tail -1 "$DATA_DIR/history.log" 2>/dev/null || echo never)" echo " Status: OK" } _search() { local term="?Usage: dividend search <term>" echo "Searching for: $term" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local m=$(grep -i "$term" "$f" 2>/dev/null || true) if [ -n "$m" ]; then echo " --- $(basename "$f" .log) ---" echo "$m" | sed 's/^/ /' fi done } _recent() { echo "=== Recent Activity ===" tail -20 "$DATA_DIR/history.log" 2>/dev/null | sed 's/^/ /' || echo " No activity yet." } case "-help" in record) shift if [ $# -eq 0 ]; then echo "Recent record entries:" tail -20 "$DATA_DIR/record.log" 2>/dev/null || echo " No entries yet. Use: dividend record <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/record.log" local total=$(wc -l < "$DATA_DIR/record.log") echo " [Dividend] record: $input" echo " Saved. Total record entries: $total" _log "record" "$input" fi ;; categorize) shift if [ $# -eq 0 ]; then echo "Recent categorize entries:" tail -20 "$DATA_DIR/categorize.log" 2>/dev/null || echo " No entries yet. Use: dividend categorize <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/categorize.log" local total=$(wc -l < "$DATA_DIR/categorize.log") echo " [Dividend] categorize: $input" echo " Saved. Total categorize entries: $total" _log "categorize" "$input" fi ;; balance) shift if [ $# -eq 0 ]; then echo "Recent balance entries:" tail -20 "$DATA_DIR/balance.log" 2>/dev/null || echo " No entries yet. Use: dividend balance <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/balance.log" local total=$(wc -l < "$DATA_DIR/balance.log") echo " [Dividend] balance: $input" echo " Saved. Total balance entries: $total" _log "balance" "$input" fi ;; trend) shift if [ $# -eq 0 ]; then echo "Recent trend entries:" tail -20 "$DATA_DIR/trend.log" 2>/dev/null || echo " No entries yet. Use: dividend trend <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/trend.log" local total=$(wc -l < "$DATA_DIR/trend.log") echo " [Dividend] trend: $input" echo " Saved. Total trend entries: $total" _log "trend" "$input" fi ;; forecast) shift if [ $# -eq 0 ]; then echo "Recent forecast entries:" tail -20 "$DATA_DIR/forecast.log" 2>/dev/null || echo " No entries yet. Use: dividend forecast <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/forecast.log" local total=$(wc -l < "$DATA_DIR/forecast.log") echo " [Dividend] forecast: $input" echo " Saved. Total forecast entries: $total" _log "forecast" "$input" fi ;; export-report) shift if [ $# -eq 0 ]; then echo "Recent export-report entries:" tail -20 "$DATA_DIR/export-report.log" 2>/dev/null || echo " No entries yet. Use: dividend export-report <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/export-report.log" local total=$(wc -l < "$DATA_DIR/export-report.log") echo " [Dividend] export-report: $input" echo " Saved. Total export-report entries: $total" _log "export-report" "$input" fi ;; budget-check) shift if [ $# -eq 0 ]; then echo "Recent budget-check entries:" tail -20 "$DATA_DIR/budget-check.log" 2>/dev/null || echo " No entries yet. Use: dividend budget-check <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/budget-check.log" local total=$(wc -l < "$DATA_DIR/budget-check.log") echo " [Dividend] budget-check: $input" echo " Saved. Total budget-check entries: $total" _log "budget-check" "$input" fi ;; summary) shift if [ $# -eq 0 ]; then echo "Recent summary entries:" tail -20 "$DATA_DIR/summary.log" 2>/dev/null || echo " No entries yet. Use: dividend summary <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/summary.log" local total=$(wc -l < "$DATA_DIR/summary.log") echo " [Dividend] summary: $input" echo " Saved. Total summary entries: $total" _log "summary" "$input" fi ;; alert) shift if [ $# -eq 0 ]; then echo "Recent alert entries:" tail -20 "$DATA_DIR/alert.log" 2>/dev/null || echo " No entries yet. Use: dividend alert <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/alert.log" local total=$(wc -l < "$DATA_DIR/alert.log") echo " [Dividend] alert: $input" echo " Saved. Total alert entries: $total" _log "alert" "$input" fi ;; history) shift if [ $# -eq 0 ]; then echo "Recent history entries:" tail -20 "$DATA_DIR/history.log" 2>/dev/null || echo " No entries yet. Use: dividend history <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/history.log" local total=$(wc -l < "$DATA_DIR/history.log") echo " [Dividend] history: $input" echo " Saved. Total history entries: $total" _log "history" "$input" fi ;; compare) shift if [ $# -eq 0 ]; then echo "Recent compare entries:" tail -20 "$DATA_DIR/compare.log" 2>/dev/null || echo " No entries yet. Use: dividend compare <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/compare.log" local total=$(wc -l < "$DATA_DIR/compare.log") echo " [Dividend] compare: $input" echo " Saved. Total compare entries: $total" _log "compare" "$input" fi ;; tax-note) shift if [ $# -eq 0 ]; then echo "Recent tax-note entries:" tail -20 "$DATA_DIR/tax-note.log" 2>/dev/null || echo " No entries yet. Use: dividend tax-note <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/tax-note.log" local total=$(wc -l < "$DATA_DIR/tax-note.log") echo " [Dividend] tax-note: $input" echo " Saved. Total tax-note entries: $total" _log "tax-note" "$input" fi ;; stats) _stats ;; export) shift; _export "$@" ;; search) shift; _search "$@" ;; recent) _recent ;; status) _status ;; help|--help|-h) _help ;; version|--version|-v) _version ;; *) echo "Unknown: $1 — run 'dividend help'" exit 1 ;; esac
Manage terminal notifications with scheduling, filtering, and delivery tracking. Use when sending alerts, filtering notifications, confirming delivery.
--- name: "Notification" description: "Manage terminal notifications with scheduling, filtering, and delivery tracking. Use when sending alerts, filtering notifications, confirming delivery." version: "2.0.0" author: "BytesAgain" homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills tags: ["notification", "tool", "terminal", "cli", "utility"] --- # Notification Terminal-first Notification manager. Keep your utility tools data organized with simple commands. ## Why Notification? - Works entirely offline — your data never leaves your machine - Simple command-line interface, no GUI needed - Export to JSON, CSV, or plain text anytime - Automatic history and activity logging ## Getting Started ```bash # See what you can do notification help # Check current status notification status # View your statistics notification stats ``` ## Commands | Command | What it does | |---------|-------------| | `notification run` | Run | | `notification check` | Check | | `notification convert` | Convert | | `notification analyze` | Analyze | | `notification generate` | Generate | | `notification preview` | Preview | | `notification batch` | Batch | | `notification compare` | Compare | | `notification export` | Export | | `notification config` | Config | | `notification status` | Status | | `notification report` | Report | | `notification stats` | Summary statistics | | `notification export` | <fmt> Export (json|csv|txt) | | `notification search` | <term> Search entries | | `notification recent` | Recent activity | | `notification status` | Health check | | `notification help` | Show this help | | `notification version` | Show version | | `notification $name:` | $c entries | | `notification Total:` | $total entries | | `notification Data` | size: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1) | | `notification Version:` | v2.0.0 | | `notification Data` | dir: $DATA_DIR | | `notification Entries:` | $(cat "$DATA_DIR"/*.log 2>/dev/null | wc -l) total | | `notification Disk:` | $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1) | | `notification Last:` | $(tail -1 "$DATA_DIR/history.log" 2>/dev/null || echo never) | | `notification Status:` | OK | | `notification [Notification]` | run: $input | | `notification Saved.` | Total run entries: $total | | `notification [Notification]` | check: $input | | `notification Saved.` | Total check entries: $total | | `notification [Notification]` | convert: $input | | `notification Saved.` | Total convert entries: $total | | `notification [Notification]` | analyze: $input | | `notification Saved.` | Total analyze entries: $total | | `notification [Notification]` | generate: $input | | `notification Saved.` | Total generate entries: $total | | `notification [Notification]` | preview: $input | | `notification Saved.` | Total preview entries: $total | | `notification [Notification]` | batch: $input | | `notification Saved.` | Total batch entries: $total | | `notification [Notification]` | compare: $input | | `notification Saved.` | Total compare entries: $total | | `notification [Notification]` | export: $input | | `notification Saved.` | Total export entries: $total | | `notification [Notification]` | config: $input | | `notification Saved.` | Total config entries: $total | | `notification [Notification]` | status: $input | | `notification Saved.` | Total status entries: $total | | `notification [Notification]` | report: $input | | `notification Saved.` | Total report entries: $total | ## Data Storage All data is stored locally at `~/.local/share/notification/`. Each action is logged with timestamps. Use `export` to back up your data anytime. ## Feedback Found a bug or have a suggestion? Let us know: https://bytesagain.com/feedback/ --- Powered by BytesAgain | bytesagain.com | [email protected] FILE:scripts/script.sh #!/usr/bin/env bash # Notification — utility tool # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail DATA_DIR="HOME/.local/share/notification" mkdir -p "$DATA_DIR" _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } _version() { echo "notification v2.0.0"; } _help() { echo "Notification v2.0.0 — utility toolkit" echo "" echo "Usage: notification <command> [args]" echo "" echo "Commands:" echo " run Run" echo " check Check" echo " convert Convert" echo " analyze Analyze" echo " generate Generate" echo " preview Preview" echo " batch Batch" echo " compare Compare" echo " export Export" echo " config Config" echo " status Status" echo " report Report" echo " stats Summary statistics" echo " export <fmt> Export (json|csv|txt)" echo " search <term> Search entries" echo " recent Recent activity" echo " status Health check" echo " help Show this help" echo " version Show version" echo "" echo "Data: $DATA_DIR" } _stats() { echo "=== Notification Stats ===" local total=0 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) local c=$(wc -l < "$f") total=$((total + c)) echo " $name: $c entries" done echo " ---" echo " Total: $total entries" echo " Data size: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1)" } _export() { local fmt="-json" local out="$DATA_DIR/export.$fmt" case "$fmt" in json) echo "[" > "$out" local first=1 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) while IFS='|' read -r ts val; do [ $first -eq 1 ] && first=0 || echo "," >> "$out" printf ' {"type":"%s","time":"%s","value":"%s"}' "$name" "$ts" "$val" >> "$out" done < "$f" done echo "\n]" >> "$out" ;; csv) echo "type,time,value" > "$out" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) while IFS='|' read -r ts val; do echo "$name,$ts,$val" >> "$out"; done < "$f" done ;; txt) echo "=== Notification Export ===" > "$out" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue echo "--- $(basename "$f" .log) ---" >> "$out" cat "$f" >> "$out" done ;; *) echo "Formats: json, csv, txt"; return 1 ;; esac echo "Exported to $out ($(wc -c < "$out") bytes)" } _status() { echo "=== Notification Status ===" echo " Version: v2.0.0" echo " Data dir: $DATA_DIR" echo " Entries: $(cat "$DATA_DIR"/*.log 2>/dev/null | wc -l) total" echo " Disk: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1)" echo " Last: $(tail -1 "$DATA_DIR/history.log" 2>/dev/null || echo never)" echo " Status: OK" } _search() { local term="?Usage: notification search <term>" echo "Searching for: $term" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local m=$(grep -i "$term" "$f" 2>/dev/null || true) if [ -n "$m" ]; then echo " --- $(basename "$f" .log) ---" echo "$m" | sed 's/^/ /' fi done } _recent() { echo "=== Recent Activity ===" tail -20 "$DATA_DIR/history.log" 2>/dev/null | sed 's/^/ /' || echo " No activity yet." } case "-help" in run) shift if [ $# -eq 0 ]; then echo "Recent run entries:" tail -20 "$DATA_DIR/run.log" 2>/dev/null || echo " No entries yet. Use: notification run <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/run.log" local total=$(wc -l < "$DATA_DIR/run.log") echo " [Notification] run: $input" echo " Saved. Total run entries: $total" _log "run" "$input" fi ;; check) shift if [ $# -eq 0 ]; then echo "Recent check entries:" tail -20 "$DATA_DIR/check.log" 2>/dev/null || echo " No entries yet. Use: notification check <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/check.log" local total=$(wc -l < "$DATA_DIR/check.log") echo " [Notification] check: $input" echo " Saved. Total check entries: $total" _log "check" "$input" fi ;; convert) shift if [ $# -eq 0 ]; then echo "Recent convert entries:" tail -20 "$DATA_DIR/convert.log" 2>/dev/null || echo " No entries yet. Use: notification convert <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/convert.log" local total=$(wc -l < "$DATA_DIR/convert.log") echo " [Notification] convert: $input" echo " Saved. Total convert entries: $total" _log "convert" "$input" fi ;; analyze) shift if [ $# -eq 0 ]; then echo "Recent analyze entries:" tail -20 "$DATA_DIR/analyze.log" 2>/dev/null || echo " No entries yet. Use: notification analyze <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/analyze.log" local total=$(wc -l < "$DATA_DIR/analyze.log") echo " [Notification] analyze: $input" echo " Saved. Total analyze entries: $total" _log "analyze" "$input" fi ;; generate) shift if [ $# -eq 0 ]; then echo "Recent generate entries:" tail -20 "$DATA_DIR/generate.log" 2>/dev/null || echo " No entries yet. Use: notification generate <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/generate.log" local total=$(wc -l < "$DATA_DIR/generate.log") echo " [Notification] generate: $input" echo " Saved. Total generate entries: $total" _log "generate" "$input" fi ;; preview) shift if [ $# -eq 0 ]; then echo "Recent preview entries:" tail -20 "$DATA_DIR/preview.log" 2>/dev/null || echo " No entries yet. Use: notification preview <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/preview.log" local total=$(wc -l < "$DATA_DIR/preview.log") echo " [Notification] preview: $input" echo " Saved. Total preview entries: $total" _log "preview" "$input" fi ;; batch) shift if [ $# -eq 0 ]; then echo "Recent batch entries:" tail -20 "$DATA_DIR/batch.log" 2>/dev/null || echo " No entries yet. Use: notification batch <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/batch.log" local total=$(wc -l < "$DATA_DIR/batch.log") echo " [Notification] batch: $input" echo " Saved. Total batch entries: $total" _log "batch" "$input" fi ;; compare) shift if [ $# -eq 0 ]; then echo "Recent compare entries:" tail -20 "$DATA_DIR/compare.log" 2>/dev/null || echo " No entries yet. Use: notification compare <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/compare.log" local total=$(wc -l < "$DATA_DIR/compare.log") echo " [Notification] compare: $input" echo " Saved. Total compare entries: $total" _log "compare" "$input" fi ;; export) shift if [ $# -eq 0 ]; then echo "Recent export entries:" tail -20 "$DATA_DIR/export.log" 2>/dev/null || echo " No entries yet. Use: notification export <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/export.log" local total=$(wc -l < "$DATA_DIR/export.log") echo " [Notification] export: $input" echo " Saved. Total export entries: $total" _log "export" "$input" fi ;; config) shift if [ $# -eq 0 ]; then echo "Recent config entries:" tail -20 "$DATA_DIR/config.log" 2>/dev/null || echo " No entries yet. Use: notification config <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/config.log" local total=$(wc -l < "$DATA_DIR/config.log") echo " [Notification] config: $input" echo " Saved. Total config entries: $total" _log "config" "$input" fi ;; status) shift if [ $# -eq 0 ]; then echo "Recent status entries:" tail -20 "$DATA_DIR/status.log" 2>/dev/null || echo " No entries yet. Use: notification status <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/status.log" local total=$(wc -l < "$DATA_DIR/status.log") echo " [Notification] status: $input" echo " Saved. Total status entries: $total" _log "status" "$input" fi ;; report) shift if [ $# -eq 0 ]; then echo "Recent report entries:" tail -20 "$DATA_DIR/report.log" 2>/dev/null || echo " No entries yet. Use: notification report <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/report.log" local total=$(wc -l < "$DATA_DIR/report.log") echo " [Notification] report: $input" echo " Saved. Total report entries: $total" _log "report" "$input" fi ;; stats) _stats ;; export) shift; _export "$@" ;; search) shift; _search "$@" ;; recent) _recent ;; status) _status ;; help|--help|-h) _help ;; version|--version|-v) _version ;; *) echo "Unknown: $1 — run 'notification help'" exit 1 ;; esac
Your personal Tire assistant. Use when you need tire.
--- name: "Tire" description: "Your personal Tire assistant. Use when you need tire." version: "2.0.0" author: "BytesAgain" homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills tags: ["maintenance", "smart-home", "inventory", "household", "tire"] --- # Tire Your personal Tire assistant. Track, analyze, and manage all your home management needs from the command line. ## Why Tire? - Works entirely offline — your data never leaves your machine - Simple command-line interface, no GUI needed - Export to JSON, CSV, or plain text anytime - Automatic history and activity logging ## Getting Started ```bash # See what you can do tire help # Check current status tire status # View your statistics tire stats ``` ## Commands | Command | What it does | |---------|-------------| | `tire run` | Run | | `tire check` | Check | | `tire convert` | Convert | | `tire analyze` | Analyze | | `tire generate` | Generate | | `tire preview` | Preview | | `tire batch` | Batch | | `tire compare` | Compare | | `tire export` | Export | | `tire config` | Config | | `tire status` | Status | | `tire report` | Report | | `tire stats` | Summary statistics | | `tire export` | <fmt> Export (json|csv|txt) | | `tire search` | <term> Search entries | | `tire recent` | Recent activity | | `tire status` | Health check | | `tire help` | Show this help | | `tire version` | Show version | | `tire $name:` | $c entries | | `tire Total:` | $total entries | | `tire Data` | size: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1) | | `tire Version:` | v2.0.0 | | `tire Data` | dir: $DATA_DIR | | `tire Entries:` | $(cat "$DATA_DIR"/*.log 2>/dev/null | wc -l) total | | `tire Disk:` | $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1) | | `tire Last:` | $(tail -1 "$DATA_DIR/history.log" 2>/dev/null || echo never) | | `tire Status:` | OK | | `tire [Tire]` | run: $input | | `tire Saved.` | Total run entries: $total | | `tire [Tire]` | check: $input | | `tire Saved.` | Total check entries: $total | | `tire [Tire]` | convert: $input | | `tire Saved.` | Total convert entries: $total | | `tire [Tire]` | analyze: $input | | `tire Saved.` | Total analyze entries: $total | | `tire [Tire]` | generate: $input | | `tire Saved.` | Total generate entries: $total | | `tire [Tire]` | preview: $input | | `tire Saved.` | Total preview entries: $total | | `tire [Tire]` | batch: $input | | `tire Saved.` | Total batch entries: $total | | `tire [Tire]` | compare: $input | | `tire Saved.` | Total compare entries: $total | | `tire [Tire]` | export: $input | | `tire Saved.` | Total export entries: $total | | `tire [Tire]` | config: $input | | `tire Saved.` | Total config entries: $total | | `tire [Tire]` | status: $input | | `tire Saved.` | Total status entries: $total | | `tire [Tire]` | report: $input | | `tire Saved.` | Total report entries: $total | ## Data Storage All data is stored locally at `~/.local/share/tire/`. Each action is logged with timestamps. Use `export` to back up your data anytime. ## Feedback Found a bug or have a suggestion? Let us know: https://bytesagain.com/feedback/ --- Powered by BytesAgain | bytesagain.com | [email protected] FILE:scripts/script.sh #!/usr/bin/env bash # Tire — utility tool # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail DATA_DIR="HOME/.local/share/tire" mkdir -p "$DATA_DIR" _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } _version() { echo "tire v2.0.0"; } _help() { echo "Tire v2.0.0 — utility toolkit" echo "" echo "Usage: tire <command> [args]" echo "" echo "Commands:" echo " run Run" echo " check Check" echo " convert Convert" echo " analyze Analyze" echo " generate Generate" echo " preview Preview" echo " batch Batch" echo " compare Compare" echo " export Export" echo " config Config" echo " status Status" echo " report Report" echo " stats Summary statistics" echo " export <fmt> Export (json|csv|txt)" echo " search <term> Search entries" echo " recent Recent activity" echo " status Health check" echo " help Show this help" echo " version Show version" echo "" echo "Data: $DATA_DIR" } _stats() { echo "=== Tire Stats ===" local total=0 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) local c=$(wc -l < "$f") total=$((total + c)) echo " $name: $c entries" done echo " ---" echo " Total: $total entries" echo " Data size: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1)" } _export() { local fmt="-json" local out="$DATA_DIR/export.$fmt" case "$fmt" in json) echo "[" > "$out" local first=1 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) while IFS='|' read -r ts val; do [ $first -eq 1 ] && first=0 || echo "," >> "$out" printf ' {"type":"%s","time":"%s","value":"%s"}' "$name" "$ts" "$val" >> "$out" done < "$f" done echo "\n]" >> "$out" ;; csv) echo "type,time,value" > "$out" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) while IFS='|' read -r ts val; do echo "$name,$ts,$val" >> "$out"; done < "$f" done ;; txt) echo "=== Tire Export ===" > "$out" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue echo "--- $(basename "$f" .log) ---" >> "$out" cat "$f" >> "$out" done ;; *) echo "Formats: json, csv, txt"; return 1 ;; esac echo "Exported to $out ($(wc -c < "$out") bytes)" } _status() { echo "=== Tire Status ===" echo " Version: v2.0.0" echo " Data dir: $DATA_DIR" echo " Entries: $(cat "$DATA_DIR"/*.log 2>/dev/null | wc -l) total" echo " Disk: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1)" echo " Last: $(tail -1 "$DATA_DIR/history.log" 2>/dev/null || echo never)" echo " Status: OK" } _search() { local term="?Usage: tire search <term>" echo "Searching for: $term" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local m=$(grep -i "$term" "$f" 2>/dev/null || true) if [ -n "$m" ]; then echo " --- $(basename "$f" .log) ---" echo "$m" | sed 's/^/ /' fi done } _recent() { echo "=== Recent Activity ===" tail -20 "$DATA_DIR/history.log" 2>/dev/null | sed 's/^/ /' || echo " No activity yet." } case "-help" in run) shift if [ $# -eq 0 ]; then echo "Recent run entries:" tail -20 "$DATA_DIR/run.log" 2>/dev/null || echo " No entries yet. Use: tire run <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/run.log" local total=$(wc -l < "$DATA_DIR/run.log") echo " [Tire] run: $input" echo " Saved. Total run entries: $total" _log "run" "$input" fi ;; check) shift if [ $# -eq 0 ]; then echo "Recent check entries:" tail -20 "$DATA_DIR/check.log" 2>/dev/null || echo " No entries yet. Use: tire check <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/check.log" local total=$(wc -l < "$DATA_DIR/check.log") echo " [Tire] check: $input" echo " Saved. Total check entries: $total" _log "check" "$input" fi ;; convert) shift if [ $# -eq 0 ]; then echo "Recent convert entries:" tail -20 "$DATA_DIR/convert.log" 2>/dev/null || echo " No entries yet. Use: tire convert <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/convert.log" local total=$(wc -l < "$DATA_DIR/convert.log") echo " [Tire] convert: $input" echo " Saved. Total convert entries: $total" _log "convert" "$input" fi ;; analyze) shift if [ $# -eq 0 ]; then echo "Recent analyze entries:" tail -20 "$DATA_DIR/analyze.log" 2>/dev/null || echo " No entries yet. Use: tire analyze <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/analyze.log" local total=$(wc -l < "$DATA_DIR/analyze.log") echo " [Tire] analyze: $input" echo " Saved. Total analyze entries: $total" _log "analyze" "$input" fi ;; generate) shift if [ $# -eq 0 ]; then echo "Recent generate entries:" tail -20 "$DATA_DIR/generate.log" 2>/dev/null || echo " No entries yet. Use: tire generate <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/generate.log" local total=$(wc -l < "$DATA_DIR/generate.log") echo " [Tire] generate: $input" echo " Saved. Total generate entries: $total" _log "generate" "$input" fi ;; preview) shift if [ $# -eq 0 ]; then echo "Recent preview entries:" tail -20 "$DATA_DIR/preview.log" 2>/dev/null || echo " No entries yet. Use: tire preview <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/preview.log" local total=$(wc -l < "$DATA_DIR/preview.log") echo " [Tire] preview: $input" echo " Saved. Total preview entries: $total" _log "preview" "$input" fi ;; batch) shift if [ $# -eq 0 ]; then echo "Recent batch entries:" tail -20 "$DATA_DIR/batch.log" 2>/dev/null || echo " No entries yet. Use: tire batch <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/batch.log" local total=$(wc -l < "$DATA_DIR/batch.log") echo " [Tire] batch: $input" echo " Saved. Total batch entries: $total" _log "batch" "$input" fi ;; compare) shift if [ $# -eq 0 ]; then echo "Recent compare entries:" tail -20 "$DATA_DIR/compare.log" 2>/dev/null || echo " No entries yet. Use: tire compare <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/compare.log" local total=$(wc -l < "$DATA_DIR/compare.log") echo " [Tire] compare: $input" echo " Saved. Total compare entries: $total" _log "compare" "$input" fi ;; export) shift if [ $# -eq 0 ]; then echo "Recent export entries:" tail -20 "$DATA_DIR/export.log" 2>/dev/null || echo " No entries yet. Use: tire export <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/export.log" local total=$(wc -l < "$DATA_DIR/export.log") echo " [Tire] export: $input" echo " Saved. Total export entries: $total" _log "export" "$input" fi ;; config) shift if [ $# -eq 0 ]; then echo "Recent config entries:" tail -20 "$DATA_DIR/config.log" 2>/dev/null || echo " No entries yet. Use: tire config <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/config.log" local total=$(wc -l < "$DATA_DIR/config.log") echo " [Tire] config: $input" echo " Saved. Total config entries: $total" _log "config" "$input" fi ;; status) shift if [ $# -eq 0 ]; then echo "Recent status entries:" tail -20 "$DATA_DIR/status.log" 2>/dev/null || echo " No entries yet. Use: tire status <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/status.log" local total=$(wc -l < "$DATA_DIR/status.log") echo " [Tire] status: $input" echo " Saved. Total status entries: $total" _log "status" "$input" fi ;; report) shift if [ $# -eq 0 ]; then echo "Recent report entries:" tail -20 "$DATA_DIR/report.log" 2>/dev/null || echo " No entries yet. Use: tire report <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/report.log" local total=$(wc -l < "$DATA_DIR/report.log") echo " [Tire] report: $input" echo " Saved. Total report entries: $total" _log "report" "$input" fi ;; stats) _stats ;; export) shift; _export "$@" ;; search) shift; _search "$@" ;; recent) _recent ;; status) _status ;; help|--help|-h) _help ;; version|--version|-v) _version ;; *) echo "Unknown: $1 — run 'tire help'" exit 1 ;; esac
Track oven usage and cooking schedules. Use when logging bake sessions, setting cook reminders, checking inventory, reviewing stats.
--- name: "Oven" description: "Track oven usage and cooking schedules. Use when logging bake sessions, setting cook reminders, checking inventory, reviewing stats." version: "2.0.0" author: "BytesAgain" homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills tags: ["maintenance", "oven", "domestic", "smart-home", "household"] --- # Oven Lightweight Oven tracker. Add entries, view stats, search history, and export in multiple formats. ## Why Oven? - Works entirely offline — your data never leaves your machine - Simple command-line interface, no GUI needed - Export to JSON, CSV, or plain text anytime - Automatic history and activity logging ## Getting Started ```bash # See what you can do oven help # Check current status oven status # View your statistics oven stats ``` ## Commands | Command | What it does | |---------|-------------| | `oven add` | Add | | `oven inventory` | Inventory | | `oven schedule` | Schedule | | `oven remind` | Remind | | `oven checklist` | Checklist | | `oven usage` | Usage | | `oven cost` | Cost | | `oven maintain` | Maintain | | `oven log` | Log | | `oven report` | Report | | `oven seasonal` | Seasonal | | `oven tips` | Tips | | `oven stats` | Summary statistics | | `oven export` | <fmt> Export (json|csv|txt) | | `oven search` | <term> Search entries | | `oven recent` | Recent activity | | `oven status` | Health check | | `oven help` | Show this help | | `oven version` | Show version | | `oven $name:` | $c entries | | `oven Total:` | $total entries | | `oven Data` | size: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1) | | `oven Version:` | v2.0.0 | | `oven Data` | dir: $DATA_DIR | | `oven Entries:` | $(cat "$DATA_DIR"/*.log 2>/dev/null | wc -l) total | | `oven Disk:` | $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1) | | `oven Last:` | $(tail -1 "$DATA_DIR/history.log" 2>/dev/null || echo never) | | `oven Status:` | OK | | `oven [Oven]` | add: $input | | `oven Saved.` | Total add entries: $total | | `oven [Oven]` | inventory: $input | | `oven Saved.` | Total inventory entries: $total | | `oven [Oven]` | schedule: $input | | `oven Saved.` | Total schedule entries: $total | | `oven [Oven]` | remind: $input | | `oven Saved.` | Total remind entries: $total | | `oven [Oven]` | checklist: $input | | `oven Saved.` | Total checklist entries: $total | | `oven [Oven]` | usage: $input | | `oven Saved.` | Total usage entries: $total | | `oven [Oven]` | cost: $input | | `oven Saved.` | Total cost entries: $total | | `oven [Oven]` | maintain: $input | | `oven Saved.` | Total maintain entries: $total | | `oven [Oven]` | log: $input | | `oven Saved.` | Total log entries: $total | | `oven [Oven]` | report: $input | | `oven Saved.` | Total report entries: $total | | `oven [Oven]` | seasonal: $input | | `oven Saved.` | Total seasonal entries: $total | | `oven [Oven]` | tips: $input | | `oven Saved.` | Total tips entries: $total | ## Data Storage All data is stored locally at `~/.local/share/oven/`. Each action is logged with timestamps. Use `export` to back up your data anytime. ## Feedback Found a bug or have a suggestion? Let us know: https://bytesagain.com/feedback/ --- Powered by BytesAgain | bytesagain.com | [email protected] FILE:scripts/script.sh #!/usr/bin/env bash # Oven — home tool # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail DATA_DIR="HOME/.local/share/oven" mkdir -p "$DATA_DIR" _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } _version() { echo "oven v2.0.0"; } _help() { echo "Oven v2.0.0 — home toolkit" echo "" echo "Usage: oven <command> [args]" echo "" echo "Commands:" echo " add Add" echo " inventory Inventory" echo " schedule Schedule" echo " remind Remind" echo " checklist Checklist" echo " usage Usage" echo " cost Cost" echo " maintain Maintain" echo " log Log" echo " report Report" echo " seasonal Seasonal" echo " tips Tips" echo " stats Summary statistics" echo " export <fmt> Export (json|csv|txt)" echo " search <term> Search entries" echo " recent Recent activity" echo " status Health check" echo " help Show this help" echo " version Show version" echo "" echo "Data: $DATA_DIR" } _stats() { echo "=== Oven Stats ===" local total=0 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) local c=$(wc -l < "$f") total=$((total + c)) echo " $name: $c entries" done echo " ---" echo " Total: $total entries" echo " Data size: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1)" } _export() { local fmt="-json" local out="$DATA_DIR/export.$fmt" case "$fmt" in json) echo "[" > "$out" local first=1 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) while IFS='|' read -r ts val; do [ $first -eq 1 ] && first=0 || echo "," >> "$out" printf ' {"type":"%s","time":"%s","value":"%s"}' "$name" "$ts" "$val" >> "$out" done < "$f" done echo "\n]" >> "$out" ;; csv) echo "type,time,value" > "$out" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) while IFS='|' read -r ts val; do echo "$name,$ts,$val" >> "$out"; done < "$f" done ;; txt) echo "=== Oven Export ===" > "$out" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue echo "--- $(basename "$f" .log) ---" >> "$out" cat "$f" >> "$out" done ;; *) echo "Formats: json, csv, txt"; return 1 ;; esac echo "Exported to $out ($(wc -c < "$out") bytes)" } _status() { echo "=== Oven Status ===" echo " Version: v2.0.0" echo " Data dir: $DATA_DIR" echo " Entries: $(cat "$DATA_DIR"/*.log 2>/dev/null | wc -l) total" echo " Disk: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1)" echo " Last: $(tail -1 "$DATA_DIR/history.log" 2>/dev/null || echo never)" echo " Status: OK" } _search() { local term="?Usage: oven search <term>" echo "Searching for: $term" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local m=$(grep -i "$term" "$f" 2>/dev/null || true) if [ -n "$m" ]; then echo " --- $(basename "$f" .log) ---" echo "$m" | sed 's/^/ /' fi done } _recent() { echo "=== Recent Activity ===" tail -20 "$DATA_DIR/history.log" 2>/dev/null | sed 's/^/ /' || echo " No activity yet." } case "-help" in add) shift if [ $# -eq 0 ]; then echo "Recent add entries:" tail -20 "$DATA_DIR/add.log" 2>/dev/null || echo " No entries yet. Use: oven add <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/add.log" local total=$(wc -l < "$DATA_DIR/add.log") echo " [Oven] add: $input" echo " Saved. Total add entries: $total" _log "add" "$input" fi ;; inventory) shift if [ $# -eq 0 ]; then echo "Recent inventory entries:" tail -20 "$DATA_DIR/inventory.log" 2>/dev/null || echo " No entries yet. Use: oven inventory <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/inventory.log" local total=$(wc -l < "$DATA_DIR/inventory.log") echo " [Oven] inventory: $input" echo " Saved. Total inventory entries: $total" _log "inventory" "$input" fi ;; schedule) shift if [ $# -eq 0 ]; then echo "Recent schedule entries:" tail -20 "$DATA_DIR/schedule.log" 2>/dev/null || echo " No entries yet. Use: oven schedule <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/schedule.log" local total=$(wc -l < "$DATA_DIR/schedule.log") echo " [Oven] schedule: $input" echo " Saved. Total schedule entries: $total" _log "schedule" "$input" fi ;; remind) shift if [ $# -eq 0 ]; then echo "Recent remind entries:" tail -20 "$DATA_DIR/remind.log" 2>/dev/null || echo " No entries yet. Use: oven remind <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/remind.log" local total=$(wc -l < "$DATA_DIR/remind.log") echo " [Oven] remind: $input" echo " Saved. Total remind entries: $total" _log "remind" "$input" fi ;; checklist) shift if [ $# -eq 0 ]; then echo "Recent checklist entries:" tail -20 "$DATA_DIR/checklist.log" 2>/dev/null || echo " No entries yet. Use: oven checklist <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/checklist.log" local total=$(wc -l < "$DATA_DIR/checklist.log") echo " [Oven] checklist: $input" echo " Saved. Total checklist entries: $total" _log "checklist" "$input" fi ;; usage) shift if [ $# -eq 0 ]; then echo "Recent usage entries:" tail -20 "$DATA_DIR/usage.log" 2>/dev/null || echo " No entries yet. Use: oven usage <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/usage.log" local total=$(wc -l < "$DATA_DIR/usage.log") echo " [Oven] usage: $input" echo " Saved. Total usage entries: $total" _log "usage" "$input" fi ;; cost) shift if [ $# -eq 0 ]; then echo "Recent cost entries:" tail -20 "$DATA_DIR/cost.log" 2>/dev/null || echo " No entries yet. Use: oven cost <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/cost.log" local total=$(wc -l < "$DATA_DIR/cost.log") echo " [Oven] cost: $input" echo " Saved. Total cost entries: $total" _log "cost" "$input" fi ;; maintain) shift if [ $# -eq 0 ]; then echo "Recent maintain entries:" tail -20 "$DATA_DIR/maintain.log" 2>/dev/null || echo " No entries yet. Use: oven maintain <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/maintain.log" local total=$(wc -l < "$DATA_DIR/maintain.log") echo " [Oven] maintain: $input" echo " Saved. Total maintain entries: $total" _log "maintain" "$input" fi ;; log) shift if [ $# -eq 0 ]; then echo "Recent log entries:" tail -20 "$DATA_DIR/log.log" 2>/dev/null || echo " No entries yet. Use: oven log <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/log.log" local total=$(wc -l < "$DATA_DIR/log.log") echo " [Oven] log: $input" echo " Saved. Total log entries: $total" _log "log" "$input" fi ;; report) shift if [ $# -eq 0 ]; then echo "Recent report entries:" tail -20 "$DATA_DIR/report.log" 2>/dev/null || echo " No entries yet. Use: oven report <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/report.log" local total=$(wc -l < "$DATA_DIR/report.log") echo " [Oven] report: $input" echo " Saved. Total report entries: $total" _log "report" "$input" fi ;; seasonal) shift if [ $# -eq 0 ]; then echo "Recent seasonal entries:" tail -20 "$DATA_DIR/seasonal.log" 2>/dev/null || echo " No entries yet. Use: oven seasonal <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/seasonal.log" local total=$(wc -l < "$DATA_DIR/seasonal.log") echo " [Oven] seasonal: $input" echo " Saved. Total seasonal entries: $total" _log "seasonal" "$input" fi ;; tips) shift if [ $# -eq 0 ]; then echo "Recent tips entries:" tail -20 "$DATA_DIR/tips.log" 2>/dev/null || echo " No entries yet. Use: oven tips <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/tips.log" local total=$(wc -l < "$DATA_DIR/tips.log") echo " [Oven] tips: $input" echo " Saved. Total tips entries: $total" _log "tips" "$input" fi ;; stats) _stats ;; export) shift; _export "$@" ;; search) shift; _search "$@" ;; recent) _recent ;; status) _status ;; help|--help|-h) _help ;; version|--version|-v) _version ;; *) echo "Unknown: $1 — run 'oven help'" exit 1 ;; esac
Track home furniture, schedule maintenance, and manage warranty details. Use when cataloging furniture, scheduling cleaning, or tracking warranty expiry dates.
--- name: "Furniture" description: "Track home furniture, schedule maintenance, and manage warranty details. Use when cataloging furniture, scheduling cleaning, or tracking warranty expiry dates." version: "2.0.0" author: "BytesAgain" homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills tags: ["furniture", "smart-home", "inventory", "household", "home"] --- # Furniture Furniture — a fast home management tool. Log anything, find it later, export when needed. ## Why Furniture? - Works entirely offline — your data never leaves your machine - Simple command-line interface, no GUI needed - Export to JSON, CSV, or plain text anytime - Automatic history and activity logging ## Getting Started ```bash # See what you can do furniture help # Check current status furniture status # View your statistics furniture stats ``` ## Commands | Command | What it does | |---------|-------------| | `furniture add` | Add | | `furniture inventory` | Inventory | | `furniture schedule` | Schedule | | `furniture remind` | Remind | | `furniture checklist` | Checklist | | `furniture usage` | Usage | | `furniture cost` | Cost | | `furniture maintain` | Maintain | | `furniture log` | Log | | `furniture report` | Report | | `furniture seasonal` | Seasonal | | `furniture tips` | Tips | | `furniture stats` | Summary statistics | | `furniture export` | <fmt> Export (json|csv|txt) | | `furniture search` | <term> Search entries | | `furniture recent` | Recent activity | | `furniture status` | Health check | | `furniture help` | Show this help | | `furniture version` | Show version | | `furniture $name:` | $c entries | | `furniture Total:` | $total entries | | `furniture Data` | size: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1) | | `furniture Version:` | v2.0.0 | | `furniture Data` | dir: $DATA_DIR | | `furniture Entries:` | $(cat "$DATA_DIR"/*.log 2>/dev/null | wc -l) total | | `furniture Disk:` | $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1) | | `furniture Last:` | $(tail -1 "$DATA_DIR/history.log" 2>/dev/null || echo never) | | `furniture Status:` | OK | | `furniture [Furniture]` | add: $input | | `furniture Saved.` | Total add entries: $total | | `furniture [Furniture]` | inventory: $input | | `furniture Saved.` | Total inventory entries: $total | | `furniture [Furniture]` | schedule: $input | | `furniture Saved.` | Total schedule entries: $total | | `furniture [Furniture]` | remind: $input | | `furniture Saved.` | Total remind entries: $total | | `furniture [Furniture]` | checklist: $input | | `furniture Saved.` | Total checklist entries: $total | | `furniture [Furniture]` | usage: $input | | `furniture Saved.` | Total usage entries: $total | | `furniture [Furniture]` | cost: $input | | `furniture Saved.` | Total cost entries: $total | | `furniture [Furniture]` | maintain: $input | | `furniture Saved.` | Total maintain entries: $total | | `furniture [Furniture]` | log: $input | | `furniture Saved.` | Total log entries: $total | | `furniture [Furniture]` | report: $input | | `furniture Saved.` | Total report entries: $total | | `furniture [Furniture]` | seasonal: $input | | `furniture Saved.` | Total seasonal entries: $total | | `furniture [Furniture]` | tips: $input | | `furniture Saved.` | Total tips entries: $total | ## Data Storage All data is stored locally at `~/.local/share/furniture/`. Each action is logged with timestamps. Use `export` to back up your data anytime. ## Feedback Found a bug or have a suggestion? Let us know: https://bytesagain.com/feedback/ --- Powered by BytesAgain | bytesagain.com | [email protected] FILE:scripts/script.sh #!/usr/bin/env bash # Furniture — home tool # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail DATA_DIR="HOME/.local/share/furniture" mkdir -p "$DATA_DIR" _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } _version() { echo "furniture v2.0.0"; } _help() { echo "Furniture v2.0.0 — home toolkit" echo "" echo "Usage: furniture <command> [args]" echo "" echo "Commands:" echo " add Add" echo " inventory Inventory" echo " schedule Schedule" echo " remind Remind" echo " checklist Checklist" echo " usage Usage" echo " cost Cost" echo " maintain Maintain" echo " log Log" echo " report Report" echo " seasonal Seasonal" echo " tips Tips" echo " stats Summary statistics" echo " export <fmt> Export (json|csv|txt)" echo " search <term> Search entries" echo " recent Recent activity" echo " status Health check" echo " help Show this help" echo " version Show version" echo "" echo "Data: $DATA_DIR" } _stats() { echo "=== Furniture Stats ===" local total=0 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) local c=$(wc -l < "$f") total=$((total + c)) echo " $name: $c entries" done echo " ---" echo " Total: $total entries" echo " Data size: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1)" } _export() { local fmt="-json" local out="$DATA_DIR/export.$fmt" case "$fmt" in json) echo "[" > "$out" local first=1 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) while IFS='|' read -r ts val; do [ $first -eq 1 ] && first=0 || echo "," >> "$out" printf ' {"type":"%s","time":"%s","value":"%s"}' "$name" "$ts" "$val" >> "$out" done < "$f" done echo "\n]" >> "$out" ;; csv) echo "type,time,value" > "$out" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) while IFS='|' read -r ts val; do echo "$name,$ts,$val" >> "$out"; done < "$f" done ;; txt) echo "=== Furniture Export ===" > "$out" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue echo "--- $(basename "$f" .log) ---" >> "$out" cat "$f" >> "$out" done ;; *) echo "Formats: json, csv, txt"; return 1 ;; esac echo "Exported to $out ($(wc -c < "$out") bytes)" } _status() { echo "=== Furniture Status ===" echo " Version: v2.0.0" echo " Data dir: $DATA_DIR" echo " Entries: $(cat "$DATA_DIR"/*.log 2>/dev/null | wc -l) total" echo " Disk: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1)" echo " Last: $(tail -1 "$DATA_DIR/history.log" 2>/dev/null || echo never)" echo " Status: OK" } _search() { local term="?Usage: furniture search <term>" echo "Searching for: $term" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local m=$(grep -i "$term" "$f" 2>/dev/null || true) if [ -n "$m" ]; then echo " --- $(basename "$f" .log) ---" echo "$m" | sed 's/^/ /' fi done } _recent() { echo "=== Recent Activity ===" tail -20 "$DATA_DIR/history.log" 2>/dev/null | sed 's/^/ /' || echo " No activity yet." } case "-help" in add) shift if [ $# -eq 0 ]; then echo "Recent add entries:" tail -20 "$DATA_DIR/add.log" 2>/dev/null || echo " No entries yet. Use: furniture add <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/add.log" local total=$(wc -l < "$DATA_DIR/add.log") echo " [Furniture] add: $input" echo " Saved. Total add entries: $total" _log "add" "$input" fi ;; inventory) shift if [ $# -eq 0 ]; then echo "Recent inventory entries:" tail -20 "$DATA_DIR/inventory.log" 2>/dev/null || echo " No entries yet. Use: furniture inventory <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/inventory.log" local total=$(wc -l < "$DATA_DIR/inventory.log") echo " [Furniture] inventory: $input" echo " Saved. Total inventory entries: $total" _log "inventory" "$input" fi ;; schedule) shift if [ $# -eq 0 ]; then echo "Recent schedule entries:" tail -20 "$DATA_DIR/schedule.log" 2>/dev/null || echo " No entries yet. Use: furniture schedule <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/schedule.log" local total=$(wc -l < "$DATA_DIR/schedule.log") echo " [Furniture] schedule: $input" echo " Saved. Total schedule entries: $total" _log "schedule" "$input" fi ;; remind) shift if [ $# -eq 0 ]; then echo "Recent remind entries:" tail -20 "$DATA_DIR/remind.log" 2>/dev/null || echo " No entries yet. Use: furniture remind <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/remind.log" local total=$(wc -l < "$DATA_DIR/remind.log") echo " [Furniture] remind: $input" echo " Saved. Total remind entries: $total" _log "remind" "$input" fi ;; checklist) shift if [ $# -eq 0 ]; then echo "Recent checklist entries:" tail -20 "$DATA_DIR/checklist.log" 2>/dev/null || echo " No entries yet. Use: furniture checklist <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/checklist.log" local total=$(wc -l < "$DATA_DIR/checklist.log") echo " [Furniture] checklist: $input" echo " Saved. Total checklist entries: $total" _log "checklist" "$input" fi ;; usage) shift if [ $# -eq 0 ]; then echo "Recent usage entries:" tail -20 "$DATA_DIR/usage.log" 2>/dev/null || echo " No entries yet. Use: furniture usage <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/usage.log" local total=$(wc -l < "$DATA_DIR/usage.log") echo " [Furniture] usage: $input" echo " Saved. Total usage entries: $total" _log "usage" "$input" fi ;; cost) shift if [ $# -eq 0 ]; then echo "Recent cost entries:" tail -20 "$DATA_DIR/cost.log" 2>/dev/null || echo " No entries yet. Use: furniture cost <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/cost.log" local total=$(wc -l < "$DATA_DIR/cost.log") echo " [Furniture] cost: $input" echo " Saved. Total cost entries: $total" _log "cost" "$input" fi ;; maintain) shift if [ $# -eq 0 ]; then echo "Recent maintain entries:" tail -20 "$DATA_DIR/maintain.log" 2>/dev/null || echo " No entries yet. Use: furniture maintain <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/maintain.log" local total=$(wc -l < "$DATA_DIR/maintain.log") echo " [Furniture] maintain: $input" echo " Saved. Total maintain entries: $total" _log "maintain" "$input" fi ;; log) shift if [ $# -eq 0 ]; then echo "Recent log entries:" tail -20 "$DATA_DIR/log.log" 2>/dev/null || echo " No entries yet. Use: furniture log <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/log.log" local total=$(wc -l < "$DATA_DIR/log.log") echo " [Furniture] log: $input" echo " Saved. Total log entries: $total" _log "log" "$input" fi ;; report) shift if [ $# -eq 0 ]; then echo "Recent report entries:" tail -20 "$DATA_DIR/report.log" 2>/dev/null || echo " No entries yet. Use: furniture report <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/report.log" local total=$(wc -l < "$DATA_DIR/report.log") echo " [Furniture] report: $input" echo " Saved. Total report entries: $total" _log "report" "$input" fi ;; seasonal) shift if [ $# -eq 0 ]; then echo "Recent seasonal entries:" tail -20 "$DATA_DIR/seasonal.log" 2>/dev/null || echo " No entries yet. Use: furniture seasonal <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/seasonal.log" local total=$(wc -l < "$DATA_DIR/seasonal.log") echo " [Furniture] seasonal: $input" echo " Saved. Total seasonal entries: $total" _log "seasonal" "$input" fi ;; tips) shift if [ $# -eq 0 ]; then echo "Recent tips entries:" tail -20 "$DATA_DIR/tips.log" 2>/dev/null || echo " No entries yet. Use: furniture tips <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/tips.log" local total=$(wc -l < "$DATA_DIR/tips.log") echo " [Furniture] tips: $input" echo " Saved. Total tips entries: $total" _log "tips" "$input" fi ;; stats) _stats ;; export) shift; _export "$@" ;; search) shift; _search "$@" ;; recent) _recent ;; status) _status ;; help|--help|-h) _help ;; version|--version|-v) _version ;; *) echo "Unknown: $1 — run 'furniture help'" exit 1 ;; esac
Log heart rate readings, track BPM trends, and set cardiovascular goals. Use when recording heart rate, tracking trends, or charting weekly averages.
--- name: "Heartrate" description: "Log heart rate readings, track BPM trends, and set cardiovascular goals. Use when recording heart rate, tracking trends, or charting weekly averages." version: "2.0.0" author: "BytesAgain" homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills tags: ["health", "tracking", "daily", "heartrate", "personal"] --- # Heartrate A focused health & wellness tool built for Heartrate. Log entries, review trends, and export reports — all locally. ## Why Heartrate? - Works entirely offline — your data never leaves your machine - Simple command-line interface, no GUI needed - Export to JSON, CSV, or plain text anytime - Automatic history and activity logging ## Getting Started ```bash # See what you can do heartrate help # Check current status heartrate status # View your statistics heartrate stats ``` ## Commands | Command | What it does | |---------|-------------| | `heartrate log` | Log | | `heartrate track` | Track | | `heartrate chart` | Chart | | `heartrate goal` | Goal | | `heartrate remind` | Remind | | `heartrate weekly` | Weekly | | `heartrate monthly` | Monthly | | `heartrate compare` | Compare | | `heartrate export` | Export | | `heartrate streak` | Streak | | `heartrate milestone` | Milestone | | `heartrate trend` | Trend | | `heartrate stats` | Summary statistics | | `heartrate export` | <fmt> Export (json|csv|txt) | | `heartrate search` | <term> Search entries | | `heartrate recent` | Recent activity | | `heartrate status` | Health check | | `heartrate help` | Show this help | | `heartrate version` | Show version | | `heartrate $name:` | $c entries | | `heartrate Total:` | $total entries | | `heartrate Data` | size: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1) | | `heartrate Version:` | v2.0.0 | | `heartrate Data` | dir: $DATA_DIR | | `heartrate Entries:` | $(cat "$DATA_DIR"/*.log 2>/dev/null | wc -l) total | | `heartrate Disk:` | $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1) | | `heartrate Last:` | $(tail -1 "$DATA_DIR/history.log" 2>/dev/null || echo never) | | `heartrate Status:` | OK | | `heartrate [Heartrate]` | log: $input | | `heartrate Saved.` | Total log entries: $total | | `heartrate [Heartrate]` | track: $input | | `heartrate Saved.` | Total track entries: $total | | `heartrate [Heartrate]` | chart: $input | | `heartrate Saved.` | Total chart entries: $total | | `heartrate [Heartrate]` | goal: $input | | `heartrate Saved.` | Total goal entries: $total | | `heartrate [Heartrate]` | remind: $input | | `heartrate Saved.` | Total remind entries: $total | | `heartrate [Heartrate]` | weekly: $input | | `heartrate Saved.` | Total weekly entries: $total | | `heartrate [Heartrate]` | monthly: $input | | `heartrate Saved.` | Total monthly entries: $total | | `heartrate [Heartrate]` | compare: $input | | `heartrate Saved.` | Total compare entries: $total | | `heartrate [Heartrate]` | export: $input | | `heartrate Saved.` | Total export entries: $total | | `heartrate [Heartrate]` | streak: $input | | `heartrate Saved.` | Total streak entries: $total | | `heartrate [Heartrate]` | milestone: $input | | `heartrate Saved.` | Total milestone entries: $total | | `heartrate [Heartrate]` | trend: $input | | `heartrate Saved.` | Total trend entries: $total | ## Data Storage All data is stored locally at `~/.local/share/heartrate/`. Each action is logged with timestamps. Use `export` to back up your data anytime. ## Feedback Found a bug or have a suggestion? Let us know: https://bytesagain.com/feedback/ --- Powered by BytesAgain | bytesagain.com | [email protected] FILE:scripts/script.sh #!/usr/bin/env bash # Heartrate — health tool # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail DATA_DIR="HOME/.local/share/heartrate" mkdir -p "$DATA_DIR" _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } _version() { echo "heartrate v2.0.0"; } _help() { echo "Heartrate v2.0.0 — health toolkit" echo "" echo "Usage: heartrate <command> [args]" echo "" echo "Commands:" echo " log Log" echo " track Track" echo " chart Chart" echo " goal Goal" echo " remind Remind" echo " weekly Weekly" echo " monthly Monthly" echo " compare Compare" echo " export Export" echo " streak Streak" echo " milestone Milestone" echo " trend Trend" echo " stats Summary statistics" echo " export <fmt> Export (json|csv|txt)" echo " search <term> Search entries" echo " recent Recent activity" echo " status Health check" echo " help Show this help" echo " version Show version" echo "" echo "Data: $DATA_DIR" } _stats() { echo "=== Heartrate Stats ===" local total=0 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) local c=$(wc -l < "$f") total=$((total + c)) echo " $name: $c entries" done echo " ---" echo " Total: $total entries" echo " Data size: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1)" } _export() { local fmt="-json" local out="$DATA_DIR/export.$fmt" case "$fmt" in json) echo "[" > "$out" local first=1 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) while IFS='|' read -r ts val; do [ $first -eq 1 ] && first=0 || echo "," >> "$out" printf ' {"type":"%s","time":"%s","value":"%s"}' "$name" "$ts" "$val" >> "$out" done < "$f" done echo "\n]" >> "$out" ;; csv) echo "type,time,value" > "$out" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) while IFS='|' read -r ts val; do echo "$name,$ts,$val" >> "$out"; done < "$f" done ;; txt) echo "=== Heartrate Export ===" > "$out" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue echo "--- $(basename "$f" .log) ---" >> "$out" cat "$f" >> "$out" done ;; *) echo "Formats: json, csv, txt"; return 1 ;; esac echo "Exported to $out ($(wc -c < "$out") bytes)" } _status() { echo "=== Heartrate Status ===" echo " Version: v2.0.0" echo " Data dir: $DATA_DIR" echo " Entries: $(cat "$DATA_DIR"/*.log 2>/dev/null | wc -l) total" echo " Disk: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1)" echo " Last: $(tail -1 "$DATA_DIR/history.log" 2>/dev/null || echo never)" echo " Status: OK" } _search() { local term="?Usage: heartrate search <term>" echo "Searching for: $term" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local m=$(grep -i "$term" "$f" 2>/dev/null || true) if [ -n "$m" ]; then echo " --- $(basename "$f" .log) ---" echo "$m" | sed 's/^/ /' fi done } _recent() { echo "=== Recent Activity ===" tail -20 "$DATA_DIR/history.log" 2>/dev/null | sed 's/^/ /' || echo " No activity yet." } case "-help" in log) shift if [ $# -eq 0 ]; then echo "Recent log entries:" tail -20 "$DATA_DIR/log.log" 2>/dev/null || echo " No entries yet. Use: heartrate log <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/log.log" local total=$(wc -l < "$DATA_DIR/log.log") echo " [Heartrate] log: $input" echo " Saved. Total log entries: $total" _log "log" "$input" fi ;; track) shift if [ $# -eq 0 ]; then echo "Recent track entries:" tail -20 "$DATA_DIR/track.log" 2>/dev/null || echo " No entries yet. Use: heartrate track <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/track.log" local total=$(wc -l < "$DATA_DIR/track.log") echo " [Heartrate] track: $input" echo " Saved. Total track entries: $total" _log "track" "$input" fi ;; chart) shift if [ $# -eq 0 ]; then echo "Recent chart entries:" tail -20 "$DATA_DIR/chart.log" 2>/dev/null || echo " No entries yet. Use: heartrate chart <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/chart.log" local total=$(wc -l < "$DATA_DIR/chart.log") echo " [Heartrate] chart: $input" echo " Saved. Total chart entries: $total" _log "chart" "$input" fi ;; goal) shift if [ $# -eq 0 ]; then echo "Recent goal entries:" tail -20 "$DATA_DIR/goal.log" 2>/dev/null || echo " No entries yet. Use: heartrate goal <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/goal.log" local total=$(wc -l < "$DATA_DIR/goal.log") echo " [Heartrate] goal: $input" echo " Saved. Total goal entries: $total" _log "goal" "$input" fi ;; remind) shift if [ $# -eq 0 ]; then echo "Recent remind entries:" tail -20 "$DATA_DIR/remind.log" 2>/dev/null || echo " No entries yet. Use: heartrate remind <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/remind.log" local total=$(wc -l < "$DATA_DIR/remind.log") echo " [Heartrate] remind: $input" echo " Saved. Total remind entries: $total" _log "remind" "$input" fi ;; weekly) shift if [ $# -eq 0 ]; then echo "Recent weekly entries:" tail -20 "$DATA_DIR/weekly.log" 2>/dev/null || echo " No entries yet. Use: heartrate weekly <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/weekly.log" local total=$(wc -l < "$DATA_DIR/weekly.log") echo " [Heartrate] weekly: $input" echo " Saved. Total weekly entries: $total" _log "weekly" "$input" fi ;; monthly) shift if [ $# -eq 0 ]; then echo "Recent monthly entries:" tail -20 "$DATA_DIR/monthly.log" 2>/dev/null || echo " No entries yet. Use: heartrate monthly <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/monthly.log" local total=$(wc -l < "$DATA_DIR/monthly.log") echo " [Heartrate] monthly: $input" echo " Saved. Total monthly entries: $total" _log "monthly" "$input" fi ;; compare) shift if [ $# -eq 0 ]; then echo "Recent compare entries:" tail -20 "$DATA_DIR/compare.log" 2>/dev/null || echo " No entries yet. Use: heartrate compare <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/compare.log" local total=$(wc -l < "$DATA_DIR/compare.log") echo " [Heartrate] compare: $input" echo " Saved. Total compare entries: $total" _log "compare" "$input" fi ;; export) shift if [ $# -eq 0 ]; then echo "Recent export entries:" tail -20 "$DATA_DIR/export.log" 2>/dev/null || echo " No entries yet. Use: heartrate export <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/export.log" local total=$(wc -l < "$DATA_DIR/export.log") echo " [Heartrate] export: $input" echo " Saved. Total export entries: $total" _log "export" "$input" fi ;; streak) shift if [ $# -eq 0 ]; then echo "Recent streak entries:" tail -20 "$DATA_DIR/streak.log" 2>/dev/null || echo " No entries yet. Use: heartrate streak <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/streak.log" local total=$(wc -l < "$DATA_DIR/streak.log") echo " [Heartrate] streak: $input" echo " Saved. Total streak entries: $total" _log "streak" "$input" fi ;; milestone) shift if [ $# -eq 0 ]; then echo "Recent milestone entries:" tail -20 "$DATA_DIR/milestone.log" 2>/dev/null || echo " No entries yet. Use: heartrate milestone <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/milestone.log" local total=$(wc -l < "$DATA_DIR/milestone.log") echo " [Heartrate] milestone: $input" echo " Saved. Total milestone entries: $total" _log "milestone" "$input" fi ;; trend) shift if [ $# -eq 0 ]; then echo "Recent trend entries:" tail -20 "$DATA_DIR/trend.log" 2>/dev/null || echo " No entries yet. Use: heartrate trend <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/trend.log" local total=$(wc -l < "$DATA_DIR/trend.log") echo " [Heartrate] trend: $input" echo " Saved. Total trend entries: $total" _log "trend" "$input" fi ;; stats) _stats ;; export) shift; _export "$@" ;; search) shift; _search "$@" ;; recent) _recent ;; status) _status ;; help|--help|-h) _help ;; version|--version|-v) _version ;; *) echo "Unknown: $1 — run 'heartrate help'" exit 1 ;; esac
Build surveys, collect responses, and analyze results. Use when creating forms, checking responses, converting data, analyzing trends, generating reports.
--- name: survey version: "2.0.0" author: BytesAgain homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills license: MIT-0 tags: [survey, tool, utility] description: "Build surveys, collect responses, and analyze results. Use when creating forms, checking responses, converting data, analyzing trends, generating reports." --- # Survey Survey builder — create questionnaires, collect responses, analyze results, export data. ## Commands | Command | Description | |---------|-------------| | `survey help` | Show usage info | | `survey run` | Run main task | | `survey status` | Check current state | | `survey list` | List items | | `survey add <item>` | Add new item | | `survey export <fmt>` | Export data | ## Usage ```bash survey help survey run survey status ``` ## Examples ```bash # Get started survey help # Run default task survey run # Export as JSON survey export json ``` ## Output Results go to stdout. Save with `survey run > output.txt`. ## Configuration Set `SURVEY_DIR` to change data directory. Default: `~/.local/share/survey/` --- *Powered by BytesAgain | bytesagain.com* *Feedback & Feature Requests: https://bytesagain.com/feedback* FILE:scripts/script.sh #!/usr/bin/env bash # Survey — utility tool # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail DATA_DIR="HOME/.local/share/survey" mkdir -p "$DATA_DIR" _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } _version() { echo "survey v2.0.0"; } _help() { echo "Survey v2.0.0 — utility toolkit" echo "" echo "Usage: survey <command> [args]" echo "" echo "Commands:" echo " run Run" echo " check Check" echo " convert Convert" echo " analyze Analyze" echo " generate Generate" echo " preview Preview" echo " batch Batch" echo " compare Compare" echo " export Export" echo " config Config" echo " status Status" echo " report Report" echo " stats Summary statistics" echo " export <fmt> Export (json|csv|txt)" echo " search <term> Search entries" echo " recent Recent activity" echo " status Health check" echo " help Show this help" echo " version Show version" echo "" echo "Data: $DATA_DIR" } _stats() { echo "=== Survey Stats ===" local total=0 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) local c=$(wc -l < "$f") total=$((total + c)) echo " $name: $c entries" done echo " ---" echo " Total: $total entries" echo " Data size: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1)" } _export() { local fmt="-json" local out="$DATA_DIR/export.$fmt" case "$fmt" in json) echo "[" > "$out" local first=1 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) while IFS='|' read -r ts val; do [ $first -eq 1 ] && first=0 || echo "," >> "$out" printf ' {"type":"%s","time":"%s","value":"%s"}' "$name" "$ts" "$val" >> "$out" done < "$f" done echo "\n]" >> "$out" ;; csv) echo "type,time,value" > "$out" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) while IFS='|' read -r ts val; do echo "$name,$ts,$val" >> "$out"; done < "$f" done ;; txt) echo "=== Survey Export ===" > "$out" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue echo "--- $(basename "$f" .log) ---" >> "$out" cat "$f" >> "$out" done ;; *) echo "Formats: json, csv, txt"; return 1 ;; esac echo "Exported to $out ($(wc -c < "$out") bytes)" } _status() { echo "=== Survey Status ===" echo " Version: v2.0.0" echo " Data dir: $DATA_DIR" echo " Entries: $(cat "$DATA_DIR"/*.log 2>/dev/null | wc -l) total" echo " Disk: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1)" echo " Last: $(tail -1 "$DATA_DIR/history.log" 2>/dev/null || echo never)" echo " Status: OK" } _search() { local term="?Usage: survey search <term>" echo "Searching for: $term" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local m=$(grep -i "$term" "$f" 2>/dev/null || true) if [ -n "$m" ]; then echo " --- $(basename "$f" .log) ---" echo "$m" | sed 's/^/ /' fi done } _recent() { echo "=== Recent Activity ===" tail -20 "$DATA_DIR/history.log" 2>/dev/null | sed 's/^/ /' || echo " No activity yet." } case "-help" in run) shift if [ $# -eq 0 ]; then echo "Recent run entries:" tail -20 "$DATA_DIR/run.log" 2>/dev/null || echo " No entries yet. Use: survey run <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/run.log" local total=$(wc -l < "$DATA_DIR/run.log") echo " [Survey] run: $input" echo " Saved. Total run entries: $total" _log "run" "$input" fi ;; check) shift if [ $# -eq 0 ]; then echo "Recent check entries:" tail -20 "$DATA_DIR/check.log" 2>/dev/null || echo " No entries yet. Use: survey check <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/check.log" local total=$(wc -l < "$DATA_DIR/check.log") echo " [Survey] check: $input" echo " Saved. Total check entries: $total" _log "check" "$input" fi ;; convert) shift if [ $# -eq 0 ]; then echo "Recent convert entries:" tail -20 "$DATA_DIR/convert.log" 2>/dev/null || echo " No entries yet. Use: survey convert <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/convert.log" local total=$(wc -l < "$DATA_DIR/convert.log") echo " [Survey] convert: $input" echo " Saved. Total convert entries: $total" _log "convert" "$input" fi ;; analyze) shift if [ $# -eq 0 ]; then echo "Recent analyze entries:" tail -20 "$DATA_DIR/analyze.log" 2>/dev/null || echo " No entries yet. Use: survey analyze <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/analyze.log" local total=$(wc -l < "$DATA_DIR/analyze.log") echo " [Survey] analyze: $input" echo " Saved. Total analyze entries: $total" _log "analyze" "$input" fi ;; generate) shift if [ $# -eq 0 ]; then echo "Recent generate entries:" tail -20 "$DATA_DIR/generate.log" 2>/dev/null || echo " No entries yet. Use: survey generate <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/generate.log" local total=$(wc -l < "$DATA_DIR/generate.log") echo " [Survey] generate: $input" echo " Saved. Total generate entries: $total" _log "generate" "$input" fi ;; preview) shift if [ $# -eq 0 ]; then echo "Recent preview entries:" tail -20 "$DATA_DIR/preview.log" 2>/dev/null || echo " No entries yet. Use: survey preview <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/preview.log" local total=$(wc -l < "$DATA_DIR/preview.log") echo " [Survey] preview: $input" echo " Saved. Total preview entries: $total" _log "preview" "$input" fi ;; batch) shift if [ $# -eq 0 ]; then echo "Recent batch entries:" tail -20 "$DATA_DIR/batch.log" 2>/dev/null || echo " No entries yet. Use: survey batch <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/batch.log" local total=$(wc -l < "$DATA_DIR/batch.log") echo " [Survey] batch: $input" echo " Saved. Total batch entries: $total" _log "batch" "$input" fi ;; compare) shift if [ $# -eq 0 ]; then echo "Recent compare entries:" tail -20 "$DATA_DIR/compare.log" 2>/dev/null || echo " No entries yet. Use: survey compare <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/compare.log" local total=$(wc -l < "$DATA_DIR/compare.log") echo " [Survey] compare: $input" echo " Saved. Total compare entries: $total" _log "compare" "$input" fi ;; export) shift if [ $# -eq 0 ]; then echo "Recent export entries:" tail -20 "$DATA_DIR/export.log" 2>/dev/null || echo " No entries yet. Use: survey export <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/export.log" local total=$(wc -l < "$DATA_DIR/export.log") echo " [Survey] export: $input" echo " Saved. Total export entries: $total" _log "export" "$input" fi ;; config) shift if [ $# -eq 0 ]; then echo "Recent config entries:" tail -20 "$DATA_DIR/config.log" 2>/dev/null || echo " No entries yet. Use: survey config <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/config.log" local total=$(wc -l < "$DATA_DIR/config.log") echo " [Survey] config: $input" echo " Saved. Total config entries: $total" _log "config" "$input" fi ;; status) shift if [ $# -eq 0 ]; then echo "Recent status entries:" tail -20 "$DATA_DIR/status.log" 2>/dev/null || echo " No entries yet. Use: survey status <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/status.log" local total=$(wc -l < "$DATA_DIR/status.log") echo " [Survey] status: $input" echo " Saved. Total status entries: $total" _log "status" "$input" fi ;; report) shift if [ $# -eq 0 ]; then echo "Recent report entries:" tail -20 "$DATA_DIR/report.log" 2>/dev/null || echo " No entries yet. Use: survey report <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/report.log" local total=$(wc -l < "$DATA_DIR/report.log") echo " [Survey] report: $input" echo " Saved. Total report entries: $total" _log "report" "$input" fi ;; stats) _stats ;; export) shift; _export "$@" ;; search) shift; _search "$@" ;; recent) _recent ;; status) _status ;; help|--help|-h) _help ;; version|--version|-v) _version ;; *) echo "Unknown: $1 — run 'survey help'" exit 1 ;; esac
Build, test, lint, and format Go projects with integrated dev tooling. Use when compiling binaries, running tests, linting code, or formatting files.
--- name: golang version: "2.0.0" author: BytesAgain homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills license: MIT-0 tags: [golang, tool, utility] description: "Build, test, lint, and format Go projects with integrated dev tooling. Use when compiling binaries, running tests, linting code, or formatting files." --- # Golang Developer toolkit for checking, validating, generating, formatting, linting, converting, and managing Go development entries. All operations are logged with timestamps and stored locally for full traceability. ## Commands | Command | Usage | Description | |---------|-------|-------------| | `check` | `golang check <input>` | Record a check entry or view recent checks | | `validate` | `golang validate <input>` | Record a validation entry or view recent validations | | `generate` | `golang generate <input>` | Record a generate entry or view recent generations | | `format` | `golang format <input>` | Record a format entry or view recent formatting operations | | `lint` | `golang lint <input>` | Record a lint entry or view recent lint results | | `explain` | `golang explain <input>` | Record an explain entry or view recent explanations | | `convert` | `golang convert <input>` | Record a convert entry or view recent conversions | | `template` | `golang template <input>` | Record a template entry or view recent templates | | `diff` | `golang diff <input>` | Record a diff entry or view recent diffs | | `preview` | `golang preview <input>` | Record a preview entry or view recent previews | | `fix` | `golang fix <input>` | Record a fix entry or view recent fixes | | `report` | `golang report <input>` | Record a report entry or view recent reports | | `stats` | `golang stats` | Show summary statistics across all entry types | | `export <fmt>` | `golang export json\|csv\|txt` | Export all entries to JSON, CSV, or plain text | | `search <term>` | `golang search <term>` | Search across all log files for a keyword | | `recent` | `golang recent` | Show the 20 most recent history entries | | `status` | `golang status` | Health check — version, entry count, disk usage, last activity | | `help` | `golang help` | Show help with all available commands | | `version` | `golang version` | Print version string | Each command (check, validate, generate, format, lint, explain, convert, template, diff, preview, fix, report) works the same way: - **With arguments:** Saves the input with a timestamp to `<command>.log` and logs to `history.log`. - **Without arguments:** Displays the 20 most recent entries from `<command>.log`. ## Data Storage All data is stored locally at `~/.local/share/golang/`: - `<command>.log` — Timestamped entries for each command (e.g., `check.log`, `lint.log`, `format.log`) - `history.log` — Unified activity log across all commands - `export.json`, `export.csv`, `export.txt` — Generated export files No cloud, no network calls, no API keys required. Fully offline. ## Requirements - Bash 4+ (uses `set -euo pipefail`) - Standard Unix utilities (`date`, `wc`, `du`, `grep`, `head`, `tail`, `sed`) - No external dependencies ## When to Use 1. **Logging Go build and test results** — Use `golang check "go build ./... passed"` or `golang validate "all tests green on v1.4.2"` to record build/test outcomes with timestamps for CI audit trails. 2. **Tracking lint and format operations** — Use `golang lint "golangci-lint found 3 issues in pkg/handler"` and `golang format "gofmt applied to cmd/"` to maintain a history of code quality actions. 3. **Recording code generation and templates** — Use `golang generate "protobuf stubs for api/v2"` and `golang template "new service boilerplate created"` to log what was generated and when. 4. **Searching past development notes** — Use `golang search "handler"` to find all entries across every log file mentioning a specific package, file, or concept. 5. **Exporting development logs for review** — Use `golang export json` to extract all logged entries as structured JSON for team reviews, retrospectives, or integration with project management tools. ## Examples ```bash # Record a check entry golang check "go vet ./... clean on main branch" # Record a lint finding golang lint "unused variable in internal/cache/store.go:88" # Log a format operation golang format "goimports applied to all .go files" # Record code generation golang generate "mockgen interfaces for service layer" # Log a fix golang fix "resolved nil pointer in middleware/auth.go" # View recent lint entries (no args = list mode) golang lint # Search all logs for a keyword golang search "middleware" # Export everything to JSON golang export json # Export to CSV for spreadsheet analysis golang export csv # View summary statistics golang stats # Health check golang status # View recent activity across all commands golang recent ``` ## How It Works Golang stores all data locally in `~/.local/share/golang/`. Each command logs activity with timestamps in the format `YYYY-MM-DD HH:MM|<input>`, enabling full traceability. The unified `history.log` records every operation with `MM-DD HH:MM <command>: <input>` format for cross-command auditing. --- Powered by BytesAgain | bytesagain.com | [email protected] FILE:scripts/script.sh #!/usr/bin/env bash # Golang — devtools tool # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail DATA_DIR="HOME/.local/share/golang" mkdir -p "$DATA_DIR" _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } _version() { echo "golang v2.0.0"; } _help() { echo "Golang v2.0.0 — devtools toolkit" echo "" echo "Usage: golang <command> [args]" echo "" echo "Commands:" echo " check Check" echo " validate Validate" echo " generate Generate" echo " format Format" echo " lint Lint" echo " explain Explain" echo " convert Convert" echo " template Template" echo " diff Diff" echo " preview Preview" echo " fix Fix" echo " report Report" echo " stats Summary statistics" echo " export <fmt> Export (json|csv|txt)" echo " search <term> Search entries" echo " recent Recent activity" echo " status Health check" echo " help Show this help" echo " version Show version" echo "" echo "Data: $DATA_DIR" } _stats() { echo "=== Golang Stats ===" local total=0 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) local c=$(wc -l < "$f") total=$((total + c)) echo " $name: $c entries" done echo " ---" echo " Total: $total entries" echo " Data size: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1)" } _export() { local fmt="-json" local out="$DATA_DIR/export.$fmt" case "$fmt" in json) echo "[" > "$out" local first=1 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) while IFS='|' read -r ts val; do [ $first -eq 1 ] && first=0 || echo "," >> "$out" printf ' {"type":"%s","time":"%s","value":"%s"}' "$name" "$ts" "$val" >> "$out" done < "$f" done echo "\n]" >> "$out" ;; csv) echo "type,time,value" > "$out" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) while IFS='|' read -r ts val; do echo "$name,$ts,$val" >> "$out"; done < "$f" done ;; txt) echo "=== Golang Export ===" > "$out" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue echo "--- $(basename "$f" .log) ---" >> "$out" cat "$f" >> "$out" done ;; *) echo "Formats: json, csv, txt"; return 1 ;; esac echo "Exported to $out ($(wc -c < "$out") bytes)" } _status() { echo "=== Golang Status ===" echo " Version: v2.0.0" echo " Data dir: $DATA_DIR" echo " Entries: $(cat "$DATA_DIR"/*.log 2>/dev/null | wc -l) total" echo " Disk: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1)" echo " Last: $(tail -1 "$DATA_DIR/history.log" 2>/dev/null || echo never)" echo " Status: OK" } _search() { local term="?Usage: golang search <term>" echo "Searching for: $term" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local m=$(grep -i "$term" "$f" 2>/dev/null || true) if [ -n "$m" ]; then echo " --- $(basename "$f" .log) ---" echo "$m" | sed 's/^/ /' fi done } _recent() { echo "=== Recent Activity ===" tail -20 "$DATA_DIR/history.log" 2>/dev/null | sed 's/^/ /' || echo " No activity yet." } case "-help" in check) shift if [ $# -eq 0 ]; then echo "Recent check entries:" tail -20 "$DATA_DIR/check.log" 2>/dev/null || echo " No entries yet. Use: golang check <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/check.log" local total=$(wc -l < "$DATA_DIR/check.log") echo " [Golang] check: $input" echo " Saved. Total check entries: $total" _log "check" "$input" fi ;; validate) shift if [ $# -eq 0 ]; then echo "Recent validate entries:" tail -20 "$DATA_DIR/validate.log" 2>/dev/null || echo " No entries yet. Use: golang validate <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/validate.log" local total=$(wc -l < "$DATA_DIR/validate.log") echo " [Golang] validate: $input" echo " Saved. Total validate entries: $total" _log "validate" "$input" fi ;; generate) shift if [ $# -eq 0 ]; then echo "Recent generate entries:" tail -20 "$DATA_DIR/generate.log" 2>/dev/null || echo " No entries yet. Use: golang generate <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/generate.log" local total=$(wc -l < "$DATA_DIR/generate.log") echo " [Golang] generate: $input" echo " Saved. Total generate entries: $total" _log "generate" "$input" fi ;; format) shift if [ $# -eq 0 ]; then echo "Recent format entries:" tail -20 "$DATA_DIR/format.log" 2>/dev/null || echo " No entries yet. Use: golang format <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/format.log" local total=$(wc -l < "$DATA_DIR/format.log") echo " [Golang] format: $input" echo " Saved. Total format entries: $total" _log "format" "$input" fi ;; lint) shift if [ $# -eq 0 ]; then echo "Recent lint entries:" tail -20 "$DATA_DIR/lint.log" 2>/dev/null || echo " No entries yet. Use: golang lint <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/lint.log" local total=$(wc -l < "$DATA_DIR/lint.log") echo " [Golang] lint: $input" echo " Saved. Total lint entries: $total" _log "lint" "$input" fi ;; explain) shift if [ $# -eq 0 ]; then echo "Recent explain entries:" tail -20 "$DATA_DIR/explain.log" 2>/dev/null || echo " No entries yet. Use: golang explain <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/explain.log" local total=$(wc -l < "$DATA_DIR/explain.log") echo " [Golang] explain: $input" echo " Saved. Total explain entries: $total" _log "explain" "$input" fi ;; convert) shift if [ $# -eq 0 ]; then echo "Recent convert entries:" tail -20 "$DATA_DIR/convert.log" 2>/dev/null || echo " No entries yet. Use: golang convert <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/convert.log" local total=$(wc -l < "$DATA_DIR/convert.log") echo " [Golang] convert: $input" echo " Saved. Total convert entries: $total" _log "convert" "$input" fi ;; template) shift if [ $# -eq 0 ]; then echo "Recent template entries:" tail -20 "$DATA_DIR/template.log" 2>/dev/null || echo " No entries yet. Use: golang template <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/template.log" local total=$(wc -l < "$DATA_DIR/template.log") echo " [Golang] template: $input" echo " Saved. Total template entries: $total" _log "template" "$input" fi ;; diff) shift if [ $# -eq 0 ]; then echo "Recent diff entries:" tail -20 "$DATA_DIR/diff.log" 2>/dev/null || echo " No entries yet. Use: golang diff <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/diff.log" local total=$(wc -l < "$DATA_DIR/diff.log") echo " [Golang] diff: $input" echo " Saved. Total diff entries: $total" _log "diff" "$input" fi ;; preview) shift if [ $# -eq 0 ]; then echo "Recent preview entries:" tail -20 "$DATA_DIR/preview.log" 2>/dev/null || echo " No entries yet. Use: golang preview <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/preview.log" local total=$(wc -l < "$DATA_DIR/preview.log") echo " [Golang] preview: $input" echo " Saved. Total preview entries: $total" _log "preview" "$input" fi ;; fix) shift if [ $# -eq 0 ]; then echo "Recent fix entries:" tail -20 "$DATA_DIR/fix.log" 2>/dev/null || echo " No entries yet. Use: golang fix <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/fix.log" local total=$(wc -l < "$DATA_DIR/fix.log") echo " [Golang] fix: $input" echo " Saved. Total fix entries: $total" _log "fix" "$input" fi ;; report) shift if [ $# -eq 0 ]; then echo "Recent report entries:" tail -20 "$DATA_DIR/report.log" 2>/dev/null || echo " No entries yet. Use: golang report <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/report.log" local total=$(wc -l < "$DATA_DIR/report.log") echo " [Golang] report: $input" echo " Saved. Total report entries: $total" _log "report" "$input" fi ;; stats) _stats ;; export) shift; _export "$@" ;; search) shift; _search "$@" ;; recent) _recent ;; status) _status ;; help|--help|-h) _help ;; version|--version|-v) _version ;; *) echo "Unknown: $1 — run 'golang help'" exit 1 ;; esac
Create placeholder data, test fixtures, and sample datasets for dev work. Use when generating mocks, building fixtures, or scaffolding content templates.
--- name: generator version: "2.0.0" author: BytesAgain homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills license: MIT-0 tags: [generator, tool, utility] description: "Create placeholder data, test fixtures, and sample datasets for dev work. Use when generating mocks, building fixtures, or scaffolding content templates." --- # Generator Content generator — create placeholder data, test fixtures, sample datasets, and templates. ## Commands | Command | Description | |---------|-------------| | `generator help` | Show usage info | | `generator run` | Run main task | | `generator status` | Check current state | | `generator list` | List items | | `generator add <item>` | Add new item | | `generator export <fmt>` | Export data | ## Usage ```bash generator help generator run generator status ``` ## Examples ```bash # Get started generator help # Run default task generator run # Export as JSON generator export json ``` ## Output Results go to stdout. Save with `generator run > output.txt`. ## Configuration Set `GENERATOR_DIR` to change data directory. Default: `~/.local/share/generator/` --- *Powered by BytesAgain | bytesagain.com* *Feedback & Feature Requests: https://bytesagain.com/feedback* FILE:scripts/script.sh #!/usr/bin/env bash # Generator — utility tool # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail DATA_DIR="HOME/.local/share/generator" mkdir -p "$DATA_DIR" _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } _version() { echo "generator v2.0.0"; } _help() { echo "Generator v2.0.0 — utility toolkit" echo "" echo "Usage: generator <command> [args]" echo "" echo "Commands:" echo " run Run" echo " check Check" echo " convert Convert" echo " analyze Analyze" echo " generate Generate" echo " preview Preview" echo " batch Batch" echo " compare Compare" echo " export Export" echo " config Config" echo " status Status" echo " report Report" echo " stats Summary statistics" echo " export <fmt> Export (json|csv|txt)" echo " search <term> Search entries" echo " recent Recent activity" echo " status Health check" echo " help Show this help" echo " version Show version" echo "" echo "Data: $DATA_DIR" } _stats() { echo "=== Generator Stats ===" local total=0 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) local c=$(wc -l < "$f") total=$((total + c)) echo " $name: $c entries" done echo " ---" echo " Total: $total entries" echo " Data size: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1)" } _export() { local fmt="-json" local out="$DATA_DIR/export.$fmt" case "$fmt" in json) echo "[" > "$out" local first=1 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) while IFS='|' read -r ts val; do [ $first -eq 1 ] && first=0 || echo "," >> "$out" printf ' {"type":"%s","time":"%s","value":"%s"}' "$name" "$ts" "$val" >> "$out" done < "$f" done echo "\n]" >> "$out" ;; csv) echo "type,time,value" > "$out" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) while IFS='|' read -r ts val; do echo "$name,$ts,$val" >> "$out"; done < "$f" done ;; txt) echo "=== Generator Export ===" > "$out" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue echo "--- $(basename "$f" .log) ---" >> "$out" cat "$f" >> "$out" done ;; *) echo "Formats: json, csv, txt"; return 1 ;; esac echo "Exported to $out ($(wc -c < "$out") bytes)" } _status() { echo "=== Generator Status ===" echo " Version: v2.0.0" echo " Data dir: $DATA_DIR" echo " Entries: $(cat "$DATA_DIR"/*.log 2>/dev/null | wc -l) total" echo " Disk: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1)" echo " Last: $(tail -1 "$DATA_DIR/history.log" 2>/dev/null || echo never)" echo " Status: OK" } _search() { local term="?Usage: generator search <term>" echo "Searching for: $term" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local m=$(grep -i "$term" "$f" 2>/dev/null || true) if [ -n "$m" ]; then echo " --- $(basename "$f" .log) ---" echo "$m" | sed 's/^/ /' fi done } _recent() { echo "=== Recent Activity ===" tail -20 "$DATA_DIR/history.log" 2>/dev/null | sed 's/^/ /' || echo " No activity yet." } case "-help" in run) shift if [ $# -eq 0 ]; then echo "Recent run entries:" tail -20 "$DATA_DIR/run.log" 2>/dev/null || echo " No entries yet. Use: generator run <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/run.log" local total=$(wc -l < "$DATA_DIR/run.log") echo " [Generator] run: $input" echo " Saved. Total run entries: $total" _log "run" "$input" fi ;; check) shift if [ $# -eq 0 ]; then echo "Recent check entries:" tail -20 "$DATA_DIR/check.log" 2>/dev/null || echo " No entries yet. Use: generator check <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/check.log" local total=$(wc -l < "$DATA_DIR/check.log") echo " [Generator] check: $input" echo " Saved. Total check entries: $total" _log "check" "$input" fi ;; convert) shift if [ $# -eq 0 ]; then echo "Recent convert entries:" tail -20 "$DATA_DIR/convert.log" 2>/dev/null || echo " No entries yet. Use: generator convert <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/convert.log" local total=$(wc -l < "$DATA_DIR/convert.log") echo " [Generator] convert: $input" echo " Saved. Total convert entries: $total" _log "convert" "$input" fi ;; analyze) shift if [ $# -eq 0 ]; then echo "Recent analyze entries:" tail -20 "$DATA_DIR/analyze.log" 2>/dev/null || echo " No entries yet. Use: generator analyze <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/analyze.log" local total=$(wc -l < "$DATA_DIR/analyze.log") echo " [Generator] analyze: $input" echo " Saved. Total analyze entries: $total" _log "analyze" "$input" fi ;; generate) shift if [ $# -eq 0 ]; then echo "Recent generate entries:" tail -20 "$DATA_DIR/generate.log" 2>/dev/null || echo " No entries yet. Use: generator generate <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/generate.log" local total=$(wc -l < "$DATA_DIR/generate.log") echo " [Generator] generate: $input" echo " Saved. Total generate entries: $total" _log "generate" "$input" fi ;; preview) shift if [ $# -eq 0 ]; then echo "Recent preview entries:" tail -20 "$DATA_DIR/preview.log" 2>/dev/null || echo " No entries yet. Use: generator preview <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/preview.log" local total=$(wc -l < "$DATA_DIR/preview.log") echo " [Generator] preview: $input" echo " Saved. Total preview entries: $total" _log "preview" "$input" fi ;; batch) shift if [ $# -eq 0 ]; then echo "Recent batch entries:" tail -20 "$DATA_DIR/batch.log" 2>/dev/null || echo " No entries yet. Use: generator batch <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/batch.log" local total=$(wc -l < "$DATA_DIR/batch.log") echo " [Generator] batch: $input" echo " Saved. Total batch entries: $total" _log "batch" "$input" fi ;; compare) shift if [ $# -eq 0 ]; then echo "Recent compare entries:" tail -20 "$DATA_DIR/compare.log" 2>/dev/null || echo " No entries yet. Use: generator compare <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/compare.log" local total=$(wc -l < "$DATA_DIR/compare.log") echo " [Generator] compare: $input" echo " Saved. Total compare entries: $total" _log "compare" "$input" fi ;; export) shift if [ $# -eq 0 ]; then echo "Recent export entries:" tail -20 "$DATA_DIR/export.log" 2>/dev/null || echo " No entries yet. Use: generator export <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/export.log" local total=$(wc -l < "$DATA_DIR/export.log") echo " [Generator] export: $input" echo " Saved. Total export entries: $total" _log "export" "$input" fi ;; config) shift if [ $# -eq 0 ]; then echo "Recent config entries:" tail -20 "$DATA_DIR/config.log" 2>/dev/null || echo " No entries yet. Use: generator config <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/config.log" local total=$(wc -l < "$DATA_DIR/config.log") echo " [Generator] config: $input" echo " Saved. Total config entries: $total" _log "config" "$input" fi ;; status) shift if [ $# -eq 0 ]; then echo "Recent status entries:" tail -20 "$DATA_DIR/status.log" 2>/dev/null || echo " No entries yet. Use: generator status <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/status.log" local total=$(wc -l < "$DATA_DIR/status.log") echo " [Generator] status: $input" echo " Saved. Total status entries: $total" _log "status" "$input" fi ;; report) shift if [ $# -eq 0 ]; then echo "Recent report entries:" tail -20 "$DATA_DIR/report.log" 2>/dev/null || echo " No entries yet. Use: generator report <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/report.log" local total=$(wc -l < "$DATA_DIR/report.log") echo " [Generator] report: $input" echo " Saved. Total report entries: $total" _log "report" "$input" fi ;; stats) _stats ;; export) shift; _export "$@" ;; search) shift; _search "$@" ;; recent) _recent ;; status) _status ;; help|--help|-h) _help ;; version|--version|-v) _version ;; *) echo "Unknown: $1 — run 'generator help'" exit 1 ;; esac
Track game scores, brackets, and player statistics. Use when recording results, scoring rounds, ranking leaderboards, reviewing game history, computing stats.
--- name: score version: "2.0.0" author: BytesAgain homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills license: MIT-0 tags: [score, tool, utility] description: "Track game scores, brackets, and player statistics. Use when recording results, scoring rounds, ranking leaderboards, reviewing game history, computing stats." --- # Score Gaming toolkit for tracking scores, rankings, challenges, leaderboards, and rewards from the command line. Log entries, review history, export data, and search across all records. ## Overview Score is a versatile CLI tool for game and competition tracking. Each command logs or retrieves entries with timestamps. Pass arguments to record new data, or run a command with no arguments to view recent entries. Built-in utilities provide statistics, data export, search, and health checks. ## Commands | Command | Description | |---------|-------------| | `score roll [input]` | Log a roll entry, or view recent rolls | | `score score [input]` | Log a score entry, or view recent scores | | `score rank [input]` | Log a rank entry, or view recent rankings | | `score history [input]` | Log a history note, or view recent history | | `score stats [input]` | Log a stats note, or view recent stats entries | | `score challenge [input]` | Log a challenge, or view recent challenges | | `score create [input]` | Log a creation event, or view recent creates | | `score join [input]` | Log a join event, or view recent joins | | `score track [input]` | Log a tracking entry, or view recent tracks | | `score leaderboard [input]` | Log a leaderboard entry, or view recent standings | | `score reward [input]` | Log a reward, or view recent rewards | | `score reset [input]` | Log a reset event, or view recent resets | | `score stats` | Show summary statistics across all log files | | `score export <fmt>` | Export all data (json, csv, or txt) | | `score search <term>` | Search all entries for a term | | `score recent` | Show last 20 lines of activity history | | `score status` | Health check (version, entries, disk usage, last activity) | | `score help` | Show usage help | | `score version` | Show version (v2.0.0) | ## Data Storage - **Location:** `~/.local/share/score/` - **Per-command logs:** Each command (roll, score, rank, etc.) writes to its own `<command>.log` file - **History:** `history.log` — timestamped action log recording every operation - **Export:** `export.<fmt>` — generated export files (json, csv, txt) - Format: `YYYY-MM-DD HH:MM|value` per line in each log file - All data is plain text. No database or cloud service. ## Requirements - bash (with `set -euo pipefail`) - Standard Unix utilities (`date`, `wc`, `du`, `tail`, `grep`, `cat`, `head`) - No external dependencies or API keys ## When to Use 1. **Tracking game scores** — Use `score score "Player1 25pts"` to log scores during a game night or tournament 2. **Running leaderboards** — Use `score leaderboard "Player1 #1"` to maintain standings, then `score export csv` for spreadsheets 3. **Dice rolling & randomness** — Log dice results with `score roll "d20: 17"` for tabletop RPG sessions 4. **Challenge tracking** — Create and track challenges between players with `score challenge "speed run level 3"` 5. **Data analysis & export** — Use `score stats` for summary counts, `score search` to find specific entries, and `score export json` for programmatic analysis ## Examples ```bash # Log a dice roll score roll "d20: natural 17" # Output: [Score] roll: d20: natural 17 # Saved. Total roll entries: 1 # Record a game score score score "Alice 2500pts round-3" # Output: [Score] score: Alice 2500pts round-3 # Saved. Total score entries: 1 # Update the leaderboard score leaderboard "Alice #1, Bob #2, Charlie #3" ``` ```bash # View recent rolls (no argument = read mode) score roll # Check overall statistics score stats # Output: history: 5 entries # roll: 3 entries # Total: 8 entries # Data size: 4.0K # Search across all entries score search "Alice" ``` ```bash # Export everything as JSON score export json # Output: Exported to ~/.local/share/score/export.json (245 bytes) # Export as CSV for spreadsheets score export csv # Check system health score status # Output: Version: v2.0.0, Data dir, Entries count, Disk usage, Last activity # View recent activity score recent ``` ## How It Works Each domain command (roll, score, rank, challenge, etc.) has dual behavior: - **With arguments:** Appends a timestamped entry to `<command>.log` and logs the action to `history.log` - **Without arguments:** Displays the last 20 entries from that command's log file The `stats` utility aggregates entry counts across all log files. The `export` command converts all logs into JSON, CSV, or plain text format. The `search` command performs case-insensitive grep across every log file. ## Tips - Each command is its own namespace — you can track dozens of game types simultaneously - Use `recent` for a quick dashboard of the last 20 actions - Pipe `export json` output to `jq` for advanced analysis - Override data directory: `export SCORE_DIR=...` (set in your environment before sourcing) --- Powered by BytesAgain | bytesagain.com | [email protected] FILE:scripts/script.sh #!/usr/bin/env bash # Score — gaming tool # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail DATA_DIR="HOME/.local/share/score" mkdir -p "$DATA_DIR" _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } _version() { echo "score v2.0.0"; } _help() { echo "Score v2.0.0 — gaming toolkit" echo "" echo "Usage: score <command> [args]" echo "" echo "Commands:" echo " roll Roll" echo " score Score" echo " rank Rank" echo " history History" echo " stats Stats" echo " challenge Challenge" echo " create Create" echo " join Join" echo " track Track" echo " leaderboard Leaderboard" echo " reward Reward" echo " reset Reset" echo " stats Summary statistics" echo " export <fmt> Export (json|csv|txt)" echo " search <term> Search entries" echo " recent Recent activity" echo " status Health check" echo " help Show this help" echo " version Show version" echo "" echo "Data: $DATA_DIR" } _stats() { echo "=== Score Stats ===" local total=0 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) local c=$(wc -l < "$f") total=$((total + c)) echo " $name: $c entries" done echo " ---" echo " Total: $total entries" echo " Data size: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1)" } _export() { local fmt="-json" local out="$DATA_DIR/export.$fmt" case "$fmt" in json) echo "[" > "$out" local first=1 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) while IFS='|' read -r ts val; do [ $first -eq 1 ] && first=0 || echo "," >> "$out" printf ' {"type":"%s","time":"%s","value":"%s"}' "$name" "$ts" "$val" >> "$out" done < "$f" done echo "\n]" >> "$out" ;; csv) echo "type,time,value" > "$out" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) while IFS='|' read -r ts val; do echo "$name,$ts,$val" >> "$out"; done < "$f" done ;; txt) echo "=== Score Export ===" > "$out" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue echo "--- $(basename "$f" .log) ---" >> "$out" cat "$f" >> "$out" done ;; *) echo "Formats: json, csv, txt"; return 1 ;; esac echo "Exported to $out ($(wc -c < "$out") bytes)" } _status() { echo "=== Score Status ===" echo " Version: v2.0.0" echo " Data dir: $DATA_DIR" echo " Entries: $(cat "$DATA_DIR"/*.log 2>/dev/null | wc -l) total" echo " Disk: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1)" echo " Last: $(tail -1 "$DATA_DIR/history.log" 2>/dev/null || echo never)" echo " Status: OK" } _search() { local term="?Usage: score search <term>" echo "Searching for: $term" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local m=$(grep -i "$term" "$f" 2>/dev/null || true) if [ -n "$m" ]; then echo " --- $(basename "$f" .log) ---" echo "$m" | sed 's/^/ /' fi done } _recent() { echo "=== Recent Activity ===" tail -20 "$DATA_DIR/history.log" 2>/dev/null | sed 's/^/ /' || echo " No activity yet." } case "-help" in roll) shift if [ $# -eq 0 ]; then echo "Recent roll entries:" tail -20 "$DATA_DIR/roll.log" 2>/dev/null || echo " No entries yet. Use: score roll <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/roll.log" local total=$(wc -l < "$DATA_DIR/roll.log") echo " [Score] roll: $input" echo " Saved. Total roll entries: $total" _log "roll" "$input" fi ;; score) shift if [ $# -eq 0 ]; then echo "Recent score entries:" tail -20 "$DATA_DIR/score.log" 2>/dev/null || echo " No entries yet. Use: score score <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/score.log" local total=$(wc -l < "$DATA_DIR/score.log") echo " [Score] score: $input" echo " Saved. Total score entries: $total" _log "score" "$input" fi ;; rank) shift if [ $# -eq 0 ]; then echo "Recent rank entries:" tail -20 "$DATA_DIR/rank.log" 2>/dev/null || echo " No entries yet. Use: score rank <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/rank.log" local total=$(wc -l < "$DATA_DIR/rank.log") echo " [Score] rank: $input" echo " Saved. Total rank entries: $total" _log "rank" "$input" fi ;; history) shift if [ $# -eq 0 ]; then echo "Recent history entries:" tail -20 "$DATA_DIR/history.log" 2>/dev/null || echo " No entries yet. Use: score history <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/history.log" local total=$(wc -l < "$DATA_DIR/history.log") echo " [Score] history: $input" echo " Saved. Total history entries: $total" _log "history" "$input" fi ;; stats) shift if [ $# -eq 0 ]; then echo "Recent stats entries:" tail -20 "$DATA_DIR/stats.log" 2>/dev/null || echo " No entries yet. Use: score stats <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/stats.log" local total=$(wc -l < "$DATA_DIR/stats.log") echo " [Score] stats: $input" echo " Saved. Total stats entries: $total" _log "stats" "$input" fi ;; challenge) shift if [ $# -eq 0 ]; then echo "Recent challenge entries:" tail -20 "$DATA_DIR/challenge.log" 2>/dev/null || echo " No entries yet. Use: score challenge <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/challenge.log" local total=$(wc -l < "$DATA_DIR/challenge.log") echo " [Score] challenge: $input" echo " Saved. Total challenge entries: $total" _log "challenge" "$input" fi ;; create) shift if [ $# -eq 0 ]; then echo "Recent create entries:" tail -20 "$DATA_DIR/create.log" 2>/dev/null || echo " No entries yet. Use: score create <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/create.log" local total=$(wc -l < "$DATA_DIR/create.log") echo " [Score] create: $input" echo " Saved. Total create entries: $total" _log "create" "$input" fi ;; join) shift if [ $# -eq 0 ]; then echo "Recent join entries:" tail -20 "$DATA_DIR/join.log" 2>/dev/null || echo " No entries yet. Use: score join <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/join.log" local total=$(wc -l < "$DATA_DIR/join.log") echo " [Score] join: $input" echo " Saved. Total join entries: $total" _log "join" "$input" fi ;; track) shift if [ $# -eq 0 ]; then echo "Recent track entries:" tail -20 "$DATA_DIR/track.log" 2>/dev/null || echo " No entries yet. Use: score track <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/track.log" local total=$(wc -l < "$DATA_DIR/track.log") echo " [Score] track: $input" echo " Saved. Total track entries: $total" _log "track" "$input" fi ;; leaderboard) shift if [ $# -eq 0 ]; then echo "Recent leaderboard entries:" tail -20 "$DATA_DIR/leaderboard.log" 2>/dev/null || echo " No entries yet. Use: score leaderboard <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/leaderboard.log" local total=$(wc -l < "$DATA_DIR/leaderboard.log") echo " [Score] leaderboard: $input" echo " Saved. Total leaderboard entries: $total" _log "leaderboard" "$input" fi ;; reward) shift if [ $# -eq 0 ]; then echo "Recent reward entries:" tail -20 "$DATA_DIR/reward.log" 2>/dev/null || echo " No entries yet. Use: score reward <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/reward.log" local total=$(wc -l < "$DATA_DIR/reward.log") echo " [Score] reward: $input" echo " Saved. Total reward entries: $total" _log "reward" "$input" fi ;; reset) shift if [ $# -eq 0 ]; then echo "Recent reset entries:" tail -20 "$DATA_DIR/reset.log" 2>/dev/null || echo " No entries yet. Use: score reset <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/reset.log" local total=$(wc -l < "$DATA_DIR/reset.log") echo " [Score] reset: $input" echo " Saved. Total reset entries: $total" _log "reset" "$input" fi ;; stats) _stats ;; export) shift; _export "$@" ;; search) shift; _search "$@" ;; recent) _recent ;; status) _status ;; help|--help|-h) _help ;; version|--version|-v) _version ;; *) echo "Unknown: $1 — run 'score help'" exit 1 ;; esac
Roll dice, track scores, and manage game stats for tabletop gaming. Use when rolling dice, tracking scores, ranking players, reviewing history.
--- name: "Dice" description: "Roll dice, track scores, and manage game stats for tabletop gaming. Use when rolling dice, tracking scores, ranking players, reviewing history." version: "2.0.0" author: "BytesAgain" homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills tags: ["dice", "scores", "tabletop", "gaming", "fun"] --- # Dice A focused gaming & entertainment tool built for Dice. Log entries, review trends, and export reports — all locally. ## Why Dice? - Works entirely offline — your data never leaves your machine - Simple command-line interface, no GUI needed - Export to JSON, CSV, or plain text anytime - Automatic history and activity logging ## Getting Started ```bash # See what you can do dice help # Check current status dice status # View your statistics dice stats ``` ## Commands | Command | What it does | |---------|-------------| | `dice roll` | Roll | | `dice score` | Score | | `dice rank` | Rank | | `dice history` | History | | `dice stats` | Stats | | `dice challenge` | Challenge | | `dice create` | Create | | `dice join` | Join | | `dice track` | Track | | `dice leaderboard` | Leaderboard | | `dice reward` | Reward | | `dice reset` | Reset | | `dice stats` | Summary statistics | | `dice export` | <fmt> Export (json|csv|txt) | | `dice search` | <term> Search entries | | `dice recent` | Recent activity | | `dice status` | Health check | | `dice help` | Show this help | | `dice version` | Show version | | `dice $name:` | $c entries | | `dice Total:` | $total entries | | `dice Data` | size: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1) | | `dice Version:` | v2.0.0 | | `dice Data` | dir: $DATA_DIR | | `dice Entries:` | $(cat "$DATA_DIR"/*.log 2>/dev/null | wc -l) total | | `dice Disk:` | $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1) | | `dice Last:` | $(tail -1 "$DATA_DIR/history.log" 2>/dev/null || echo never) | | `dice Status:` | OK | | `dice [Dice]` | roll: $input | | `dice Saved.` | Total roll entries: $total | | `dice [Dice]` | score: $input | | `dice Saved.` | Total score entries: $total | | `dice [Dice]` | rank: $input | | `dice Saved.` | Total rank entries: $total | | `dice [Dice]` | history: $input | | `dice Saved.` | Total history entries: $total | | `dice [Dice]` | stats: $input | | `dice Saved.` | Total stats entries: $total | | `dice [Dice]` | challenge: $input | | `dice Saved.` | Total challenge entries: $total | | `dice [Dice]` | create: $input | | `dice Saved.` | Total create entries: $total | | `dice [Dice]` | join: $input | | `dice Saved.` | Total join entries: $total | | `dice [Dice]` | track: $input | | `dice Saved.` | Total track entries: $total | | `dice [Dice]` | leaderboard: $input | | `dice Saved.` | Total leaderboard entries: $total | | `dice [Dice]` | reward: $input | | `dice Saved.` | Total reward entries: $total | | `dice [Dice]` | reset: $input | | `dice Saved.` | Total reset entries: $total | ## Data Storage All data is stored locally at `~/.local/share/dice/`. Each action is logged with timestamps. Use `export` to back up your data anytime. ## Feedback Found a bug or have a suggestion? Let us know: https://bytesagain.com/feedback/ --- Powered by BytesAgain | bytesagain.com | [email protected] FILE:scripts/script.sh #!/usr/bin/env bash # Dice — gaming tool # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail DATA_DIR="HOME/.local/share/dice" mkdir -p "$DATA_DIR" _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } _version() { echo "dice v2.0.0"; } _help() { echo "Dice v2.0.0 — gaming toolkit" echo "" echo "Usage: dice <command> [args]" echo "" echo "Commands:" echo " roll Roll" echo " score Score" echo " rank Rank" echo " history History" echo " stats Stats" echo " challenge Challenge" echo " create Create" echo " join Join" echo " track Track" echo " leaderboard Leaderboard" echo " reward Reward" echo " reset Reset" echo " stats Summary statistics" echo " export <fmt> Export (json|csv|txt)" echo " search <term> Search entries" echo " recent Recent activity" echo " status Health check" echo " help Show this help" echo " version Show version" echo "" echo "Data: $DATA_DIR" } _stats() { echo "=== Dice Stats ===" local total=0 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) local c=$(wc -l < "$f") total=$((total + c)) echo " $name: $c entries" done echo " ---" echo " Total: $total entries" echo " Data size: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1)" } _export() { local fmt="-json" local out="$DATA_DIR/export.$fmt" case "$fmt" in json) echo "[" > "$out" local first=1 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) while IFS='|' read -r ts val; do [ $first -eq 1 ] && first=0 || echo "," >> "$out" printf ' {"type":"%s","time":"%s","value":"%s"}' "$name" "$ts" "$val" >> "$out" done < "$f" done echo "\n]" >> "$out" ;; csv) echo "type,time,value" > "$out" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) while IFS='|' read -r ts val; do echo "$name,$ts,$val" >> "$out"; done < "$f" done ;; txt) echo "=== Dice Export ===" > "$out" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue echo "--- $(basename "$f" .log) ---" >> "$out" cat "$f" >> "$out" done ;; *) echo "Formats: json, csv, txt"; return 1 ;; esac echo "Exported to $out ($(wc -c < "$out") bytes)" } _status() { echo "=== Dice Status ===" echo " Version: v2.0.0" echo " Data dir: $DATA_DIR" echo " Entries: $(cat "$DATA_DIR"/*.log 2>/dev/null | wc -l) total" echo " Disk: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1)" echo " Last: $(tail -1 "$DATA_DIR/history.log" 2>/dev/null || echo never)" echo " Status: OK" } _search() { local term="?Usage: dice search <term>" echo "Searching for: $term" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local m=$(grep -i "$term" "$f" 2>/dev/null || true) if [ -n "$m" ]; then echo " --- $(basename "$f" .log) ---" echo "$m" | sed 's/^/ /' fi done } _recent() { echo "=== Recent Activity ===" tail -20 "$DATA_DIR/history.log" 2>/dev/null | sed 's/^/ /' || echo " No activity yet." } case "-help" in roll) shift if [ $# -eq 0 ]; then echo "Recent roll entries:" tail -20 "$DATA_DIR/roll.log" 2>/dev/null || echo " No entries yet. Use: dice roll <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/roll.log" local total=$(wc -l < "$DATA_DIR/roll.log") echo " [Dice] roll: $input" echo " Saved. Total roll entries: $total" _log "roll" "$input" fi ;; score) shift if [ $# -eq 0 ]; then echo "Recent score entries:" tail -20 "$DATA_DIR/score.log" 2>/dev/null || echo " No entries yet. Use: dice score <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/score.log" local total=$(wc -l < "$DATA_DIR/score.log") echo " [Dice] score: $input" echo " Saved. Total score entries: $total" _log "score" "$input" fi ;; rank) shift if [ $# -eq 0 ]; then echo "Recent rank entries:" tail -20 "$DATA_DIR/rank.log" 2>/dev/null || echo " No entries yet. Use: dice rank <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/rank.log" local total=$(wc -l < "$DATA_DIR/rank.log") echo " [Dice] rank: $input" echo " Saved. Total rank entries: $total" _log "rank" "$input" fi ;; history) shift if [ $# -eq 0 ]; then echo "Recent history entries:" tail -20 "$DATA_DIR/history.log" 2>/dev/null || echo " No entries yet. Use: dice history <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/history.log" local total=$(wc -l < "$DATA_DIR/history.log") echo " [Dice] history: $input" echo " Saved. Total history entries: $total" _log "history" "$input" fi ;; stats) shift if [ $# -eq 0 ]; then echo "Recent stats entries:" tail -20 "$DATA_DIR/stats.log" 2>/dev/null || echo " No entries yet. Use: dice stats <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/stats.log" local total=$(wc -l < "$DATA_DIR/stats.log") echo " [Dice] stats: $input" echo " Saved. Total stats entries: $total" _log "stats" "$input" fi ;; challenge) shift if [ $# -eq 0 ]; then echo "Recent challenge entries:" tail -20 "$DATA_DIR/challenge.log" 2>/dev/null || echo " No entries yet. Use: dice challenge <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/challenge.log" local total=$(wc -l < "$DATA_DIR/challenge.log") echo " [Dice] challenge: $input" echo " Saved. Total challenge entries: $total" _log "challenge" "$input" fi ;; create) shift if [ $# -eq 0 ]; then echo "Recent create entries:" tail -20 "$DATA_DIR/create.log" 2>/dev/null || echo " No entries yet. Use: dice create <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/create.log" local total=$(wc -l < "$DATA_DIR/create.log") echo " [Dice] create: $input" echo " Saved. Total create entries: $total" _log "create" "$input" fi ;; join) shift if [ $# -eq 0 ]; then echo "Recent join entries:" tail -20 "$DATA_DIR/join.log" 2>/dev/null || echo " No entries yet. Use: dice join <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/join.log" local total=$(wc -l < "$DATA_DIR/join.log") echo " [Dice] join: $input" echo " Saved. Total join entries: $total" _log "join" "$input" fi ;; track) shift if [ $# -eq 0 ]; then echo "Recent track entries:" tail -20 "$DATA_DIR/track.log" 2>/dev/null || echo " No entries yet. Use: dice track <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/track.log" local total=$(wc -l < "$DATA_DIR/track.log") echo " [Dice] track: $input" echo " Saved. Total track entries: $total" _log "track" "$input" fi ;; leaderboard) shift if [ $# -eq 0 ]; then echo "Recent leaderboard entries:" tail -20 "$DATA_DIR/leaderboard.log" 2>/dev/null || echo " No entries yet. Use: dice leaderboard <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/leaderboard.log" local total=$(wc -l < "$DATA_DIR/leaderboard.log") echo " [Dice] leaderboard: $input" echo " Saved. Total leaderboard entries: $total" _log "leaderboard" "$input" fi ;; reward) shift if [ $# -eq 0 ]; then echo "Recent reward entries:" tail -20 "$DATA_DIR/reward.log" 2>/dev/null || echo " No entries yet. Use: dice reward <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/reward.log" local total=$(wc -l < "$DATA_DIR/reward.log") echo " [Dice] reward: $input" echo " Saved. Total reward entries: $total" _log "reward" "$input" fi ;; reset) shift if [ $# -eq 0 ]; then echo "Recent reset entries:" tail -20 "$DATA_DIR/reset.log" 2>/dev/null || echo " No entries yet. Use: dice reset <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/reset.log" local total=$(wc -l < "$DATA_DIR/reset.log") echo " [Dice] reset: $input" echo " Saved. Total reset entries: $total" _log "reset" "$input" fi ;; stats) _stats ;; export) shift; _export "$@" ;; search) shift; _search "$@" ;; recent) _recent ;; status) _status ;; help|--help|-h) _help ;; version|--version|-v) _version ;; *) echo "Unknown: $1 — run 'dice help'" exit 1 ;; esac
Reference tool for devtools — covers intro, quickstart, patterns and more. Quick lookup for Encode concepts, best practices, and implementation patterns.
--- name: "encode" version: "2.0.4" description: "Reference tool for devtools — covers intro, quickstart, patterns and more. Quick lookup for Encode concepts, best practices, and implementation patterns." author: "BytesAgain" homepage: "https://bytesagain.com" source: "https://github.com/bytesagain/ai-skills" tags: [encode, reference] category: "devtools" --- # Encode Reference tool for devtools — covers intro, quickstart, patterns and more. Quick lookup for Encode concepts, best practices, and implementation patterns. No API keys or credentials required. ## Commands | Command | Description | |---------|-------------| | `intro` | intro reference | | `quickstart` | quickstart reference | | `patterns` | patterns reference | | `debugging` | debugging reference | | `performance` | performance reference | | `security` | security reference | | `migration` | migration reference | | `cheatsheet` | cheatsheet reference | ## Output Format All commands output plain-text reference documentation via heredoc. No external API calls, no credentials needed, no network access. --- *Powered by BytesAgain | bytesagain.com | [email protected]* FILE:scripts/script.sh #!/usr/bin/env bash # encode — Encode reference tool. Use when working with encode in devtools contexts. # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail VERSION="2.0.3" show_help() { cat << 'HELPEOF' encode v$VERSION — Encode Reference Tool Usage: encode <command> Commands: intro Overview and core concepts quickstart Getting started guide patterns Common patterns and best practices debugging Debugging and troubleshooting performance Performance optimization tips security Security considerations migration Migration and upgrade guide cheatsheet Quick reference cheat sheet help Show this help version Show version Powered by BytesAgain | bytesagain.com HELPEOF } cmd_intro() { cat << 'EOF' # Encode — Overview ## What is Encode? Encode (encode) is a specialized tool/concept in the devtools domain. It provides essential capabilities for professionals working with encode. ## Key Concepts - Core encode principles and fundamentals - How encode fits into the broader devtools ecosystem - Essential terminology every practitioner should know ## Why Encode Matters Understanding encode is critical for: - Improving efficiency in devtools workflows - Reducing errors and downtime - Meeting industry standards and compliance requirements - Enabling better decision-making with accurate data ## Getting Started 1. Understand the basic encode concepts 2. Learn the standard tools and interfaces 3. Practice with common scenarios 4. Review safety and compliance requirements EOF } cmd_quickstart() { cat << 'EOF' # Encode — Quick Start Guide ## Prerequisites - Basic understanding of devtools concepts - Required tools and access credentials - System meeting minimum requirements ## Installation 1. Download or clone the encode package 2. Install dependencies 3. Configure initial settings 4. Verify installation ## First Steps 1. Run the hello-world example 2. Review the default configuration 3. Try a simple real-world task 4. Explore available commands and options ## Next Steps - Read the full documentation - Join the community forum - Try advanced features - Set up automated workflows EOF } cmd_patterns() { cat << 'EOF' # Encode — Common Patterns & Best Practices ## Design Patterns 1. **Standard Pattern**: The most common approach for encode 2. **Scalable Pattern**: For high-volume or distributed scenarios 3. **Resilient Pattern**: For fault-tolerant implementations ## Best Practices - Follow the principle of least privilege - Use version control for all configurations - Implement comprehensive logging - Test changes in staging before production - Document all custom configurations ## Anti-Patterns to Avoid - Hardcoding credentials or configuration - Skipping validation and error handling - Ignoring monitoring and alerting - Making changes without documentation - Over-engineering simple solutions EOF } cmd_debugging() { cat << 'EOF' # Encode — Debugging Guide ## Common Errors 1. **Connection refused**: Check service status and network 2. **Permission denied**: Verify credentials and access rights 3. **Timeout**: Check network, increase limits, optimize queries 4. **Invalid input**: Validate data format and encoding ## Debugging Tools - Built-in logging and diagnostics - Network analysis tools (tcpdump, wireshark) - System monitoring (top, htop, iostat) - Application-specific debug modes ## Debug Workflow 1. Reproduce the issue consistently 2. Check logs for error messages 3. Isolate the failing component 4. Test with minimal configuration 5. Apply fix and verify EOF } cmd_performance() { cat << 'EOF' # Encode — Performance Optimization ## Key Metrics - Response time / latency - Throughput / operations per second - Resource utilization (CPU, memory, I/O) - Error rate and retry frequency ## Optimization Strategies 1. **Caching**: Reduce redundant operations 2. **Batching**: Group small operations 3. **Indexing**: Speed up data lookups 4. **Compression**: Reduce data transfer size 5. **Parallel Processing**: Utilize multiple cores ## Monitoring - Set up baseline performance metrics - Configure alerts for anomalies - Track trends over time - Regular capacity planning reviews EOF } cmd_security() { cat << 'EOF' # Encode — Security Considerations ## Authentication & Authorization - Use strong, unique credentials - Implement role-based access control - Enable multi-factor authentication where possible - Regularly review and rotate credentials ## Data Protection - Encrypt data at rest and in transit - Implement proper backup procedures - Follow data retention policies - Sanitize inputs to prevent injection ## Network Security - Use firewalls and network segmentation - Monitor for suspicious activity - Keep all software patched and updated - Disable unnecessary services and ports EOF } cmd_migration() { cat << 'EOF' # Encode — Migration & Upgrade Guide ## Pre-Migration Checklist - [ ] Current system fully documented - [ ] Complete backup taken and verified - [ ] Target environment prepared - [ ] Rollback plan documented - [ ] Stakeholders notified ## Migration Steps 1. Prepare target environment 2. Export data from source 3. Transform data if needed 4. Import to target 5. Verify data integrity 6. Update configurations 7. Test all functionality 8. Switch traffic / go live ## Post-Migration - Monitor for errors and performance - Verify all integrations working - Update documentation - Decommission old system after confirmation EOF } cmd_cheatsheet() { cat << 'EOF' # Encode — Quick Reference ## Essential Commands | Command | Description | |---------|-------------| | help | Show available commands | | version | Display version info | | intro | Overview and fundamentals | | troubleshooting | Common problems and fixes | ## Common Workflows 1. **Setup**: install → configure → verify → test 2. **Daily**: check → monitor → report → review 3. **Issue**: diagnose → isolate → fix → verify → document ## Key Shortcuts - Use tab completion for commands - Check logs first when troubleshooting - Always backup before making changes - Document everything you change EOF } CMD="-help" shift 2>/dev/null || true case "$CMD" in intro) cmd_intro "$@" ;; quickstart) cmd_quickstart "$@" ;; patterns) cmd_patterns "$@" ;; debugging) cmd_debugging "$@" ;; performance) cmd_performance "$@" ;; security) cmd_security "$@" ;; migration) cmd_migration "$@" ;; cheatsheet) cmd_cheatsheet "$@" ;; help|--help|-h) show_help ;; version|--version|-v) echo "encode v$VERSION — Powered by BytesAgain" ;; *) echo "Unknown: $CMD"; echo "Run: encode help"; exit 1 ;; esac
diff reference tool
--- name: "diff" version: "2.0.4" description: "diff reference tool" author: "BytesAgain" homepage: "https://bytesagain.com" source: "https://github.com/bytesagain/ai-skills" tags: [diff, reference] category: "devtools" --- # Diff diff reference tool. No API keys or credentials required — outputs reference documentation only. ## Commands | Command | Description | |---------|-------------| | `intro` | intro reference | | `quickstart` | quickstart reference | | `patterns` | patterns reference | | `debugging` | debugging reference | | `performance` | performance reference | | `security` | security reference | | `migration` | migration reference | | `cheatsheet` | cheatsheet reference | ## Output Format All commands output plain-text reference documentation via heredoc. No external API calls, no credentials needed, no network access. --- *Powered by BytesAgain | bytesagain.com | [email protected]* FILE:scripts/script.sh #!/usr/bin/env bash # diff — Diff reference tool. Use when working with diff in devtools contexts. # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail VERSION="2.0.4" show_help() { cat << 'HELPEOF' diff v$VERSION — Diff Reference Tool Usage: diff <command> Commands: intro Overview and core concepts quickstart Getting started guide patterns Common patterns and best practices debugging Debugging and troubleshooting performance Performance optimization tips security Security considerations migration Migration and upgrade guide cheatsheet Quick reference cheat sheet help Show this help version Show version Powered by BytesAgain | bytesagain.com HELPEOF } cmd_intro() { cat << 'EOF' # Diff — Overview ## What is Diff? Diff (diff) is a specialized tool/concept in the devtools domain. It provides essential capabilities for professionals working with diff. ## Key Concepts - Core diff principles and fundamentals - How diff fits into the broader devtools ecosystem - Essential terminology every practitioner should know ## Why Diff Matters Understanding diff is critical for: - Improving efficiency in devtools workflows - Reducing errors and downtime - Meeting industry standards and compliance requirements - Enabling better decision-making with accurate data ## Getting Started 1. Understand the basic diff concepts 2. Learn the standard tools and interfaces 3. Practice with common scenarios 4. Review safety and compliance requirements EOF } cmd_quickstart() { cat << 'EOF' # Diff — Quick Start Guide ## Prerequisites - Basic understanding of devtools concepts - Required tools and access credentials - System meeting minimum requirements ## Installation 1. Download or clone the diff package 2. Install dependencies 3. Configure initial settings 4. Verify installation ## First Steps 1. Run the hello-world example 2. Review the default configuration 3. Try a simple real-world task 4. Explore available commands and options ## Next Steps - Read the full documentation - Join the community forum - Try advanced features - Set up automated workflows EOF } cmd_patterns() { cat << 'EOF' # Diff — Common Patterns & Best Practices ## Design Patterns 1. **Standard Pattern**: The most common approach for diff 2. **Scalable Pattern**: For high-volume or distributed scenarios 3. **Resilient Pattern**: For fault-tolerant implementations ## Best Practices - Follow the principle of least privilege - Use version control for all configurations - Implement comprehensive logging - Test changes in staging before production - Document all custom configurations ## Anti-Patterns to Avoid - Hardcoding credentials or configuration - Skipping validation and error handling - Ignoring monitoring and alerting - Making changes without documentation - Over-engineering simple solutions EOF } cmd_debugging() { cat << 'EOF' # Diff — Debugging Guide ## Common Errors 1. **Connection refused**: Check service status and network 2. **Permission denied**: Verify credentials and access rights 3. **Timeout**: Check network, increase limits, optimize queries 4. **Invalid input**: Validate data format and encoding ## Debugging Tools - Built-in logging and diagnostics - Network analysis tools (tcpdump, wireshark) - System monitoring (top, htop, iostat) - Application-specific debug modes ## Debug Workflow 1. Reproduce the issue consistently 2. Check logs for error messages 3. Isolate the failing component 4. Test with minimal configuration 5. Apply fix and verify EOF } cmd_performance() { cat << 'EOF' # Diff — Performance Optimization ## Key Metrics - Response time / latency - Throughput / operations per second - Resource utilization (CPU, memory, I/O) - Error rate and retry frequency ## Optimization Strategies 1. **Caching**: Reduce redundant operations 2. **Batching**: Group small operations 3. **Indexing**: Speed up data lookups 4. **Compression**: Reduce data transfer size 5. **Parallel Processing**: Utilize multiple cores ## Monitoring - Set up baseline performance metrics - Configure alerts for anomalies - Track trends over time - Regular capacity planning reviews EOF } cmd_security() { cat << 'EOF' # Diff — Security Considerations ## Authentication & Authorization - Use strong, unique credentials - Implement role-based access control - Enable multi-factor authentication where possible - Regularly review and rotate credentials ## Data Protection - Encrypt data at rest and in transit - Implement proper backup procedures - Follow data retention policies - Sanitize inputs to prevent injection ## Network Security - Use firewalls and network segmentation - Monitor for suspicious activity - Keep all software patched and updated - Disable unnecessary services and ports EOF } cmd_migration() { cat << 'EOF' # Diff — Migration & Upgrade Guide ## Pre-Migration Checklist - [ ] Current system fully documented - [ ] Complete backup taken and verified - [ ] Target environment prepared - [ ] Rollback plan documented - [ ] Stakeholders notified ## Migration Steps 1. Prepare target environment 2. Export data from source 3. Transform data if needed 4. Import to target 5. Verify data integrity 6. Update configurations 7. Test all functionality 8. Switch traffic / go live ## Post-Migration - Monitor for errors and performance - Verify all integrations working - Update documentation - Decommission old system after confirmation EOF } cmd_cheatsheet() { cat << 'EOF' # Diff — Quick Reference ## Essential Commands | Command | Description | |---------|-------------| | help | Show available commands | | version | Display version info | | intro | Overview and fundamentals | | troubleshooting | Common problems and fixes | ## Common Workflows 1. **Setup**: install → configure → verify → test 2. **Daily**: check → monitor → report → review 3. **Issue**: diagnose → isolate → fix → verify → document ## Key Shortcuts - Use tab completion for commands - Check logs first when troubleshooting - Always backup before making changes - Document everything you change EOF } CMD="-help" shift 2>/dev/null || true case "$CMD" in intro) cmd_intro "$@" ;; quickstart) cmd_quickstart "$@" ;; patterns) cmd_patterns "$@" ;; debugging) cmd_debugging "$@" ;; performance) cmd_performance "$@" ;; security) cmd_security "$@" ;; migration) cmd_migration "$@" ;; cheatsheet) cmd_cheatsheet "$@" ;; help|--help|-h) show_help ;; version|--version|-v) echo "diff v$VERSION — Powered by BytesAgain" ;; *) echo "Unknown: $CMD"; echo "Run: diff help"; exit 1 ;; esac
Monitor CPU load, per-core usage, and rank top resource-consuming processes. Use when checking temperatures, ranking processes, tracking load.
--- name: cpu version: "2.0.0" author: BytesAgain homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills license: MIT-0 tags: [cpu, tool, utility] description: "Monitor CPU load, per-core usage, and rank top resource-consuming processes. Use when checking temperatures, ranking processes, tracking load." --- # Cpu Cpu v2.0.0 — a sysops toolkit for scanning, monitoring, reporting, alerting, benchmarking, and managing system operations. Each command logs timestamped records locally, providing a lightweight operations journal for tracking system events, fixes, backups, and performance comparisons. ## Commands | Command | Description | |---------|-------------| | `cpu scan <input>` | Record a scan result (or view recent scans with no args) | | `cpu monitor <input>` | Log a monitoring observation (or view recent monitors) | | `cpu report <input>` | Record a report entry (or view recent reports) | | `cpu alert <input>` | Log an alert event (or view recent alerts) | | `cpu top <input>` | Record a top-process snapshot (or view recent tops) | | `cpu usage <input>` | Log a usage measurement (or view recent usage records) | | `cpu check <input>` | Record a health check (or view recent checks) | | `cpu fix <input>` | Log a fix or remediation (or view recent fixes) | | `cpu cleanup <input>` | Record a cleanup action (or view recent cleanups) | | `cpu backup <input>` | Log a backup event (or view recent backups) | | `cpu restore <input>` | Record a restore operation (or view recent restores) | | `cpu log <input>` | Add a general log entry (or view recent log entries) | | `cpu benchmark <input>` | Record a benchmark result (or view recent benchmarks) | | `cpu compare <input>` | Log a comparison (or view recent comparisons) | | `cpu stats` | Show summary statistics across all log files | | `cpu search <term>` | Search all entries for a keyword (case-insensitive) | | `cpu recent` | Show the 20 most recent activity entries | | `cpu status` | Health check — version, entry count, disk usage, last activity | | `cpu help` | Display all available commands | | `cpu version` | Print version string | Each operations command (scan, monitor, report, alert, top, usage, check, fix, cleanup, backup, restore, log, benchmark, compare) works identically: - **With arguments:** saves a timestamped entry to `~/.local/share/cpu/<command>.log` and logs to `history.log` - **Without arguments:** displays the 20 most recent entries from that command's log file ## Data Storage All data is stored locally in `~/.local/share/cpu/`: | File | Contents | |------|----------| | `scan.log` | System scan results | | `monitor.log` | Monitoring observations | | `report.log` | Report entries | | `alert.log` | Alert events | | `top.log` | Top-process snapshots | | `usage.log` | Usage measurements | | `check.log` | Health check records | | `fix.log` | Fix/remediation records | | `cleanup.log` | Cleanup action records | | `backup.log` | Backup event records | | `restore.log` | Restore operation records | | `log.log` | General log entries | | `benchmark.log` | Benchmark results | | `compare.log` | Comparison records | | `history.log` | Unified activity log for all commands | The `stats` command reads all `.log` files and reports line counts per file, total entries, data directory size, and the timestamp of the first recorded activity. The `export` utility function can produce **JSON**, **CSV**, or **TXT** output files under the data directory. ## Requirements - **Bash** (4.0+) - **coreutils** — `date`, `wc`, `du`, `head`, `tail`, `grep`, `basename`, `cat` - No external dependencies, API keys, or network access required - Works on Linux and macOS ## When to Use 1. **Tracking system operations** — use `scan`, `monitor`, `check`, and `alert` to maintain a timestamped journal of system health events and observations 2. **Recording fixes and remediations** — use `fix` and `cleanup` to document what was changed and when, creating an audit trail for incident response 3. **Benchmarking and comparing performance** — use `benchmark` and `compare` to log performance results over time and track improvements or regressions 4. **Managing backup and restore history** — use `backup` and `restore` to log when backups were taken and restores were performed, with searchable history 5. **Searching operational history** — use `search <term>` to find specific events across all log categories, or `recent` to view the latest 20 activities at a glance ## Examples ```bash # Record a scan finding cpu scan "port 8080 open on web-server-01" # Log a monitoring observation cpu monitor "memory usage at 78% on db-primary" # Record an alert cpu alert "disk /var/log at 92% capacity" # Log a fix cpu fix "rotated nginx logs, freed 2.3GB on web-01" # Record a benchmark result cpu benchmark "sysbench cpu run: 1847 events/sec" # Compare two environments cpu compare "prod latency 45ms vs staging 62ms" # Log a backup cpu backup "full backup of postgres completed 14.2GB" # Search all logs for a keyword cpu search "disk" # View summary statistics cpu stats # Check system status cpu status # View recent activity cpu recent ``` ## How It Works Cpu uses a simple append-only log architecture. Every command writes a pipe-delimited record (`timestamp|value`) to its dedicated log file. The `history.log` file captures a unified timeline of all operations with the format `MM-DD HH:MM command: value`. This design makes Cpu: - **Fast** — pure bash, no database overhead - **Transparent** — all data is human-readable plain text - **Portable** — works anywhere bash runs, no install needed - **Auditable** — every action is timestamped and traceable --- Powered by BytesAgain | bytesagain.com | [email protected] FILE:scripts/script.sh #!/usr/bin/env bash # Cpu — sysops tool # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail DATA_DIR="HOME/.local/share/cpu" mkdir -p "$DATA_DIR" _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } _version() { echo "cpu v2.0.0"; } _help() { echo "Cpu v2.0.0 — sysops toolkit" echo "" echo "Usage: cpu <command> [args]" echo "" echo "Commands:" echo " scan Scan" echo " monitor Monitor" echo " report Report" echo " alert Alert" echo " top Top" echo " usage Usage" echo " check Check" echo " fix Fix" echo " cleanup Cleanup" echo " backup Backup" echo " restore Restore" echo " log Log" echo " benchmark Benchmark" echo " compare Compare" echo " stats Summary statistics" echo " export <fmt> Export (json|csv|txt)" echo " status Health check" echo " help Show this help" echo " version Show version" echo "" echo "Data: $DATA_DIR" } _stats() { echo "=== Cpu Stats ===" local total=0 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) local c=$(wc -l < "$f") total=$((total + c)) echo " $name: $c entries" done echo " ---" echo " Total: $total entries" echo " Data size: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1)" echo " Since: $(head -1 "$DATA_DIR/history.log" 2>/dev/null | cut -d'|' -f1 || echo 'N/A')" } _export() { local fmt="-json" local out="$DATA_DIR/export.$fmt" case "$fmt" in json) echo "[" > "$out" local first=1 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) while IFS='|' read -r ts val; do [ $first -eq 1 ] && first=0 || echo "," >> "$out" printf ' {"type":"%s","time":"%s","value":"%s"}' "$name" "$ts" "$val" >> "$out" done < "$f" done echo "" >> "$out" echo "]" >> "$out" ;; csv) echo "type,time,value" > "$out" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) while IFS='|' read -r ts val; do echo "$name,$ts,$val" >> "$out" done < "$f" done ;; txt) echo "=== Cpu Export ===" > "$out" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue echo "--- $(basename "$f" .log) ---" >> "$out" cat "$f" >> "$out" echo "" >> "$out" done ;; *) echo "Formats: json, csv, txt"; return 1 ;; esac echo "Exported to $out ($(wc -c < "$out") bytes)" } _status() { echo "=== Cpu Status ===" echo " Version: v2.0.0" echo " Data dir: $DATA_DIR" echo " Entries: $(cat "$DATA_DIR"/*.log 2>/dev/null | wc -l) total" echo " Disk: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1)" local last=$(tail -1 "$DATA_DIR/history.log" 2>/dev/null || echo "never") echo " Last activity: $last" echo " Status: OK" } _search() { local term="?Usage: cpu search <term>" echo "Searching for: $term" local found=0 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local matches=$(grep -i "$term" "$f" 2>/dev/null || true) if [ -n "$matches" ]; then echo " --- $(basename "$f" .log) ---" echo "$matches" | while read -r line; do echo " $line" found=$((found + 1)) done fi done [ $found -eq 0 ] && echo " No matches found." } _recent() { echo "=== Recent Activity ===" if [ -f "$DATA_DIR/history.log" ]; then tail -20 "$DATA_DIR/history.log" | while IFS='' read -r line; do echo " $line" done else echo " No activity yet." fi } # Main dispatch case "-help" in scan) shift if [ $# -eq 0 ]; then echo "Recent scan entries:" tail -20 "$DATA_DIR/scan.log" 2>/dev/null || echo " No entries yet. Use: cpu scan <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/scan.log" local total=$(wc -l < "$DATA_DIR/scan.log") echo " [Cpu] scan: $input" echo " Saved. Total scan entries: $total" _log "scan" "$input" fi ;; monitor) shift if [ $# -eq 0 ]; then echo "Recent monitor entries:" tail -20 "$DATA_DIR/monitor.log" 2>/dev/null || echo " No entries yet. Use: cpu monitor <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/monitor.log" local total=$(wc -l < "$DATA_DIR/monitor.log") echo " [Cpu] monitor: $input" echo " Saved. Total monitor entries: $total" _log "monitor" "$input" fi ;; report) shift if [ $# -eq 0 ]; then echo "Recent report entries:" tail -20 "$DATA_DIR/report.log" 2>/dev/null || echo " No entries yet. Use: cpu report <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/report.log" local total=$(wc -l < "$DATA_DIR/report.log") echo " [Cpu] report: $input" echo " Saved. Total report entries: $total" _log "report" "$input" fi ;; alert) shift if [ $# -eq 0 ]; then echo "Recent alert entries:" tail -20 "$DATA_DIR/alert.log" 2>/dev/null || echo " No entries yet. Use: cpu alert <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/alert.log" local total=$(wc -l < "$DATA_DIR/alert.log") echo " [Cpu] alert: $input" echo " Saved. Total alert entries: $total" _log "alert" "$input" fi ;; top) shift if [ $# -eq 0 ]; then echo "Recent top entries:" tail -20 "$DATA_DIR/top.log" 2>/dev/null || echo " No entries yet. Use: cpu top <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/top.log" local total=$(wc -l < "$DATA_DIR/top.log") echo " [Cpu] top: $input" echo " Saved. Total top entries: $total" _log "top" "$input" fi ;; usage) shift if [ $# -eq 0 ]; then echo "Recent usage entries:" tail -20 "$DATA_DIR/usage.log" 2>/dev/null || echo " No entries yet. Use: cpu usage <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/usage.log" local total=$(wc -l < "$DATA_DIR/usage.log") echo " [Cpu] usage: $input" echo " Saved. Total usage entries: $total" _log "usage" "$input" fi ;; check) shift if [ $# -eq 0 ]; then echo "Recent check entries:" tail -20 "$DATA_DIR/check.log" 2>/dev/null || echo " No entries yet. Use: cpu check <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/check.log" local total=$(wc -l < "$DATA_DIR/check.log") echo " [Cpu] check: $input" echo " Saved. Total check entries: $total" _log "check" "$input" fi ;; fix) shift if [ $# -eq 0 ]; then echo "Recent fix entries:" tail -20 "$DATA_DIR/fix.log" 2>/dev/null || echo " No entries yet. Use: cpu fix <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/fix.log" local total=$(wc -l < "$DATA_DIR/fix.log") echo " [Cpu] fix: $input" echo " Saved. Total fix entries: $total" _log "fix" "$input" fi ;; cleanup) shift if [ $# -eq 0 ]; then echo "Recent cleanup entries:" tail -20 "$DATA_DIR/cleanup.log" 2>/dev/null || echo " No entries yet. Use: cpu cleanup <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/cleanup.log" local total=$(wc -l < "$DATA_DIR/cleanup.log") echo " [Cpu] cleanup: $input" echo " Saved. Total cleanup entries: $total" _log "cleanup" "$input" fi ;; backup) shift if [ $# -eq 0 ]; then echo "Recent backup entries:" tail -20 "$DATA_DIR/backup.log" 2>/dev/null || echo " No entries yet. Use: cpu backup <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/backup.log" local total=$(wc -l < "$DATA_DIR/backup.log") echo " [Cpu] backup: $input" echo " Saved. Total backup entries: $total" _log "backup" "$input" fi ;; restore) shift if [ $# -eq 0 ]; then echo "Recent restore entries:" tail -20 "$DATA_DIR/restore.log" 2>/dev/null || echo " No entries yet. Use: cpu restore <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/restore.log" local total=$(wc -l < "$DATA_DIR/restore.log") echo " [Cpu] restore: $input" echo " Saved. Total restore entries: $total" _log "restore" "$input" fi ;; log) shift if [ $# -eq 0 ]; then echo "Recent log entries:" tail -20 "$DATA_DIR/log.log" 2>/dev/null || echo " No entries yet. Use: cpu log <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/log.log" local total=$(wc -l < "$DATA_DIR/log.log") echo " [Cpu] log: $input" echo " Saved. Total log entries: $total" _log "log" "$input" fi ;; benchmark) shift if [ $# -eq 0 ]; then echo "Recent benchmark entries:" tail -20 "$DATA_DIR/benchmark.log" 2>/dev/null || echo " No entries yet. Use: cpu benchmark <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/benchmark.log" local total=$(wc -l < "$DATA_DIR/benchmark.log") echo " [Cpu] benchmark: $input" echo " Saved. Total benchmark entries: $total" _log "benchmark" "$input" fi ;; compare) shift if [ $# -eq 0 ]; then echo "Recent compare entries:" tail -20 "$DATA_DIR/compare.log" 2>/dev/null || echo " No entries yet. Use: cpu compare <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/compare.log" local total=$(wc -l < "$DATA_DIR/compare.log") echo " [Cpu] compare: $input" echo " Saved. Total compare entries: $total" _log "compare" "$input" fi ;; stats) _stats ;; export) shift; _export "$@" ;; search) shift; _search "$@" ;; recent) _recent ;; status) _status ;; help|--help|-h) _help ;; version|--version|-v) _version ;; *) echo "Unknown command: $1" echo "Run 'cpu help' for available commands." exit 1 ;; esac
Manage blog posts with drafts, scheduling, and SEO optimization. Use when creating articles, optimizing metadata, or scheduling publication dates.
--- name: blog version: "2.0.1" author: BytesAgain homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills license: MIT-0 tags: [blog, tool, utility] description: "Manage blog posts with drafts, scheduling, and SEO optimization. Use when creating articles, optimizing metadata, or scheduling publication dates." --- # Blog A content creation toolkit for drafting, editing, optimizing, scheduling, and managing blog content workflows — all from the command line with timestamped local logging. ## Commands | Command | Description | |---------|-------------| | `blog draft <input>` | Log a draft idea or snippet. Without args, shows recent drafts | | `blog edit <input>` | Record an editing pass or revision note. Without args, shows recent edits | | `blog optimize <input>` | Log SEO or content optimization notes. Without args, shows recent optimizations | | `blog schedule <input>` | Record a publication schedule entry. Without args, shows recent schedules | | `blog hashtags <input>` | Log hashtag sets for social promotion. Without args, shows recent hashtag entries | | `blog hooks <input>` | Record attention hooks or opening lines. Without args, shows recent hooks | | `blog cta <input>` | Log call-to-action ideas. Without args, shows recent CTAs | | `blog rewrite <input>` | Record a rewrite or major revision. Without args, shows recent rewrites | | `blog translate <input>` | Log a translation task or result. Without args, shows recent translations | | `blog tone <input>` | Record tone/voice notes for a piece. Without args, shows recent tone entries | | `blog headline <input>` | Log headline options and A/B test ideas. Without args, shows recent headlines | | `blog outline <input>` | Record a post outline or structure. Without args, shows recent outlines | | `blog stats` | Show summary statistics across all entry types | | `blog search <term>` | Search across all log entries for a keyword | | `blog recent` | Show the 20 most recent activity entries | | `blog status` | Health check — version, data dir, entry count, disk usage, last activity | | `blog export <fmt>` | Export all data in json, csv, or txt format | | `blog help` | Show all available commands | | `blog version` | Print version (v2.0.0) | Each content command (draft, edit, optimize, 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: ``` ~/.local/share/blog/ ├── draft.log # Draft ideas and snippets ├── edit.log # Editing notes and revisions ├── optimize.log # SEO / content optimization records ├── schedule.log # Publication schedule entries ├── hashtags.log # Hashtag sets for social media ├── hooks.log # Attention hooks / opening lines ├── cta.log # Call-to-action ideas ├── rewrite.log # Major revision records ├── translate.log # Translation tasks and results ├── tone.log # Tone / voice notes ├── headline.log # Headline options and A/B ideas ├── outline.log # Post outlines and structures └── history.log # Unified activity log with timestamps ``` 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`, `cat` - No external dependencies or API keys required - Works offline — all data stays on your machine ## When to Use 1. **Blog content pipeline** — Track a post from draft → outline → edit → optimize → schedule in one place with timestamps, so you always know where each piece stands 2. **SEO workflow** — Log optimization notes, headline variants, and hashtag sets for each post, then search or export them later for analysis 3. **Editorial calendar** — Use `schedule` to record publication dates and `recent` to see upcoming deadlines at a glance 4. **Multi-language content** — Track translations with `translate`, tone adjustments with `tone`, and rewrites with `rewrite` to manage localized content 5. **Social media prep** — Build a library of hooks, CTAs, and hashtag sets that you can search and reuse across posts ## Examples ### Full blog post workflow ```bash # Start with a draft idea blog draft "10 productivity hacks for remote developers — listicle format" # Create the outline blog outline "Intro (hook) → 10 tips with examples → CTA → conclusion" # Write headline options blog headline "Option A: 10 Hacks That Actually Work | Option B: Remote Dev Productivity Guide" # Log editing notes blog edit "tightened intro paragraph, added code examples to tips 3 and 7" # Optimize for SEO blog optimize "target keyword: remote developer productivity, density 1.2%, meta desc added" # Schedule publication blog schedule "publish 2024-04-15 09:00 UTC — cross-post to Dev.to and Medium" ``` ### Social media preparation ```bash # Create hashtag sets blog hashtags "#remotework #developer #productivity #coding #devtips" # Write hooks for social posts blog hooks "Most devs waste 2 hours daily on context switching. Here's how to fix it." # Add a CTA blog cta "Download our free remote work checklist — link in bio" # Set the tone blog tone "conversational, slightly informal, use second person (you/your)" ``` ### Review and export ```bash # Search for entries about a topic blog search "productivity" # View recent activity blog recent # Check stats across all categories blog stats # Export everything as JSON for backup blog export json # Quick health check blog status ``` ### Rewrite and translate ```bash # Log a major rewrite blog rewrite "complete overhaul of intro section — new angle focusing on data" # Track a translation blog translate "EN → ES: productivity article translated, 1800 words, reviewed by Maria" ``` ## Output All commands print confirmation to stdout. Data is persisted in `~/.local/share/blog/`. Use `blog stats` for an overview, `blog search <term>` to find specific entries, or `blog export <fmt>` to extract all data as JSON, CSV, or plain text. --- *Powered by BytesAgain | bytesagain.com | [email protected]* FILE:scripts/script.sh #!/usr/bin/env bash # Blog — content tool # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail DATA_DIR="HOME/.local/share/blog" mkdir -p "$DATA_DIR" _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } _version() { echo "blog v2.0.0"; } _help() { echo "Blog v2.0.0 — content toolkit" echo "" echo "Usage: blog <command> [args]" echo "" echo "Commands:" echo " draft Draft" echo " edit Edit" echo " optimize Optimize" echo " schedule Schedule" echo " hashtags Hashtags" echo " hooks Hooks" echo " cta Cta" echo " rewrite Rewrite" echo " translate Translate" echo " tone Tone" echo " headline Headline" echo " outline Outline" echo " stats Summary statistics" echo " export <fmt> Export (json|csv|txt)" echo " status Health check" echo " help Show this help" echo " version Show version" echo "" echo "Data: $DATA_DIR" } _stats() { echo "=== Blog Stats ===" local total=0 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) local c=$(wc -l < "$f") total=$((total + c)) echo " $name: $c entries" done echo " ---" echo " Total: $total entries" echo " Data size: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1)" echo " Since: $(head -1 "$DATA_DIR/history.log" 2>/dev/null | cut -d'|' -f1 || echo 'N/A')" } _export() { local fmt="-json" local out="$DATA_DIR/export.$fmt" case "$fmt" in json) echo "[" > "$out" local first=1 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) while IFS='|' read -r ts val; do [ $first -eq 1 ] && first=0 || echo "," >> "$out" printf ' {"type":"%s","time":"%s","value":"%s"}' "$name" "$ts" "$val" >> "$out" done < "$f" done echo "" >> "$out" echo "]" >> "$out" ;; csv) echo "type,time,value" > "$out" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) while IFS='|' read -r ts val; do echo "$name,$ts,$val" >> "$out" done < "$f" done ;; txt) echo "=== Blog Export ===" > "$out" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue echo "--- $(basename "$f" .log) ---" >> "$out" cat "$f" >> "$out" echo "" >> "$out" done ;; *) echo "Formats: json, csv, txt"; return 1 ;; esac echo "Exported to $out ($(wc -c < "$out") bytes)" } _status() { echo "=== Blog Status ===" echo " Version: v2.0.0" echo " Data dir: $DATA_DIR" echo " Entries: $(cat "$DATA_DIR"/*.log 2>/dev/null | wc -l) total" echo " Disk: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1)" local last=$(tail -1 "$DATA_DIR/history.log" 2>/dev/null || echo "never") echo " Last activity: $last" echo " Status: OK" } _search() { local term="?Usage: blog search <term>" echo "Searching for: $term" local found=0 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local matches=$(grep -i "$term" "$f" 2>/dev/null || true) if [ -n "$matches" ]; then echo " --- $(basename "$f" .log) ---" echo "$matches" | while read -r line; do echo " $line" found=$((found + 1)) done fi done [ $found -eq 0 ] && echo " No matches found." } _recent() { echo "=== Recent Activity ===" if [ -f "$DATA_DIR/history.log" ]; then tail -20 "$DATA_DIR/history.log" | while IFS='' read -r line; do echo " $line" done else echo " No activity yet." fi } # Main dispatch case "-help" in draft) shift if [ $# -eq 0 ]; then echo "Recent draft entries:" tail -20 "$DATA_DIR/draft.log" 2>/dev/null || echo " No entries yet. Use: blog draft <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/draft.log" local total=$(wc -l < "$DATA_DIR/draft.log") echo " [Blog] draft: $input" echo " Saved. Total draft entries: $total" _log "draft" "$input" fi ;; edit) shift if [ $# -eq 0 ]; then echo "Recent edit entries:" tail -20 "$DATA_DIR/edit.log" 2>/dev/null || echo " No entries yet. Use: blog edit <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/edit.log" local total=$(wc -l < "$DATA_DIR/edit.log") echo " [Blog] edit: $input" echo " Saved. Total edit entries: $total" _log "edit" "$input" fi ;; optimize) shift if [ $# -eq 0 ]; then echo "Recent optimize entries:" tail -20 "$DATA_DIR/optimize.log" 2>/dev/null || echo " No entries yet. Use: blog optimize <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/optimize.log" local total=$(wc -l < "$DATA_DIR/optimize.log") echo " [Blog] optimize: $input" echo " Saved. Total optimize entries: $total" _log "optimize" "$input" fi ;; schedule) shift if [ $# -eq 0 ]; then echo "Recent schedule entries:" tail -20 "$DATA_DIR/schedule.log" 2>/dev/null || echo " No entries yet. Use: blog schedule <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/schedule.log" local total=$(wc -l < "$DATA_DIR/schedule.log") echo " [Blog] schedule: $input" echo " Saved. Total schedule entries: $total" _log "schedule" "$input" fi ;; hashtags) shift if [ $# -eq 0 ]; then echo "Recent hashtags entries:" tail -20 "$DATA_DIR/hashtags.log" 2>/dev/null || echo " No entries yet. Use: blog hashtags <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/hashtags.log" local total=$(wc -l < "$DATA_DIR/hashtags.log") echo " [Blog] hashtags: $input" echo " Saved. Total hashtags entries: $total" _log "hashtags" "$input" fi ;; hooks) shift if [ $# -eq 0 ]; then echo "Recent hooks entries:" tail -20 "$DATA_DIR/hooks.log" 2>/dev/null || echo " No entries yet. Use: blog hooks <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/hooks.log" local total=$(wc -l < "$DATA_DIR/hooks.log") echo " [Blog] hooks: $input" echo " Saved. Total hooks entries: $total" _log "hooks" "$input" fi ;; cta) shift if [ $# -eq 0 ]; then echo "Recent cta entries:" tail -20 "$DATA_DIR/cta.log" 2>/dev/null || echo " No entries yet. Use: blog cta <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/cta.log" local total=$(wc -l < "$DATA_DIR/cta.log") echo " [Blog] cta: $input" echo " Saved. Total cta entries: $total" _log "cta" "$input" fi ;; rewrite) shift if [ $# -eq 0 ]; then echo "Recent rewrite entries:" tail -20 "$DATA_DIR/rewrite.log" 2>/dev/null || echo " No entries yet. Use: blog rewrite <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/rewrite.log" local total=$(wc -l < "$DATA_DIR/rewrite.log") echo " [Blog] rewrite: $input" echo " Saved. Total rewrite entries: $total" _log "rewrite" "$input" fi ;; translate) shift if [ $# -eq 0 ]; then echo "Recent translate entries:" tail -20 "$DATA_DIR/translate.log" 2>/dev/null || echo " No entries yet. Use: blog translate <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/translate.log" local total=$(wc -l < "$DATA_DIR/translate.log") echo " [Blog] translate: $input" echo " Saved. Total translate entries: $total" _log "translate" "$input" fi ;; tone) shift if [ $# -eq 0 ]; then echo "Recent tone entries:" tail -20 "$DATA_DIR/tone.log" 2>/dev/null || echo " No entries yet. Use: blog tone <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/tone.log" local total=$(wc -l < "$DATA_DIR/tone.log") echo " [Blog] tone: $input" echo " Saved. Total tone entries: $total" _log "tone" "$input" fi ;; headline) shift if [ $# -eq 0 ]; then echo "Recent headline entries:" tail -20 "$DATA_DIR/headline.log" 2>/dev/null || echo " No entries yet. Use: blog headline <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/headline.log" local total=$(wc -l < "$DATA_DIR/headline.log") echo " [Blog] headline: $input" echo " Saved. Total headline entries: $total" _log "headline" "$input" fi ;; outline) shift if [ $# -eq 0 ]; then echo "Recent outline entries:" tail -20 "$DATA_DIR/outline.log" 2>/dev/null || echo " No entries yet. Use: blog outline <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/outline.log" local total=$(wc -l < "$DATA_DIR/outline.log") echo " [Blog] outline: $input" echo " Saved. Total outline entries: $total" _log "outline" "$input" fi ;; stats) _stats ;; export) shift; _export "$@" ;; search) shift; _search "$@" ;; recent) _recent ;; status) _status ;; help|--help|-h) _help ;; version|--version|-v) _version ;; *) echo "Unknown command: $1" echo "Run 'blog help' for available commands." exit 1 ;; esac
Manage SMS templates with variable substitution and formatting. Use when preparing bulk messages.
--- name: "sms" version: "3.0.0" description: "Manage SMS templates with variable substitution and formatting. Use when preparing bulk messages." author: "BytesAgain" homepage: "https://bytesagain.com" --- # sms Manage SMS templates with variable substitution and formatting. Use when preparing bulk messages. ## Commands ### `create` ```bash scripts/script.sh create <name text> ``` ### `list` ```bash scripts/script.sh list ``` ### `preview` ```bash scripts/script.sh preview <name> ``` ### `send` ```bash scripts/script.sh send <name phone> ``` ### `var` ```bash scripts/script.sh var <name key_val> ``` ### `export` ```bash scripts/script.sh export <file> ``` ## Data Storage Data stored in `~/.local/share/sms/`. --- *Powered by BytesAgain | bytesagain.com | [email protected]* FILE:scripts/script.sh #!/usr/bin/env bash set -euo pipefail VERSION="3.0.0" SCRIPT_NAME="sms" DATA_DIR="$HOME/.local/share/sms" mkdir -p "$DATA_DIR" # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Powered by BytesAgain | bytesagain.com | [email protected] _info() { echo "[INFO] $*"; } _error() { echo "[ERROR] $*" >&2; } die() { _error "$@"; exit 1; } cmd_create() { local name="-" local text="-" [ -z "$name" ] && die "Usage: $SCRIPT_NAME create <name text>" echo '{"name":"'$2'","text":"'$3'"}' >> $DATA_DIR/templates.jsonl && echo 'Created template: $2' } cmd_list() { cat $DATA_DIR/templates.jsonl 2>/dev/null | tail -20 } cmd_preview() { local name="-" [ -z "$name" ] && die "Usage: $SCRIPT_NAME preview <name>" grep $2 $DATA_DIR/templates.jsonl 2>/dev/null | tail -1 } cmd_send() { local name="-" local phone="-" [ -z "$name" ] && die "Usage: $SCRIPT_NAME send <name phone>" echo 'Formatted message for $3 using template $2' } cmd_var() { local name="-" local key_val="-" [ -z "$name" ] && die "Usage: $SCRIPT_NAME var <name key_val>" echo 'Variable substitution: $3 in template $2' } cmd_export() { local file="-" [ -z "$file" ] && die "Usage: $SCRIPT_NAME export <file>" cp $DATA_DIR/templates.jsonl $2 && echo Exported } cmd_help() { echo "$SCRIPT_NAME v$VERSION" echo "" echo "Commands:" printf " %-25s\n" "create <name text>" printf " %-25s\n" "list" printf " %-25s\n" "preview <name>" printf " %-25s\n" "send <name phone>" printf " %-25s\n" "var <name key_val>" printf " %-25s\n" "export <file>" printf " %%-25s\n" "help" echo "" echo "Powered by BytesAgain | bytesagain.com | [email protected]" } cmd_version() { echo "$SCRIPT_NAME v$VERSION"; } main() { local cmd="-help" case "$cmd" in create) shift; cmd_create "$@" ;; list) shift; cmd_list "$@" ;; preview) shift; cmd_preview "$@" ;; send) shift; cmd_send "$@" ;; var) shift; cmd_var "$@" ;; export) shift; cmd_export "$@" ;; help) cmd_help ;; version) cmd_version ;; *) die "Unknown: $cmd" ;; esac } main "$@"
Reference tool for devtools — covers intro, quickstart, patterns and more. Quick lookup for Lyrics concepts, best practices, and implementation patterns.
--- name: "lyrics" version: "2.0.4" description: "Reference tool for devtools — covers intro, quickstart, patterns and more. Quick lookup for Lyrics concepts, best practices, and implementation patterns." author: "BytesAgain" homepage: "https://bytesagain.com" source: "https://github.com/bytesagain/ai-skills" tags: [lyrics, reference] category: "devtools" --- # Lyrics Reference tool for devtools — covers intro, quickstart, patterns and more. Quick lookup for Lyrics concepts, best practices, and implementation patterns. No API keys or credentials required. ## Commands | Command | Description | |---------|-------------| | `intro` | intro reference | | `quickstart` | quickstart reference | | `patterns` | patterns reference | | `debugging` | debugging reference | | `performance` | performance reference | | `security` | security reference | | `migration` | migration reference | | `cheatsheet` | cheatsheet reference | ## Output Format All commands output plain-text reference documentation via heredoc. No external API calls, no credentials needed, no network access. --- *Powered by BytesAgain | bytesagain.com | [email protected]* FILE:scripts/script.sh #!/usr/bin/env bash # lyrics — Lyrics reference tool. Use when working with lyrics in data contexts. # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail VERSION="2.0.3" show_help() { cat << 'HELPEOF' lyrics v$VERSION — Lyrics Reference Tool Usage: lyrics <command> Commands: intro Overview and core concepts quickstart Getting started guide patterns Common patterns and best practices debugging Debugging and troubleshooting performance Performance optimization tips security Security considerations migration Migration and upgrade guide cheatsheet Quick reference cheat sheet help Show this help version Show version Powered by BytesAgain | bytesagain.com HELPEOF } cmd_intro() { cat << 'EOF' # Lyrics — Overview ## What is Lyrics? Lyrics (lyrics) is a specialized tool/concept in the data domain. It provides essential capabilities for professionals working with lyrics. ## Key Concepts - Core lyrics principles and fundamentals - How lyrics fits into the broader data ecosystem - Essential terminology every practitioner should know ## Why Lyrics Matters Understanding lyrics is critical for: - Improving efficiency in data workflows - Reducing errors and downtime - Meeting industry standards and compliance requirements - Enabling better decision-making with accurate data ## Getting Started 1. Understand the basic lyrics concepts 2. Learn the standard tools and interfaces 3. Practice with common scenarios 4. Review safety and compliance requirements EOF } cmd_quickstart() { cat << 'EOF' # Lyrics — Quick Start Guide ## Prerequisites - Basic understanding of data concepts - Required tools and access credentials - System meeting minimum requirements ## Installation 1. Download or clone the lyrics package 2. Install dependencies 3. Configure initial settings 4. Verify installation ## First Steps 1. Run the hello-world example 2. Review the default configuration 3. Try a simple real-world task 4. Explore available commands and options ## Next Steps - Read the full documentation - Join the community forum - Try advanced features - Set up automated workflows EOF } cmd_patterns() { cat << 'EOF' # Lyrics — Common Patterns & Best Practices ## Design Patterns 1. **Standard Pattern**: The most common approach for lyrics 2. **Scalable Pattern**: For high-volume or distributed scenarios 3. **Resilient Pattern**: For fault-tolerant implementations ## Best Practices - Follow the principle of least privilege - Use version control for all configurations - Implement comprehensive logging - Test changes in staging before production - Document all custom configurations ## Anti-Patterns to Avoid - Hardcoding credentials or configuration - Skipping validation and error handling - Ignoring monitoring and alerting - Making changes without documentation - Over-engineering simple solutions EOF } cmd_debugging() { cat << 'EOF' # Lyrics — Debugging Guide ## Common Errors 1. **Connection refused**: Check service status and network 2. **Permission denied**: Verify credentials and access rights 3. **Timeout**: Check network, increase limits, optimize queries 4. **Invalid input**: Validate data format and encoding ## Debugging Tools - Built-in logging and diagnostics - Network analysis tools (tcpdump, wireshark) - System monitoring (top, htop, iostat) - Application-specific debug modes ## Debug Workflow 1. Reproduce the issue consistently 2. Check logs for error messages 3. Isolate the failing component 4. Test with minimal configuration 5. Apply fix and verify EOF } cmd_performance() { cat << 'EOF' # Lyrics — Performance Optimization ## Key Metrics - Response time / latency - Throughput / operations per second - Resource utilization (CPU, memory, I/O) - Error rate and retry frequency ## Optimization Strategies 1. **Caching**: Reduce redundant operations 2. **Batching**: Group small operations 3. **Indexing**: Speed up data lookups 4. **Compression**: Reduce data transfer size 5. **Parallel Processing**: Utilize multiple cores ## Monitoring - Set up baseline performance metrics - Configure alerts for anomalies - Track trends over time - Regular capacity planning reviews EOF } cmd_security() { cat << 'EOF' # Lyrics — Security Considerations ## Authentication & Authorization - Use strong, unique credentials - Implement role-based access control - Enable multi-factor authentication where possible - Regularly review and rotate credentials ## Data Protection - Encrypt data at rest and in transit - Implement proper backup procedures - Follow data retention policies - Sanitize inputs to prevent injection ## Network Security - Use firewalls and network segmentation - Monitor for suspicious activity - Keep all software patched and updated - Disable unnecessary services and ports EOF } cmd_migration() { cat << 'EOF' # Lyrics — Migration & Upgrade Guide ## Pre-Migration Checklist - [ ] Current system fully documented - [ ] Complete backup taken and verified - [ ] Target environment prepared - [ ] Rollback plan documented - [ ] Stakeholders notified ## Migration Steps 1. Prepare target environment 2. Export data from source 3. Transform data if needed 4. Import to target 5. Verify data integrity 6. Update configurations 7. Test all functionality 8. Switch traffic / go live ## Post-Migration - Monitor for errors and performance - Verify all integrations working - Update documentation - Decommission old system after confirmation EOF } cmd_cheatsheet() { cat << 'EOF' # Lyrics — Quick Reference ## Essential Commands | Command | Description | |---------|-------------| | help | Show available commands | | version | Display version info | | intro | Overview and fundamentals | | troubleshooting | Common problems and fixes | ## Common Workflows 1. **Setup**: install → configure → verify → test 2. **Daily**: check → monitor → report → review 3. **Issue**: diagnose → isolate → fix → verify → document ## Key Shortcuts - Use tab completion for commands - Check logs first when troubleshooting - Always backup before making changes - Document everything you change EOF } CMD="-help" shift 2>/dev/null || true case "$CMD" in intro) cmd_intro "$@" ;; quickstart) cmd_quickstart "$@" ;; patterns) cmd_patterns "$@" ;; debugging) cmd_debugging "$@" ;; performance) cmd_performance "$@" ;; security) cmd_security "$@" ;; migration) cmd_migration "$@" ;; cheatsheet) cmd_cheatsheet "$@" ;; help|--help|-h) show_help ;; version|--version|-v) echo "lyrics v$VERSION — Powered by BytesAgain" ;; *) echo "Unknown: $CMD"; echo "Run: lyrics help"; exit 1 ;; esac
Create SVG diagrams with shapes, layers, and multi-format export. Use when generating graphics, building diagrams, arranging layouts.
--- name: draw version: "2.0.0" author: BytesAgain homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills license: MIT-0 tags: [draw, tool, utility] description: "Create SVG diagrams with shapes, layers, and multi-format export. Use when generating graphics, building diagrams, arranging layouts." --- # Draw Design toolkit for managing color palettes, generating swatches, mixing colors, creating gradients, previewing designs, and exporting results. A command-line companion for designers and front-end developers. ## Commands | Command | Description | |---------|-------------| | `draw palette <input>` | Create or log a color palette entry | | `draw preview <input>` | Record a design preview note | | `draw generate <input>` | Generate and log a design asset or concept | | `draw convert <input>` | Log a color or format conversion | | `draw harmonize <input>` | Record a color harmony analysis | | `draw contrast <input>` | Log a contrast check result | | `draw export <input>` | Log an export operation | | `draw random <input>` | Record a random color or design generation | | `draw browse <input>` | Log a browsing/discovery session | | `draw mix <input>` | Record a color mixing result | | `draw gradient <input>` | Log a gradient definition | | `draw swatch <input>` | Record a color swatch entry | | `draw stats` | Show summary statistics across all logs | | `draw export <fmt>` | Export all data (json, csv, or txt) | | `draw search <term>` | Search across all log files for a term | | `draw recent` | Show the 20 most recent activity entries | | `draw status` | Health check — version, disk usage, last activity | | `draw help` | Show all available commands | | `draw version` | Show current version | Each command without arguments displays the most recent 20 entries from its log file. ## Data Storage All data is stored in `~/.local/share/draw/`: - **Per-command logs** — `palette.log`, `preview.log`, `generate.log`, `convert.log`, `harmonize.log`, `contrast.log`, `export.log`, `random.log`, `browse.log`, `mix.log`, `gradient.log`, `swatch.log` - **Activity history** — `history.log` (unified timeline of all actions) - **Exports** — `export.json`, `export.csv`, or `export.txt` (generated on demand) Data format: each entry is stored as `YYYY-MM-DD HH:MM|<value>`, pipe-delimited for easy parsing. ## Requirements - Bash 4+ with `set -euo pipefail` - Standard POSIX utilities (`date`, `wc`, `du`, `head`, `tail`, `grep`, `cut`, `basename`) - No external dependencies or API keys required ## When to Use 1. **Building a color system** — log palettes, harmonies, and contrast checks while designing a brand or UI theme 2. **Prototyping design assets** — generate swatches, gradients, and random color explorations for rapid iteration 3. **Auditing accessibility** — record contrast ratios and color harmony data for WCAG compliance reviews 4. **Maintaining a design journal** — track every color decision, mix experiment, and conversion over time 5. **Exporting design data** — export your full color and design history as JSON, CSV, or plain text for handoff to other tools ## Examples ```bash # Log a new palette draw palette "#FF5733 #33FF57 #3357FF warm-sunset" # Record a contrast check draw contrast "bg:#FFFFFF fg:#333333 ratio:12.6:1 PASS" # Mix two colors and log the result draw mix "#FF0000 + #0000FF = #800080 purple" # Generate a gradient definition draw gradient "linear 90deg #000000 → #FFFFFF" # Create a swatch entry draw swatch "Coral #FF7F50 used in header CTA" # Export all design data as JSON draw export json # Search all logs for a specific hex color draw search "FF5733" # View recent activity draw recent # Check overall status draw status ``` ## Output All command output goes to stdout. Redirect to a file if needed: ```bash draw stats > design-report.txt draw export csv ``` --- *Powered by BytesAgain | bytesagain.com | [email protected]* FILE:scripts/script.sh #!/usr/bin/env bash # Draw — design tool # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail DATA_DIR="HOME/.local/share/draw" mkdir -p "$DATA_DIR" _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } _version() { echo "draw v2.0.0"; } _help() { echo "Draw v2.0.0 — design toolkit" echo "" echo "Usage: draw <command> [args]" echo "" echo "Commands:" echo " palette Palette" echo " preview Preview" echo " generate Generate" echo " convert Convert" echo " harmonize Harmonize" echo " contrast Contrast" echo " export Export" echo " random Random" echo " browse Browse" echo " mix Mix" echo " gradient Gradient" echo " swatch Swatch" echo " stats Summary statistics" echo " export <fmt> Export (json|csv|txt)" echo " status Health check" echo " help Show this help" echo " version Show version" echo "" echo "Data: $DATA_DIR" } _stats() { echo "=== Draw Stats ===" local total=0 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) local c=$(wc -l < "$f") total=$((total + c)) echo " $name: $c entries" done echo " ---" echo " Total: $total entries" echo " Data size: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1)" echo " Since: $(head -1 "$DATA_DIR/history.log" 2>/dev/null | cut -d'|' -f1 || echo 'N/A')" } _export() { local fmt="-json" local out="$DATA_DIR/export.$fmt" case "$fmt" in json) echo "[" > "$out" local first=1 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) while IFS='|' read -r ts val; do [ $first -eq 1 ] && first=0 || echo "," >> "$out" printf ' {"type":"%s","time":"%s","value":"%s"}' "$name" "$ts" "$val" >> "$out" done < "$f" done echo "" >> "$out" echo "]" >> "$out" ;; csv) echo "type,time,value" > "$out" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) while IFS='|' read -r ts val; do echo "$name,$ts,$val" >> "$out" done < "$f" done ;; txt) echo "=== Draw Export ===" > "$out" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue echo "--- $(basename "$f" .log) ---" >> "$out" cat "$f" >> "$out" echo "" >> "$out" done ;; *) echo "Formats: json, csv, txt"; return 1 ;; esac echo "Exported to $out ($(wc -c < "$out") bytes)" } _status() { echo "=== Draw Status ===" echo " Version: v2.0.0" echo " Data dir: $DATA_DIR" echo " Entries: $(cat "$DATA_DIR"/*.log 2>/dev/null | wc -l) total" echo " Disk: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1)" local last=$(tail -1 "$DATA_DIR/history.log" 2>/dev/null || echo "never") echo " Last activity: $last" echo " Status: OK" } _search() { local term="?Usage: draw search <term>" echo "Searching for: $term" local found=0 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local matches=$(grep -i "$term" "$f" 2>/dev/null || true) if [ -n "$matches" ]; then echo " --- $(basename "$f" .log) ---" echo "$matches" | while read -r line; do echo " $line" found=$((found + 1)) done fi done [ $found -eq 0 ] && echo " No matches found." } _recent() { echo "=== Recent Activity ===" if [ -f "$DATA_DIR/history.log" ]; then tail -20 "$DATA_DIR/history.log" | while IFS='' read -r line; do echo " $line" done else echo " No activity yet." fi } # Main dispatch case "-help" in palette) shift if [ $# -eq 0 ]; then echo "Recent palette entries:" tail -20 "$DATA_DIR/palette.log" 2>/dev/null || echo " No entries yet. Use: draw palette <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/palette.log" local total=$(wc -l < "$DATA_DIR/palette.log") echo " [Draw] palette: $input" echo " Saved. Total palette entries: $total" _log "palette" "$input" fi ;; preview) shift if [ $# -eq 0 ]; then echo "Recent preview entries:" tail -20 "$DATA_DIR/preview.log" 2>/dev/null || echo " No entries yet. Use: draw preview <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/preview.log" local total=$(wc -l < "$DATA_DIR/preview.log") echo " [Draw] preview: $input" echo " Saved. Total preview entries: $total" _log "preview" "$input" fi ;; generate) shift if [ $# -eq 0 ]; then echo "Recent generate entries:" tail -20 "$DATA_DIR/generate.log" 2>/dev/null || echo " No entries yet. Use: draw generate <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/generate.log" local total=$(wc -l < "$DATA_DIR/generate.log") echo " [Draw] generate: $input" echo " Saved. Total generate entries: $total" _log "generate" "$input" fi ;; convert) shift if [ $# -eq 0 ]; then echo "Recent convert entries:" tail -20 "$DATA_DIR/convert.log" 2>/dev/null || echo " No entries yet. Use: draw convert <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/convert.log" local total=$(wc -l < "$DATA_DIR/convert.log") echo " [Draw] convert: $input" echo " Saved. Total convert entries: $total" _log "convert" "$input" fi ;; harmonize) shift if [ $# -eq 0 ]; then echo "Recent harmonize entries:" tail -20 "$DATA_DIR/harmonize.log" 2>/dev/null || echo " No entries yet. Use: draw harmonize <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/harmonize.log" local total=$(wc -l < "$DATA_DIR/harmonize.log") echo " [Draw] harmonize: $input" echo " Saved. Total harmonize entries: $total" _log "harmonize" "$input" fi ;; contrast) shift if [ $# -eq 0 ]; then echo "Recent contrast entries:" tail -20 "$DATA_DIR/contrast.log" 2>/dev/null || echo " No entries yet. Use: draw contrast <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/contrast.log" local total=$(wc -l < "$DATA_DIR/contrast.log") echo " [Draw] contrast: $input" echo " Saved. Total contrast entries: $total" _log "contrast" "$input" fi ;; export) shift if [ $# -eq 0 ]; then echo "Recent export entries:" tail -20 "$DATA_DIR/export.log" 2>/dev/null || echo " No entries yet. Use: draw export <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/export.log" local total=$(wc -l < "$DATA_DIR/export.log") echo " [Draw] export: $input" echo " Saved. Total export entries: $total" _log "export" "$input" fi ;; random) shift if [ $# -eq 0 ]; then echo "Recent random entries:" tail -20 "$DATA_DIR/random.log" 2>/dev/null || echo " No entries yet. Use: draw random <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/random.log" local total=$(wc -l < "$DATA_DIR/random.log") echo " [Draw] random: $input" echo " Saved. Total random entries: $total" _log "random" "$input" fi ;; browse) shift if [ $# -eq 0 ]; then echo "Recent browse entries:" tail -20 "$DATA_DIR/browse.log" 2>/dev/null || echo " No entries yet. Use: draw browse <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/browse.log" local total=$(wc -l < "$DATA_DIR/browse.log") echo " [Draw] browse: $input" echo " Saved. Total browse entries: $total" _log "browse" "$input" fi ;; mix) shift if [ $# -eq 0 ]; then echo "Recent mix entries:" tail -20 "$DATA_DIR/mix.log" 2>/dev/null || echo " No entries yet. Use: draw mix <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/mix.log" local total=$(wc -l < "$DATA_DIR/mix.log") echo " [Draw] mix: $input" echo " Saved. Total mix entries: $total" _log "mix" "$input" fi ;; gradient) shift if [ $# -eq 0 ]; then echo "Recent gradient entries:" tail -20 "$DATA_DIR/gradient.log" 2>/dev/null || echo " No entries yet. Use: draw gradient <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/gradient.log" local total=$(wc -l < "$DATA_DIR/gradient.log") echo " [Draw] gradient: $input" echo " Saved. Total gradient entries: $total" _log "gradient" "$input" fi ;; swatch) shift if [ $# -eq 0 ]; then echo "Recent swatch entries:" tail -20 "$DATA_DIR/swatch.log" 2>/dev/null || echo " No entries yet. Use: draw swatch <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/swatch.log" local total=$(wc -l < "$DATA_DIR/swatch.log") echo " [Draw] swatch: $input" echo " Saved. Total swatch entries: $total" _log "swatch" "$input" fi ;; stats) _stats ;; export) shift; _export "$@" ;; search) shift; _search "$@" ;; recent) _recent ;; status) _status ;; help|--help|-h) _help ;; version|--version|-v) _version ;; *) echo "Unknown command: $1" echo "Run 'draw help' for available commands." exit 1 ;; esac
Find files by name, size, date, and type with deduplication. Use when searching filesystems.
--- name: "finder" version: "3.0.0" description: "Find files by name, size, date, and type with deduplication. Use when searching filesystems." author: "BytesAgain" homepage: "https://bytesagain.com" --- # finder Find files by name, size, date, and type with deduplication. Use when searching filesystems. ## Commands ### `name` ```bash scripts/script.sh name <pattern dir> ``` ### `size` ```bash scripts/script.sh size <min dir> ``` ### `recent` ```bash scripts/script.sh recent <dir days> ``` ### `type` ```bash scripts/script.sh type <ext dir> ``` ### `empty` ```bash scripts/script.sh empty <dir> ``` ### `large` ```bash scripts/script.sh large <dir count> ``` ## Data Storage Data stored in `~/.local/share/finder/`. --- *Powered by BytesAgain | bytesagain.com | [email protected]* FILE:scripts/script.sh #!/usr/bin/env bash set -euo pipefail VERSION="3.0.0" SCRIPT_NAME="finder" DATA_DIR="$HOME/.local/share/finder" mkdir -p "$DATA_DIR" # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Powered by BytesAgain | bytesagain.com | [email protected] _info() { echo "[INFO] $*"; } _error() { echo "[ERROR] $*" >&2; } die() { _error "$@"; exit 1; } cmd_name() { local pattern="-" local dir="-" [ -z "$pattern" ] && die "Usage: $SCRIPT_NAME name <pattern dir>" find -. -name $2 2>/dev/null | head -20 } cmd_size() { local min="-" local dir="-" [ -z "$min" ] && die "Usage: $SCRIPT_NAME size <min dir>" find -. -type f -size +-1M 2>/dev/null | head -20 } cmd_recent() { local dir="-" local days="-" [ -z "$dir" ] && die "Usage: $SCRIPT_NAME recent <dir days>" find -. -type f -mtime --7 2>/dev/null | head -20 } cmd_type() { local ext="-" local dir="-" [ -z "$ext" ] && die "Usage: $SCRIPT_NAME type <ext dir>" find -. -name '*.$2' 2>/dev/null | head -20 } cmd_empty() { local dir="-" [ -z "$dir" ] && die "Usage: $SCRIPT_NAME empty <dir>" find -. -empty 2>/dev/null | head -20 } cmd_large() { local dir="-" local count="-" [ -z "$dir" ] && die "Usage: $SCRIPT_NAME large <dir count>" find -. -type f -printf '%s %p ' 2>/dev/null | sort -rn | head --10 } cmd_help() { echo "$SCRIPT_NAME v$VERSION" echo "" echo "Commands:" printf " %-25s\n" "name <pattern dir>" printf " %-25s\n" "size <min dir>" printf " %-25s\n" "recent <dir days>" printf " %-25s\n" "type <ext dir>" printf " %-25s\n" "empty <dir>" printf " %-25s\n" "large <dir count>" printf " %%-25s\n" "help" echo "" echo "Powered by BytesAgain | bytesagain.com | [email protected]" } cmd_version() { echo "$SCRIPT_NAME v$VERSION"; } main() { local cmd="-help" case "$cmd" in name) shift; cmd_name "$@" ;; size) shift; cmd_size "$@" ;; recent) shift; cmd_recent "$@" ;; type) shift; cmd_type "$@" ;; empty) shift; cmd_empty "$@" ;; large) shift; cmd_large "$@" ;; help) cmd_help ;; version) cmd_version ;; *) die "Unknown: $cmd" ;; esac } main "$@"
Manage passwords with generation, strength checks, and storage. Use when creating credentials, auditing strength, rotating secrets, checking breaches.
--- name: password version: "3.0.1" author: BytesAgain homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills license: MIT-0 tags: [password, tool, utility] description: "Manage passwords with generation, strength checks, and storage. Use when creating credentials, auditing strength, rotating secrets, checking breaches." --- # password Generate, check, and analyze passwords. ## Commands ### `generate` Generate a random password (default: 16 chars) ```bash scripts/script.sh generate ``` ### `strength` Rate password strength (weak/fair/good/strong/excellent) ```bash scripts/script.sh strength ``` ### `entropy` Calculate Shannon entropy in bits ```bash scripts/script.sh entropy ``` ### `batch` Generate multiple passwords at once ```bash scripts/script.sh batch ``` ### `diceware` Generate a diceware-style passphrase ```bash scripts/script.sh diceware ``` ### `pin` Generate a numeric PIN ```bash scripts/script.sh pin ``` ## Requirements - curl --- *Powered by BytesAgain | bytesagain.com | [email protected]* FILE:scripts/script.sh #!/usr/bin/env bash set -euo pipefail # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ # Password Generator & Checker # Powered by BytesAgain | bytesagain.com | [email protected] # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ DATA_DIR="HOME/.local/share/password-tool" VERSION="3.0.1" LOWER="abcdefghijklmnopqrstuvwxyz" UPPER="ABCDEFGHIJKLMNOPQRSTUVWXYZ" DIGITS="0123456789" SYMBOLS='!@#$%^&*()-_=+[]{}|;:,.<>?/~`' mkdir -p "$DATA_DIR" # ── Helpers ────────────────────────────────────────────────────────────────── die() { echo "Error: $*" >&2; exit 1; } usage() { cat <<'EOF' Password Tool — Generate, check, and analyze passwords USAGE: password generate [length] [--symbols] [--no-upper] [--no-digits] password strength <password> password entropy <password> password batch <count> [length] [--symbols] password check-leak <password> password diceware [words] password pin [length] password help COMMANDS: generate Generate a random password (default: 16 chars) strength Rate password strength (weak/fair/good/strong/excellent) entropy Calculate Shannon entropy in bits batch Generate multiple passwords at once check-leak Check if password appeared in breaches (k-anonymity, safe) diceware Generate a diceware-style passphrase pin Generate a numeric PIN help Show this help message Powered by BytesAgain | bytesagain.com | [email protected] EOF } # Generate random bytes and map to charset _rand_chars() { local charset="$1" count="$2" local charset_len=#charset local result="" local bytes bytes=$(od -An -tu1 -N "$((count * 2))" /dev/urandom | tr -s ' ' '\n' | grep -v '^$') local collected=0 while IFS= read -r byte; do [[ $collected -ge $count ]] && break local idx=$(( byte % charset_len )) result+="$idx:1" ((collected++)) done <<< "$bytes" echo "$result" } # Shuffle a string in-place using Fisher-Yates on chars _shuffle_string() { local s="$1" local len=#s local arr=() for (( i=0; i<len; i++ )); do arr+=("$i:1") done local bytes bytes=$(od -An -tu4 -N "$((len * 4))" /dev/urandom | tr -s ' ' '\n' | grep -v '^$') local idx=0 local rand_vals=() while IFS= read -r v; do rand_vals+=("$v") done <<< "$bytes" for (( i=len-1; i>0; i-- )); do local j=$(( rand_vals[idx] % (i + 1) )) ((idx++)) || true local tmp="arr[$i]" arr[$i]="arr[$j]" arr[$j]="$tmp" done local out="" for c in "arr[@]"; do out+="$c"; done echo "$out" } # ── Commands ───────────────────────────────────────────────────────────────── cmd_generate() { local length=16 local use_symbols=false local use_upper=true local use_digits=true while [[ $# -gt 0 ]]; do case "$1" in --symbols) use_symbols=true; shift ;; --no-upper) use_upper=false; shift ;; --no-digits) use_digits=false; shift ;; [0-9]*) length="$1"; shift ;; *) die "Unknown option: $1" ;; esac done [[ $length -lt 4 ]] && die "Minimum length is 4" [[ $length -gt 256 ]] && die "Maximum length is 256" # Build charset local charset="$LOWER" $use_upper && charset+="$UPPER" $use_digits && charset+="$DIGITS" $use_symbols && charset+="$SYMBOLS" # Generate with guaranteed character class coverage local required="" required+="$(_rand_chars "$LOWER" 1)" $use_upper && required+="$(_rand_chars "$UPPER" 1)" $use_digits && required+="$(_rand_chars "$DIGITS" 1)" $use_symbols && required+="$(_rand_chars "$SYMBOLS" 1)" local remaining=$(( length - #required )) [[ $remaining -lt 0 ]] && remaining=0 local fill="" if [[ $remaining -gt 0 ]]; then fill="$(_rand_chars "$charset" "$remaining")" fi local password password="$(_shuffle_string "requiredfill")" echo "$password" } cmd_strength() { local pw="-" [[ -z "$pw" ]] && die "Usage: password strength <password>" local score=0 local len=#pw local feedback=() # Length scoring if [[ $len -ge 16 ]]; then ((score += 30)) elif [[ $len -ge 12 ]]; then ((score += 20)) elif [[ $len -ge 8 ]]; then ((score += 10)) else feedback+=("Too short (min 8 recommended)") fi # Character class diversity [[ "$pw" =~ [a-z] ]] && ((score += 10)) || feedback+=("No lowercase letters") [[ "$pw" =~ [A-Z] ]] && ((score += 15)) || feedback+=("No uppercase letters") [[ "$pw" =~ [0-9] ]] && ((score += 10)) || feedback+=("No digits") [[ "$pw" =~ [^a-zA-Z0-9] ]] && ((score += 20)) || feedback+=("No special characters") # Bonus for length beyond 20 if [[ $len -ge 20 ]]; then ((score += 10)) fi # Penalize repeated characters local unique_chars unique_chars=$(echo -n "$pw" | fold -w1 | sort -u | wc -l) local ratio=$(( (unique_chars * 100) / len )) if [[ $ratio -lt 40 ]]; then ((score -= 15)) feedback+=("Too many repeated characters") elif [[ $ratio -ge 80 ]]; then ((score += 5)) fi # Penalize common patterns local pw_lower pw_lower=$(echo "$pw" | tr '[:upper:]' '[:lower:]') for pattern in "password" "123456" "qwerty" "abc123" "admin" "letmein" "welcome" "monkey"; do if [[ "$pw_lower" == *"$pattern"* ]]; then ((score -= 20)) feedback+=("Contains common pattern: $pattern") fi done # Penalize sequential characters if echo "$pw" | grep -qP '(.)\1{2,}'; then ((score -= 10)) feedback+=("Contains character repetitions (3+)") fi [[ $score -lt 0 ]] && score=0 [[ $score -gt 100 ]] && score=100 local rating if [[ $score -ge 85 ]]; then rating="EXCELLENT ████████████████████ ✓" elif [[ $score -ge 70 ]]; then rating="STRONG ████████████████░░░░" elif [[ $score -ge 50 ]]; then rating="GOOD ████████████░░░░░░░░" elif [[ $score -ge 30 ]]; then rating="FAIR ████████░░░░░░░░░░░░" else rating="WEAK ████░░░░░░░░░░░░░░░░ ✗" fi echo "Password Strength Analysis" echo "━━━━━━━━━━━━━━━━━━━━━━━━━━" echo "Length: $len characters" echo "Score: $score / 100" echo "Rating: $rating" if [[ #feedback[@] -gt 0 ]]; then echo "" echo "Suggestions:" for f in "feedback[@]"; do echo " • $f" done fi } cmd_entropy() { local pw="-" [[ -z "$pw" ]] && die "Usage: password entropy <password>" local len=#pw # Determine pool size based on character classes present local pool=0 [[ "$pw" =~ [a-z] ]] && ((pool += 26)) [[ "$pw" =~ [A-Z] ]] && ((pool += 26)) [[ "$pw" =~ [0-9] ]] && ((pool += 10)) [[ "$pw" =~ [^a-zA-Z0-9] ]] && ((pool += 32)) [[ $pool -eq 0 ]] && pool=1 # Entropy = len * log2(pool) # log2(x) = ln(x) / ln(2) — use awk for floating point local entropy entropy=$(awk -v l="$len" -v p="$pool" 'BEGIN { printf "%.2f", l * (log(p) / log(2)) }') # Shannon entropy per character (actual distribution) local shannon shannon=$(echo -n "$pw" | fold -w1 | sort | uniq -c | awk ' BEGIN { total=0; ent=0 } { counts[NR]=$1; total+=$1 } END { for (i in counts) { p = counts[i] / total ent -= p * (log(p) / log(2)) } printf "%.2f", ent * total } ') local strength if awk "BEGIN { exit ($entropy >= 128) ? 0 : 1 }"; then strength="Excellent (128+ bits)" elif awk "BEGIN { exit ($entropy >= 80) ? 0 : 1 }"; then strength="Strong (80+ bits)" elif awk "BEGIN { exit ($entropy >= 60) ? 0 : 1 }"; then strength="Adequate (60+ bits)" elif awk "BEGIN { exit ($entropy >= 40) ? 0 : 1 }"; then strength="Weak (40+ bits)" else strength="Very Weak (<40 bits)" fi echo "Entropy Analysis" echo "━━━━━━━━━━━━━━━━" echo "Length: $len characters" echo "Character pool: $pool possible characters" echo "Max entropy: entropy bits" echo "Shannon entropy: shannon bits" echo "Strength: $strength" echo "" echo "Note: Max entropy assumes random selection from the pool." echo " Shannon entropy measures actual randomness of this password." } cmd_batch() { local count="-5" local length="-16" local extra_args=() shift 2 2>/dev/null || true while [[ $# -gt 0 ]]; do extra_args+=("$1") shift done [[ $count -lt 1 || $count -gt 100 ]] && die "Count must be between 1 and 100" echo "Generating $count passwords (length=$length):" echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" for (( i=1; i<=count; i++ )); do printf "%3d. %s\n" "$i" "$(cmd_generate "$length" "extra_args[@]")" done } cmd_check_leak() { local pw="-" [[ -z "$pw" ]] && die "Usage: password check-leak <password>" command -v curl &>/dev/null || die "curl is required for breach checking" # k-anonymity: only send first 5 chars of SHA-1 hash local sha1 sha1=$(printf '%s' "$pw" | openssl sha1 | awk '{print toupper($NF)}') local prefix="0:5" local suffix="5" echo "Checking password against Have I Been Pwned database..." echo "(Using k-anonymity — your full password is never sent)" echo "" local response response=$(curl -sS "https://api.pwnedpasswords.com/range/prefix" 2>&1) || { die "Failed to reach HIBP API. Check your internet connection." } local match match=$(echo "$response" | grep -i "^suffix:" || true) if [[ -n "$match" ]]; then local occurrences occurrences=$(echo "$match" | cut -d: -f2 | tr -d '[:space:]') echo "⚠ PASSWORD COMPROMISED" echo " This password has appeared in occurrences data breach(es)." echo " You should NOT use this password." return 1 else echo "✓ Password not found in any known breaches." echo " (This doesn't guarantee safety — use a strong unique password.)" return 0 fi } cmd_diceware() { local word_count="-6" [[ $word_count -lt 3 || $word_count -gt 20 ]] && die "Word count must be between 3 and 20" # Embedded minimal word list (common EFF-inspired short words) local words=( able acid aged also area army away baby back ball band bank base bath bear beat been beer bell belt best bill bird bite blow blue boat body bomb bond bone book born boss both bowl burn busy cafe cage cake call calm came camp card care case cash cast cave chat chip city claim clan clay clip club coal coat code coin cold come cook cool cope copy core cost crew crop cube curl cute dare dark data date dawn days dead deal dear debt deck deep deer demo deny desk dial diet dirt dish disk dock does done door dose down draw drew drop drug drum dual duel duke dumb dump dust duty each earn ease east easy edge else emit ends envy epic euro even evil exam exec exit face fact fail fair fall fame fast fate fear feed feel feet fell file fill film find fine fire firm fish fist five flag flat flew flip flow fold folk food foot ford fore fork form fort four free from fuel full fund gain game gang gate gave gear gene gift girl give glad glow glue goal goes gold golf gone good grab gray grew grey grip grow gulf guru half hall hand hang hard harm hash hate have head heal heap hear heat heavy heel held help here hero high hill hint hire hold hole holy home hope horn host hour huge hung hunt idea inch info iron isle item jack jail jean jobs join joke jump jury just keen keep kent keys kick kids kill kind king kiss knee knew knit knot know lack laid lake lamp land lane last late lawn laws lead left lend less life lift like limb line link lion list live load loan lock logo long look lord lose loss lost lots love luck made mail main make male mall many maps mark mass mate mayo meal mean meat meet menu mere mess mile milk mind mine miss mode mood moon more most move much must myth name navy near neat neck need nest news next nice nine node none norm nose note noun odds okay once only onto open oral otto ours oval oven over pace pack page paid pair palm palm pane papa park part pass past path paul peak peer pick pile pine pink pipe plan play plot plug plus poem poet poll pond pool poor pope port pose post pour pray prey pull pump pure push race rain rank rare rate read real rear rely rent rest rice rich ride ring rise risk road rock role roll roof room root rope rose rule rush ruth safe said sake sale salt same sand sang save seal seat seed seek seem seen self sell semi send sent sept shed ship shop shot show shut sick side sign silk site size skin slip slot slow snap snow soft soil sold some song soon sort soul spot star stay stem step stop such suit sure swim tail take tale talk tall tank tape task taxi team tech tell tend tent term test text than that them then they thin this thus tide tied till time tiny told toll tone took tool tops tore torn tour town trap tree trim trip true tube luck turn twin type ugly unit upon urge used user vast very vice view vote wage wait wake walk wall want ward warm wash wave weak wear week well went were west what when whom wide wife wild will wind wine wing wire wise wish with wood word wore work worn wrap yard yeah year your zero zone ) local dict_size=#words[@] local passphrase=() local rand_bytes rand_bytes=$(od -An -tu4 -N "$((word_count * 4))" /dev/urandom | tr -s ' ' '\n' | grep -v '^$') local idx=0 while IFS= read -r val; do [[ $idx -ge $word_count ]] && break local word_idx=$(( val % dict_size )) passphrase+=("words[$word_idx]") ((idx++)) done <<< "$rand_bytes" local result result=$(IFS='-'; echo "passphrase[*]") # Estimate entropy: log2(dict_size) * word_count local entropy entropy=$(awk -v n="$word_count" -v s="$dict_size" 'BEGIN { printf "%.1f", n * (log(s)/log(2)) }') echo "Diceware Passphrase" echo "━━━━━━━━━━━━━━━━━━━" echo "Passphrase: $result" echo "Words: $word_count" echo "Dictionary: $dict_size words" echo "Entropy: ~entropy bits" } cmd_pin() { local length="-6" [[ $length -lt 3 || $length -gt 20 ]] && die "PIN length must be between 3 and 20" local pin pin=$(_rand_chars "$DIGITS" "$length") echo "PIN: $pin" echo "Length: $length digits" } # ── Main ───────────────────────────────────────────────────────────────────── main() { local cmd="-help" shift 2>/dev/null || true case "$cmd" in generate) cmd_generate "$@" ;; strength) cmd_strength "$@" ;; entropy) cmd_entropy "$@" ;; batch) cmd_batch "$@" ;; check-leak) cmd_check_leak "$@" ;; diceware) cmd_diceware "$@" ;; pin) cmd_pin "$@" ;; help|--help|-h) usage ;; version) echo "password-tool vVERSION" ;; *) die "Unknown command: $cmd. Run 'password help' for usage." ;; esac } main "$@"
Reference tool for devtools — covers intro, quickstart, patterns and more. Quick lookup for Encrypt concepts, best practices, and implementation patterns.
--- name: "encrypt" version: "2.0.4" description: "Reference tool for devtools — covers intro, quickstart, patterns and more. Quick lookup for Encrypt concepts, best practices, and implementation patterns." author: "BytesAgain" homepage: "https://bytesagain.com" source: "https://github.com/bytesagain/ai-skills" tags: [encrypt, reference] category: "devtools" --- # Encrypt Reference tool for devtools — covers intro, quickstart, patterns and more. Quick lookup for Encrypt concepts, best practices, and implementation patterns. No API keys or credentials required. ## Commands | Command | Description | |---------|-------------| | `intro` | intro reference | | `quickstart` | quickstart reference | | `patterns` | patterns reference | | `debugging` | debugging reference | | `performance` | performance reference | | `security` | security reference | | `migration` | migration reference | | `cheatsheet` | cheatsheet reference | ## Output Format All commands output plain-text reference documentation via heredoc. No external API calls, no credentials needed, no network access. --- *Powered by BytesAgain | bytesagain.com | [email protected]* FILE:scripts/script.sh #!/usr/bin/env bash # encrypt — Encrypt reference tool. Use when working with encrypt in security contexts. # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail VERSION="2.0.3" show_help() { cat << 'HELPEOF' encrypt v$VERSION — Encrypt Reference Tool Usage: encrypt <command> Commands: intro Overview and core concepts quickstart Getting started guide patterns Common patterns and best practices debugging Debugging and troubleshooting performance Performance optimization tips security Security considerations migration Migration and upgrade guide cheatsheet Quick reference cheat sheet help Show this help version Show version Powered by BytesAgain | bytesagain.com HELPEOF } cmd_intro() { cat << 'EOF' # Encrypt — Overview ## What is Encrypt? Encrypt (encrypt) is a specialized tool/concept in the security domain. It provides essential capabilities for professionals working with encrypt. ## Key Concepts - Core encrypt principles and fundamentals - How encrypt fits into the broader security ecosystem - Essential terminology every practitioner should know ## Why Encrypt Matters Understanding encrypt is critical for: - Improving efficiency in security workflows - Reducing errors and downtime - Meeting industry standards and compliance requirements - Enabling better decision-making with accurate data ## Getting Started 1. Understand the basic encrypt concepts 2. Learn the standard tools and interfaces 3. Practice with common scenarios 4. Review safety and compliance requirements EOF } cmd_quickstart() { cat << 'EOF' # Encrypt — Quick Start Guide ## Prerequisites - Basic understanding of security concepts - Required tools and access credentials - System meeting minimum requirements ## Installation 1. Download or clone the encrypt package 2. Install dependencies 3. Configure initial settings 4. Verify installation ## First Steps 1. Run the hello-world example 2. Review the default configuration 3. Try a simple real-world task 4. Explore available commands and options ## Next Steps - Read the full documentation - Join the community forum - Try advanced features - Set up automated workflows EOF } cmd_patterns() { cat << 'EOF' # Encrypt — Common Patterns & Best Practices ## Design Patterns 1. **Standard Pattern**: The most common approach for encrypt 2. **Scalable Pattern**: For high-volume or distributed scenarios 3. **Resilient Pattern**: For fault-tolerant implementations ## Best Practices - Follow the principle of least privilege - Use version control for all configurations - Implement comprehensive logging - Test changes in staging before production - Document all custom configurations ## Anti-Patterns to Avoid - Hardcoding credentials or configuration - Skipping validation and error handling - Ignoring monitoring and alerting - Making changes without documentation - Over-engineering simple solutions EOF } cmd_debugging() { cat << 'EOF' # Encrypt — Debugging Guide ## Common Errors 1. **Connection refused**: Check service status and network 2. **Permission denied**: Verify credentials and access rights 3. **Timeout**: Check network, increase limits, optimize queries 4. **Invalid input**: Validate data format and encoding ## Debugging Tools - Built-in logging and diagnostics - Network analysis tools (tcpdump, wireshark) - System monitoring (top, htop, iostat) - Application-specific debug modes ## Debug Workflow 1. Reproduce the issue consistently 2. Check logs for error messages 3. Isolate the failing component 4. Test with minimal configuration 5. Apply fix and verify EOF } cmd_performance() { cat << 'EOF' # Encrypt — Performance Optimization ## Key Metrics - Response time / latency - Throughput / operations per second - Resource utilization (CPU, memory, I/O) - Error rate and retry frequency ## Optimization Strategies 1. **Caching**: Reduce redundant operations 2. **Batching**: Group small operations 3. **Indexing**: Speed up data lookups 4. **Compression**: Reduce data transfer size 5. **Parallel Processing**: Utilize multiple cores ## Monitoring - Set up baseline performance metrics - Configure alerts for anomalies - Track trends over time - Regular capacity planning reviews EOF } cmd_security() { cat << 'EOF' # Encrypt — Security Considerations ## Authentication & Authorization - Use strong, unique credentials - Implement role-based access control - Enable multi-factor authentication where possible - Regularly review and rotate credentials ## Data Protection - Encrypt data at rest and in transit - Implement proper backup procedures - Follow data retention policies - Sanitize inputs to prevent injection ## Network Security - Use firewalls and network segmentation - Monitor for suspicious activity - Keep all software patched and updated - Disable unnecessary services and ports EOF } cmd_migration() { cat << 'EOF' # Encrypt — Migration & Upgrade Guide ## Pre-Migration Checklist - [ ] Current system fully documented - [ ] Complete backup taken and verified - [ ] Target environment prepared - [ ] Rollback plan documented - [ ] Stakeholders notified ## Migration Steps 1. Prepare target environment 2. Export data from source 3. Transform data if needed 4. Import to target 5. Verify data integrity 6. Update configurations 7. Test all functionality 8. Switch traffic / go live ## Post-Migration - Monitor for errors and performance - Verify all integrations working - Update documentation - Decommission old system after confirmation EOF } cmd_cheatsheet() { cat << 'EOF' # Encrypt — Quick Reference ## Essential Commands | Command | Description | |---------|-------------| | help | Show available commands | | version | Display version info | | intro | Overview and fundamentals | | troubleshooting | Common problems and fixes | ## Common Workflows 1. **Setup**: install → configure → verify → test 2. **Daily**: check → monitor → report → review 3. **Issue**: diagnose → isolate → fix → verify → document ## Key Shortcuts - Use tab completion for commands - Check logs first when troubleshooting - Always backup before making changes - Document everything you change EOF } CMD="-help" shift 2>/dev/null || true case "$CMD" in intro) cmd_intro "$@" ;; quickstart) cmd_quickstart "$@" ;; patterns) cmd_patterns "$@" ;; debugging) cmd_debugging "$@" ;; performance) cmd_performance "$@" ;; security) cmd_security "$@" ;; migration) cmd_migration "$@" ;; cheatsheet) cmd_cheatsheet "$@" ;; help|--help|-h) show_help ;; version|--version|-v) echo "encrypt v$VERSION — Powered by BytesAgain" ;; *) echo "Unknown: $CMD"; echo "Run: encrypt help"; exit 1 ;; esac
Web crawling and scraping reference — robots.txt protocol, Scrapy framework, anti-bot detection, headless browsers, and legal considerations
--- name: "crawler" version: "3.0.0" description: "Web crawling and scraping reference — robots.txt protocol, Scrapy framework, anti-bot detection, headless browsers, and legal considerations" author: "BytesAgain" homepage: "https://bytesagain.com" source: "https://github.com/bytesagain/ai-skills" tags: [web-scraping, scrapy, crawler, robots-txt, selenium] category: "devtools" --- # Crawler Web crawling and scraping reference — robots.txt protocol, Scrapy framework, anti-bot detection, headless browsers, and legal considerations. No API keys or credentials required — outputs reference documentation only. ## Commands | Command | Description | |---------|-------------| | `intro` | Crawling vs scraping, robots.txt, sitemap | | `standards` | HTTP caching, structured data, meta tags | | `troubleshooting` | Anti-bot detection, JS rendering, encoding | | `performance` | Concurrency, dedup, incremental, distributed | | `security` | Legal landscape, ethical guidelines, proxies | | `migration` | BeautifulSoup to Scrapy, requests to Playwright | | `cheatsheet` | Scrapy commands, CSS/XPath, curl, user-agents | | `faq` | Legality, JS pages, blocking, storage | ## Output Format All commands output plain-text reference documentation via heredoc. No external API calls, no credentials needed, no network access. --- *Powered by BytesAgain | bytesagain.com | [email protected]* FILE:scripts/script.sh #!/usr/bin/env bash # crawler — Web Crawling & Scraping Reference set -euo pipefail VERSION="3.0.0" cmd_intro() { cat << 'EOF' # Web Crawling & Scraping — Overview ## Crawling vs Scraping Crawling: Systematically browsing the web, following links, discovering URLs Purpose: Build index (like Google), map site structure, find content Output: List of URLs, link graph, sitemap Scraping: Extracting specific data from web pages Purpose: Get prices, reviews, contact info, structured data Output: Structured data (JSON, CSV, database records) In practice: Crawl first (find pages), then scrape (extract data) ## robots.txt Protocol (RFC 9309) Location: https://example.com/robots.txt Purpose: Tell crawlers which pages they can/cannot access Directives: User-agent: * (applies to all crawlers) Disallow: /admin/ (don't crawl admin pages) Allow: /admin/public/ (exception within disallowed path) Crawl-delay: 10 (wait 10 seconds between requests) Sitemap: /sitemap.xml (location of sitemap) Important: robots.txt is advisory, not enforced (polite crawlers follow it) Legal: Ignoring robots.txt may increase legal liability ## Sitemap.xml Purpose: Tell crawlers about all important pages Format: XML with <urlset> containing <url> entries Tags: <loc>, <lastmod>, <changefreq>, <priority> Sitemap index: For large sites, index file pointing to multiple sitemaps Size limits: 50,000 URLs or 50MB per sitemap file Auto-discovery: Referenced in robots.txt or via HTTP header ## Crawl Politeness Rate limiting: 1-2 requests per second per domain (minimum) Respect robots.txt and Crawl-delay directive Identify yourself: Use descriptive User-Agent string Handle errors gracefully: Back off on 429 (Too Many Requests) Respect nofollow/noindex meta tags EOF } cmd_standards() { cat << 'EOF' # Web Standards for Crawling ## HTTP Caching Headers Cache-Control: max-age=3600 (cache for 1 hour) ETag: "abc123" → If-None-Match: "abc123" (conditional request) Last-Modified: date → If-Modified-Since: date (conditional request) 304 Not Modified: Content unchanged, use cached version Why care: Saves bandwidth, reduces server load, faster crawls Implementation: Store ETag/Last-Modified per URL, send in next request ## Structured Data Standards JSON-LD (preferred by Google): <script type="application/ld+json"> {"@context":"https://schema.org","@type":"Product","name":"Widget"} </script> Microdata: HTML attributes (itemscope, itemprop) RDFa: HTML attributes (typeof, property) Schema.org types: Product, Article, Event, Organization, Person, Review Benefit for scrapers: Machine-readable data already extracted by site ## Meta Tags for Crawlers <meta name="robots" content="noindex, nofollow"> (page-level control) <meta name="googlebot" content="nosnippet"> (Google-specific) <link rel="canonical" href="https://example.com/page"> (preferred URL) X-Robots-Tag HTTP header: Same directives, works for non-HTML files Directives: index, noindex, follow, nofollow, noarchive, nosnippet ## HTTP Status Codes for Crawlers 200: OK (process page) 301: Permanent redirect (update URL in database, follow redirect) 302: Temporary redirect (follow but keep original URL) 304: Not Modified (use cached version) 403: Forbidden (stop, likely blocked) 404: Not Found (remove from index) 429: Too Many Requests (back off, check Retry-After header) 500: Server Error (retry later, maybe 3 times with exponential backoff) 503: Service Unavailable (temporary, check Retry-After) EOF } cmd_troubleshooting() { cat << 'EOF' # Crawling Troubleshooting ## Anti-Bot Detection CAPTCHAs: - reCAPTCHA v3: Score-based, no user interaction (hard to bypass) - hCaptcha: Image classification tasks - Solutions: Captcha-solving services (2Captcha, Anti-Captcha) — costly - Better: Use API if available, contact site for data access Browser Fingerprinting: - Canvas fingerprint: Render invisible image, hash pixel data - WebGL fingerprint: GPU rendering characteristics - Navigator properties: plugins, languages, platform - TLS fingerprint (JA3/JA4): Unique per browser/library - requests library JA3 ≠ Chrome JA3 → detected as bot - Solution: Use real browser (Playwright/Puppeteer) or curl_cffi Rate Limiting: - 429 responses with Retry-After header - IP-based throttling (affects all concurrent requests from same IP) - Progressive blocking: Warns → slows → blocks → bans - Solution: Respect rate limits, use rotating proxies, add random delays ## JavaScript Rendering Problem: Page content loaded via JavaScript (SPA/React/Vue/Angular) Simple requests/BeautifulSoup: Only see initial HTML (no JS-rendered content) Solutions: 1. Playwright/Puppeteer: Full browser, executes JS 2. Splash: Lightweight rendering service (Scrapy integration) 3. API endpoints: Check Network tab for XHR/fetch calls to data APIs 4. Pre-rendered/SSR pages: Some sites serve static HTML to crawlers Playwright usage: await page.goto(url) await page.wait_for_selector('.product-list') content = await page.content() ## Encoding Issues Mojibake: garbled text from wrong encoding Detection: chardet library (Python), charset in Content-Type header Common: UTF-8 (default), Shift_JIS (Japanese), GB2312/GBK (Chinese) Fix: response.encoding = response.apparent_encoding HTML entities: & < > → use html.unescape() or BeautifulSoup EOF } cmd_performance() { cat << 'EOF' # Crawling Performance ## Concurrent Requests Sequential: 1 request/second = 86,400 pages/day Concurrent (10 threads): 10 req/s = 864,000 pages/day Async (100 connections): 100 req/s = 8.6M pages/day (if server allows) Bottleneck: Usually politeness (rate limiting), not your bandwidth Python: asyncio + aiohttp, or Scrapy (built-in async) Node.js: Got/Axios with concurrency limiter (p-limit) Rule: Balance speed vs politeness — don't overwhelm target servers ## URL Deduplication Problem: Same page reachable via multiple URLs Solutions: - Normalize URLs: lowercase, sort params, remove fragments, trailing slash - Bloom filter: Probabilistic set membership (very memory efficient) 1M URLs in ~1.2MB RAM, 1% false positive rate - Hash set: Exact dedup, more memory but no false positives - Database: URL table with unique constraint (persistent across runs) Python bloom filter: from pybloom_live import BloomFilter ## Incremental Crawling Problem: Re-crawling entire site is wasteful Strategy: 1. Store Last-Modified and ETag for each URL 2. Send conditional requests (If-Modified-Since / If-None-Match) 3. Only process pages that return 200 (skip 304 Not Modified) 4. Prioritize recently changed pages (from sitemap lastmod) 5. Schedule: High-priority pages daily, low-priority weekly Savings: Typically 70-90% bandwidth reduction vs full crawl ## Distributed Crawling Scrapy + Scrapy-Redis: Distribute URLs across multiple workers Architecture: Redis queue → Multiple Scrapy spiders → Shared pipeline URL frontier: Redis set for dedup, sorted set for priority queue Scaling: Add more workers as needed (horizontal scaling) Alternatives: - Apache Nutch: Java-based, Hadoop integration, web-scale - StormCrawler: Storm-based, real-time crawling - Colly: Go library, fast concurrent crawling EOF } cmd_security() { cat << 'EOF' # Legal & Ethical Considerations ## Legal Landscape United States: CFAA (Computer Fraud and Abuse Act): Unauthorized access = criminal hiQ v LinkedIn (2022): Scraping public data is not CFAA violation But: Terms of Service violation may still create civil liability Van Buren v US (2021): Narrowed CFAA — exceeding authorized access ≠ misuse European Union: GDPR: Scraping personal data requires legal basis (consent, legitimate interest) Database Directive: Protects database investments (EU-specific right) Ryanair v PR Aviation: Screen scraping can violate terms of service Key principles: - Public data ≠ free data (legal ≠ ethical ≠ terms-compliant) - Personal data scraping has stricter requirements (GDPR) - Commercial use of scraped data faces more scrutiny - Always check ToS before scraping ## Ethical Scraping Guidelines 1. Check for API first (always prefer official API over scraping) 2. Read and follow robots.txt 3. Rate limit your requests (minimum 1s between requests per domain) 4. Identify your crawler (descriptive User-Agent with contact info) 5. Don't scrape behind authentication without permission 6. Respect CAPTCHA (it means they don't want you crawling) 7. Cache responses to avoid re-fetching 8. Don't redistribute copyrighted content 9. Handle personal data per GDPR/CCPA requirements 10. Stop if you receive a cease and desist ## Proxy Rotation Types: Datacenter proxies: Fast, cheap ($1-2/GB), easily detected Residential proxies: Real IPs, harder to detect, expensive ($5-15/GB) Mobile proxies: Hardest to detect, most expensive ($20+/GB) ISP proxies: Static residential IPs, good balance Providers: Bright Data, Oxylabs, Smartproxy, ScraperAPI Rotation strategy: New IP per request or per domain Anti-detect: Rotate User-Agent, accept headers, TLS fingerprint per IP EOF } cmd_migration() { cat << 'EOF' # Scraping Framework Migration ## BeautifulSoup → Scrapy When to migrate: - Need concurrent requests (BS4 is single-threaded) - Crawling multiple pages with link following - Need robust retry/error handling - Want pipeline processing (database, file storage) BeautifulSoup strengths: Simple, quick scripts, good for one-off scraping Scrapy strengths: Production-grade, built-in concurrency, middleware, pipelines Migration mapping: requests.get(url) → scrapy.Request(url, callback) BeautifulSoup(html) → response.css() or response.xpath() soup.find('div', class_='x') → response.css('div.x') soup.find_all('a') → response.css('a::attr(href)').getall() Manual loop → Spider with parse method + yield ## requests → Playwright (for JS Sites) When: Page content loaded via JavaScript (React, Vue, Angular SPAs) Playwright advantages: Full browser engine, handles JS, AJAX, websockets Setup: pip install playwright playwright install chromium Migration: response = requests.get(url) → page = browser.new_page() html = response.text → page.goto(url) page.wait_for_selector('.data') html = page.content() Headless mode: browser = playwright.chromium.launch(headless=True) Resource: Block images/CSS for faster scraping: page.route("**/*.{png,jpg,css}", lambda route: route.abort()) ## Self-Hosted → Cloud Scraping Cloud options: ScraperAPI: API proxy with JS rendering ($29/mo) Apify: Actor-based scraping platform (free tier) Crawlee: Open source (Apify's framework, self-host or cloud) Zyte (formerly Scrapy Cloud): Scrapy hosting + smart proxy Benefits: No proxy management, built-in browser rendering, auto-scaling Self-hosted benefits: Full control, no per-request costs, data stays local Hybrid: Run spiders locally, use cloud proxy/rendering services EOF } cmd_cheatsheet() { cat << 'EOF' # Web Scraping Quick Reference ## Scrapy Commands scrapy startproject myproject # Create project scrapy genspider myspider domain # Generate spider scrapy crawl myspider # Run spider scrapy shell "http://example.com" # Interactive shell scrapy bench # Benchmark concurrency scrapy view http://example.com # Open page in browser scrapy fetch --nolog http://url # Fetch single page ## CSS Selectors vs XPath CSS: response.css('div.product h2::text').get() XPath: response.xpath('//div[@class="product"]/h2/text()').get() CSS examples: div.class Element with class #id Element with id a::attr(href) Attribute value h1::text Text content div > p Direct child div p Any descendant li:nth-child(2) Second list item XPath examples: //div[@class="x"] Element with class //a/@href Attribute value //h1/text() Text content //div[contains(@class,"x")] Class contains //table/tr[position()>1] Skip header row ## curl with Cookie Jar curl -c cookies.txt -b cookies.txt -L "https://example.com/login" -d "user=x&pass=y" curl -b cookies.txt "https://example.com/data" ## Common User-Agent Strings Chrome: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Firefox: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0 Googlebot: Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html) ## Headless Chrome Flags --headless=new New headless mode (Chrome 112+) --disable-gpu Disable GPU (server environments) --no-sandbox Required in Docker --disable-dev-shm Use /tmp instead of /dev/shm --window-size=1920,1080 Set viewport --user-agent="..." Custom user agent EOF } cmd_faq() { cat << 'EOF' # Web Scraping — FAQ Q: Is web scraping legal? A: It depends on jurisdiction, what you scrape, and how you use it. US: Scraping public data generally OK (hiQ v LinkedIn ruling). EU: GDPR restricts scraping personal data. Database Directive applies. Factors: robots.txt compliance, ToS agreement, personal data, purpose. Safe: Public data, no ToS violation, no personal data, non-commercial. Risky: Behind login, against ToS, personal data, commercial purpose. Always consult a lawyer for commercial scraping operations. Q: How do I scrape JavaScript-rendered pages? A: Use a browser automation tool: - Playwright (recommended): Python/JS/Java/.NET, fast, modern API. - Puppeteer: JS/Node.js, Chrome DevTools Protocol. - Selenium: Oldest, widest language support, slower. Alternative: Check for API endpoints (Network tab in DevTools). Many SPAs load data via JSON API — scraping the API is more efficient. Q: How do I avoid getting blocked? A: 1. Slow down (1-3 second delays between requests). 2. Rotate User-Agent strings (pool of 10-20 real browser UAs). 3. Use residential proxies for sensitive targets. 4. Match browser fingerprint (TLS, headers, cookies). 5. Handle CAPTCHAs or use browser automation. 6. Don't crawl aggressively during business hours. 7. Rotate session/cookies periodically. Q: BeautifulSoup vs Scrapy — which should I use? A: BeautifulSoup + requests: Best for quick scripts, few pages. Scrapy: Best for production crawlers, many pages, pipeline processing. If you're scraping <100 pages: BeautifulSoup is fine. If you're building a recurring scraping system: Use Scrapy. Learning curve: BS4 = 30 minutes, Scrapy = a few hours. Q: How do I store scraped data? A: Small (< 10K records): CSV or JSON files. Medium (10K-1M): SQLite database (single file, no server). Large (> 1M): PostgreSQL or MongoDB. Pipeline: Scrapy pipelines can write to any of these automatically. Best practice: Store raw HTML too (allows re-parsing later). EOF } cmd_help() { echo "crawler v$VERSION — Web Crawling & Scraping Reference" echo "" echo "Usage: crawler <command>" echo "" echo "Commands:" echo " intro Crawling vs scraping, robots.txt, sitemap" echo " standards HTTP caching, structured data, meta tags" echo " troubleshooting Anti-bot detection, JS rendering, encoding" echo " performance Concurrency, dedup, incremental, distributed" echo " security Legal landscape, ethical guidelines, proxies" echo " migration BS4→Scrapy, requests→Playwright, cloud" echo " cheatsheet Scrapy commands, CSS/XPath, curl, user-agents" echo " faq Legality, JS pages, blocking, storage" echo " help Show this help" } case "-help" in intro) cmd_intro ;; standards) cmd_standards ;; troubleshooting) cmd_troubleshooting ;; performance) cmd_performance ;; security) cmd_security ;; migration) cmd_migration ;; cheatsheet) cmd_cheatsheet ;; faq) cmd_faq ;; help|--help|-h) cmd_help ;; *) echo "Unknown: $1"; echo "Run: crawler help" ;; esac
Split large files, run parallel processing, and stream batch analysis. Use when sampling datasets, aggregating logs, or transforming bulk data.
--- name: bigdata version: "2.0.0" author: BytesAgain homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills license: MIT-0 tags: [bigdata, tool, utility] description: "Split large files, run parallel processing, and stream batch analysis. Use when sampling datasets, aggregating logs, or transforming bulk data." --- # BigData A comprehensive data processing toolkit for ingesting, transforming, querying, filtering, aggregating, and managing data workflows — all from the command line with local timestamped log storage. ## Commands | Command | Description | |---------|-------------| | `bigdata ingest <input>` | Ingest raw data into the system. Without args, shows recent ingest entries | | `bigdata transform <input>` | Record a data transformation step. Without args, shows recent transforms | | `bigdata query <input>` | Log and track data queries. Without args, shows recent queries | | `bigdata filter <input>` | Apply and record data filters. Without args, shows recent filters | | `bigdata aggregate <input>` | Record aggregation operations. Without args, shows recent aggregations | | `bigdata visualize <input>` | Log visualization tasks. Without args, shows recent visualizations | | `bigdata export <input>` | Log export operations. Without args, shows recent exports | | `bigdata sample <input>` | Record data sampling operations. Without args, shows recent samples | | `bigdata schema <input>` | Track schema definitions and changes. Without args, shows recent schemas | | `bigdata validate <input>` | Log data validation checks. Without args, shows recent validations | | `bigdata pipeline <input>` | Record pipeline configurations. Without args, shows recent pipelines | | `bigdata profile <input>` | Log data profiling operations. Without args, shows recent profiles | | `bigdata stats` | Show summary statistics across all entry types | | `bigdata search <term>` | Search across all log entries for a keyword | | `bigdata recent` | Show the 20 most recent activity entries from the history log | | `bigdata status` | Health check — version, data dir, total entries, disk usage, last activity | | `bigdata help` | Show all available commands | | `bigdata version` | Print version (v2.0.0) | Each data command (ingest, transform, query, etc.) works the same way: - **With arguments**: saves the entry with a timestamp to its dedicated `.log` file and records it in the 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: ``` ~/.local/share/bigdata/ ├── ingest.log # Ingested data entries ├── transform.log # Transformation records ├── query.log # Query log ├── filter.log # Filter operations ├── aggregate.log # Aggregation records ├── visualize.log # Visualization tasks ├── export.log # Export operations ├── sample.log # Sampling records ├── schema.log # Schema definitions ├── validate.log # Validation checks ├── pipeline.log # Pipeline configurations ├── profile.log # Profiling results └── history.log # Unified activity log with timestamps ``` 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`, `cat` - No external dependencies or API keys required - Works offline — all data stays on your machine ## When to Use 1. **Data pipeline tracking** — Record each step of a multi-stage data workflow (ingest → transform → validate → export) with full timestamps for audit trails 2. **Quick data logging** — Capture observations, measurements, or notes about datasets directly from the terminal without opening a separate app 3. **Schema management** — Keep track of schema definitions, changes, and validation rules as your data evolves over time 4. **Data quality monitoring** — Log validation checks and profiling results to build a history of data quality metrics 5. **Workflow documentation** — Use search and recent commands to review what data operations were performed, when, and in what order ## Examples ### Log a complete data workflow ```bash # Ingest raw data bigdata ingest "customer_orders_2024.csv — 1.2M rows loaded" # Transform it bigdata transform "normalize dates to ISO-8601, trim whitespace, deduplicate" # Validate the output bigdata validate "all required fields present, no nulls in customer_id" # Record the schema bigdata schema "orders: id(int), customer_id(int), amount(decimal), date(date)" # Export when ready bigdata export "final dataset pushed to analytics warehouse" ``` ### Search and review activity ```bash # Search across all logs for a keyword bigdata search "customer" # Check overall statistics bigdata stats # View recent activity across all commands bigdata recent # Health check bigdata status ``` ### Pipeline and profiling ```bash # Define a pipeline bigdata pipeline "daily-etl: ingest → clean → validate → load — runs at 02:00 UTC" # Profile a dataset bigdata profile "users table: 500K rows, 12 columns, 0.3% nulls in email field" # Sample data for testing bigdata sample "random 10% sample from transactions for QA testing" # Record an aggregation bigdata aggregate "monthly revenue by region — Q1 totals computed" ``` ### Filter and query tracking ```bash # Log a filter operation bigdata filter "removed records older than 2020-01-01, kept 850K of 1.2M rows" # Track a query bigdata query "SELECT region, SUM(revenue) FROM orders GROUP BY region" # Log a visualization bigdata visualize "bar chart: monthly revenue trend, exported as PNG" ``` ## Output All commands print confirmation to stdout. Data is persisted in `~/.local/share/bigdata/`. Use `bigdata stats` for a summary or `bigdata search <term>` to find specific entries across all logs. --- *Powered by BytesAgain | bytesagain.com | [email protected]* FILE:scripts/script.sh #!/usr/bin/env bash # Bigdata — data tool # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail DATA_DIR="HOME/.local/share/bigdata" mkdir -p "$DATA_DIR" _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } _version() { echo "bigdata v2.0.0"; } _help() { echo "Bigdata v2.0.0 — data toolkit" echo "" echo "Usage: bigdata <command> [args]" echo "" echo "Commands:" echo " ingest Ingest" echo " transform Transform" echo " query Query" echo " filter Filter" echo " aggregate Aggregate" echo " visualize Visualize" echo " export Export" echo " sample Sample" echo " schema Schema" echo " validate Validate" echo " pipeline Pipeline" echo " profile Profile" echo " stats Summary statistics" echo " export <fmt> Export (json|csv|txt)" echo " status Health check" echo " help Show this help" echo " version Show version" echo "" echo "Data: $DATA_DIR" } _stats() { echo "=== Bigdata Stats ===" local total=0 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) local c=$(wc -l < "$f") total=$((total + c)) echo " $name: $c entries" done echo " ---" echo " Total: $total entries" echo " Data size: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1)" echo " Since: $(head -1 "$DATA_DIR/history.log" 2>/dev/null | cut -d'|' -f1 || echo 'N/A')" } _export() { local fmt="-json" local out="$DATA_DIR/export.$fmt" case "$fmt" in json) echo "[" > "$out" local first=1 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) while IFS='|' read -r ts val; do [ $first -eq 1 ] && first=0 || echo "," >> "$out" printf ' {"type":"%s","time":"%s","value":"%s"}' "$name" "$ts" "$val" >> "$out" done < "$f" done echo "" >> "$out" echo "]" >> "$out" ;; csv) echo "type,time,value" > "$out" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) while IFS='|' read -r ts val; do echo "$name,$ts,$val" >> "$out" done < "$f" done ;; txt) echo "=== Bigdata Export ===" > "$out" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue echo "--- $(basename "$f" .log) ---" >> "$out" cat "$f" >> "$out" echo "" >> "$out" done ;; *) echo "Formats: json, csv, txt"; return 1 ;; esac echo "Exported to $out ($(wc -c < "$out") bytes)" } _status() { echo "=== Bigdata Status ===" echo " Version: v2.0.0" echo " Data dir: $DATA_DIR" echo " Entries: $(cat "$DATA_DIR"/*.log 2>/dev/null | wc -l) total" echo " Disk: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1)" local last=$(tail -1 "$DATA_DIR/history.log" 2>/dev/null || echo "never") echo " Last activity: $last" echo " Status: OK" } _search() { local term="?Usage: bigdata search <term>" echo "Searching for: $term" local found=0 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local matches=$(grep -i "$term" "$f" 2>/dev/null || true) if [ -n "$matches" ]; then echo " --- $(basename "$f" .log) ---" echo "$matches" | while read -r line; do echo " $line" found=$((found + 1)) done fi done [ $found -eq 0 ] && echo " No matches found." } _recent() { echo "=== Recent Activity ===" if [ -f "$DATA_DIR/history.log" ]; then tail -20 "$DATA_DIR/history.log" | while IFS='' read -r line; do echo " $line" done else echo " No activity yet." fi } # Main dispatch case "-help" in ingest) shift if [ $# -eq 0 ]; then echo "Recent ingest entries:" tail -20 "$DATA_DIR/ingest.log" 2>/dev/null || echo " No entries yet. Use: bigdata ingest <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/ingest.log" local total=$(wc -l < "$DATA_DIR/ingest.log") echo " [Bigdata] ingest: $input" echo " Saved. Total ingest entries: $total" _log "ingest" "$input" fi ;; transform) shift if [ $# -eq 0 ]; then echo "Recent transform entries:" tail -20 "$DATA_DIR/transform.log" 2>/dev/null || echo " No entries yet. Use: bigdata transform <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/transform.log" local total=$(wc -l < "$DATA_DIR/transform.log") echo " [Bigdata] transform: $input" echo " Saved. Total transform entries: $total" _log "transform" "$input" fi ;; query) shift if [ $# -eq 0 ]; then echo "Recent query entries:" tail -20 "$DATA_DIR/query.log" 2>/dev/null || echo " No entries yet. Use: bigdata query <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/query.log" local total=$(wc -l < "$DATA_DIR/query.log") echo " [Bigdata] query: $input" echo " Saved. Total query entries: $total" _log "query" "$input" fi ;; filter) shift if [ $# -eq 0 ]; then echo "Recent filter entries:" tail -20 "$DATA_DIR/filter.log" 2>/dev/null || echo " No entries yet. Use: bigdata filter <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/filter.log" local total=$(wc -l < "$DATA_DIR/filter.log") echo " [Bigdata] filter: $input" echo " Saved. Total filter entries: $total" _log "filter" "$input" fi ;; aggregate) shift if [ $# -eq 0 ]; then echo "Recent aggregate entries:" tail -20 "$DATA_DIR/aggregate.log" 2>/dev/null || echo " No entries yet. Use: bigdata aggregate <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/aggregate.log" local total=$(wc -l < "$DATA_DIR/aggregate.log") echo " [Bigdata] aggregate: $input" echo " Saved. Total aggregate entries: $total" _log "aggregate" "$input" fi ;; visualize) shift if [ $# -eq 0 ]; then echo "Recent visualize entries:" tail -20 "$DATA_DIR/visualize.log" 2>/dev/null || echo " No entries yet. Use: bigdata visualize <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/visualize.log" local total=$(wc -l < "$DATA_DIR/visualize.log") echo " [Bigdata] visualize: $input" echo " Saved. Total visualize entries: $total" _log "visualize" "$input" fi ;; export) shift if [ $# -eq 0 ]; then echo "Recent export entries:" tail -20 "$DATA_DIR/export.log" 2>/dev/null || echo " No entries yet. Use: bigdata export <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/export.log" local total=$(wc -l < "$DATA_DIR/export.log") echo " [Bigdata] export: $input" echo " Saved. Total export entries: $total" _log "export" "$input" fi ;; sample) shift if [ $# -eq 0 ]; then echo "Recent sample entries:" tail -20 "$DATA_DIR/sample.log" 2>/dev/null || echo " No entries yet. Use: bigdata sample <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/sample.log" local total=$(wc -l < "$DATA_DIR/sample.log") echo " [Bigdata] sample: $input" echo " Saved. Total sample entries: $total" _log "sample" "$input" fi ;; schema) shift if [ $# -eq 0 ]; then echo "Recent schema entries:" tail -20 "$DATA_DIR/schema.log" 2>/dev/null || echo " No entries yet. Use: bigdata schema <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/schema.log" local total=$(wc -l < "$DATA_DIR/schema.log") echo " [Bigdata] schema: $input" echo " Saved. Total schema entries: $total" _log "schema" "$input" fi ;; validate) shift if [ $# -eq 0 ]; then echo "Recent validate entries:" tail -20 "$DATA_DIR/validate.log" 2>/dev/null || echo " No entries yet. Use: bigdata validate <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/validate.log" local total=$(wc -l < "$DATA_DIR/validate.log") echo " [Bigdata] validate: $input" echo " Saved. Total validate entries: $total" _log "validate" "$input" fi ;; pipeline) shift if [ $# -eq 0 ]; then echo "Recent pipeline entries:" tail -20 "$DATA_DIR/pipeline.log" 2>/dev/null || echo " No entries yet. Use: bigdata pipeline <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/pipeline.log" local total=$(wc -l < "$DATA_DIR/pipeline.log") echo " [Bigdata] pipeline: $input" echo " Saved. Total pipeline entries: $total" _log "pipeline" "$input" fi ;; profile) shift if [ $# -eq 0 ]; then echo "Recent profile entries:" tail -20 "$DATA_DIR/profile.log" 2>/dev/null || echo " No entries yet. Use: bigdata profile <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/profile.log" local total=$(wc -l < "$DATA_DIR/profile.log") echo " [Bigdata] profile: $input" echo " Saved. Total profile entries: $total" _log "profile" "$input" fi ;; stats) _stats ;; export) shift; _export "$@" ;; search) shift; _search "$@" ;; recent) _recent ;; status) _status ;; help|--help|-h) _help ;; version|--version|-v) _version ;; *) echo "Unknown command: $1" echo "Run 'bigdata help' for available commands." exit 1 ;; esac