Skip to content

Latest commit

 

History

History
279 lines (215 loc) · 10.9 KB

File metadata and controls

279 lines (215 loc) · 10.9 KB

14. Extended Commands & Features

In addition to the core TUI dashboard and daily timeline, TermStory features a suite of advanced CLI subcommands:

🧠 Ask (Natural Language Q&A)

Use semantic Q&A and search over your developer history. termstory ask retrieves relevant sessions using BM25 context retrieval combined with LLM processing to answer questions like:

  • termstory ask "What did I work on last Monday?"
  • termstory ask "When did I fix the database deadlocks?"

Session commands and commit messages are sanitized through the local redaction engine before being sent to the LLM — no raw secrets leave your machine. See Privacy Sanitizer for details.

🔮 Predict (Pre-Cognitive Workspace)

The pre-cognitive workspace predicts what project or workspace you will work on next based on historical transition probabilities and time-of-day patterns.

  • termstory predict
  • termstory predict --top 5
  • termstory predict --json
  • termstory predict --days 30

🎮 Gamification & Personality Profiles

  • RPG Class Alter Ego (termstory rpg-class): Automatically profiles your developer style into daily classes (e.g. Regex Sorcerer, Docker Demolitionist) based on commands executed, with optional AI biography generation.
  • Vampire Coder Index (termstory vampire-index): Measures late-night work intensity by tracking commands and commits done between midnight and 5:00 AM.
  • Project Necromancer Score (termstory necromancer): Measures the resurrection frequency of stale projects that were dormant for 6+ months.
  • Rage-Quit Signatures (termstory rage-quit): Analyzes the final terminal command run right before 12h+ coding breaks to identify patterns in how sessions end.

💢 Anger Translator (termstory anger-translator)

Translates developer commits and preceding terminal error diagnostics/rebuild attempts into emotional roasts and real internal states.

🔮 Fortune Teller (termstory fortune-teller)

Scans late-night chaotic sessions (such as bypass-tests, frantic commit iterations, rapid edits) to generate witty Monday-morning bug fortunes and predictions.

⏱️ Database Profiler (termstory profile)

Profiles database query execution times and identifies N+1 read patterns to help keep the TermStory TUI/CLI extremely fast.

📹 Replay (Terminal Session Playback)

Replay the exact commands and delays of a past development session directly in your terminal like a movie.

  • termstory replay
  • termstory replay <session_id>
  • termstory replay --speed 2.0
  • termstory replay --list

💡 Insights (Executive Focus & Activity)

Calculate developer focus scores, time-of-day work distributions, and project focus metrics to highlight active days, total durations, and main achievements.

  • termstory insights

🌐 Web (HTML Report Generator)

Generate and automatically open a beautiful, high-density HTML report of your TermStory history and AI chronicles in your web browser.

  • termstory web

📤 Export (Structured Data Export)

Export all or filtered sessions as JSON or CSV files to share or perform custom analysis.

  • termstory export --format json
  • termstory export --format csv --output history.csv

📊 Stats (Detailed Work Telemetry)

Compute and display high-density, CLI-native command category breakdown tables, tool usage, and terminal telemetry.

  • termstory stats

🏷️ Tags (Session Classification)

Auto-classify and tag sessions (deploy, debug, setup, test, docs) based on shell commands and git commit messages.

  • termstory tags
  • termstory tags debug
  • termstory tags --rebuild

🗄️ Archive (termstory archive)

Archive older sessions, commands, commits, and summaries (older than N days) into a separate archive database file to keep the active database lean.

  • termstory archive --days 90

💾 Backup & Restore (termstory backup / termstory restore)

Create timestamped database backups or restore your database from a backup file in case of corruption or data migration.

  • termstory backup
  • termstory restore /path/to/backup.db

📅 Timeline (termstory timeline)

Render a high-density ASCII visual activity chart and timeline of command distributions over the recent days.

  • termstory timeline
  • termstory timeline --days 30

📓 Notebook (termstory notebook)

Export your terminal sessions as a clean, chronological Markdown journal/notebook grouped by day, optionally filtered by project or date range.

  • termstory notebook
  • termstory notebook --project myapp --since 7

⏰ Reminders (termstory remind)

Schedule, list, and manage reminders linked to specific sessions (e.g. reminding yourself of a task in a few days).

  • termstory remind "follow up on bug fix" --days 2
  • termstory remind --list
  • termstory remind --complete 1

⚙️ Reset (termstory reset)

Reset all TermStory state, clear the SQLite database, and wipe the configuration file back to clean defaults.

  • termstory reset

🔍 Observability Relay (termstory obs)

