How versenilvis/iris works
IRIS is a terminal-native shell completion tool: as a user edits a command line, it finds relevant suggestions, ranks and displays them inline, and supports selecting or accepting a suggestion. The map includes documented shell-history, alias, configuration, and AI capabilities. Source excerpts are partial, so some runtime wiring—especially history and ranking within the wrapper—is shown only where supported by the available evidence.
Main entry points: wrapper.go Shell wrapper · lookup.go Completion lookup · engine.go AI engine · main.go CLI entry
Components 19
Shell runtime
- CLI entry
cmd/iris/main.go - Command root
root/root.go - Shell wrapper
root/wrapper.go - Shell adapter
integration/shell/adapter.go - Inline overlay
integration/overlay.go - History integration
integration/history.go
Suggestion engine
- Command registry
commands/all.go - Tool specifications
commands - Completion lookup
spec/lookup.go - Argument generators
spec/filegen.go - Suggestion scoring
internal/scoring/scorer.go
Context and settings
- Workspace detection
internal/workspace/workspace.go - Live configuration
internal/config/config.go - Local state
internal/config/state.go
AI suggestions
- AI engine
internal/ai/engine.go - AI context providers
internal/ai/context_provider.go - AI API client
internal/ai/client.go
Other components
- Shell user
- AI provider
Connections 18
- Shell user → CLI entry: starts
- CLI entry → Command root: executes
- Command root → Shell wrapper: runs shell
- Shell wrapper → Shell adapter: gets shell
- Shell wrapper → Inline overlay: renders
- Shell wrapper → Live configuration: reads settings
- Shell wrapper → Local state: loads mode
- Shell wrapper → History integration: records command
- Command registry → Tool specifications: registers
- Shell wrapper → Completion lookup: requests matches
- Completion lookup → Command registry: queries specs
- Completion lookup → Argument generators: generates arguments
- Completion lookup → Suggestion scoring: ranks candidates
- Suggestion scoring → Workspace detection: checks context
- Shell wrapper → AI engine: requests AI
- AI engine → AI context providers: gathers context
- AI engine → AI API client: requests completion
- AI API client → AI provider: sends request