CLI reference
Every ragforge subcommand, sourced from ragforge/cli.py.
ragforge info
List all registered plugin components (parsers, chunkers, embedders, metrics) and module status. No flags.
ragforge inforagforge parse
Parse a file into clean text. Auto-detects format by extension.
ragforge parse notes.md
ragforge parse report.pdf --parser docling --preview 1000| Flag | Description |
|---|---|
--parser | Parser backend: text, html, pdf, docling. Default: auto-detect. |
--preview N | Characters of text to show (default: 500). |
--json | Output as JSON. |
ragforge chunk
Parse then chunk a file.
ragforge chunk notes.md --strategy structure --max-tokens 384| Flag | Description |
|---|---|
--parser | Parser backend (same as parse). |
--strategy | fixed | structure | docling. Default: structure. |
--max-tokens N | Target chunk size in tokens. |
--show-text | Print each chunk's text. |
--json | Output as JSON. |
ragforge knowledge build
Build a knowledge base from files or directories.
ragforge knowledge build my-kb ./docs/ faq.md
ragforge knowledge build my-kb ./docs/ --embedder sentence-transformers| Flag | Description |
|---|---|
--strategy | fixed | structure | docling (default: structure). |
--parser | Parser backend. |
--embedder | default | sentence-transformers | openai. |
--json | Output as JSON. |
ragforge query
Query a built knowledge base with hybrid search.
ragforge query my-kb "How do refunds work?"
ragforge query my-kb "refunds" -k 3 --mode hybrid --rerank
ragforge query my-kb "refunds" --generate --llm ollama --model llama3| Flag | Description |
|---|---|
-k N | Number of results (default: 5). |
--mode | dense | bm25 | hybrid (default: hybrid). |
--rerank | Apply cross-encoder reranking. |
--generate | Generate a grounded LLM answer. |
--llm | LLM provider: openai, anthropic, ollama. |
--model | Override default model for the LLM provider. |
--json | Output as JSON. |
ragforge eval
ragforge eval run
Evaluate a knowledge base against a golden dataset (JSON or CSV).
ragforge eval run my-kb golden.json
ragforge eval run my-kb golden.json --metrics hit_rate,mrr --rerank| Flag | Description |
|---|---|
-k N | Top-k for retrieval (default: 5). |
--mode | Retrieval mode (default: hybrid). |
--rerank | Apply reranking. |
--generate | Generate answers (required for judge metrics). |
--llm | LLM provider. |
--metrics | Comma-separated metrics. |
--json | Output as JSON. |
ragforge eval compare
A/B compare two knowledge bases on the same golden dataset.
ragforge eval compare my-kb-v1 my-kb-v2 golden.jsonragforge eval bootstrap
Generate a draft golden dataset from an existing KB using an LLM. Human review required before use.
ragforge eval bootstrap my-kb -n 20 --llm ollama --out draft_golden.jsonragforge agents
ragforge agents run
Run a multi-agent orchestration task from a Python config file. The config must defineagents and optionally goal, max_steps,board_name, and seed.
ragforge agents run config.py --max-steps 20 --persist| Flag | Description |
|---|---|
--max-steps N | Maximum orchestration steps. |
--persist | Use SQLite-backed blackboard (default: in-memory). |
--json | Output as JSON. |
ragforge agents benchmark
Run a blackboard-vs-direct-messaging cost comparison.
ragforge agents benchmark config.pyragforge agents board
Inspect the current state of a named SQLite-backed blackboard.
ragforge agents board research-taskragforge serve
Start the HTTP/JSON API server.
ragforge serve --host 0.0.0.0 --port 8000| Flag | Description |
|---|---|
--host | Bind host (default: 0.0.0.0). |
--port N | Port (default: 8000). |
--reload | Enable auto-reload (development mode). |
ragforge ui
Launch the local web dashboard (tracing, evaluation viewer, chat). Requires ragforge[ui].
ragforge ui --port 8000| Flag | Description |
|---|---|
--host | Bind host. |
--port N | Port. |
--no-browser | Don't auto-open browser. |