Update docs
This commit is contained in:
parent
98727ad080
commit
fdd926eeba
3 changed files with 18 additions and 0 deletions
|
|
@ -6,6 +6,7 @@ The `haiku-rag` CLI provides complete document management functionality.
|
||||||
Global options (must be specified before the command):
|
Global options (must be specified before the command):
|
||||||
|
|
||||||
- `--config` - Specify custom configuration file
|
- `--config` - Specify custom configuration file
|
||||||
|
- `--read-only` - Open database in read-only mode (blocks writes, skips upgrades)
|
||||||
- `--version` / `-v` - Show version and exit
|
- `--version` / `-v` - Show version and exit
|
||||||
|
|
||||||
Per-command options:
|
Per-command options:
|
||||||
|
|
@ -17,6 +18,7 @@ The `haiku-rag` CLI provides complete document management functionality.
|
||||||
```bash
|
```bash
|
||||||
haiku-rag --config /path/to/config.yaml list
|
haiku-rag --config /path/to/config.yaml list
|
||||||
haiku-rag --config /path/to/config.yaml list --db /path/to/custom.db
|
haiku-rag --config /path/to/config.yaml list --db /path/to/custom.db
|
||||||
|
haiku-rag --read-only search "query"
|
||||||
haiku-rag add -h
|
haiku-rag add -h
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -234,6 +236,9 @@ haiku-rag serve --monitor --mcp --agui
|
||||||
|
|
||||||
# Custom MCP port
|
# Custom MCP port
|
||||||
haiku-rag serve --mcp --mcp-port 9000
|
haiku-rag serve --mcp --mcp-port 9000
|
||||||
|
|
||||||
|
# Read-only mode (excludes write MCP tools, disables monitor)
|
||||||
|
haiku-rag --read-only serve --mcp
|
||||||
```
|
```
|
||||||
|
|
||||||
See [Server Mode](server.md) for details on available services.
|
See [Server Mode](server.md) for details on available services.
|
||||||
|
|
|
||||||
|
|
@ -63,8 +63,13 @@ haiku-rag serve --mcp --mcp-port 9000
|
||||||
|
|
||||||
# stdio transport (for Claude Desktop)
|
# stdio transport (for Claude Desktop)
|
||||||
haiku-rag serve --mcp --stdio
|
haiku-rag serve --mcp --stdio
|
||||||
|
|
||||||
|
# Read-only mode (excludes write tools)
|
||||||
|
haiku-rag --read-only serve --mcp --stdio
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Read-only mode:** When `--read-only` is specified, write tools (`add_document_from_file`, `add_document_from_url`, `add_document_from_text`, `delete_document`) are not registered. Only search and query tools remain available.
|
||||||
|
|
||||||
## Claude Desktop Integration
|
## Claude Desktop Integration
|
||||||
|
|
||||||
Add to your Claude Desktop configuration (`claude_desktop_config.json`):
|
Add to your Claude Desktop configuration (`claude_desktop_config.json`):
|
||||||
|
|
|
||||||
|
|
@ -17,11 +17,19 @@ async with HaikuRAG("path/to/database.lancedb", create=True) as client:
|
||||||
async with HaikuRAG("path/to/database.lancedb") as client:
|
async with HaikuRAG("path/to/database.lancedb") as client:
|
||||||
# Your code here
|
# Your code here
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
# Open in read-only mode (blocks writes, skips upgrades)
|
||||||
|
async with HaikuRAG("path/to/database.lancedb", read_only=True) as client:
|
||||||
|
results = await client.search("query") # Read operations work
|
||||||
|
# await client.create_document(...) # Would raise ReadOnlyError
|
||||||
```
|
```
|
||||||
|
|
||||||
!!! note
|
!!! note
|
||||||
Databases must be explicitly created with `create=True` or via `haiku-rag init` before use. Operations on non-existent databases will raise `FileNotFoundError`.
|
Databases must be explicitly created with `create=True` or via `haiku-rag init` before use. Operations on non-existent databases will raise `FileNotFoundError`.
|
||||||
|
|
||||||
|
!!! note
|
||||||
|
Read-only mode is useful for safely accessing databases without risk of modification. It blocks all write operations, skips database upgrades on open, and prevents settings from being saved.
|
||||||
|
|
||||||
## Document Management
|
## Document Management
|
||||||
|
|
||||||
### Creating Documents
|
### Creating Documents
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue