@clawhub-bytesagain-lab-4f4db08043
Reference tool for devtools — covers intro, quickstart, patterns and more. Quick lookup for Devops Journey concepts, best practices, and implementation patte...
--- name: "devops-journey" version: "2.0.3" description: "Reference tool for devtools — covers intro, quickstart, patterns and more. Quick lookup for Devops Journey concepts, best practices, and implementation patte..." author: "BytesAgain" homepage: "https://bytesagain.com" source: "https://github.com/bytesagain/ai-skills" tags: [devops,journey, reference] category: "devtools" --- # Devops Journey Reference tool for devtools — covers intro, quickstart, patterns and more. Quick lookup for Devops Journey concepts, best practices, and implementation patte... 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 # devops-journey — Devops Journey reference tool. Use when working with devops journey in sysops contexts. # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail VERSION="2.0.2" show_help() { cat << 'HELPEOF' devops-journey v$VERSION — Devops Journey Reference Tool Usage: devops-journey <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' # Devops Journey — Overview ## What is Devops Journey? Devops Journey (devops-journey) is a specialized tool/concept in the sysops domain. It provides essential capabilities for professionals working with devops journey. ## Key Concepts - Core devops journey principles and fundamentals - How devops journey fits into the broader sysops ecosystem - Essential terminology every practitioner should know ## Why Devops Journey Matters Understanding devops journey is critical for: - Improving efficiency in sysops workflows - Reducing errors and downtime - Meeting industry standards and compliance requirements - Enabling better decision-making with accurate data ## Getting Started 1. Understand the basic devops journey concepts 2. Learn the standard tools and interfaces 3. Practice with common scenarios 4. Review safety and compliance requirements EOF } cmd_quickstart() { cat << 'EOF' # Devops Journey — Quick Start Guide ## Prerequisites - Basic understanding of sysops concepts - Required tools and access credentials - System meeting minimum requirements ## Installation 1. Download or clone the devops journey 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' # Devops Journey — Common Patterns & Best Practices ## Design Patterns 1. **Standard Pattern**: The most common approach for devops journey 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' # Devops Journey — 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' # Devops Journey — 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' # Devops Journey — 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' # Devops Journey — 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' # Devops Journey — 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 "devops-journey v$VERSION — Powered by BytesAgain" ;; *) echo "Unknown: $CMD"; echo "Run: devops-journey help"; exit 1 ;; esac
Reference tool for devtools — covers intro, quickstart, patterns and more. Quick lookup for Container Analyzer concepts, best practices, and implementation p...
--- name: "container-analyzer" version: "2.0.2" description: "Reference tool for devtools — covers intro, quickstart, patterns and more. Quick lookup for Container Analyzer concepts, best practices, and implementation p..." author: "BytesAgain" homepage: "https://bytesagain.com" source: "https://github.com/bytesagain/ai-skills" tags: [container,analyzer, reference] category: "devtools" --- # Container Analyzer Reference tool for devtools — covers intro, quickstart, patterns and more. Quick lookup for Container Analyzer concepts, best practices, and implementation p... 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 # container-analyzer — Container Analyzer reference tool. Use when working with container analyzer in devtools contexts. # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail VERSION="2.0.1" show_help() { cat << 'HELPEOF' container-analyzer v$VERSION — Container Analyzer Reference Tool Usage: container-analyzer <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' # Container Analyzer — Overview ## What is Container Analyzer? Container Analyzer (container-analyzer) is a specialized tool/concept in the devtools domain. It provides essential capabilities for professionals working with container analyzer. ## Key Concepts - Core container analyzer principles and fundamentals - How container analyzer fits into the broader devtools ecosystem - Essential terminology every practitioner should know ## Why Container Analyzer Matters Understanding container analyzer 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 container analyzer concepts 2. Learn the standard tools and interfaces 3. Practice with common scenarios 4. Review safety and compliance requirements EOF } cmd_quickstart() { cat << 'EOF' # Container Analyzer — Quick Start Guide ## Prerequisites - Basic understanding of devtools concepts - Required tools and access credentials - System meeting minimum requirements ## Installation 1. Download or clone the container analyzer 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' # Container Analyzer — Common Patterns & Best Practices ## Design Patterns 1. **Standard Pattern**: The most common approach for container analyzer 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' # Container Analyzer — 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' # Container Analyzer — 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' # Container Analyzer — 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' # Container Analyzer — 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' # Container Analyzer — 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 "container-analyzer v$VERSION — Powered by BytesAgain" ;; *) echo "Unknown: $CMD"; echo "Run: container-analyzer help"; exit 1 ;; esac
Learn Docker hands-on with tutorials on containers and orchestration. Use when studying Docker, practicing networking, exploring swarm mode.
--- name: Dockerlabs description: "Learn Docker hands-on with tutorials on containers and orchestration. Use when studying Docker, practicing networking, exploring swarm mode." version: "2.0.0" license: Apache-2.0 runtime: python3 --- # Dockerlabs Devtools toolkit for Docker-related workflows — check, validate, generate, format, lint, explain, convert, template, diff, preview, fix, and report on Docker configurations. All entries are logged locally with timestamps for full traceability. ## Commands | Command | Description | |---------|-------------| | `dockerlabs check <input>` | Check a Docker configuration or record a check entry | | `dockerlabs validate <input>` | Validate a Docker setup or record a validation entry | | `dockerlabs generate <input>` | Generate Docker artifacts or record a generation entry | | `dockerlabs format <input>` | Format Docker files or record a format entry | | `dockerlabs lint <input>` | Lint Dockerfiles or record a lint entry | | `dockerlabs explain <input>` | Explain Docker concepts or record an explanation entry | | `dockerlabs convert <input>` | Convert Docker configurations or record a conversion entry | | `dockerlabs template <input>` | Manage Docker templates or record a template entry | | `dockerlabs diff <input>` | Diff Docker configurations or record a diff entry | | `dockerlabs preview <input>` | Preview Docker setups or record a preview entry | | `dockerlabs fix <input>` | Fix Docker issues or record a fix entry | | `dockerlabs report <input>` | Generate reports or record a report entry | | `dockerlabs stats` | Show summary statistics across all entry types | | `dockerlabs export <fmt>` | Export all data (json, csv, or txt) | | `dockerlabs search <term>` | Search across all log entries | | `dockerlabs recent` | Show the 20 most recent activity entries | | `dockerlabs status` | Health check — version, data dir, entry count, disk usage | | `dockerlabs help` | Show help with all available commands | | `dockerlabs version` | Show current version (v2.0.0) | Each command (check, validate, generate, format, lint, explain, convert, template, diff, preview, fix, report) works in two modes: - **No arguments**: displays the 20 most recent entries from that command's log - **With arguments**: records the input with a timestamp and appends to the command's log file ## Data Storage All data is stored locally at `~/.local/share/dockerlabs/`. Each action is logged to its own file (e.g., `check.log`, `lint.log`, `generate.log`). A unified `history.log` tracks all operations. Use `export` to back up your data anytime in JSON, CSV, or plain text format. ## Requirements - bash 4+ (uses `set -euo pipefail`) - Standard Unix utilities (`wc`, `du`, `grep`, `tail`, `sed`, `date`) ## When to Use - Tracking Docker configuration checks, validations, and linting results - Logging Docker file generation, conversion, and formatting operations - Keeping an audit trail of Docker troubleshooting and fixes - Exporting Docker operation history for reporting or compliance - Searching past Docker operations by keyword ## Examples ```bash # Record a Dockerfile lint result dockerlabs lint "Dockerfile uses latest tag — pin to specific version" # Record a validation check dockerlabs validate "docker-compose.yml syntax OK, 3 services defined" # Generate a template entry dockerlabs generate "multi-stage build for Node.js app" # View recent lint entries dockerlabs lint # Search for entries mentioning "nginx" dockerlabs search nginx # Export all data as JSON dockerlabs export json # Check overall health dockerlabs status # View summary stats dockerlabs stats ``` --- Powered by BytesAgain | bytesagain.com | [email protected] FILE:scripts/script.sh #!/usr/bin/env bash # Dockerlabs — devtools tool # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail DATA_DIR="HOME/.local/share/dockerlabs" mkdir -p "$DATA_DIR" _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } _version() { echo "dockerlabs v2.0.0"; } _help() { echo "Dockerlabs v2.0.0 — devtools toolkit" echo "" echo "Usage: dockerlabs <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 "=== Dockerlabs 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 "=== Dockerlabs 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 "=== Dockerlabs 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: dockerlabs 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: dockerlabs 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 " [Dockerlabs] 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: dockerlabs 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 " [Dockerlabs] 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: dockerlabs 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 " [Dockerlabs] 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: dockerlabs 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 " [Dockerlabs] 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: dockerlabs 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 " [Dockerlabs] 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: dockerlabs 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 " [Dockerlabs] 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: dockerlabs 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 " [Dockerlabs] 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: dockerlabs 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 " [Dockerlabs] 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: dockerlabs 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 " [Dockerlabs] 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: dockerlabs 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 " [Dockerlabs] 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: dockerlabs 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 " [Dockerlabs] 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: dockerlabs 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 " [Dockerlabs] 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 'dockerlabs help'" exit 1 ;; esac
Create, test, and learn regular expressions with live matching. Use when validating patterns, checking groups, generating regex, linting syntax.
---
name: Regexr
description: "Create, test, and learn regular expressions with live matching. Use when validating patterns, checking groups, generating regex, linting syntax."
version: "2.0.0"
author: "BytesAgain"
homepage: https://bytesagain.com
source: https://github.com/bytesagain/ai-skills
tags: ["regex", "regexp", "正则表达式", "pattern", "javascript", "utility", "developer"]
categories: ["Developer Tools", "Utility"]
commands:
- name: "help"
description: "显示RegExr工具的帮助信息和可用命令列表。"
usage: "regexr help"
- name: "run"
description: "启动RegExr交互式界面,允许用户创建、测试和调试正则表达式。"
usage: "regexr run"
- name: "info"
description: "提供RegExr工具的版本信息和相关资源链接。"
usage: "regexr info"
- name: "status"
description: "检查RegExr工具的运行状态和依赖项健康状况。"
usage: "regexr status"
changelog:
- version: "2.0.0"
date: "2026-03-15"
changes:
- "初始版本发布"
pricing_model: "free"
license: "MIT"
docs_url: "https://bytesagain.com/skills/regexr"
support_url: "https://bytesagain.com/feedback"
---
# Regexr
Developer tools CLI for checking, validating, generating, and working with regular expressions and code patterns. Lint syntax, explain complex expressions, convert between formats, generate templates, diff pattern versions, preview matches, fix common regex issues, and produce reports — all from the command line with persistent local logging.
## Commands
Run `regexr <command> [args]` to use.
| Command | Description |
|---------|-------------|
| `check` | Check regex patterns for correctness and common pitfalls |
| `validate` | Validate regex syntax and structure |
| `generate` | Generate regex patterns from descriptions or examples |
| `format` | Format and prettify regex expressions |
| `lint` | Lint regex for style, performance, and safety issues |
| `explain` | Explain what a regex pattern does in plain language |
| `convert` | Convert regex between flavors (PCRE, JS, Python, etc.) |
| `template` | Apply or manage regex templates for common use cases |
| `diff` | Diff two regex patterns and show behavioral differences |
| `preview` | Preview regex matches against sample text |
| `fix` | Auto-fix common regex issues (escaping, anchoring, etc.) |
| `report` | Generate regex quality and coverage reports |
| `stats` | Show summary statistics across all categories |
| `export <fmt>` | Export data in json, csv, or txt format |
| `search <term>` | Search across all logged entries |
| `recent` | Show recent activity from history log |
| `status` | Health check — version, data dir, disk usage |
| `help` | Show help and available commands |
| `version` | Show version (v2.0.0) |
Each domain command (check, validate, generate, etc.) works in two modes:
- **Without arguments**: displays the most recent 20 entries from that category
- **With arguments**: logs the input with a timestamp and saves to the category log file
## Data Storage
All data is stored locally in `~/.local/share/regexr/`:
- Each command creates its own log file (e.g., `check.log`, `validate.log`, `generate.log`)
- A unified `history.log` tracks all activity across commands
- Entries are stored in `timestamp|value` pipe-delimited format
- Export supports JSON, CSV, and plain text formats
## Requirements
- Bash 4+ with `set -euo pipefail` strict mode
- Standard Unix utilities: `date`, `wc`, `du`, `tail`, `grep`, `sed`, `cat`
- No external dependencies or API keys required
## When to Use
1. **Building and testing regex patterns** — use `generate` to create patterns from descriptions, `check` to verify correctness, and `preview` to test against sample data
2. **Learning and understanding regex** — use `explain` to break down complex patterns into plain-language descriptions, perfect for code reviews or onboarding
3. **Linting and fixing regex in codebases** — run `lint` to catch performance and safety issues (catastrophic backtracking, unanchored patterns), then `fix` to auto-correct them
4. **Converting regex across languages** — use `convert` to translate patterns between JavaScript, Python, PCRE, and other flavors when porting code
5. **Documenting regex usage in projects** — log patterns with `template`, generate `report` summaries, and `export` data for documentation or audits
## Examples
```bash
# Check a regex pattern for issues
regexr check "^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z]{2,}$ — email validation"
# Validate regex syntax
regexr validate "(?<=@)[a-z]+\.com — lookbehind syntax OK"
# Generate a pattern from description
regexr generate "match IPv4 addresses: \d{1,3}(\.\d{1,3}){3}"
# Explain a complex regex
regexr explain "^(?=.*[A-Z])(?=.*\d).{8,}$ — password: 1 uppercase, 1 digit, 8+ chars"
# Lint for performance issues
regexr lint "(a+)+ — warning: catastrophic backtracking possible"
# Convert between flavors
regexr convert "JS→Python: /\d+/g becomes re.findall(r'\d+', text)"
# Fix common issues
regexr fix "added anchors: ^pattern$ and escaped special chars"
# Preview matches
regexr preview "pattern=[0-9]{3}-[0-9]{4} matched: 555-1234, 800-9999"
# View summary statistics
regexr stats
# Export all data as JSON
regexr export json
# Search logged patterns
regexr search "email"
```
## Output
All commands output to stdout. Redirect to a file if needed:
```bash
regexr report "weekly pattern audit" > report.txt
regexr export csv # saves to ~/.local/share/regexr/export.csv
```
## Configuration
Set `DATA_DIR` by modifying the script, or use the default: `~/.local/share/regexr/`
---
Powered by BytesAgain | bytesagain.com | [email protected]
FILE:scripts/script.sh
#!/usr/bin/env bash
# Regexr — devtools tool
# Powered by BytesAgain | bytesagain.com | [email protected]
set -euo pipefail
DATA_DIR="HOME/.local/share/regexr"
mkdir -p "$DATA_DIR"
_log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; }
_version() { echo "regexr v2.0.0"; }
_help() {
echo "Regexr v2.0.0 — devtools toolkit"
echo ""
echo "Usage: regexr <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 "=== Regexr 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 "=== Regexr 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 "=== Regexr 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: regexr 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: regexr 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 " [Regexr] 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: regexr 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 " [Regexr] 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: regexr 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 " [Regexr] 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: regexr 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 " [Regexr] 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: regexr 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 " [Regexr] 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: regexr 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 " [Regexr] 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: regexr 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 " [Regexr] 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: regexr 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 " [Regexr] 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: regexr 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 " [Regexr] 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: regexr 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 " [Regexr] 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: regexr 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 " [Regexr] 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: regexr 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 " [Regexr] 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 'regexr help'"
exit 1
;;
esacGenerate and preview CSS shadow effects using CLI tools. Use when you need box-shadow, text-shadow, drop-shadow, layered shadows, presets, animations,
--- name: shadow version: "1.0.0" description: "Generate and preview CSS shadow effects using CLI tools. Use when you need box-shadow, text-shadow, drop-shadow, layered shadows, presets, animations," author: BytesAgain homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills tags: - css - shadow - design - frontend - generator --- # Shadow — CSS Shadow Effect Generator A powerful CLI tool for generating, previewing, and managing CSS shadow effects. Supports box-shadow, text-shadow, drop-shadow, inset shadows, multi-layer effects, presets, random generation, animation keyframes, and export to CSS/JSON. ## Prerequisites - Python 3.8+ - Bash shell ## Data Storage All saved shadow presets and configurations are persisted in `~/.shadow/data.jsonl`. Each line is a JSON object representing a shadow definition with its parameters. ## Commands Run all commands via the script at `scripts/script.sh`. ### `box` Generate a CSS box-shadow value. ```bash bash scripts/script.sh box [--x 0] [--y 4] [--blur 8] [--spread 0] [--color "rgba(0,0,0,0.2)"] [--name my-shadow] [--save] ``` ### `text` Generate a CSS text-shadow value. ```bash bash scripts/script.sh text [--x 1] [--y 1] [--blur 2] [--color "#333"] [--name heading-shadow] [--save] ``` ### `drop` Generate a CSS drop-shadow filter value. ```bash bash scripts/script.sh drop [--x 0] [--y 4] [--blur 8] [--color "rgba(0,0,0,0.3)"] [--name drop1] [--save] ``` ### `inset` Generate an inset box-shadow value. ```bash bash scripts/script.sh inset [--x 0] [--y 2] [--blur 4] [--spread 0] [--color "rgba(0,0,0,0.1)"] [--name inner] [--save] ``` ### `layer` Combine multiple shadows into a layered effect. ```bash bash scripts/script.sh layer <shadow_name1> <shadow_name2> [shadow_name3...] [--name layered] [--save] ``` ### `preset` List or apply built-in shadow presets (material, neumorphism, flat, elevated, etc.). ```bash bash scripts/script.sh preset [list|apply] [--name material-1] [--save] ``` ### `random` Generate a random shadow effect with optional constraints. ```bash bash scripts/script.sh random [--type box|text|drop] [--layers 1-3] [--save] [--name random1] ``` ### `animate` Generate CSS animation keyframes for shadow transitions. ```bash bash scripts/script.sh animate <shadow_name_from> <shadow_name_to> [--duration 0.3s] [--name hover-effect] ``` ### `export` Export saved shadows to CSS, JSON, or SCSS format. ```bash bash scripts/script.sh export [--format css|json|scss] [--name specific-shadow] [--all] ``` ### `preview` Preview a shadow as ASCII art or generate an HTML preview file. ```bash bash scripts/script.sh preview <shadow_name> [--html] [--output preview.html] ``` ### `help` Show usage information and available commands. ```bash bash scripts/script.sh help ``` ### `version` Show the current version of the shadow tool. ```bash bash scripts/script.sh version ``` ## Workflow Example ```bash # Generate a box shadow bash scripts/script.sh box --x 0 --y 4 --blur 12 --color "rgba(0,0,0,0.15)" --name card --save # Generate an inset shadow bash scripts/script.sh inset --x 0 --y 2 --blur 4 --color "rgba(0,0,0,0.08)" --name inner --save # Layer them bash scripts/script.sh layer card inner --name card-combo --save # Preview bash scripts/script.sh preview card-combo --html --output card-preview.html # Export all as CSS bash scripts/script.sh export --format css --all ``` ## Built-in Presets - **material-1** through **material-5**: Google Material Design elevation shadows - **neumorphism**: Soft UI neumorphic effect - **flat**: Minimal flat shadow - **elevated**: Strong elevation effect - **glow**: Colored glow effect ## Notes - All shadows are saved locally for reuse and composition. - Export supports CSS custom properties format for design systems. - Animation keyframes work with any saved shadow pair. --- Powered by BytesAgain | bytesagain.com | [email protected] FILE:scripts/script.sh #!/usr/bin/env bash # shadow/scripts/script.sh — CSS Shadow Effect Generator # Version: 1.0.0 # Data: ~/.shadow/data.jsonl set -euo pipefail VERSION="1.0.0" DATA_DIR="$HOME/.shadow" DATA_FILE="$DATA_DIR/data.jsonl" mkdir -p "$DATA_DIR" touch "$DATA_FILE" # ─── usage ─────────────────────────────────────────────────────────────────── usage() { cat <<'EOF' shadow — CSS Shadow Effect Generator v1.0.0 Usage: script.sh <command> [options] Commands: box Generate a CSS box-shadow value text Generate a CSS text-shadow value drop Generate a CSS drop-shadow filter value inset Generate an inset box-shadow value layer Combine multiple shadows into a layered effect preset List or apply built-in shadow presets random Generate a random shadow effect animate Generate CSS animation keyframes for shadow transitions export Export saved shadows to CSS, JSON, or SCSS preview Preview a shadow as ASCII art or HTML help Show this help message version Show version Run 'script.sh <command> --help' for details on each command. EOF } # ─── main dispatch ─────────────────────────────────────────────────────────── CMD="-help" shift || true case "$CMD" in box|text|drop|inset|layer|preset|random|animate|export|preview) python3 - "$CMD" "$@" << 'PYEOF' #!/usr/bin/env python3 """shadow — CSS Shadow Effect Generator (Python core)""" import sys import os import json import random import datetime import argparse import colorsys import re VERSION = "1.0.0" DATA_DIR = os.path.expanduser("~/.shadow") DATA_FILE = os.path.join(DATA_DIR, "data.jsonl") os.makedirs(DATA_DIR, exist_ok=True) if not os.path.exists(DATA_FILE): open(DATA_FILE, "a").close() # ── helpers ────────────────────────────────────────────────────────────────── def load_all(): """Load all shadow records from data.jsonl.""" records = [] if os.path.exists(DATA_FILE): with open(DATA_FILE, "r") as f: for line in f: line = line.strip() if line: try: records.append(json.loads(line)) except json.JSONDecodeError: continue return records def save_record(record): """Append a shadow record to data.jsonl, replacing if same name exists.""" records = load_all() records = [r for r in records if r.get("name") != record.get("name")] records.append(record) with open(DATA_FILE, "w") as f: for r in records: f.write(json.dumps(r) + "\n") def find_record(name): """Find a record by name.""" for r in load_all(): if r.get("name") == name: return r return None def timestamp(): return datetime.datetime.utcnow().isoformat() + "Z" def parse_color(c): """Return a valid CSS color string.""" if c is None: return "rgba(0,0,0,0.2)" return c # ── shadow value builders ──────────────────────────────────────────────────── def build_box_shadow(x=0, y=4, blur=8, spread=0, color="rgba(0,0,0,0.2)", inset=False): parts = [] if inset: parts.append("inset") parts.extend([f"{x}px", f"{y}px", f"{blur}px", f"{spread}px", color]) return " ".join(parts) def build_text_shadow(x=1, y=1, blur=2, color="#333"): return f"{x}px {y}px {blur}px {color}" def build_drop_shadow(x=0, y=4, blur=8, color="rgba(0,0,0,0.3)"): return f"drop-shadow({x}px {y}px {blur}px {color})" # ── presets ────────────────────────────────────────────────────────────────── PRESETS = { "material-1": { "type": "box", "css": "0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24)", "description": "Material Design elevation 1", }, "material-2": { "type": "box", "css": "0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23)", "description": "Material Design elevation 2", }, "material-3": { "type": "box", "css": "0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23)", "description": "Material Design elevation 3", }, "material-4": { "type": "box", "css": "0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22)", "description": "Material Design elevation 4", }, "material-5": { "type": "box", "css": "0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22)", "description": "Material Design elevation 5", }, "neumorphism": { "type": "box", "css": "8px 8px 16px rgba(0,0,0,0.1), -8px -8px 16px rgba(255,255,255,0.7)", "description": "Soft UI neumorphic effect", }, "flat": { "type": "box", "css": "0 1px 2px rgba(0,0,0,0.1)", "description": "Minimal flat shadow", }, "elevated": { "type": "box", "css": "0 20px 60px rgba(0,0,0,0.3), 0 8px 20px rgba(0,0,0,0.15)", "description": "Strong elevation effect", }, "glow": { "type": "box", "css": "0 0 20px rgba(98,0,238,0.4), 0 0 60px rgba(98,0,238,0.2)", "description": "Colored glow effect", }, } # ── command handlers ───────────────────────────────────────────────────────── def cmd_box(args): parser = argparse.ArgumentParser(prog="shadow box", description="Generate CSS box-shadow") parser.add_argument("--x", type=int, default=0, help="Horizontal offset (px)") parser.add_argument("--y", type=int, default=4, help="Vertical offset (px)") parser.add_argument("--blur", type=int, default=8, help="Blur radius (px)") parser.add_argument("--spread", type=int, default=0, help="Spread radius (px)") parser.add_argument("--color", type=str, default="rgba(0,0,0,0.2)", help="Shadow color") parser.add_argument("--name", type=str, default=None, help="Name for this shadow") parser.add_argument("--save", action="store_true", help="Save to data file") opts = parser.parse_args(args) css_value = build_box_shadow(opts.x, opts.y, opts.blur, opts.spread, opts.color) name = opts.name or f"box-{opts.x}-{opts.y}-{opts.blur}" record = { "name": name, "type": "box", "params": {"x": opts.x, "y": opts.y, "blur": opts.blur, "spread": opts.spread, "color": opts.color}, "css_property": "box-shadow", "css_value": css_value, "created_at": timestamp(), } print(f"box-shadow: {css_value};") print(f"Name: {name}") if opts.save: save_record(record) print(f"✅ Saved to {DATA_FILE}") def cmd_text(args): parser = argparse.ArgumentParser(prog="shadow text", description="Generate CSS text-shadow") parser.add_argument("--x", type=int, default=1, help="Horizontal offset (px)") parser.add_argument("--y", type=int, default=1, help="Vertical offset (px)") parser.add_argument("--blur", type=int, default=2, help="Blur radius (px)") parser.add_argument("--color", type=str, default="#333", help="Shadow color") parser.add_argument("--name", type=str, default=None, help="Name for this shadow") parser.add_argument("--save", action="store_true", help="Save to data file") opts = parser.parse_args(args) css_value = build_text_shadow(opts.x, opts.y, opts.blur, opts.color) name = opts.name or f"text-{opts.x}-{opts.y}-{opts.blur}" record = { "name": name, "type": "text", "params": {"x": opts.x, "y": opts.y, "blur": opts.blur, "color": opts.color}, "css_property": "text-shadow", "css_value": css_value, "created_at": timestamp(), } print(f"text-shadow: {css_value};") print(f"Name: {name}") if opts.save: save_record(record) print(f"✅ Saved to {DATA_FILE}") def cmd_drop(args): parser = argparse.ArgumentParser(prog="shadow drop", description="Generate CSS drop-shadow filter") parser.add_argument("--x", type=int, default=0, help="Horizontal offset (px)") parser.add_argument("--y", type=int, default=4, help="Vertical offset (px)") parser.add_argument("--blur", type=int, default=8, help="Blur radius (px)") parser.add_argument("--color", type=str, default="rgba(0,0,0,0.3)", help="Shadow color") parser.add_argument("--name", type=str, default=None, help="Name for this shadow") parser.add_argument("--save", action="store_true", help="Save to data file") opts = parser.parse_args(args) css_value = build_drop_shadow(opts.x, opts.y, opts.blur, opts.color) name = opts.name or f"drop-{opts.x}-{opts.y}-{opts.blur}" record = { "name": name, "type": "drop", "params": {"x": opts.x, "y": opts.y, "blur": opts.blur, "color": opts.color}, "css_property": "filter", "css_value": css_value, "created_at": timestamp(), } print(f"filter: {css_value};") print(f"Name: {name}") if opts.save: save_record(record) print(f"✅ Saved to {DATA_FILE}") def cmd_inset(args): parser = argparse.ArgumentParser(prog="shadow inset", description="Generate inset box-shadow") parser.add_argument("--x", type=int, default=0, help="Horizontal offset (px)") parser.add_argument("--y", type=int, default=2, help="Vertical offset (px)") parser.add_argument("--blur", type=int, default=4, help="Blur radius (px)") parser.add_argument("--spread", type=int, default=0, help="Spread radius (px)") parser.add_argument("--color", type=str, default="rgba(0,0,0,0.1)", help="Shadow color") parser.add_argument("--name", type=str, default=None, help="Name for this shadow") parser.add_argument("--save", action="store_true", help="Save to data file") opts = parser.parse_args(args) css_value = build_box_shadow(opts.x, opts.y, opts.blur, opts.spread, opts.color, inset=True) name = opts.name or f"inset-{opts.x}-{opts.y}-{opts.blur}" record = { "name": name, "type": "inset", "params": {"x": opts.x, "y": opts.y, "blur": opts.blur, "spread": opts.spread, "color": opts.color}, "css_property": "box-shadow", "css_value": css_value, "created_at": timestamp(), } print(f"box-shadow: {css_value};") print(f"Name: {name}") if opts.save: save_record(record) print(f"✅ Saved to {DATA_FILE}") def cmd_layer(args): parser = argparse.ArgumentParser(prog="shadow layer", description="Combine multiple shadows") parser.add_argument("shadows", nargs="+", help="Names of shadows to combine") parser.add_argument("--name", type=str, default=None, help="Name for the layered shadow") parser.add_argument("--save", action="store_true", help="Save to data file") opts = parser.parse_args(args) shadow_names = opts.shadows found = [] for sn in shadow_names: rec = find_record(sn) if rec is None: print(f"❌ Shadow '{sn}' not found. Save it first.") sys.exit(1) found.append(rec) # only box-shadow and inset types can be layered directly css_parts = [] for rec in found: css_parts.append(rec["css_value"]) combined = ", ".join(css_parts) name = opts.name or "layered-" + "-".join(shadow_names) record = { "name": name, "type": "layer", "layers": shadow_names, "css_property": "box-shadow", "css_value": combined, "created_at": timestamp(), } print(f"box-shadow: {combined};") print(f"Name: {name}") print(f"Layers: {', '.join(shadow_names)}") if opts.save: save_record(record) print(f"✅ Saved to {DATA_FILE}") def cmd_preset(args): parser = argparse.ArgumentParser(prog="shadow preset", description="List or apply presets") parser.add_argument("action", nargs="?", default="list", choices=["list", "apply"]) parser.add_argument("--name", type=str, default=None, help="Preset name") parser.add_argument("--save", action="store_true", help="Save applied preset") opts = parser.parse_args(args) if opts.action == "list": print("Available presets:") print(f"{'Name':<20} {'Description'}") print("-" * 60) for pname, pdata in PRESETS.items(): print(f"{pname:<20} {pdata['description']}") return # apply if not opts.name: print("❌ --name is required for apply") sys.exit(1) if opts.name not in PRESETS: print(f"❌ Unknown preset: {opts.name}") print(f"Available: {', '.join(PRESETS.keys())}") sys.exit(1) preset = PRESETS[opts.name] print(f"box-shadow: {preset['css']};") print(f"/* {preset['description']} */") if opts.save: record = { "name": opts.name, "type": preset["type"], "params": {"preset": opts.name}, "css_property": "box-shadow", "css_value": preset["css"], "created_at": timestamp(), } save_record(record) print(f"✅ Saved preset '{opts.name}' to {DATA_FILE}") def cmd_random(args): parser = argparse.ArgumentParser(prog="shadow random", description="Generate random shadow") parser.add_argument("--type", dest="shadow_type", choices=["box", "text", "drop"], default="box") parser.add_argument("--layers", type=str, default="1", help="Number of layers, e.g. '1-3'") parser.add_argument("--save", action="store_true") parser.add_argument("--name", type=str, default=None) opts = parser.parse_args(args) # parse layers range if "-" in opts.layers: lo, hi = opts.layers.split("-") num_layers = random.randint(int(lo), int(hi)) else: num_layers = int(opts.layers) def rand_color(): r, g, b = random.randint(0, 255), random.randint(0, 255), random.randint(0, 255) a = round(random.uniform(0.1, 0.5), 2) return f"rgba({r},{g},{b},{a})" parts = [] for _ in range(max(1, num_layers)): x = random.randint(-20, 20) y = random.randint(-20, 20) blur = random.randint(0, 40) spread = random.randint(-5, 15) color = rand_color() if opts.shadow_type == "box": parts.append(build_box_shadow(x, y, blur, spread, color)) elif opts.shadow_type == "text": parts.append(build_text_shadow(x, y, blur, color)) elif opts.shadow_type == "drop": parts.append(build_drop_shadow(x, y, blur, color)) css_value = ", ".join(parts) name = opts.name or f"random-{opts.shadow_type}-{random.randint(1000,9999)}" prop_map = {"box": "box-shadow", "text": "text-shadow", "drop": "filter"} css_property = prop_map.get(opts.shadow_type, "box-shadow") record = { "name": name, "type": opts.shadow_type, "params": {"random": True, "layers": num_layers}, "css_property": css_property, "css_value": css_value, "created_at": timestamp(), } print(f"{css_property}: {css_value};") print(f"Name: {name}") print(f"Layers: {num_layers}") if opts.save: save_record(record) print(f"✅ Saved to {DATA_FILE}") def cmd_animate(args): parser = argparse.ArgumentParser(prog="shadow animate", description="Generate CSS animation keyframes") parser.add_argument("shadow_from", help="Starting shadow name") parser.add_argument("shadow_to", help="Ending shadow name") parser.add_argument("--duration", type=str, default="0.3s", help="Animation duration") parser.add_argument("--name", type=str, default=None, help="Animation name") opts = parser.parse_args(args) rec_from = find_record(opts.shadow_from) rec_to = find_record(opts.shadow_to) if not rec_from: print(f"❌ Shadow '{opts.shadow_from}' not found.") sys.exit(1) if not rec_to: print(f"❌ Shadow '{opts.shadow_to}' not found.") sys.exit(1) anim_name = opts.name or f"shadow-{opts.shadow_from}-to-{opts.shadow_to}" prop = rec_from.get("css_property", "box-shadow") css = f"""@keyframes {anim_name} {{ 0% {{ {prop}: {rec_from['css_value']}; }} 100% {{ {prop}: {rec_to['css_value']}; }} }} .{anim_name} {{ animation: {anim_name} {opts.duration} ease-in-out; }} /* Hover usage example */ .shadow-hover {{ {prop}: {rec_from['css_value']}; transition: {prop} {opts.duration} ease-in-out; }} .shadow-hover:hover {{ {prop}: {rec_to['css_value']}; }}""" print(css) print(f"\n/* Animation: {anim_name} | Duration: {opts.duration} */") def cmd_export(args): parser = argparse.ArgumentParser(prog="shadow export", description="Export shadows") parser.add_argument("--format", choices=["css", "json", "scss"], default="css") parser.add_argument("--name", type=str, default=None, help="Export specific shadow") parser.add_argument("--all", action="store_true", help="Export all shadows") opts = parser.parse_args(args) records = load_all() if opts.name: records = [r for r in records if r.get("name") == opts.name] if not records: print("❌ No shadows found to export.") sys.exit(1) if opts.format == "css": print(":root {") for r in records: safe = r["name"].replace(" ", "-") print(f" --shadow-{safe}: {r['css_value']};") print("}") print() for r in records: safe = r["name"].replace(" ", "-") prop = r.get("css_property", "box-shadow") print(f".shadow-{safe} {{") print(f" {prop}: {r['css_value']};") print("}") elif opts.format == "scss": for r in records: safe = r["name"].replace(" ", "-") print(f"$shadow-{safe}: {r['css_value']};") print() for r in records: safe = r["name"].replace(" ", "-") prop = r.get("css_property", "box-shadow") print(f".shadow-{safe} {{") print(f" {prop}: $shadow-{safe};") print("}") elif opts.format == "json": output = [] for r in records: output.append({ "name": r["name"], "type": r.get("type", "box"), "css_property": r.get("css_property", "box-shadow"), "css_value": r["css_value"], }) print(json.dumps(output, indent=2)) def cmd_preview(args): parser = argparse.ArgumentParser(prog="shadow preview", description="Preview a shadow") parser.add_argument("shadow_name", help="Name of shadow to preview") parser.add_argument("--html", action="store_true", help="Generate HTML preview") parser.add_argument("--output", type=str, default=None, help="Output file path") opts = parser.parse_args(args) rec = find_record(opts.shadow_name) if not rec: print(f"❌ Shadow '{opts.shadow_name}' not found.") sys.exit(1) prop = rec.get("css_property", "box-shadow") val = rec["css_value"] if opts.html: html_content = f"""<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Shadow Preview: {rec['name']}</title> <style> body {{ display: flex; justify-content: center; align-items: center; min-height: 100vh; background: #f0f0f0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; margin: 0; flex-direction: column; gap: 24px; }} .preview-card {{ width: 280px; height: 180px; background: #ffffff; border-radius: 12px; {prop}: {val}; display: flex; align-items: center; justify-content: center; color: #666; font-size: 14px; }} .css-code {{ background: #1e1e1e; color: #d4d4d4; padding: 16px 24px; border-radius: 8px; font-family: 'Courier New', monospace; font-size: 13px; white-space: pre; }} h2 {{ color: #333; margin: 0; }} </style> </head> <body> <h2>{rec['name']}</h2> <div class="preview-card">Shadow Preview</div> <div class="css-code">{prop}: {val};</div> </body> </html>""" if opts.output: with open(opts.output, "w") as f: f.write(html_content) print(f"✅ HTML preview written to {opts.output}") else: print(html_content) else: # ASCII art preview print(f"┌─────────────────────────────┐") print(f"│ │") print(f"│ Shadow: {rec['name']:<15}│") print(f"│ Type: {rec.get('type','?'):<15}│") print(f"│ │") print(f"└─────────────────────────────┘") print(f" ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░") print(f" ░░░░░░░░░░░░░░░░░░░░░░░░░░░░") print() print(f"{prop}: {val};") # ── dispatch ───────────────────────────────────────────────────────────────── def main(): if len(sys.argv) < 2: print("Missing command.") sys.exit(1) cmd = sys.argv[1] rest = sys.argv[2:] dispatch = { "box": cmd_box, "text": cmd_text, "drop": cmd_drop, "inset": cmd_inset, "layer": cmd_layer, "preset": cmd_preset, "random": cmd_random, "animate": cmd_animate, "export": cmd_export, "preview": cmd_preview, } handler = dispatch.get(cmd) if handler: handler(rest) else: print(f"Unknown command: {cmd}") sys.exit(1) if __name__ == "__main__": main() PYEOF ;; help) usage ;; version) echo "shadow vVERSION" ;; *) echo "❌ Unknown command: $CMD" echo "Run 'script.sh help' for usage." exit 1 ;; esac
Reference tool for devtools — covers intro, quickstart, patterns and more. Quick lookup for Profit concepts, best practices, and implementation patterns.
--- name: "profit" version: "2.0.1" description: "Reference tool for devtools — covers intro, quickstart, patterns and more. Quick lookup for Profit concepts, best practices, and implementation patterns." author: "BytesAgain" homepage: "https://bytesagain.com" source: "https://github.com/bytesagain/ai-skills" tags: [profit, reference] category: "devtools" --- # Profit Reference tool for devtools — covers intro, quickstart, patterns and more. Quick lookup for Profit 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 # profit — Profit reference tool. Use when working with profit in devtools contexts. # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail VERSION="2.0.0" show_help() { cat << 'HELPEOF' profit v$VERSION — Profit Reference Tool Usage: profit <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' # Profit — Overview ## What is Profit? Profit (profit) is a specialized tool/concept in the devtools domain. It provides essential capabilities for professionals working with profit. ## Key Concepts - Core profit principles and fundamentals - How profit fits into the broader devtools ecosystem - Essential terminology every practitioner should know ## Why Profit Matters Understanding profit 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 profit concepts 2. Learn the standard tools and interfaces 3. Practice with common scenarios 4. Review safety and compliance requirements EOF } cmd_quickstart() { cat << 'EOF' # Profit — Quick Start Guide ## Prerequisites - Basic understanding of devtools concepts - Required tools and access credentials - System meeting minimum requirements ## Installation 1. Download or clone the profit 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' # Profit — Common Patterns & Best Practices ## Design Patterns 1. **Standard Pattern**: The most common approach for profit 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' # Profit — 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' # Profit — 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' # Profit — 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' # Profit — 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' # Profit — 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 "profit v$VERSION — Powered by BytesAgain" ;; *) echo "Unknown: $CMD"; echo "Run: profit help"; exit 1 ;; esac
Reference tool for devtools — covers intro, quickstart, patterns and more. Quick lookup for Funnlp concepts, best practices, and implementation patterns.
--- name: "funnlp" version: "2.0.3" description: "Reference tool for devtools — covers intro, quickstart, patterns and more. Quick lookup for Funnlp concepts, best practices, and implementation patterns." author: "BytesAgain" homepage: "https://bytesagain.com" source: "https://github.com/bytesagain/ai-skills" tags: [funnlp, reference] category: "devtools" --- # Funnlp Reference tool for devtools — covers intro, quickstart, patterns and more. Quick lookup for Funnlp 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 # funnlp — Funnlp reference tool. Use when working with funnlp in devtools contexts. # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail VERSION="2.0.2" show_help() { cat << 'HELPEOF' funnlp v$VERSION — Funnlp Reference Tool Usage: funnlp <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' # Funnlp — Overview ## What is Funnlp? Funnlp (funnlp) is a specialized tool/concept in the devtools domain. It provides essential capabilities for professionals working with funnlp. ## Key Concepts - Core funnlp principles and fundamentals - How funnlp fits into the broader devtools ecosystem - Essential terminology every practitioner should know ## Why Funnlp Matters Understanding funnlp 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 funnlp concepts 2. Learn the standard tools and interfaces 3. Practice with common scenarios 4. Review safety and compliance requirements EOF } cmd_quickstart() { cat << 'EOF' # Funnlp — Quick Start Guide ## Prerequisites - Basic understanding of devtools concepts - Required tools and access credentials - System meeting minimum requirements ## Installation 1. Download or clone the funnlp 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' # Funnlp — Common Patterns & Best Practices ## Design Patterns 1. **Standard Pattern**: The most common approach for funnlp 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' # Funnlp — 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' # Funnlp — 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' # Funnlp — 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' # Funnlp — 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' # Funnlp — 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 "funnlp v$VERSION — Powered by BytesAgain" ;; *) echo "Unknown: $CMD"; echo "Run: funnlp help"; exit 1 ;; esac
Design beautiful GitHub profile READMEs with templates. Use when styling profiles, validating badges, generating stat widgets, formatting bio sections.
--- version: "2.0.0" name: readme-maker description: "Design beautiful GitHub profile READMEs with templates. Use when styling profiles, validating badges, generating stat widgets, formatting bio sections." --- # Readme Maker Developer tools CLI for checking, validating, generating, and formatting README files and documentation. Lint your markdown, generate templates, convert between formats, diff versions, preview output, fix common issues, and produce reports — all from the command line with persistent local logging. ## Commands Run `readme-maker <command> [args]` to use. | Command | Description | |---------|-------------| | `check` | Check README files for completeness and common issues | | `validate` | Validate markdown structure and formatting rules | | `generate` | Generate README content from project metadata | | `format` | Format and beautify markdown content | | `lint` | Lint markdown for style and syntax issues | | `explain` | Explain markdown elements or README sections | | `convert` | Convert between documentation formats | | `template` | Apply or manage README templates | | `diff` | Diff two README versions or sections | | `preview` | Preview rendered markdown output | | `fix` | Auto-fix common README issues | | `report` | Generate documentation quality reports | | `stats` | Show summary statistics across all categories | | `export <fmt>` | Export data in json, csv, or txt format | | `search <term>` | Search across all logged entries | | `recent` | Show recent activity from history log | | `status` | Health check — version, data dir, disk usage | | `help` | Show help and available commands | | `version` | Show version (v2.0.0) | Each domain command (check, validate, generate, etc.) works in two modes: - **Without arguments**: displays the most recent 20 entries from that category - **With arguments**: logs the input with a timestamp and saves to the category log file ## Data Storage All data is stored locally in `~/.local/share/readme-maker/`: - Each command creates its own log file (e.g., `check.log`, `generate.log`, `lint.log`) - A unified `history.log` tracks all activity across commands - Entries are stored in `timestamp|value` pipe-delimited format - Export supports JSON, CSV, and plain text formats ## Requirements - Bash 4+ with `set -euo pipefail` strict mode - Standard Unix utilities: `date`, `wc`, `du`, `tail`, `grep`, `sed`, `cat` - No external dependencies or API keys required ## When to Use 1. **Starting a new project** — generate a README from a template, then lint and format it to ensure quality before committing 2. **Auditing existing documentation** — check and validate your README for missing sections (license, contributing, install instructions) and auto-fix common issues 3. **Converting documentation formats** — convert README content between markdown, reStructuredText, or other formats as part of a docs pipeline 4. **Comparing README changes** — diff two versions of your README to review what changed across releases or branches 5. **CI/CD documentation quality gates** — integrate lint and validate commands into your pipeline to enforce documentation standards on every PR ## Examples ```bash # Check a README for completeness readme-maker check "missing: license section, contributing guide, badges" # Validate markdown structure readme-maker validate "## headers OK, links 3/3 valid, images 1/1 accessible" # Generate README from project info readme-maker generate "name=my-app lang=python license=MIT" # Lint for style issues readme-maker lint "line 42: trailing whitespace; line 58: no blank line before heading" # Format markdown content readme-maker format "normalized headings, fixed list indentation, wrapped at 80 cols" # Apply a template readme-maker template "minimal — added: title, description, install, usage, license" # Preview rendered output readme-maker preview "rendered 128 lines, 3 code blocks, 2 tables" # View summary statistics readme-maker stats # Export all data as JSON readme-maker export json # Search for specific entries readme-maker search "license" ``` ## Output All commands output to stdout. Redirect to a file if needed: ```bash readme-maker report "weekly audit" > report.txt readme-maker export csv # saves to ~/.local/share/readme-maker/export.csv ``` ## Configuration Set `DATA_DIR` by modifying the script, or use the default: `~/.local/share/readme-maker/` --- Powered by BytesAgain | bytesagain.com | [email protected] FILE:scripts/script.sh #!/usr/bin/env bash # Readme Maker — devtools tool # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail DATA_DIR="HOME/.local/share/readme-maker" mkdir -p "$DATA_DIR" _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } _version() { echo "readme-maker v2.0.0"; } _help() { echo "Readme Maker v2.0.0 — devtools toolkit" echo "" echo "Usage: readme-maker <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 "=== Readme Maker 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 "=== Readme Maker 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 "=== Readme Maker 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: readme-maker 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: readme-maker 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 " [Readme Maker] 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: readme-maker 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 " [Readme Maker] 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: readme-maker 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 " [Readme Maker] 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: readme-maker 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 " [Readme Maker] 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: readme-maker 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 " [Readme Maker] 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: readme-maker 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 " [Readme Maker] 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: readme-maker 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 " [Readme Maker] 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: readme-maker 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 " [Readme Maker] 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: readme-maker 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 " [Readme Maker] 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: readme-maker 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 " [Readme Maker] 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: readme-maker 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 " [Readme Maker] 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: readme-maker 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 " [Readme Maker] 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 'readme-maker help'" exit 1 ;; esac
Reference tool for devtools — covers intro, quickstart, patterns and more. Quick lookup for Mychef concepts, best practices, and implementation patterns.
--- name: "mychef" version: "2.0.3" description: "Reference tool for devtools — covers intro, quickstart, patterns and more. Quick lookup for Mychef concepts, best practices, and implementation patterns." author: "BytesAgain" homepage: "https://bytesagain.com" source: "https://github.com/bytesagain/ai-skills" tags: [mychef, reference] category: "devtools" --- # Mychef Reference tool for devtools — covers intro, quickstart, patterns and more. Quick lookup for Mychef 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 # mychef — Mychef reference tool. Use when working with mychef in devtools contexts. # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail VERSION="2.0.2" show_help() { cat << 'HELPEOF' mychef v$VERSION — Mychef Reference Tool Usage: mychef <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' # Mychef — Overview ## What is Mychef? Mychef (mychef) is a specialized tool/concept in the devtools domain. It provides essential capabilities for professionals working with mychef. ## Key Concepts - Core mychef principles and fundamentals - How mychef fits into the broader devtools ecosystem - Essential terminology every practitioner should know ## Why Mychef Matters Understanding mychef 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 mychef concepts 2. Learn the standard tools and interfaces 3. Practice with common scenarios 4. Review safety and compliance requirements EOF } cmd_quickstart() { cat << 'EOF' # Mychef — Quick Start Guide ## Prerequisites - Basic understanding of devtools concepts - Required tools and access credentials - System meeting minimum requirements ## Installation 1. Download or clone the mychef 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' # Mychef — Common Patterns & Best Practices ## Design Patterns 1. **Standard Pattern**: The most common approach for mychef 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' # Mychef — 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' # Mychef — 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' # Mychef — 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' # Mychef — 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' # Mychef — 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 "mychef v$VERSION — Powered by BytesAgain" ;; *) echo "Unknown: $CMD"; echo "Run: mychef help"; exit 1 ;; esac
Run Pomodoro sessions with break timers and productivity tracking. Use when starting focus sessions, tracking streaks, reviewing productivity.
--- version: "2.0.0" name: deepfocus description: "Run Pomodoro sessions with break timers and productivity tracking. Use when starting focus sessions, tracking streaks, reviewing productivity." --- # Deepfocus Deepfocus v2.0.0 — a productivity toolkit for managing tasks, plans, reviews, streaks, reminders, and more from the command line. ## Commands Run via: `bash scripts/script.sh <command> [args]` | Command | Description | |---------|-------------| | `add <input>` | Add a new entry (task, note, idea). Without args, shows recent entries. | | `plan <input>` | Create or view plan entries for organizing your day/week. | | `track <input>` | Track progress on goals, habits, or tasks. | | `review <input>` | Log review notes — reflect on what went well or needs improvement. | | `streak <input>` | Record streak data for habit tracking and consistency. | | `remind <input>` | Set reminders and notes for future reference. | | `prioritize <input>` | Mark and log priority levels for tasks. | | `archive <input>` | Archive completed or outdated entries. | | `tag <input>` | Tag entries with labels for easy categorization. | | `timeline <input>` | Add timeline entries for chronological tracking. | | `report <input>` | Generate or log report entries for summaries. | | `weekly-review <input>` | Log weekly review notes for end-of-week reflection. | | `stats` | Show summary statistics across all entry types. | | `export <fmt>` | Export all data in `json`, `csv`, or `txt` format. | | `search <term>` | Search across all log files for a keyword. | | `recent` | Show the 20 most recent activity entries from the history log. | | `status` | Health check — version, data directory, entry count, disk usage. | | `help` | Show the built-in help message with all available commands. | | `version` | Print the current version (`deepfocus v2.0.0`). | Each data command (add, plan, track, etc.) works in two modes: - **With arguments**: saves the input with a timestamp to its dedicated log file. - **Without arguments**: displays the 20 most recent entries from that log. ## Data Storage All data is stored locally in `~/.local/share/deepfocus/`: - Each command has its own log file (e.g., `add.log`, `plan.log`, `track.log`) - Entries are saved in `timestamp|value` format - A unified `history.log` records all activity across commands - Export files are written to the same directory ## Requirements - Bash (standard system shell) - No external dependencies — uses only coreutils (`date`, `wc`, `du`, `grep`, `tail`, `cat`) ## When to Use - When you need to quickly add tasks, plans, or notes from the terminal - To track daily habits and maintain productivity streaks - For end-of-day or weekly reviews and reflections - To set reminders and prioritize tasks without leaving the command line - To search through past entries by keyword - To export your productivity data for analysis or backup - When you want a lightweight, file-based focus and task management system ## Examples ```bash # Add a task deepfocus add "Write unit tests for the auth module" # Create a plan for the day deepfocus plan "Morning: deep work on API refactor. Afternoon: PR reviews." # Track a habit deepfocus track "Completed 45-minute focus session on documentation" # Log a review deepfocus review "Good progress on backend. Need to speed up frontend work." # Record a streak deepfocus streak "Day 15 of daily coding — still going strong" # Set a reminder deepfocus remind "Submit expense report by end of week" # Prioritize a task deepfocus prioritize "P0: Fix production memory leak" # Archive an old entry deepfocus archive "Q3 planning notes — no longer relevant" # Tag an entry deepfocus tag "meeting-notes: Sprint retrospective takeaways" # Add to timeline deepfocus timeline "Shipped v2.0 release to production" # Generate a report deepfocus report "Weekly output: 12 tasks completed, 3 carried over" # Log a weekly review deepfocus weekly-review "Best week this month — cleared the entire backlog" # View all statistics deepfocus stats # Export everything as JSON deepfocus export json # Search for entries mentioning "focus" deepfocus search focus # Check recent activity deepfocus recent # Health check deepfocus status ``` --- Powered by BytesAgain | bytesagain.com | [email protected] FILE:scripts/script.sh #!/usr/bin/env bash # Deepfocus — productivity tool # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail DATA_DIR="HOME/.local/share/deepfocus" mkdir -p "$DATA_DIR" _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } _version() { echo "deepfocus v2.0.0"; } _help() { echo "Deepfocus v2.0.0 — productivity toolkit" echo "" echo "Usage: deepfocus <command> [args]" echo "" echo "Commands:" echo " add Add" echo " plan Plan" echo " track Track" echo " review Review" echo " streak Streak" echo " remind Remind" echo " prioritize Prioritize" echo " archive Archive" echo " tag Tag" echo " timeline Timeline" echo " report Report" echo " weekly-review Weekly Review" 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 "=== Deepfocus 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 "=== Deepfocus 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 "=== Deepfocus 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: deepfocus 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: deepfocus 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 " [Deepfocus] add: $input" echo " Saved. Total add entries: $total" _log "add" "$input" fi ;; plan) shift if [ $# -eq 0 ]; then echo "Recent plan entries:" tail -20 "$DATA_DIR/plan.log" 2>/dev/null || echo " No entries yet. Use: deepfocus plan <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/plan.log" local total=$(wc -l < "$DATA_DIR/plan.log") echo " [Deepfocus] plan: $input" echo " Saved. Total plan entries: $total" _log "plan" "$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: deepfocus 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 " [Deepfocus] track: $input" echo " Saved. Total track entries: $total" _log "track" "$input" fi ;; review) shift if [ $# -eq 0 ]; then echo "Recent review entries:" tail -20 "$DATA_DIR/review.log" 2>/dev/null || echo " No entries yet. Use: deepfocus review <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/review.log" local total=$(wc -l < "$DATA_DIR/review.log") echo " [Deepfocus] review: $input" echo " Saved. Total review entries: $total" _log "review" "$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: deepfocus 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 " [Deepfocus] streak: $input" echo " Saved. Total streak entries: $total" _log "streak" "$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: deepfocus 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 " [Deepfocus] remind: $input" echo " Saved. Total remind entries: $total" _log "remind" "$input" fi ;; prioritize) shift if [ $# -eq 0 ]; then echo "Recent prioritize entries:" tail -20 "$DATA_DIR/prioritize.log" 2>/dev/null || echo " No entries yet. Use: deepfocus prioritize <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/prioritize.log" local total=$(wc -l < "$DATA_DIR/prioritize.log") echo " [Deepfocus] prioritize: $input" echo " Saved. Total prioritize entries: $total" _log "prioritize" "$input" fi ;; archive) shift if [ $# -eq 0 ]; then echo "Recent archive entries:" tail -20 "$DATA_DIR/archive.log" 2>/dev/null || echo " No entries yet. Use: deepfocus archive <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/archive.log" local total=$(wc -l < "$DATA_DIR/archive.log") echo " [Deepfocus] archive: $input" echo " Saved. Total archive entries: $total" _log "archive" "$input" fi ;; tag) shift if [ $# -eq 0 ]; then echo "Recent tag entries:" tail -20 "$DATA_DIR/tag.log" 2>/dev/null || echo " No entries yet. Use: deepfocus tag <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/tag.log" local total=$(wc -l < "$DATA_DIR/tag.log") echo " [Deepfocus] tag: $input" echo " Saved. Total tag entries: $total" _log "tag" "$input" fi ;; timeline) shift if [ $# -eq 0 ]; then echo "Recent timeline entries:" tail -20 "$DATA_DIR/timeline.log" 2>/dev/null || echo " No entries yet. Use: deepfocus timeline <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/timeline.log" local total=$(wc -l < "$DATA_DIR/timeline.log") echo " [Deepfocus] timeline: $input" echo " Saved. Total timeline entries: $total" _log "timeline" "$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: deepfocus 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 " [Deepfocus] report: $input" echo " Saved. Total report entries: $total" _log "report" "$input" fi ;; weekly-review) shift if [ $# -eq 0 ]; then echo "Recent weekly-review entries:" tail -20 "$DATA_DIR/weekly-review.log" 2>/dev/null || echo " No entries yet. Use: deepfocus weekly-review <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/weekly-review.log" local total=$(wc -l < "$DATA_DIR/weekly-review.log") echo " [Deepfocus] weekly-review: $input" echo " Saved. Total weekly-review entries: $total" _log "weekly-review" "$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 'deepfocus help'" exit 1 ;; esac
Explore CSV and JSON files with quick queries, filters, and aggregation. Use when inspecting data, running queries, filtering rows, aggregating.
--- name: DataView description: "Explore CSV and JSON files with quick queries, filters, and aggregation. Use when inspecting data, running queries, filtering rows, aggregating." version: "2.0.0" author: "BytesAgain" homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills tags: ["data","csv","json","analysis","statistics","viewer","explorer","developer"] categories: ["Developer Tools", "Data Analysis", "Utility"] --- # DataView A data processing toolkit for ingesting, transforming, querying, and managing data entries from the command line. All operations are logged with timestamps and stored locally. ## Commands ### Data Operations Each data command works in two modes: run without arguments to view recent entries, or pass input to record a new entry. | Command | Description | |---------|-------------| | `dataview ingest <input>` | Ingest data — record a new ingest entry or view recent ones | | `dataview transform <input>` | Transform data — record a transformation or view recent ones | | `dataview query <input>` | Query data — record a query or view recent ones | | `dataview filter <input>` | Filter data — record a filter operation or view recent ones | | `dataview aggregate <input>` | Aggregate data — record an aggregation or view recent ones | | `dataview visualize <input>` | Visualize data — record a visualization or view recent ones | | `dataview export <input>` | Export data — record an export entry or view recent ones | | `dataview sample <input>` | Sample data — record a sample or view recent ones | | `dataview schema <input>` | Schema management — record a schema entry or view recent ones | | `dataview validate <input>` | Validate data — record a validation or view recent ones | | `dataview pipeline <input>` | Pipeline management — record a pipeline step or view recent ones | | `dataview profile <input>` | Profile data — record a profile or view recent ones | ### Utility Commands | Command | Description | |---------|-------------| | `dataview stats` | Show summary statistics — entry counts per category, total entries, disk usage | | `dataview export <fmt>` | Export all data to a file (formats: `json`, `csv`, `txt`) | | `dataview search <term>` | Search all log files for a term (case-insensitive) | | `dataview recent` | Show last 20 entries from activity history | | `dataview status` | Health check — version, data directory, entry count, disk usage, last activity | | `dataview help` | Show available commands | | `dataview version` | Show version (v2.0.0) | ## Data Storage All data is stored locally at `~/.local/share/dataview/`: - Each data command writes to its own log file (e.g., `ingest.log`, `transform.log`) - Entries are stored as `timestamp|value` pairs (pipe-delimited) - All actions are tracked in `history.log` with timestamps - Export generates files in the data directory (`export.json`, `export.csv`, or `export.txt`) ## Requirements - Bash (with `set -euo pipefail`) - Standard Unix utilities: `date`, `wc`, `du`, `grep`, `tail`, `cat`, `sed` - No external dependencies or API keys required ## When to Use - To log and track data processing operations (ingest, transform, query, etc.) - To maintain a searchable history of data viewing and analysis activities - To export accumulated records in JSON, CSV, or plain text format - As part of larger automation or data inspection workflows - When you need a lightweight, local-only data operation tracker ## Examples ```bash # Record a new ingest entry dataview ingest "loaded sales_report.csv 2500 rows" # View recent transform entries dataview transform # Record a query dataview query "top 10 products by revenue" # Filter data dataview filter "region=APAC" # Search across all logs dataview search "sales" # Export everything as CSV dataview export csv # Check overall statistics dataview stats # View recent activity dataview recent # Health check dataview status ``` --- Powered by BytesAgain | bytesagain.com | [email protected] 💬 Feedback & Feature Requests: https://bytesagain.com/feedback FILE:scripts/script.sh #!/usr/bin/env bash # Dataview — data tool # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail DATA_DIR="HOME/.local/share/dataview" mkdir -p "$DATA_DIR" _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } _version() { echo "dataview v2.0.0"; } _help() { echo "Dataview v2.0.0 — data toolkit" echo "" echo "Usage: dataview <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 " 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 "=== Dataview 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 "=== Dataview 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 "=== Dataview 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: dataview 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 ingest) shift if [ $# -eq 0 ]; then echo "Recent ingest entries:" tail -20 "$DATA_DIR/ingest.log" 2>/dev/null || echo " No entries yet. Use: dataview 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 " [Dataview] 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: dataview 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 " [Dataview] 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: dataview 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 " [Dataview] 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: dataview 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 " [Dataview] 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: dataview 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 " [Dataview] 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: dataview 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 " [Dataview] 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: dataview 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 " [Dataview] 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: dataview 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 " [Dataview] 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: dataview 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 " [Dataview] 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: dataview 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 " [Dataview] 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: dataview 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 " [Dataview] 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: dataview 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 " [Dataview] 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: $1 — run 'dataview help'" exit 1 ;; esac
Track compliance requirements and generate audit trail reports. Use when auditing controls, checking policies, generating audit trails.
--- name: "Compliance" description: "Track compliance requirements and generate audit trail reports. Use when auditing controls, checking policies, generating audit trails." version: "2.0.0" author: "BytesAgain" homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills tags: ["encryption", "protection", "compliance", "security", "privacy"] --- # Compliance Security toolkit for logging, tracking, and exporting compliance-related activities. Each command records timestamped entries to its own log file. Call without arguments to view recent entries; call with arguments to record a new entry. ## Commands | Command | What it does | |---------|-------------| | `compliance generate <input>` | Record a generate entry (no args = show recent) | | `compliance check-strength <input>` | Record a check-strength entry (no args = show recent) | | `compliance rotate <input>` | Record a rotate entry (no args = show recent) | | `compliance audit <input>` | Record an audit entry (no args = show recent) | | `compliance store <input>` | Record a store entry (no args = show recent) | | `compliance retrieve <input>` | Record a retrieve entry (no args = show recent) | | `compliance expire <input>` | Record an expire entry (no args = show recent) | | `compliance policy <input>` | Record a policy entry (no args = show recent) | | `compliance report <input>` | Record a report entry (no args = show recent) | | `compliance hash <input>` | Record a hash entry (no args = show recent) | | `compliance verify <input>` | Record a verify entry (no args = show recent) | | `compliance revoke <input>` | Record a revoke entry (no args = show recent) | | `compliance stats` | Show summary statistics across all log files | | `compliance export <fmt>` | Export all data to json, csv, or txt format | | `compliance search <term>` | Search all log entries for a keyword | | `compliance recent` | Show the 20 most recent history entries | | `compliance status` | Health check — version, entry count, disk usage, last activity | | `compliance help` | Show help message | | `compliance version` | Show version (v2.0.0) | ## Data Storage All data is stored locally in `~/.local/share/compliance/`. Each command writes to its own `.log` file (e.g., `audit.log`, `policy.log`). A unified `history.log` tracks all activity with timestamps. ## Requirements - Bash 4+ - Standard Unix utilities (`wc`, `du`, `tail`, `grep`, `date`, `sed`) ## When to Use - Logging compliance audit findings, policy checks, and security events with timestamps - Tracking credential rotations, revocations, and strength checks over time - Recording data store/retrieve operations for audit trail purposes - Searching historical compliance entries by keyword - Exporting compliance records to JSON, CSV, or plain text for regulatory reporting ## Examples ```bash # Record an audit finding compliance audit "reviewed access controls for prod database — 3 issues found" # Log a credential rotation compliance rotate "rotated API keys for payment gateway" # Record a policy update compliance policy "updated data retention policy to 90 days" # Check password strength assessment compliance check-strength "admin account meets complexity requirements" # Search all logs for "database" compliance search database # Export compliance records to JSON compliance export json # View overall stats compliance stats ``` --- Powered by BytesAgain | bytesagain.com | [email protected] FILE:scripts/script.sh #!/usr/bin/env bash # Compliance — security tool # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail DATA_DIR="HOME/.local/share/compliance" mkdir -p "$DATA_DIR" _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } _version() { echo "compliance v2.0.0"; } _help() { echo "Compliance v2.0.0 — security toolkit" echo "" echo "Usage: compliance <command> [args]" echo "" echo "Commands:" echo " generate Generate" echo " check-strength Check Strength" echo " rotate Rotate" echo " audit Audit" echo " store Store" echo " retrieve Retrieve" echo " expire Expire" echo " policy Policy" echo " report Report" echo " hash Hash" echo " verify Verify" echo " revoke Revoke" 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 "=== Compliance 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 "=== Compliance 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 "=== Compliance 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: compliance 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 generate) shift if [ $# -eq 0 ]; then echo "Recent generate entries:" tail -20 "$DATA_DIR/generate.log" 2>/dev/null || echo " No entries yet. Use: compliance 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 " [Compliance] generate: $input" echo " Saved. Total generate entries: $total" _log "generate" "$input" fi ;; check-strength) shift if [ $# -eq 0 ]; then echo "Recent check-strength entries:" tail -20 "$DATA_DIR/check-strength.log" 2>/dev/null || echo " No entries yet. Use: compliance check-strength <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/check-strength.log" local total=$(wc -l < "$DATA_DIR/check-strength.log") echo " [Compliance] check-strength: $input" echo " Saved. Total check-strength entries: $total" _log "check-strength" "$input" fi ;; rotate) shift if [ $# -eq 0 ]; then echo "Recent rotate entries:" tail -20 "$DATA_DIR/rotate.log" 2>/dev/null || echo " No entries yet. Use: compliance rotate <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/rotate.log" local total=$(wc -l < "$DATA_DIR/rotate.log") echo " [Compliance] rotate: $input" echo " Saved. Total rotate entries: $total" _log "rotate" "$input" fi ;; audit) shift if [ $# -eq 0 ]; then echo "Recent audit entries:" tail -20 "$DATA_DIR/audit.log" 2>/dev/null || echo " No entries yet. Use: compliance audit <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/audit.log" local total=$(wc -l < "$DATA_DIR/audit.log") echo " [Compliance] audit: $input" echo " Saved. Total audit entries: $total" _log "audit" "$input" fi ;; store) shift if [ $# -eq 0 ]; then echo "Recent store entries:" tail -20 "$DATA_DIR/store.log" 2>/dev/null || echo " No entries yet. Use: compliance store <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/store.log" local total=$(wc -l < "$DATA_DIR/store.log") echo " [Compliance] store: $input" echo " Saved. Total store entries: $total" _log "store" "$input" fi ;; retrieve) shift if [ $# -eq 0 ]; then echo "Recent retrieve entries:" tail -20 "$DATA_DIR/retrieve.log" 2>/dev/null || echo " No entries yet. Use: compliance retrieve <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/retrieve.log" local total=$(wc -l < "$DATA_DIR/retrieve.log") echo " [Compliance] retrieve: $input" echo " Saved. Total retrieve entries: $total" _log "retrieve" "$input" fi ;; expire) shift if [ $# -eq 0 ]; then echo "Recent expire entries:" tail -20 "$DATA_DIR/expire.log" 2>/dev/null || echo " No entries yet. Use: compliance expire <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/expire.log" local total=$(wc -l < "$DATA_DIR/expire.log") echo " [Compliance] expire: $input" echo " Saved. Total expire entries: $total" _log "expire" "$input" fi ;; policy) shift if [ $# -eq 0 ]; then echo "Recent policy entries:" tail -20 "$DATA_DIR/policy.log" 2>/dev/null || echo " No entries yet. Use: compliance policy <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/policy.log" local total=$(wc -l < "$DATA_DIR/policy.log") echo " [Compliance] policy: $input" echo " Saved. Total policy entries: $total" _log "policy" "$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: compliance 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 " [Compliance] report: $input" echo " Saved. Total report entries: $total" _log "report" "$input" fi ;; hash) shift if [ $# -eq 0 ]; then echo "Recent hash entries:" tail -20 "$DATA_DIR/hash.log" 2>/dev/null || echo " No entries yet. Use: compliance hash <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/hash.log" local total=$(wc -l < "$DATA_DIR/hash.log") echo " [Compliance] hash: $input" echo " Saved. Total hash entries: $total" _log "hash" "$input" fi ;; verify) shift if [ $# -eq 0 ]; then echo "Recent verify entries:" tail -20 "$DATA_DIR/verify.log" 2>/dev/null || echo " No entries yet. Use: compliance verify <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/verify.log" local total=$(wc -l < "$DATA_DIR/verify.log") echo " [Compliance] verify: $input" echo " Saved. Total verify entries: $total" _log "verify" "$input" fi ;; revoke) shift if [ $# -eq 0 ]; then echo "Recent revoke entries:" tail -20 "$DATA_DIR/revoke.log" 2>/dev/null || echo " No entries yet. Use: compliance revoke <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/revoke.log" local total=$(wc -l < "$DATA_DIR/revoke.log") echo " [Compliance] revoke: $input" echo " Saved. Total revoke entries: $total" _log "revoke" "$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 'compliance help'" exit 1 ;; esac
usb reference tool
--- name: "usb" version: "2.0.2" description: "usb reference tool" author: "BytesAgain" homepage: "https://bytesagain.com" source: "https://github.com/bytesagain/ai-skills" tags: [usb, reference] category: "devtools" --- # Usb usb 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 # usb — Usb reference tool. Use when working with usb in devtools contexts. # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail VERSION="2.0.2" show_help() { cat << 'HELPEOF' usb v$VERSION — Usb Reference Tool Usage: usb <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' # Usb — Overview ## What is Usb? Usb (usb) is a specialized tool/concept in the devtools domain. It provides essential capabilities for professionals working with usb. ## Key Concepts - Core usb principles and fundamentals - How usb fits into the broader devtools ecosystem - Essential terminology every practitioner should know ## Why Usb Matters Understanding usb 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 usb concepts 2. Learn the standard tools and interfaces 3. Practice with common scenarios 4. Review safety and compliance requirements EOF } cmd_quickstart() { cat << 'EOF' # Usb — Quick Start Guide ## Prerequisites - Basic understanding of devtools concepts - Required tools and access credentials - System meeting minimum requirements ## Installation 1. Download or clone the usb 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' # Usb — Common Patterns & Best Practices ## Design Patterns 1. **Standard Pattern**: The most common approach for usb 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' # Usb — 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' # Usb — 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' # Usb — 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' # Usb — 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' # Usb — 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 "usb v$VERSION — Powered by BytesAgain" ;; *) echo "Unknown: $CMD"; echo "Run: usb help"; exit 1 ;; esac
Validate and format passport or identity document data. Use when checking fields, validating numbers, generating fixtures, linting records.
--- name: "Passport" description: "Validate and format passport or identity document data. Use when checking fields, validating numbers, generating fixtures, linting records." version: "2.0.0" author: "BytesAgain" homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills tags: ["automation", "code", "passport", "cli", "engineering"] --- # Passport Take control of Passport with this developer tools toolkit. Clean interface, local storage, zero configuration. ## Why Passport? - 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 passport help # Check current status passport status # View your statistics passport stats ``` ## Commands | Command | What it does | |---------|-------------| | `passport check` | Check | | `passport validate` | Validate | | `passport generate` | Generate | | `passport format` | Format | | `passport lint` | Lint | | `passport explain` | Explain | | `passport convert` | Convert | | `passport template` | Template | | `passport diff` | Diff | | `passport preview` | Preview | | `passport fix` | Fix | | `passport report` | Report | | `passport stats` | Summary statistics | | `passport export` | <fmt> Export (json|csv|txt) | | `passport search` | <term> Search entries | | `passport recent` | Recent activity | | `passport status` | Health check | | `passport help` | Show this help | | `passport version` | Show version | | `passport $name:` | $c entries | | `passport Total:` | $total entries | | `passport Data` | size: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1) | | `passport Version:` | v2.0.0 | | `passport Data` | dir: $DATA_DIR | | `passport Entries:` | $(cat "$DATA_DIR"/*.log 2>/dev/null | wc -l) total | | `passport Disk:` | $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1) | | `passport Last:` | $(tail -1 "$DATA_DIR/history.log" 2>/dev/null || echo never) | | `passport Status:` | OK | | `passport [Passport]` | check: $input | | `passport Saved.` | Total check entries: $total | | `passport [Passport]` | validate: $input | | `passport Saved.` | Total validate entries: $total | | `passport [Passport]` | generate: $input | | `passport Saved.` | Total generate entries: $total | | `passport [Passport]` | format: $input | | `passport Saved.` | Total format entries: $total | | `passport [Passport]` | lint: $input | | `passport Saved.` | Total lint entries: $total | | `passport [Passport]` | explain: $input | | `passport Saved.` | Total explain entries: $total | | `passport [Passport]` | convert: $input | | `passport Saved.` | Total convert entries: $total | | `passport [Passport]` | template: $input | | `passport Saved.` | Total template entries: $total | | `passport [Passport]` | diff: $input | | `passport Saved.` | Total diff entries: $total | | `passport [Passport]` | preview: $input | | `passport Saved.` | Total preview entries: $total | | `passport [Passport]` | fix: $input | | `passport Saved.` | Total fix entries: $total | | `passport [Passport]` | report: $input | | `passport Saved.` | Total report entries: $total | ## Data Storage All data is stored locally at `~/.local/share/passport/`. 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 # Passport — devtools tool # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail DATA_DIR="HOME/.local/share/passport" mkdir -p "$DATA_DIR" _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } _version() { echo "passport v2.0.0"; } _help() { echo "Passport v2.0.0 — devtools toolkit" echo "" echo "Usage: passport <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 "=== Passport 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 "=== Passport 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 "=== Passport 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: passport 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: passport 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 " [Passport] 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: passport 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 " [Passport] 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: passport 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 " [Passport] 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: passport 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 " [Passport] 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: passport 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 " [Passport] 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: passport 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 " [Passport] 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: passport 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 " [Passport] 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: passport 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 " [Passport] 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: passport 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 " [Passport] 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: passport 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 " [Passport] 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: passport 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 " [Passport] 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: passport 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 " [Passport] 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 'passport help'" exit 1 ;; esac
Record bond holdings, analyze yields, and track maturity dates. Use when managing fixed-income portfolios, comparing yields, or exporting data.
--- name: "Bonds" description: "Record bond holdings, analyze yields, and track maturity dates. Use when managing fixed-income portfolios, comparing yields, or exporting data." version: "2.0.0" author: "BytesAgain" homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills tags: ["planning", "budget", "tracking", "finance", "bonds"] --- # Bonds Bonds makes personal finance simple. Record, search, and analyze your data with clear terminal output. ## Why Bonds? - 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 bonds help # Check current status bonds status # View your statistics bonds stats ``` ## Commands | Command | What it does | |---------|-------------| | `bonds run` | Run | | `bonds check` | Check | | `bonds convert` | Convert | | `bonds analyze` | Analyze | | `bonds generate` | Generate | | `bonds preview` | Preview | | `bonds batch` | Batch | | `bonds compare` | Compare | | `bonds export` | Export | | `bonds config` | Config | | `bonds status` | Status | | `bonds report` | Report | | `bonds stats` | Summary statistics | | `bonds export` | <fmt> Export (json|csv|txt) | | `bonds search` | <term> Search entries | | `bonds recent` | Recent activity | | `bonds status` | Health check | | `bonds help` | Show this help | | `bonds version` | Show version | | `bonds $name:` | $c entries | | `bonds Total:` | $total entries | | `bonds Data` | size: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1) | | `bonds Version:` | v2.0.0 | | `bonds Data` | dir: $DATA_DIR | | `bonds Entries:` | $(cat "$DATA_DIR"/*.log 2>/dev/null | wc -l) total | | `bonds Disk:` | $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1) | | `bonds Last:` | $(tail -1 "$DATA_DIR/history.log" 2>/dev/null || echo never) | | `bonds Status:` | OK | | `bonds [Bonds]` | run: $input | | `bonds Saved.` | Total run entries: $total | | `bonds [Bonds]` | check: $input | | `bonds Saved.` | Total check entries: $total | | `bonds [Bonds]` | convert: $input | | `bonds Saved.` | Total convert entries: $total | | `bonds [Bonds]` | analyze: $input | | `bonds Saved.` | Total analyze entries: $total | | `bonds [Bonds]` | generate: $input | | `bonds Saved.` | Total generate entries: $total | | `bonds [Bonds]` | preview: $input | | `bonds Saved.` | Total preview entries: $total | | `bonds [Bonds]` | batch: $input | | `bonds Saved.` | Total batch entries: $total | | `bonds [Bonds]` | compare: $input | | `bonds Saved.` | Total compare entries: $total | | `bonds [Bonds]` | export: $input | | `bonds Saved.` | Total export entries: $total | | `bonds [Bonds]` | config: $input | | `bonds Saved.` | Total config entries: $total | | `bonds [Bonds]` | status: $input | | `bonds Saved.` | Total status entries: $total | | `bonds [Bonds]` | report: $input | | `bonds Saved.` | Total report entries: $total | ## Data Storage All data is stored locally at `~/.local/share/bonds/`. 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 # Bonds — utility tool # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail DATA_DIR="HOME/.local/share/bonds" mkdir -p "$DATA_DIR" _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } _version() { echo "bonds v2.0.0"; } _help() { echo "Bonds v2.0.0 — utility toolkit" echo "" echo "Usage: bonds <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 "=== Bonds 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 "=== Bonds 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 "=== Bonds 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: bonds 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: bonds 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 " [Bonds] 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: bonds 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 " [Bonds] 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: bonds 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 " [Bonds] 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: bonds 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 " [Bonds] 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: bonds 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 " [Bonds] 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: bonds 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 " [Bonds] 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: bonds 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 " [Bonds] 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: bonds 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 " [Bonds] 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: bonds 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 " [Bonds] 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: bonds 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 " [Bonds] 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: bonds 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 " [Bonds] 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: bonds 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 " [Bonds] 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 'bonds help'" exit 1 ;; esac
Track fridge and pantry inventory with expiry reminders and grocery lists. Use when logging groceries, checking expiry dates, or building shopping lists.
--- name: "Fridge" description: "Track fridge and pantry inventory with expiry reminders and grocery lists. Use when logging groceries, checking expiry dates, or building shopping lists." version: "2.0.0" author: "BytesAgain" homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills tags: ["maintenance", "inventory", "household", "fridge", "home"] --- # Fridge Manage Fridge data right from your terminal. Built for people who want organize your household without complex setup. ## Why Fridge? - 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 fridge help # Check current status fridge status # View your statistics fridge stats ``` ## Commands | Command | What it does | |---------|-------------| | `fridge add` | Add | | `fridge inventory` | Inventory | | `fridge schedule` | Schedule | | `fridge remind` | Remind | | `fridge checklist` | Checklist | | `fridge usage` | Usage | | `fridge cost` | Cost | | `fridge maintain` | Maintain | | `fridge log` | Log | | `fridge report` | Report | | `fridge seasonal` | Seasonal | | `fridge tips` | Tips | | `fridge stats` | Summary statistics | | `fridge export` | <fmt> Export (json|csv|txt) | | `fridge search` | <term> Search entries | | `fridge recent` | Recent activity | | `fridge status` | Health check | | `fridge help` | Show this help | | `fridge version` | Show version | | `fridge $name:` | $c entries | | `fridge Total:` | $total entries | | `fridge Data` | size: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1) | | `fridge Version:` | v2.0.0 | | `fridge Data` | dir: $DATA_DIR | | `fridge Entries:` | $(cat "$DATA_DIR"/*.log 2>/dev/null | wc -l) total | | `fridge Disk:` | $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1) | | `fridge Last:` | $(tail -1 "$DATA_DIR/history.log" 2>/dev/null || echo never) | | `fridge Status:` | OK | | `fridge [Fridge]` | add: $input | | `fridge Saved.` | Total add entries: $total | | `fridge [Fridge]` | inventory: $input | | `fridge Saved.` | Total inventory entries: $total | | `fridge [Fridge]` | schedule: $input | | `fridge Saved.` | Total schedule entries: $total | | `fridge [Fridge]` | remind: $input | | `fridge Saved.` | Total remind entries: $total | | `fridge [Fridge]` | checklist: $input | | `fridge Saved.` | Total checklist entries: $total | | `fridge [Fridge]` | usage: $input | | `fridge Saved.` | Total usage entries: $total | | `fridge [Fridge]` | cost: $input | | `fridge Saved.` | Total cost entries: $total | | `fridge [Fridge]` | maintain: $input | | `fridge Saved.` | Total maintain entries: $total | | `fridge [Fridge]` | log: $input | | `fridge Saved.` | Total log entries: $total | | `fridge [Fridge]` | report: $input | | `fridge Saved.` | Total report entries: $total | | `fridge [Fridge]` | seasonal: $input | | `fridge Saved.` | Total seasonal entries: $total | | `fridge [Fridge]` | tips: $input | | `fridge Saved.` | Total tips entries: $total | ## Data Storage All data is stored locally at `~/.local/share/fridge/`. 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 # Fridge — home tool # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail DATA_DIR="HOME/.local/share/fridge" mkdir -p "$DATA_DIR" _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } _version() { echo "fridge v2.0.0"; } _help() { echo "Fridge v2.0.0 — home toolkit" echo "" echo "Usage: fridge <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 "=== Fridge 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 "=== Fridge 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 "=== Fridge 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: fridge 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: fridge 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 " [Fridge] 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: fridge 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 " [Fridge] 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: fridge 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 " [Fridge] 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: fridge 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 " [Fridge] 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: fridge 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 " [Fridge] 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: fridge 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 " [Fridge] 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: fridge 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 " [Fridge] 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: fridge 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 " [Fridge] 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: fridge 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 " [Fridge] 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: fridge 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 " [Fridge] 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: fridge 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 " [Fridge] 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: fridge 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 " [Fridge] 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 'fridge help'" exit 1 ;; esac
Organize room inventory and maintenance schedules. Use when adding furniture items, tracking appliances, scheduling deep cleans, setting repair reminders.
--- name: "Room" description: "Organize room inventory and maintenance schedules. Use when adding furniture items, tracking appliances, scheduling deep cleans, setting repair reminders." version: "2.0.0" author: "BytesAgain" homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills tags: ["organize", "domestic", "room", "inventory", "home"] --- # Room Terminal-first Room manager. Keep your home management data organized with simple commands. ## Why Room? - 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 room help # Check current status room status # View your statistics room stats ``` ## Commands | Command | What it does | |---------|-------------| | `room add` | Add | | `room inventory` | Inventory | | `room schedule` | Schedule | | `room remind` | Remind | | `room checklist` | Checklist | | `room usage` | Usage | | `room cost` | Cost | | `room maintain` | Maintain | | `room log` | Log | | `room report` | Report | | `room seasonal` | Seasonal | | `room tips` | Tips | | `room stats` | Summary statistics | | `room export` | <fmt> Export (json|csv|txt) | | `room search` | <term> Search entries | | `room recent` | Recent activity | | `room status` | Health check | | `room help` | Show this help | | `room version` | Show version | | `room $name:` | $c entries | | `room Total:` | $total entries | | `room Data` | size: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1) | | `room Version:` | v2.0.0 | | `room Data` | dir: $DATA_DIR | | `room Entries:` | $(cat "$DATA_DIR"/*.log 2>/dev/null | wc -l) total | | `room Disk:` | $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1) | | `room Last:` | $(tail -1 "$DATA_DIR/history.log" 2>/dev/null || echo never) | | `room Status:` | OK | | `room [Room]` | add: $input | | `room Saved.` | Total add entries: $total | | `room [Room]` | inventory: $input | | `room Saved.` | Total inventory entries: $total | | `room [Room]` | schedule: $input | | `room Saved.` | Total schedule entries: $total | | `room [Room]` | remind: $input | | `room Saved.` | Total remind entries: $total | | `room [Room]` | checklist: $input | | `room Saved.` | Total checklist entries: $total | | `room [Room]` | usage: $input | | `room Saved.` | Total usage entries: $total | | `room [Room]` | cost: $input | | `room Saved.` | Total cost entries: $total | | `room [Room]` | maintain: $input | | `room Saved.` | Total maintain entries: $total | | `room [Room]` | log: $input | | `room Saved.` | Total log entries: $total | | `room [Room]` | report: $input | | `room Saved.` | Total report entries: $total | | `room [Room]` | seasonal: $input | | `room Saved.` | Total seasonal entries: $total | | `room [Room]` | tips: $input | | `room Saved.` | Total tips entries: $total | ## Data Storage All data is stored locally at `~/.local/share/room/`. 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 # Room — home tool # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail DATA_DIR="HOME/.local/share/room" mkdir -p "$DATA_DIR" _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } _version() { echo "room v2.0.0"; } _help() { echo "Room v2.0.0 — home toolkit" echo "" echo "Usage: room <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 "=== Room 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 "=== Room 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 "=== Room 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: room 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: room 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 " [Room] 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: room 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 " [Room] 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: room 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 " [Room] 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: room 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 " [Room] 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: room 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 " [Room] 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: room 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 " [Room] 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: room 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 " [Room] 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: room 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 " [Room] 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: room 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 " [Room] 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: room 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 " [Room] 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: room 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 " [Room] 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: room 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 " [Room] 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 'room help'" exit 1 ;; esac
Log daily steps, set fitness goals, and chart walking trends. Use when logging counts, tracking progress, charting trends, setting goals.
--- name: "Step" description: "Log daily steps, set fitness goals, and chart walking trends. Use when logging counts, tracking progress, charting trends, setting goals." version: "2.0.0" author: "BytesAgain" homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills tags: ["health", "wellness", "tracking", "self-care", "step"] --- # Step Terminal-first Step manager. Keep your health & wellness data organized with simple commands. ## Why Step? - 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 step help # Check current status step status # View your statistics step stats ``` ## Commands | Command | What it does | |---------|-------------| | `step log` | Log | | `step track` | Track | | `step chart` | Chart | | `step goal` | Goal | | `step remind` | Remind | | `step weekly` | Weekly | | `step monthly` | Monthly | | `step compare` | Compare | | `step export` | Export | | `step streak` | Streak | | `step milestone` | Milestone | | `step trend` | Trend | | `step stats` | Summary statistics | | `step export` | <fmt> Export (json|csv|txt) | | `step search` | <term> Search entries | | `step recent` | Recent activity | | `step status` | Health check | | `step help` | Show this help | | `step version` | Show version | | `step $name:` | $c entries | | `step Total:` | $total entries | | `step Data` | size: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1) | | `step Version:` | v2.0.0 | | `step Data` | dir: $DATA_DIR | | `step Entries:` | $(cat "$DATA_DIR"/*.log 2>/dev/null | wc -l) total | | `step Disk:` | $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1) | | `step Last:` | $(tail -1 "$DATA_DIR/history.log" 2>/dev/null || echo never) | | `step Status:` | OK | | `step [Step]` | log: $input | | `step Saved.` | Total log entries: $total | | `step [Step]` | track: $input | | `step Saved.` | Total track entries: $total | | `step [Step]` | chart: $input | | `step Saved.` | Total chart entries: $total | | `step [Step]` | goal: $input | | `step Saved.` | Total goal entries: $total | | `step [Step]` | remind: $input | | `step Saved.` | Total remind entries: $total | | `step [Step]` | weekly: $input | | `step Saved.` | Total weekly entries: $total | | `step [Step]` | monthly: $input | | `step Saved.` | Total monthly entries: $total | | `step [Step]` | compare: $input | | `step Saved.` | Total compare entries: $total | | `step [Step]` | export: $input | | `step Saved.` | Total export entries: $total | | `step [Step]` | streak: $input | | `step Saved.` | Total streak entries: $total | | `step [Step]` | milestone: $input | | `step Saved.` | Total milestone entries: $total | | `step [Step]` | trend: $input | | `step Saved.` | Total trend entries: $total | ## Data Storage All data is stored locally at `~/.local/share/step/`. 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 # Step — health tool # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail DATA_DIR="HOME/.local/share/step" mkdir -p "$DATA_DIR" _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } _version() { echo "step v2.0.0"; } _help() { echo "Step v2.0.0 — health toolkit" echo "" echo "Usage: step <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 "=== Step 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 "=== Step 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 "=== Step 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: step 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: step 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 " [Step] 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: step 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 " [Step] 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: step 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 " [Step] 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: step 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 " [Step] 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: step 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 " [Step] 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: step 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 " [Step] 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: step 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 " [Step] 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: step 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 " [Step] 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: step 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 " [Step] 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: step 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 " [Step] 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: step 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 " [Step] 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: step 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 " [Step] 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 'step help'" exit 1 ;; esac
Track vitamin and supplement intake with goals and reminders. Use when logging supplements, setting nutrition goals, reviewing history, or scheduling doses.
--- name: "Vitamin" description: "Track vitamin and supplement intake with goals and reminders. Use when logging supplements, setting nutrition goals, reviewing history, or scheduling doses." version: "2.0.0" author: "BytesAgain" homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills tags: ["vitamin", "tracking", "daily", "self-care", "monitor"] --- # Vitamin Terminal-first Vitamin manager. Keep your health & wellness data organized with simple commands. ## Why Vitamin? - 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 vitamin help # Check current status vitamin status # View your statistics vitamin stats ``` ## Commands | Command | What it does | |---------|-------------| | `vitamin log` | Log | | `vitamin track` | Track | | `vitamin chart` | Chart | | `vitamin goal` | Goal | | `vitamin remind` | Remind | | `vitamin weekly` | Weekly | | `vitamin monthly` | Monthly | | `vitamin compare` | Compare | | `vitamin export` | Export | | `vitamin streak` | Streak | | `vitamin milestone` | Milestone | | `vitamin trend` | Trend | | `vitamin stats` | Summary statistics | | `vitamin export` | <fmt> Export (json|csv|txt) | | `vitamin search` | <term> Search entries | | `vitamin recent` | Recent activity | | `vitamin status` | Health check | | `vitamin help` | Show this help | | `vitamin version` | Show version | | `vitamin $name:` | $c entries | | `vitamin Total:` | $total entries | | `vitamin Data` | size: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1) | | `vitamin Version:` | v2.0.0 | | `vitamin Data` | dir: $DATA_DIR | | `vitamin Entries:` | $(cat "$DATA_DIR"/*.log 2>/dev/null | wc -l) total | | `vitamin Disk:` | $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1) | | `vitamin Last:` | $(tail -1 "$DATA_DIR/history.log" 2>/dev/null || echo never) | | `vitamin Status:` | OK | | `vitamin [Vitamin]` | log: $input | | `vitamin Saved.` | Total log entries: $total | | `vitamin [Vitamin]` | track: $input | | `vitamin Saved.` | Total track entries: $total | | `vitamin [Vitamin]` | chart: $input | | `vitamin Saved.` | Total chart entries: $total | | `vitamin [Vitamin]` | goal: $input | | `vitamin Saved.` | Total goal entries: $total | | `vitamin [Vitamin]` | remind: $input | | `vitamin Saved.` | Total remind entries: $total | | `vitamin [Vitamin]` | weekly: $input | | `vitamin Saved.` | Total weekly entries: $total | | `vitamin [Vitamin]` | monthly: $input | | `vitamin Saved.` | Total monthly entries: $total | | `vitamin [Vitamin]` | compare: $input | | `vitamin Saved.` | Total compare entries: $total | | `vitamin [Vitamin]` | export: $input | | `vitamin Saved.` | Total export entries: $total | | `vitamin [Vitamin]` | streak: $input | | `vitamin Saved.` | Total streak entries: $total | | `vitamin [Vitamin]` | milestone: $input | | `vitamin Saved.` | Total milestone entries: $total | | `vitamin [Vitamin]` | trend: $input | | `vitamin Saved.` | Total trend entries: $total | ## Data Storage All data is stored locally at `~/.local/share/vitamin/`. 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 # Vitamin — health tool # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail DATA_DIR="HOME/.local/share/vitamin" mkdir -p "$DATA_DIR" _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } _version() { echo "vitamin v2.0.0"; } _help() { echo "Vitamin v2.0.0 — health toolkit" echo "" echo "Usage: vitamin <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 "=== Vitamin 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 "=== Vitamin 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 "=== Vitamin 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: vitamin 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: vitamin 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 " [Vitamin] 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: vitamin 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 " [Vitamin] 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: vitamin 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 " [Vitamin] 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: vitamin 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 " [Vitamin] 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: vitamin 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 " [Vitamin] 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: vitamin 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 " [Vitamin] 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: vitamin 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 " [Vitamin] 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: vitamin 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 " [Vitamin] 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: vitamin 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 " [Vitamin] 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: vitamin 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 " [Vitamin] 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: vitamin 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 " [Vitamin] 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: vitamin 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 " [Vitamin] 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 'vitamin help'" exit 1 ;; esac
Calculate BMI, log weight entries, and chart body composition trends. Use when tracking fitness progress, setting weight goals, or reviewing data.
--- name: "Bmi" description: "Calculate BMI, log weight entries, and chart body composition trends. Use when tracking fitness progress, setting weight goals, or reviewing data." version: "2.0.0" author: "BytesAgain" homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills tags: ["fitness", "bmi", "tracking", "daily", "monitor"] --- # Bmi A focused health & wellness tool built for Bmi. Log entries, review trends, and export reports — all locally. ## Why Bmi? - 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 bmi help # Check current status bmi status # View your statistics bmi stats ``` ## Commands | Command | What it does | |---------|-------------| | `bmi log` | Log | | `bmi track` | Track | | `bmi chart` | Chart | | `bmi goal` | Goal | | `bmi remind` | Remind | | `bmi weekly` | Weekly | | `bmi monthly` | Monthly | | `bmi compare` | Compare | | `bmi export` | Export | | `bmi streak` | Streak | | `bmi milestone` | Milestone | | `bmi trend` | Trend | | `bmi stats` | Summary statistics | | `bmi export` | <fmt> Export (json|csv|txt) | | `bmi search` | <term> Search entries | | `bmi recent` | Recent activity | | `bmi status` | Health check | | `bmi help` | Show this help | | `bmi version` | Show version | | `bmi $name:` | $c entries | | `bmi Total:` | $total entries | | `bmi Data` | size: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1) | | `bmi Version:` | v2.0.0 | | `bmi Data` | dir: $DATA_DIR | | `bmi Entries:` | $(cat "$DATA_DIR"/*.log 2>/dev/null | wc -l) total | | `bmi Disk:` | $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1) | | `bmi Last:` | $(tail -1 "$DATA_DIR/history.log" 2>/dev/null || echo never) | | `bmi Status:` | OK | | `bmi [Bmi]` | log: $input | | `bmi Saved.` | Total log entries: $total | | `bmi [Bmi]` | track: $input | | `bmi Saved.` | Total track entries: $total | | `bmi [Bmi]` | chart: $input | | `bmi Saved.` | Total chart entries: $total | | `bmi [Bmi]` | goal: $input | | `bmi Saved.` | Total goal entries: $total | | `bmi [Bmi]` | remind: $input | | `bmi Saved.` | Total remind entries: $total | | `bmi [Bmi]` | weekly: $input | | `bmi Saved.` | Total weekly entries: $total | | `bmi [Bmi]` | monthly: $input | | `bmi Saved.` | Total monthly entries: $total | | `bmi [Bmi]` | compare: $input | | `bmi Saved.` | Total compare entries: $total | | `bmi [Bmi]` | export: $input | | `bmi Saved.` | Total export entries: $total | | `bmi [Bmi]` | streak: $input | | `bmi Saved.` | Total streak entries: $total | | `bmi [Bmi]` | milestone: $input | | `bmi Saved.` | Total milestone entries: $total | | `bmi [Bmi]` | trend: $input | | `bmi Saved.` | Total trend entries: $total | ## Data Storage All data is stored locally at `~/.local/share/bmi/`. 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 # Bmi — health tool # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail DATA_DIR="HOME/.local/share/bmi" mkdir -p "$DATA_DIR" _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } _version() { echo "bmi v2.0.0"; } _help() { echo "Bmi v2.0.0 — health toolkit" echo "" echo "Usage: bmi <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 "=== Bmi 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 "=== Bmi 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 "=== Bmi 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: bmi 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: bmi 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 " [Bmi] 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: bmi 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 " [Bmi] 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: bmi 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 " [Bmi] 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: bmi 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 " [Bmi] 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: bmi 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 " [Bmi] 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: bmi 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 " [Bmi] 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: bmi 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 " [Bmi] 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: bmi 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 " [Bmi] 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: bmi 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 " [Bmi] 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: bmi 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 " [Bmi] 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: bmi 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 " [Bmi] 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: bmi 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 " [Bmi] 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 'bmi help'" exit 1 ;; esac
Generate lottery numbers and check results. Use when picking numbers for draws.
--- name: "lottery" version: "3.0.0" description: "Generate lottery numbers and check results. Use when picking numbers for draws." author: "BytesAgain" homepage: "https://bytesagain.com" --- # lottery Generate lottery numbers and check results. Use when picking numbers for draws. ## Commands ### `pick` ```bash scripts/script.sh pick <count max> ``` ### `powerball` ```bash scripts/script.sh powerball ``` ### `mega` ```bash scripts/script.sh mega ``` ### `check` ```bash scripts/script.sh check <numbers winning> ``` ### `history` ```bash scripts/script.sh history ``` ### `stats` ```bash scripts/script.sh stats ``` ## Data Storage Data stored in `~/.local/share/lottery/`. --- *Powered by BytesAgain | bytesagain.com | [email protected]* FILE:scripts/script.sh #!/usr/bin/env bash set -euo pipefail VERSION="3.0.0" SCRIPT_NAME="lottery" DATA_DIR="$HOME/.local/share/lottery" mkdir -p "$DATA_DIR" # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Powered by BytesAgain | bytesagain.com | [email protected] _info() { echo "[INFO] $*"; } _error() { echo "[ERROR] $*" >&2; } die() { _error "$@"; exit 1; } cmd_pick() { local count="-" local max="-" [ -z "$count" ] && die "Usage: $SCRIPT_NAME pick <count max>" shuf -i 1--49 -n -6 | sort -n | tr '\n' ' '; echo } cmd_powerball() { echo 'Numbers: '$(shuf -i 1-69 -n 5 | sort -n | tr '\n' ' ')' PB: '$(shuf -i 1-26 -n 1) } cmd_mega() { echo 'Numbers: '$(shuf -i 1-70 -n 5 | sort -n | tr '\n' ' ')' MB: '$(shuf -i 1-25 -n 1) } cmd_check() { local numbers="-" local winning="-" [ -z "$numbers" ] && die "Usage: $SCRIPT_NAME check <numbers winning>" echo 'Your: $2 Winning: $3' } cmd_history() { cat $DATA_DIR/picks.log 2>/dev/null || echo 'No history' } cmd_stats() { echo 'Total picks: '$(wc -l < $DATA_DIR/picks.log 2>/dev/null || echo 0) } cmd_help() { echo "$SCRIPT_NAME v$VERSION" echo "" echo "Commands:" printf " %-25s\n" "pick <count max>" printf " %-25s\n" "powerball" printf " %-25s\n" "mega" printf " %-25s\n" "check <numbers winning>" printf " %-25s\n" "history" printf " %-25s\n" "stats" 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 pick) shift; cmd_pick "$@" ;; powerball) shift; cmd_powerball "$@" ;; mega) shift; cmd_mega "$@" ;; check) shift; cmd_check "$@" ;; history) shift; cmd_history "$@" ;; stats) shift; cmd_stats "$@" ;; help) cmd_help ;; version) cmd_version ;; *) die "Unknown: $cmd" ;; esac } main "$@"
Generate MD5 and SHA checksums, verify integrity, and compare hash values. Use when computing checksums, verifying downloads, or comparing hash outputs.
--- name: hash version: "3.0.1" author: BytesAgain homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills license: MIT-0 tags: [hash, tool, utility] description: "Generate MD5 and SHA checksums, verify integrity, and compare hash values. Use when computing checksums, verifying downloads, or comparing hash outputs." --- # hash Hash & Checksum Tool. ## Commands ### `md5` Compute MD5 hash ```bash scripts/script.sh md5 <file_or_text> ``` ### `sha1` Compute SHA-1 hash ```bash scripts/script.sh sha1 <file_or_text> ``` ### `sha256` Compute SHA-256 hash ```bash scripts/script.sh sha256 <file_or_text> ``` ### `sha512` Compute SHA-512 hash ```bash scripts/script.sh sha512 <file_or_text> ``` ### `verify` Verify a file against a known hash ```bash scripts/script.sh verify <file> <expected_hash> ``` ### `compare` Compare hashes of two files ```bash scripts/script.sh compare <file1> <file2> ``` ### `batch` Hash every file in a directory (default: sha256) ```bash scripts/script.sh batch <directory> [algo] ``` ### `check` Verify hashes listed in a checksum file ```bash scripts/script.sh check <hashfile> ``` ### `history` Show recent hash operations ```bash scripts/script.sh history ``` ## Requirements - bash 4.0+ --- *Powered by BytesAgain | bytesagain.com | [email protected]* FILE:scripts/script.sh #!/usr/bin/env bash set -euo pipefail ############################################################################### # hash — Hash & Checksum Tool # Powered by BytesAgain | bytesagain.com | [email protected] ############################################################################### BRAND="Powered by BytesAgain | bytesagain.com | [email protected]" DATA_DIR="HOME/.local/share/hash" HISTORY_FILE="DATA_DIR/history.log" mkdir -p "DATA_DIR" # --------------------------------------------------------------------------- # Helpers # --------------------------------------------------------------------------- die() { echo "ERROR: $*" >&2; exit 1; } info() { echo "▸ $*"; } usage() { cat <<'EOF' hash — Hash & Checksum Tool USAGE script.sh <command> [arguments...] COMMANDS md5 <file_or_text> Compute MD5 hash sha1 <file_or_text> Compute SHA-1 hash sha256 <file_or_text> Compute SHA-256 hash sha512 <file_or_text> Compute SHA-512 hash verify <file> <expected_hash> Verify a file against a known hash compare <file1> <file2> Compare hashes of two files batch <directory> [algo] Hash every file in a directory (default: sha256) check <hashfile> Verify hashes listed in a checksum file history Show recent hash operations EOF echo "BRAND" } # Detect the best available tool for a given algorithm hash_file() { local algo="$1" file="$2" case "algo" in md5) if command -v md5sum &>/dev/null; then md5sum "$file" | awk '{print $1}' elif command -v openssl &>/dev/null; then openssl dgst -md5 "$file" | awk '{print $NF}' else die "No md5sum or openssl found" fi ;; sha1) if command -v sha1sum &>/dev/null; then sha1sum "$file" | awk '{print $1}' elif command -v openssl &>/dev/null; then openssl dgst -sha1 "$file" | awk '{print $NF}' else die "No sha1sum or openssl found" fi ;; sha256) if command -v sha256sum &>/dev/null; then sha256sum "$file" | awk '{print $1}' elif command -v openssl &>/dev/null; then openssl dgst -sha256 "$file" | awk '{print $NF}' else die "No sha256sum or openssl found" fi ;; sha512) if command -v sha512sum &>/dev/null; then sha512sum "$file" | awk '{print $1}' elif command -v openssl &>/dev/null; then openssl dgst -sha512 "$file" | awk '{print $NF}' else die "No sha512sum or openssl found" fi ;; *) die "Unsupported algorithm: algo" ;; esac } # Hash a string by piping through the same tools hash_string() { local algo="$1" text="$2" case "algo" in md5) printf '%s' "$text" | md5sum 2>/dev/null | awk '{print $1}' \ || printf '%s' "$text" | openssl dgst -md5 | awk '{print $NF}' ;; sha1) printf '%s' "$text" | sha1sum 2>/dev/null | awk '{print $1}' \ || printf '%s' "$text" | openssl dgst -sha1 | awk '{print $NF}' ;; sha256) printf '%s' "$text" | sha256sum 2>/dev/null | awk '{print $1}' \ || printf '%s' "$text" | openssl dgst -sha256 | awk '{print $NF}' ;; sha512) printf '%s' "$text" | sha512sum 2>/dev/null | awk '{print $1}' \ || printf '%s' "$text" | openssl dgst -sha512 | awk '{print $NF}' ;; *) die "Unsupported algorithm: algo" ;; esac } # Auto-detect hash algorithm from length detect_algo() { local hash="$1" local len=#hash case "len" in 32) echo "md5" ;; 40) echo "sha1" ;; 64) echo "sha256" ;; 128) echo "sha512" ;; *) echo "unknown" ;; esac } log_operation() { local op="$1" detail="$2" echo "$(date -u '+%Y-%m-%dT%H:%M:%SZ') op detail" >> "HISTORY_FILE" } # Format file size for display human_size() { local bytes="$1" if (( bytes >= 1073741824 )); then echo "$(awk "BEGIN{printf \"%.2f\", $bytes/1073741824}") GB" elif (( bytes >= 1048576 )); then echo "$(awk "BEGIN{printf \"%.2f\", $bytes/1048576}") MB" elif (( bytes >= 1024 )); then echo "$(awk "BEGIN{printf \"%.2f\", $bytes/1024}") KB" else echo "bytes B" fi } # --------------------------------------------------------------------------- # Commands # --------------------------------------------------------------------------- cmd_hash() { local algo="$1" shift [[ $# -lt 1 ]] && die "Usage: algo <file_or_text>" local input="$1" if [[ -f "input" ]]; then local size size=$(stat -c%s "$input" 2>/dev/null || stat -f%z "$input" 2>/dev/null || echo "?") local h h=$(hash_file "algo" "input") echo "Algorithm : algo^^" echo "File : input" echo "Size : $(human_size "size")" echo "Hash : h" log_operation "algo" "file=input hash=h" else local h h=$(hash_string "algo" "input") echo "Algorithm : algo^^" echo "Input : input" echo "Hash : h" log_operation "algo" "text hash=h" fi } cmd_verify() { [[ $# -lt 2 ]] && die "Usage: verify <file> <expected_hash>" local file="$1" expected="$2" [[ -f "file" ]] || die "File not found: file" # Normalize to lowercase expected=$(echo "expected" | tr '[:upper:]' '[:lower:]') local algo algo=$(detect_algo "expected") [[ "algo" == "unknown" ]] && die "Cannot detect algorithm from hash length (#expected chars). Supported: 32=md5, 40=sha1, 64=sha256, 128=sha512" info "Detected algorithm: algo^^ (from hash length)" local actual actual=$(hash_file "algo" "file") echo "File : file" echo "Algorithm: algo^^" echo "Expected : expected" echo "Actual : actual" echo "" if [[ "actual" == "expected" ]]; then echo "✅ MATCH — File integrity verified" log_operation "verify" "file=file algo=algo result=MATCH" else echo "❌ MISMATCH — File may be corrupted or tampered with" log_operation "verify" "file=file algo=algo result=MISMATCH" exit 1 fi } cmd_compare() { [[ $# -lt 2 ]] && die "Usage: compare <file1> <file2>" local f1="$1" f2="$2" [[ -f "f1" ]] || die "File not found: f1" [[ -f "f2" ]] || die "File not found: f2" echo "Comparing files with multiple algorithms..." echo "" printf "%-8s | %-64s | %-64s | %s\n" "ALGO" "FILE 1" "FILE 2" "MATCH" printf "%-8s-+-%-64s-+-%-64s-+-%s\n" "--------" "----------------------------------------------------------------" "----------------------------------------------------------------" "-----" local all_match=true for algo in md5 sha1 sha256; do local h1 h2 match_str h1=$(hash_file "algo" "f1") h2=$(hash_file "algo" "f2") if [[ "h1" == "h2" ]]; then match_str=" ✅" else match_str=" ❌" all_match=false fi printf "%-8s | %-64s | %-64s | %s\n" "algo^^" "h1" "h2" "match_str" done echo "" if all_match; then echo "✅ Files are identical (all hashes match)" else echo "❌ Files differ" fi log_operation "compare" "f1=f1 f2=f2 identical=all_match" } cmd_batch() { [[ $# -lt 1 ]] && die "Usage: batch <directory> [algo]" local dir="$1" local algo="-sha256" [[ -d "dir" ]] || die "Directory not found: dir" info "Hashing all files in dir with algo^^..." echo "" local count=0 total_size=0 local manifest="DATA_DIR/batch_$(date +%Y%m%d_%H%M%S).txt" while IFS= read -r -d '' file; do local h size h=$(hash_file "algo" "file") size=$(stat -c%s "$file" 2>/dev/null || stat -f%z "$file" 2>/dev/null || echo 0) total_size=$((total_size + size)) count=$((count + 1)) echo "h file" echo "h file" >> "manifest" done < <(find "dir" -type f -print0 | sort -z) echo "" info "Files hashed : count" info "Total size : $(human_size total_size)" info "Algorithm : algo^^" info "Manifest saved: manifest" log_operation "batch" "dir=dir algo=algo files=count" } cmd_check() { [[ $# -lt 1 ]] && die "Usage: check <hashfile>" local hashfile="$1" [[ -f "hashfile" ]] || die "Hash file not found: hashfile" info "Verifying checksums from hashfile..." echo "" local total=0 passed=0 failed=0 missing=0 while IFS= read -r line; do # Skip empty lines and comments [[ -z "line" || "line" == \#* ]] && continue local expected_hash file_path expected_hash=$(echo "line" | awk '{print $1}') file_path=$(echo "line" | sed 's/^[^ ]* *\*\?//') total=$((total + 1)) if [[ ! -f "file_path" ]]; then echo "⚠️ MISSING file_path" missing=$((missing + 1)) continue fi local algo algo=$(detect_algo "expected_hash") if [[ "algo" == "unknown" ]]; then echo "⚠️ UNKNOWN file_path (can't detect algo from hash length)" failed=$((failed + 1)) continue fi local actual actual=$(hash_file "algo" "file_path") if [[ "actual" == "expected_hash" ]]; then echo "✅ OK file_path" passed=$((passed + 1)) else echo "❌ FAILED file_path" failed=$((failed + 1)) fi done < "hashfile" echo "" echo "────────────────────────────────────" echo "Total: total | Passed: passed | Failed: failed | Missing: missing" if [[ failed -eq 0 && missing -eq 0 ]]; then echo "✅ All checksums verified successfully" else echo "❌ Some checksums failed or files were missing" exit 1 fi log_operation "check" "hashfile=hashfile total=total passed=passed failed=failed" } cmd_history() { if [[ ! -f "HISTORY_FILE" || ! -s "HISTORY_FILE" ]]; then echo "No hash operations recorded yet." return fi info "Recent hash operations:" echo "" tail -20 "HISTORY_FILE" | while IFS= read -r line; do echo " line" done echo "" local total total=$(wc -l < "HISTORY_FILE") echo "(total total operations)" } # --------------------------------------------------------------------------- # Main dispatch # --------------------------------------------------------------------------- main() { if [[ $# -lt 1 ]]; then usage exit 0 fi local cmd="$1" shift case "cmd" in md5|sha1|sha256|sha512) cmd_hash "cmd" "$@" ;; verify) cmd_verify "$@" ;; compare) cmd_compare "$@" ;; batch) cmd_batch "$@" ;; check) cmd_check "$@" ;; history) cmd_history ;; help|--help|-h) usage ;; *) die "Unknown command: cmd. Run with 'help' for usage." ;; esac } main "$@"
Generate HTML landing pages from templates with SEO optimization. Use when creating web pages.
--- name: "landing" version: "3.0.0" description: "Generate HTML landing pages from templates with SEO optimization. Use when creating web pages." author: "BytesAgain" homepage: "https://bytesagain.com" --- # landing Generate HTML landing pages from templates with SEO optimization. Use when creating web pages. ## Commands ### `create` ```bash scripts/script.sh create <title description> ``` ### `template` ```bash scripts/script.sh template <type> ``` ### `checklist` ```bash scripts/script.sh checklist ``` ### `meta` ```bash scripts/script.sh meta <file> ``` ### `optimize` ```bash scripts/script.sh optimize <file> ``` ### `preview` ```bash scripts/script.sh preview <file> ``` ## Data Storage Data stored in `~/.local/share/landing/`. --- *Powered by BytesAgain | bytesagain.com | [email protected]* FILE:scripts/script.sh #!/usr/bin/env bash set -euo pipefail VERSION="3.0.0" SCRIPT_NAME="landing" DATA_DIR="$HOME/.local/share/landing" 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 title="-" local description="-" [ -z "$title" ] && die "Usage: $SCRIPT_NAME create <title description>" echo '<!DOCTYPE html><html><head><title>'$2'</title><meta name="description" content="'$3'"></head><body><h1>'$2'</h1><p>'$3'</p></body></html>' } cmd_template() { local type="-" [ -z "$type" ] && die "Usage: $SCRIPT_NAME template <type>" case $2 in startup) echo 'Hero + Features + CTA template';; saas) echo 'Header + Pricing + FAQ template';; *) echo 'Types: startup, saas, portfolio, blog';; esac } cmd_checklist() { echo 'Landing Page Checklist:'; echo '[ ] Clear headline'; echo '[ ] Call to action'; echo '[ ] Social proof'; echo '[ ] Mobile responsive'; echo '[ ] Fast loading' } cmd_meta() { local file="-" [ -z "$file" ] && die "Usage: $SCRIPT_NAME meta <file>" grep -o '<title>[^<]*</title>' $2 2>/dev/null; grep -o 'content="[^"]*"' $2 2>/dev/null | head -3 } cmd_optimize() { local file="-" [ -z "$file" ] && die "Usage: $SCRIPT_NAME optimize <file>" echo 'SEO check for $2:'; grep -q 'meta name="description"' $2 2>/dev/null && echo 'Has meta description' || echo 'Missing meta description' } cmd_preview() { local file="-" [ -z "$file" ] && die "Usage: $SCRIPT_NAME preview <file>" echo 'Open $2 in browser: file://$2' } cmd_help() { echo "$SCRIPT_NAME v$VERSION" echo "" echo "Commands:" printf " %-25s\n" "create <title description>" printf " %-25s\n" "template <type>" printf " %-25s\n" "checklist" printf " %-25s\n" "meta <file>" printf " %-25s\n" "optimize <file>" printf " %-25s\n" "preview <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 "$@" ;; template) shift; cmd_template "$@" ;; checklist) shift; cmd_checklist "$@" ;; meta) shift; cmd_meta "$@" ;; optimize) shift; cmd_optimize "$@" ;; preview) shift; cmd_preview "$@" ;; help) cmd_help ;; version) cmd_version ;; *) die "Unknown: $cmd" ;; esac } main "$@"
Manage message queues with priorities and retry logic. Use when adding jobs, planning retry strategies, tracking delivery status, reviewing failed items.
--- name: queue version: "2.0.1" author: BytesAgain homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills license: MIT-0 tags: [queue, task-management, project-planning, workflow] description: "Manage message queues with priorities and retry logic. Use when adding jobs, planning retry strategies, tracking delivery status, reviewing failed items." --- # Queue Task queue with priority management, timeline tracking, streaks, tagging, and weekly reviews. Logs all operations with timestamps for full traceability. ## Commands | Command | Description | |---------|-------------| | `queue add <item>` | Add a new item to the queue | | `queue plan <task>` | Plan a task with scheduling details | | `queue track <id>` | Track progress on a queued item | | `queue review` | Review current queue items and status | | `queue prioritize <id> <level>` | Set priority level for an item | | `queue remind <id>` | Set a reminder for a queued item | | `queue streak` | Show current processing streak | | `queue tag <id> <tag>` | Tag a queue item for categorization | | `queue timeline` | Display timeline of all queue activity | | `queue report` | Generate a queue status report | | `queue archive <id>` | Move completed items to archive | | `queue weekly-review` | Run a weekly review of queue throughput | | `queue stats` | Show queue statistics and counts | | `queue export <fmt>` | Export queue data in json, csv, or txt | | `queue search <term>` | Search across all queue entries | | `queue recent [n]` | Show last n queue operations | | `queue status` | Show current queue health | | `queue help` | Display help and available commands | | `queue version` | Show version number | ## Data Storage All data stored locally in `~/.local/share/queue/`: - `add.log` — added items - `plan.log` — planned tasks - `track.log` — tracking events - `history.log` — full operation history - Exported files saved to current directory ## Requirements - bash 4+ - Standard coreutils (grep, wc, du, sort, head, tail) ## When to Use - Adding tasks to a processing queue with priority levels - Tracking progress on multiple concurrent jobs - Running weekly reviews to assess throughput and bottlenecks - Tagging and categorizing queue items for filtering - Archiving completed work and generating reports ## Examples ```bash # Add a new item to the queue queue add "Process incoming data files" # Plan a scheduled task queue plan "Deploy v2.0 to staging" # Track progress on an item queue track ITEM-001 # Set priority queue prioritize ITEM-001 high # Tag for categorization queue tag ITEM-001 deployment # Run weekly review queue weekly-review # Export queue data queue export json # Show recent activity queue recent 15 ``` ## Tips - Use `prioritize` to bubble urgent items to the top - `weekly-review` gives a throughput summary with trends - `tag` items to filter by category in `search` - `archive` completed items to keep the active queue clean - `streak` tracks how many consecutive days you processed items --- Powered by BytesAgain | bytesagain.com | [email protected] FILE:scripts/script.sh #!/usr/bin/env bash # Queue — productivity tool # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail DATA_DIR="HOME/.local/share/queue" mkdir -p "$DATA_DIR" _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } _version() { echo "queue v2.0.0"; } _help() { echo "Queue v2.0.0 — productivity toolkit" echo "" echo "Usage: queue <command> [args]" echo "" echo "Commands:" echo " add Add" echo " plan Plan" echo " track Track" echo " review Review" echo " streak Streak" echo " remind Remind" echo " prioritize Prioritize" echo " archive Archive" echo " tag Tag" echo " timeline Timeline" echo " report Report" echo " weekly-review Weekly Review" 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 "=== Queue 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 "=== Queue 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 "=== Queue 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: queue 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 add) shift if [ $# -eq 0 ]; then echo "Recent add entries:" tail -20 "$DATA_DIR/add.log" 2>/dev/null || echo " No entries yet. Use: queue 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 " [Queue] add: $input" echo " Saved. Total add entries: $total" _log "add" "$input" fi ;; plan) shift if [ $# -eq 0 ]; then echo "Recent plan entries:" tail -20 "$DATA_DIR/plan.log" 2>/dev/null || echo " No entries yet. Use: queue plan <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/plan.log" local total=$(wc -l < "$DATA_DIR/plan.log") echo " [Queue] plan: $input" echo " Saved. Total plan entries: $total" _log "plan" "$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: queue 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 " [Queue] track: $input" echo " Saved. Total track entries: $total" _log "track" "$input" fi ;; review) shift if [ $# -eq 0 ]; then echo "Recent review entries:" tail -20 "$DATA_DIR/review.log" 2>/dev/null || echo " No entries yet. Use: queue review <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/review.log" local total=$(wc -l < "$DATA_DIR/review.log") echo " [Queue] review: $input" echo " Saved. Total review entries: $total" _log "review" "$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: queue 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 " [Queue] streak: $input" echo " Saved. Total streak entries: $total" _log "streak" "$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: queue 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 " [Queue] remind: $input" echo " Saved. Total remind entries: $total" _log "remind" "$input" fi ;; prioritize) shift if [ $# -eq 0 ]; then echo "Recent prioritize entries:" tail -20 "$DATA_DIR/prioritize.log" 2>/dev/null || echo " No entries yet. Use: queue prioritize <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/prioritize.log" local total=$(wc -l < "$DATA_DIR/prioritize.log") echo " [Queue] prioritize: $input" echo " Saved. Total prioritize entries: $total" _log "prioritize" "$input" fi ;; archive) shift if [ $# -eq 0 ]; then echo "Recent archive entries:" tail -20 "$DATA_DIR/archive.log" 2>/dev/null || echo " No entries yet. Use: queue archive <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/archive.log" local total=$(wc -l < "$DATA_DIR/archive.log") echo " [Queue] archive: $input" echo " Saved. Total archive entries: $total" _log "archive" "$input" fi ;; tag) shift if [ $# -eq 0 ]; then echo "Recent tag entries:" tail -20 "$DATA_DIR/tag.log" 2>/dev/null || echo " No entries yet. Use: queue tag <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/tag.log" local total=$(wc -l < "$DATA_DIR/tag.log") echo " [Queue] tag: $input" echo " Saved. Total tag entries: $total" _log "tag" "$input" fi ;; timeline) shift if [ $# -eq 0 ]; then echo "Recent timeline entries:" tail -20 "$DATA_DIR/timeline.log" 2>/dev/null || echo " No entries yet. Use: queue timeline <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/timeline.log" local total=$(wc -l < "$DATA_DIR/timeline.log") echo " [Queue] timeline: $input" echo " Saved. Total timeline entries: $total" _log "timeline" "$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: queue 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 " [Queue] report: $input" echo " Saved. Total report entries: $total" _log "report" "$input" fi ;; weekly-review) shift if [ $# -eq 0 ]; then echo "Recent weekly-review entries:" tail -20 "$DATA_DIR/weekly-review.log" 2>/dev/null || echo " No entries yet. Use: queue weekly-review <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/weekly-review.log" local total=$(wc -l < "$DATA_DIR/weekly-review.log") echo " [Queue] weekly-review: $input" echo " Saved. Total weekly-review entries: $total" _log "weekly-review" "$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 'queue help' for available commands." exit 1 ;; esac