The saravapos command-line interface for the Saravapos Translation Protocol.
npm install -g @saravapos/cli
# or use without installing
npx @saravapos/cli --help| Command | Purpose |
|---|---|
saravapos translate |
Translate text between two Saravapos profiles |
saravapos validate <path> |
Validate a Saravapos profile YAML file against the spec |
saravapos init -o <path> |
Create a new Saravapos profile YAML file (interactive wizard) |
saravapos list-providers |
List supported LLM providers and their required env vars |
saravapos version |
Print the CLI version (same as --version) |
| Flag | Purpose |
|---|---|
-p, --provider <name> |
LLM provider: anthropic, openai, or ollama |
-v, --verbose |
Enable verbose logging |
--version |
Print the CLI version |
-h, --help |
Print help |
Translate a chess concept for an F1 fan, with inline text:
saravapos translate \
--from profiles/chess-expert.yaml \
--to profiles/f1-fan.yaml \
--text "I sacrificed a pawn for positional advantage"Read the source from a file, write the translation to disk:
saravapos translate \
--from profiles/software-engineer.yaml \
--to profiles/curious-novice.yaml \
--input notes.md \
--output notes.translated.mdPipe input on stdin, switch provider, pick a specific model:
echo "Recursion is the soul of induction." | saravapos \
--provider openai \
translate \
--from profiles/software-engineer.yaml \
--to profiles/curious-novice.yaml \
--model gpt-4oTranslate flags reference:
| Flag | Purpose |
|---|---|
--from <path> |
Source profile YAML (required) |
--to <path> |
Destination profile YAML (required) |
--input <path> |
Read source text from a file |
--text <string> |
Inline source text |
--output <path> |
Write translated output to a file (otherwise stdout) |
--model <name> |
Override the LLM model |
If neither --input nor --text is provided, source text is read from stdin.
saravapos validate profiles/chess-expert.yaml
# ✓ profiles/chess-expert.yaml is valid
# display_name: Chess Expert
# expertise: 2
# analogies: 3On failure, prints field-level errors and exits non-zero:
saravapos validate bad-profile.yaml
# ✗ bad-profile.yaml is invalid
# /identity: must have required property 'display_name'Interactive wizard — prompts for identity + first expertise entry, then writes a well-commented YAML template:
saravapos init --output me.yaml
# (prompts) → wrote me.yaml
saravapos validate me.yaml # the file it just wrote is guaranteed to passInit refuses to overwrite an existing file unless --force is passed:
saravapos init -o me.yaml --forcesaravapos list-providers
# Supported LLM providers:
#
# anthropic env: ANTHROPIC_API_KEY default: claude-sonnet-4-6
# openai env: OPENAI_API_KEY default: gpt-4o
# ollama env: OLLAMA_HOST default: llama3.1
#
# Select with `--provider <name>` or the SARAVAPOS_PROVIDER env var.pnpm dev:cli -- --help # run the CLI without building
pnpm --filter @saravapos/cli build