sempropos v1.0.0
GitHub
v1.0.0 · Offline-First · Python 3.11+ · MIT

Instant CLI mastery,
without leaving your terminal.

sem replaces apropos, --help, and man with a canonical structured ToolSpec index, Porter-stemmed BM25 + semantic retrieval, safe local GGUF / Ollama synthesis, and an auto-managed warm daemon.

zsh — sem v1.0.0
$ sem -e "delete files older than 30 days"
╭─ Command (DESTRUCTIVE) ────────────── local_gguf · 118ms ─╮
│ find . -type f -mtime +30 -delete                          │
╰────────────────────────────────────────────────────────────╯
⚠ Safety Notice: `find -delete` permanently removes matched files.
  -type   File is of type: f (regular file)
  -mtime  File's data was last modified n*24 hours ago
  -delete Delete files; true if removal succeeded

$ sem show du --flags depth
  -d, --max-depth <N>  print total for a directory only if N levels below
Ask / Ctrl+S

Grounded Synthesis

JSON-schema constrained local GGUF (0.5B–3B), pure-HTTP Ollama, or zero-LLM Tier-0 fallback with safety warnings.

Show

Instant Reference Cards

0ms-LLM structured cheat sheets merging man(7)/mdoc(7), tldr, completions, and safe --help probes.

Search

Smart Tool Discovery

Weighted multi-column Porter FTS5, extension hints (.7z, .json), and compound intent ranking.

Files

  • Architecture Overview
  • CLI Surface and Query Dispatch - Commands, bare-query argv normalization, ask/show/search output modes, daemon/config/model commands, flags, exit codes, and dispatch behavior for the sem CLI.
  • Configuration and Paths - Data, config, and runtime directory resolution, config.toml schema, provider and model settings, index metadata validation, revision constants, and API key resolution.
  • Warm Daemon & Service Layer - Auto-managed Unix-socket warm daemon (SemDaemonServer, stdlib-only DaemonClient, --porcelain fast path, flock single-instance lock, idle auto-shutdown) and the decoupled SemService application layer.
  • Development and Quality - Local development setup, Makefile targets, ruff and mypy configuration, CI quality gates, test layout and offline policy, release publishing, and roadmap themes.
  • Index Database Schema - SQLite v3 tables, four Porter-stemmed FTS5 virtual tables, synchronization triggers, connection behavior, and the repository queries that depend on the schema.
  • Indexing Pipeline - How sempropos discovers PATH binaries and man pages, parses roff/mdoc plus tldr, completions, and safe --help probes, merges them into ToolSpecs, and maintains SQLite and embeddings incrementally and atomically.
  • Operations and Troubleshooting - Install, update, doctor, config, daemon, model, and provider workflows, index staleness detection, and remedies for common index, provider, daemon, and embedding failures.
  • Quickstart - Install sem v1.0.0, build the multi-source ToolSpec index, use ask/show/search modes, optionally enable the built-in local GGUF model, and set up Ctrl+S shell integration.
  • Retrieval and Ranking - Stopword filtering, singular forms, weighted directional synonym expansion, multi-column BM25 with artifact and intent boosts, confidence-gated semantic recall, hybrid fusion semantics, and per-tool flag selection.
  • Shell Integration - The zsh, bash, and fish Ctrl+S widgets, tab completions, the stty requirement, and the --porcelain contract that makes in-place command replacement safe.
  • Command Synthesis, Providers & Safety Verification - Provider contracts, lazy facade dispatch, managed local GGUF models, pure-HTTP Ollama and OpenAI-compatible backends, FastEmbed embeddings, Tier-0 deterministic fallback, JSON-schema prompt budgeting, and command safety verification.