blogus scan Static scan for LLM calls
Walks the repository and lists every OpenAI and Anthropic call it can identify in Python and JavaScript, with file path, line number, and whether the call uses an inline string or an already-versioned prompt.
Features
blogus is a single CLI with one command per step of the prompt lifecycle. Nothing here needs a server, and the build-time path never calls a model. Group by what you’re trying to do.
Find every prompt that already exists in your codebase — including the ones no one remembers writing.
blogus scan Walks the repository and lists every OpenAI and Anthropic call it can identify in Python and JavaScript, with file path, line number, and whether the call uses an inline string or an already-versioned prompt.
blogus check The inverse of scan: surfaces template strings that live in code but never made it into a .prompt file. Run it in CI to stop unversioned prompts slipping through review.
Promote inline strings into reviewable, typed .prompt files with pinned models.
blogus init Scaffolds a prompts/ directory. Engineers promote inline strings into .prompt files: YAML frontmatter (name, model.id, model.temperature, variables) followed by a Jinja-style template body.
blogus prompts Enumerates every .prompt file on disk with its name and pinned model, so you can see your prompt surface at a glance.
Pin each prompt to a content hash so what ships is provably what was reviewed.
blogus lock Computes a sha256 over each .prompt file’s template content and records it in prompts.lock alongside the git commit it was generated from. One entry per prompt.
blogus verify Recomputes hashes on disk and exits non-zero on any mismatch between the code markers, the .prompt files, and prompts.lock. Reads files only — no model calls, no secrets required.
Rewrite call sites to load from the versioned files and keep code and prompts in lockstep.
blogus fix Replaces inline strings with load_prompt("name", var=value) and inserts a marker comment of the form # @blogus:summarize sha256:a1b2c3d4 above the call. Your runtime now reads from the versioned file.
Spot-check prompts from the CLI without touching application code. Needs an API key.
blogus exec <name> Renders the template with variables and calls the pinned model. Useful for verifying a change before it lands. Reads OPENAI_API_KEY / ANTHROPIC_API_KEY from the environment.
blogus analyze A lightweight spot-check on a prompt’s effectiveness. Not a full eval harness — that stays a separate concern — but enough to sanity-check a change.
blogus test Produces test cases for a prompt so you can exercise it against representative inputs before shipping.
blogus demo Launches an interactive terminal demo (behind the blogus[tui] extra) that walks through the scan → version → lock → sync workflow on a sample repo.
The quickstart walks scan → lock → verify in about two minutes. The architecture page explains how the three sources of truth stay in agreement.