Skill: bytesagain-lab/step (version 2.0.2)

--- 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 | [REDACTED_SECRET]

path: scripts/script.sh
content: #!/usr/bin/env bash
# Step — health tool
# Powered by BytesAgain | bytesagain.com | [REDACTED_SECRET]
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="${1:-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="${1:?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 "${1:-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

Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (MEDIUM)