Installation
Install the CLI globally using your preferred package manager:npx:
Running a Full RAG Server from Local Files
If you have a local directory of markdown files or PDFs, you can ingest them, index them, and run a complete standalone RAG server using only the CLI. Here is the complete end-to-end workflow:Core Commands Reference
Once installed, you can use thelarkup-rag (or rag) command.
| Command | Description |
|---|---|
larkup-rag init [name] | Create a new RAG server workspace and make it active. |
larkup-rag servers | List all servers (● marks the active one). |
larkup-rag use <id|name> | Switch the active server workspace. |
larkup-rag config | Show the active server’s configuration and status. |
larkup-rag add-doc --file <path> | Add a document from a local file. |
larkup-rag add-doc --text "<text>" | Add a document from inline text (optional --title, --url). |
larkup-rag index | Execute the chunking and embedding pipeline. |
larkup-rag generate [--out <dir>] | Emit the deployable RAG server to disk. |
larkup-rag serve | Run the generated server locally in the foreground. |
larkup-rag query "<question>" | Retrieve the top-k chunks (--topK <n> optional). |
larkup-rag chat | Chat with your knowledge base in the terminal (--model <id> optional). |
larkup-rag settings | Configure CLI settings (e.g., chat models). |

