How krishna4a6av/showcmm works
showcmm is a CLI for importing shell history into local command-frequency statistics, browsing those statistics, and optionally sending a summary for AI analysis. The main workflow runs through main.py: users update, view, delete, or request analysis; history import parses configured shell files before storing commands, while views and AI summaries read the stored data. The README documents several shell parsers and AI modes; source excerpts show their shared implementation paths, but not every runtime detail.
Main entry points: main.py Command router · history.py History importer · ai.py AI analysis · show_commands.py Command queries
Components 14
CLI
- Command router
main.py - Table display
utils/display.py
History import
- History importer
functions/history.py - Shell config
utils/read_toml.py - History parsers
utils/parser.py
Analysis
- Command queries
functions/show_commands.py - AI data summary
utils/json_data.py - AI analysis
functions/ai.py - AI modes
config.py
Local data
- History deletion
functions/delete.py - SQLite statistics
db/database.py
Other components
- CLI user
- Shell history files
- AI provider
Connections 20
- CLI user → Command router: runs commands
- Command router → History importer: starts import
- Command router → Command queries: requests view
- Command router → Table display: displays results
- Command router → History deletion: requests deletion
- Command router → AI analysis: requests analysis
- History importer → Shell config: loads settings
- Shell history files → History importer: provides history
- History importer → History parsers: parses lines
- History importer → SQLite statistics: inserts commands
- Command queries → SQLite statistics: queries statistics
- Command queries → History parsers: normalizes commands
- Command queries → Command router: returns results
- AI data summary → SQLite statistics: reads statistics
- AI data summary → History parsers: normalizes commands
- AI analysis → AI data summary: builds input
- AI analysis → AI modes: selects prompt
- AI analysis → AI provider: sends analysis
- AI provider → AI analysis: returns response
- History deletion → SQLite statistics: removes database