Toggle observability settings (such as Nemo relay / DeepWiki settings) for Hermes via local .env and config.yaml updates.

  • termstory obs

15. CLI Reference

Daily

termstory                    # Today's timeline
termstory today              # Same as above
termstory today --detailed   # All commands, no noise filtering, with timestamps
termstory today --compare    # Side-by-side with yesterday
termstory today --stats      # Command category frequency table

Search

termstory search <query>             # Chronological session search
termstory search docker
termstory search docker --project myapp
termstory search docker --since 2026-05-01
termstory search docker --detailed
termstory search docker --semantic   # Local hybrid semantic/RAG search

Historical

termstory week               # Current week
termstory week --last        # Previous week
termstory month              # Current month
termstory month "May 2026"   # Specific month
termstory month --last       # Previous month

Projects

termstory project <name>                       # 30-day deep dive
termstory project myapp --files                # Files edited, by frequency
termstory project myapp --stats                # Command category breakdown
termstory projects                             # All tracked projects
termstory projects --sort time                 # By total hours (default)
termstory projects --sort recent               # By last active date
termstory projects --sort name                 # Alphabetically
termstory project context <name> "description" # Set goals/context for a project
termstory project context <name> --show        # View project context description

Insights & Metrics

termstory insights           # Focus scores, time-of-day distribution, project focus
termstory rpg-class          # Assigner for daily RPG developer class with biography
termstory vampire-index      # Late-night coding intensity analytics
termstory necromancer        # Dormant project reactivation metrics
termstory rage-quit          # Final commands run prior to 12h+ inactivity periods

Diagnostics & Tuning

termstory profile            # Profile database query latency (defaults to limit 10)
termstory profile --limit 20 # Profile top 20 queries and identify N+1 paths
termstory fortune-teller     # Detect chaotic sessions & predict Monday-morning bugs
termstory anger-translator   # Translate recent commits/errors into emotional states

Stats

termstory stats              # Detailed, high-density work statistics and telemetry

Ask

termstory ask "What did I work on last Monday?"  # Natural language queries using BM25 context retrieval
termstory ask "When did I fix the database deadlocks?"

Predict

termstory predict            # Pre-Cognitive Workspace: predict what you will work on next
termstory predict --top 5    # Show top 5 predicted projects
termstory predict --json     # Output predictions as machine-readable JSON
termstory predict --days 30  # Analyze specific number of days of history

Replay

termstory replay             # Replay the most recent terminal session
termstory replay 42          # Replay session #42
termstory replay --speed 2.0 # Fast-forward (2.0x playback speed)
termstory replay --speed 0.5 # Slow-motion playback (0.5x speed)
termstory replay --list      # List recent sessions to choose from

Web

termstory web                # Generate and open a beautiful HTML report in your browser

Export

termstory export --format json                           # Export all sessions as JSON to stdout
termstory export --format csv --output ~/history.csv      # Export as CSV to a file
termstory export --project myapp --since 7               # Export last 7 days of "myapp" project
termstory export --since 2026-06-01                      # Export sessions since specific date

Tags

termstory tags               # View summary of session counts and durations per tag
termstory tags debug         # List recent sessions tagged with "debug"
termstory tags test --limit 10 # List top 10 sessions with "test" tag
termstory tags --rebuild     # Force rebuild/re-evaluate tag classification for all sessions

TUI

termstory ui                 # Full dashboard, last 90 days
termstory ui --days 30       # Limit to last 30 days
termstory ui --all           # All history

Config

termstory config list
termstory config get active_provider
termstory config set active_provider groq
termstory config set providers.groq.api_key gsk_...

Date override

termstory 2026-05-15                 # Specific date
termstory --date 2026-05-15 week     # Week containing that date

Database, Archiving & Maintenance

termstory optimize                   # Vacuum SQLite database and rebuild indexes
termstory archive                    # Archive sessions older than 90 days
termstory archive --days 30          # Archive sessions older than 30 days
termstory backup                     # Create a timestamped backup of the database
termstory restore /path/to/backup.db # Restore database from a backup file
termstory reset                      # Reset all TermStory state and database

Timeline & Notebook

termstory timeline                   # Render ASCII activity timeline over 30 days
termstory timeline --days 60         # Render ASCII timeline over 60 days
termstory notebook                   # Export history sessions as Markdown journal
termstory notebook --project myapp   # Export journal for specific project

Reminders

termstory remind "refactor auth"     # Add a reminder
termstory remind --list              # List active/pending reminders
termstory remind --complete 2        # Mark reminder #2 as completed

Observability

termstory obs                        # Toggle DeepWiki observability relay for Hermes