openclaw-docs-cli
v1.0.0
Published
Minimalist OpenClaw docs search with Fuse.js fuzzy matching, local paths, and TypeScript
Downloads
85
Maintainers
Readme
openclaw-docs-cli
Minimalist, AI-optimized documentation search for OpenClaw using Fuse.js.
Installation
# Install globally (recommended for CLI use)
npm install -g openclaw-docs-cli
# Install as a dependency
npm install openclaw-docs-cliNote: Requires openclaw package to be installed for docs auto-resolution.
CLI
# Search - shows path + summary + read_when by default
ocdocs "discord config"
# Expand for full details (urls, score, title)
ocdocs "discord config" --expand
# List all docs (discovery phase)
ocdocs --listAPI
import { searchDocs, getDocs } from 'openclaw-docs-cli';
// Search
const results = searchDocs('discord config');
// Get all docs
const allDocs = getDocs();Configuration
| Env | Description |
|-----|-------------|
| DOCS_DIR | Override docs directory (auto-resolved from installed openclaw package) |
Minimal AGENTS.md Additions
Append these to your project's AGENTS.md. Do not replace your full prompt setup:
IMPORTANT : You have access to `ocdocs` cli tool, optimized for Ai Agents.
- MANDATORY: When you need to find any information about openclaw, you must use `ocdocs --help` and extensively leverage this tool.
- Default output: path + summary + read_when (token-efficient)
- Use --expand only when you need urls/score/full details
- If no results, split multi-word queries, adjust --threshold, or try broader terms.
- Always use your native read tools for file contents; ocdocs is for discovery.Features
- Consolidated - Single-file core logic for zero-friction integration.
- Fuzzy Search - Typos and partial matches via Fuse.js.
- AI-First - Token-efficient text output designed for agent context windows.
- Modern - Dual CJS/ESM support, native Node.js types.
License
MIT
