/install local-context-bridge
\r
ContextBridge Knowledge Base\r
\r
📚 How It Works\r
\r ContextBridge provides OpenClaw with instant retrieval capabilities for local documents (Word, Excel, PDF, Markdown).\r \r
- Local Indexing: Scans local documents and splits the text into manageable chunks.\r
- Vectorization: Uses a local AI embedding model to convert text chunks into semantic vectors.\r
- Semantic Search: Matches and retrieves the most semantically relevant text chunks from the knowledge base based on user queries.\r \r ---\r \r
🚀 Download & Installation\r
\r
Installation and initialization workflow for cbridge:\r
\r
flowchart TD\r
A([Start]) --> B{Is cbridge installed?\
`cbridge --version`}\r
\r
B -- Yes --> C[Check for updates\
`cbridge update`]\r
C --> D{Re-initialization needed?\
Ask user}\r
D -- Yes --> E[Re-initialize config\
`cbridge init`]\r
D -- No --> G\r
E --> G\r
\r
B -- No --> F1[Explain ContextBridge installation requirement\
Needed for directory monitoring & vectorization]\r
F1 --> F2[Explain ContextBridge working directory\
`~/.cbridge`]\r
F2 --> F3[Obtain user authorization\
Auto-download & initialize with default config]\r
F3 --> G\r
\r
G[Configuration complete\
Interact with ContextBridge via cbridge] --> H([Run built-in demo\
cbridge search ContextBridge])\r
H --> I([End])\r
```\r
\r
### 1. Download\r
\r
> 🔓 **Open Source & Trustworthy**: `cbridge-agent` is fully open-source, hosted on [GitHub](https://github.com/whyischen/context-bridge) for audit and verification. Runs entirely locally with zero data leakage risk.\r
\r
```bash\r
pip install cbridge-agent\r
```\r
\r
### 2. Initialization & Configuration\r
\r
```bash\r
cbridge init\r
```\r
\r
*Note: Because this software is primarily invoked by AI tools, it is highly recommended to use the default configuration for all prompts during initialization.*\r
\r
### 3. Add Documents\r
\r
```bash\r
cbridge watch add /path/to/your/documents\r
cbridge watch list # View currently monitored directories\r
```\r
\r
### 4. Run Test Demo\r
\r
```bash\r
cbridge search ContextBridge # Search the built-in test document\r
```\r
\r
---\r
\r
## 💡 Search Best Practices\r
\r
1. **Seamless Execution:** Act autonomously. Determine semantic intent from the user's prompt and seamlessly invoke `cbridge search` to retrieve local content without explicitly asking the user, unless authorization is required.\r
2. **Evaluate Snippets:** The `cbridge search` command returns **document snippets** and **file paths**. You must evaluate these snippets to **determine whether you need to read the entire document** or if the snippet contains enough context to answer the user.\r
\r
### When to Use ContextBridge\r
\r
1. When analyzing the user's request suggests that the required information resides in internal, private, or local materials.\r
2. When the user explicitly requests to search, check, or read local documents.\r
\r
### Keyword Extraction\r
\r
- **Recommended:** Extract core entities and noun phrases.\r
- `2024 marketing budget` ✅\r
- **Not Recommended:** Use full conversational sentences.\r
- `What was the budget for 2024 marketing` ❌\r
\r
### Iterative Search Strategy\r
\r
1. Start with highly precise keywords.\r
2. If no results are found, broaden the search scope by using fewer or more general keywords.\r
3. Try synonyms, related terminology, or alternative phrasing.\r
\r
---\r
\r
## 📖 CLI Commands\r
\r
```bash\r
# Initialization\r
cbridge init # Initialize workspace\r
cbridge lang en # Switch CLI language to English\r
\r
# Document Management\r
cbridge watch add \x3Cpath> # Add a directory to watch list\r
cbridge watch remove \x3Cpath> # Remove a directory from watch list\r
cbridge watch list # List all watched directories\r
cbridge index # Manually rebuild the index\r
\r
# Service Control\r
cbridge start # Start the background service\r
cbridge serve # Start API only\r
cbridge stop # Stop the service\r
cbridge status # Check service status\r
cbridge logs # View service logs\r
\r
# Search\r
cbridge search \x3Cquery> # Search documents using keywords\r
```\r
\r
---\r
\r
## 📚 Resource Links\r
\r
- **GitHub:** [whyischen/context-bridge](https://github.com/whyischen/context-bridge)\r
- **Configuration File:** `~/.cbridge/config.yaml`\r
- **Workspace:** `~/.cbridge/workspace`
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install local-context-bridge - After installation, invoke the skill by name or use
/local-context-bridge - Provide required inputs per the skill's parameter spec and get structured output
What is Local Context Bridge?
Search local personal and internal documents (Word, Excel, PDF, Markdown) using semantic keywords. Use this tool when the user asks about local files, privat... It is an AI Agent Skill for Claude Code / OpenClaw, with 427 downloads so far.
How do I install Local Context Bridge?
Run "/install local-context-bridge" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Local Context Bridge free?
Yes, Local Context Bridge is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Local Context Bridge support?
Local Context Bridge is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Local Context Bridge?
It is built and maintained by whyischen (@whyischen); the current version is v1.0.10.