Skip to content
blogus uvx blogus

Features

Eleven commands, one workflow

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.

Discover

Find every prompt that already exists in your codebase — including the ones no one remembers writing.

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.

blogus check

Drift detection

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.

Version

Promote inline strings into reviewable, typed .prompt files with pinned models.

blogus init

Create the prompts directory

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

List versioned prompts

Enumerates every .prompt file on disk with its name and pinned model, so you can see your prompt surface at a glance.

Lock

Pin each prompt to a content hash so what ships is provably what was reviewed.

blogus lock

Generate prompts.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

CI verification gate

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.

Sync

Rewrite call sites to load from the versioned files and keep code and prompts in lockstep.

blogus fix

Rewrite call sites

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.

Run

Spot-check prompts from the CLI without touching application code. Needs an API key.

blogus exec <name>

Execute a prompt

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

Evaluate effectiveness

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

Generate test cases

Produces test cases for a prompt so you can exercise it against representative inputs before shipping.

blogus demo

Interactive TUI

Launches an interactive terminal demo (behind the blogus[tui] extra) that walks through the scan → version → lock → sync workflow on a sample repo.

See it end to end

The quickstart walks scan → lock → verify in about two minutes. The architecture page explains how the three sources of truth stay in agreement.