Skip to content

add ssage_log CLI with markdown/notebook export and db pruning#82

Open
civvic wants to merge 1 commit intoAnswerDotAI:mainfrom
civvic:dev-hist
Open

add ssage_log CLI with markdown/notebook export and db pruning#82
civvic wants to merge 1 commit intoAnswerDotAI:mainfrom
civvic:dev-hist

Conversation

@civvic
Copy link
Copy Markdown

@civvic civvic commented Apr 27, 2026

Introduce a dedicated ssage_log CLI for viewing/exporting ShellSage SQLite logs with lifecycle/export features.

What changed

  • Added new log viewer module:
    • nbs/02_logview.ipynb
    • script entrypoint wired to shell_sage.logview:ssage_log
  • Core capabilities:
    • --info summary view (index + timestamp + one-line prompt)
    • --ls to list available log DB files
    • --prune rotate active logs.db to timestamped logs-YYYY-MM-DD-HHMMSS.db, then recreate fresh active DB
    • -log_db PATH to read a specific DB
    • --out to write output to file
    • --last / --all selection
    • --format json l md | nb
    • --md_frontmatter / --md_context markdown export options
    • -format nb export to .ipynb with one markdown cell per selected row

Introduce a dedicated logview module and ssage_log command for reading
ShellSage SQLite logs with --last/--all selection, --info/--ls views,
and jsonl/md output. Add markdown options (--frontmatter,
--context), notebook export (--format nb), and --prune rotation of
active logs.db to timestamped archives with active DB recreation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant