
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
Documentation search CLI using SQLite FTS5 full-text search with Porter stemming and BM25 ranking
Markdown documentation search CLI using SQLite FTS5 full-text search.
docs and search commandspnpm install
pnpm run build
# 1. Install globally
npm install -g anydocs
# or
pnpm install -g anydocs
# 2. Initialize anydocs
anydocs init
# 3. Edit config file at ~/.config/anydocs/anydocs.json
cat > ~/.config/anydocs/anydocs.json << 'EOF'
{
"projects": [
{ "repo": "vercel/next.js" }
]
}
EOF
# 4. Install (clone and index) projects
anydocs install
# 5. Search for content
anydocs search "routing" -n 5
# 6. Retrieve a specific document
anydocs docs /docs/app/getting-started.md --project next.js
Edit ~/.config/anydocs/anydocs.json to define projects:
{
"projects": [
{ "repo": "vercel/next.js" },
{ "repo": "facebook/react" },
{
"repo": "github.com/vuejs/core",
"name": "vue3",
"ref": "v3.4.0",
"path": "packages/*/README.md"
}
]
}
Configuration fields:
repo (required): Repository in owner/repo or host/owner/repo formatname (optional): Project name, defaults to repo name (e.g., "next.js")ref (optional): Git branch or tag, defaults to repository's default branchpath (optional): Glob pattern for indexing, defaults to **/*.{md,mdx}sparse-checkout (optional): Array of paths for sparse checkoutoptions (optional): Additional CLI optionsInstall (clone and index) all configured projects:
# Install all projects
anydocs install
# Install specific project only
anydocs install --project next.js
What install does:
~/.local/share/anydocs/repos/host/owner/repo~/.local/share/anydocs/docs/~/.local/share/anydocs/anydocs-lock.yaml# Basic search
anydocs search "hello"
# Limit number of results
anydocs search "world" -n 5
# Search with FTS5 query syntax
anydocs search "hello AND world"
anydocs search '"exact phrase"'
anydocs search "run*" # Prefix search
anydocs search "hello OR world"
anydocs search "hello NOT world"
Search output (JSON):
[
{
"path": "/guide/intro.md",
"title": "Getting Started",
"snippet": "Welcome to the <b>documentation</b> system!",
"score": -0.0000015
}
]
Retrieve the raw Markdown content:
anydocs docs /guide/intro.md --project next.js
Output is the original Markdown with front-matter removed.
# Initialize anydocs
anydocs init
# Configure projects
cat > ~/.config/anydocs/anydocs.json << 'EOF'
{
"projects": [
{ "repo": "vercel/next.js" },
{ "repo": "facebook/react" }
]
}
EOF
# Install all projects
anydocs install
# Search across all projects
anydocs search "hooks" -n 5
# Search specific project
anydocs search "routing" --project next.js
# Get specific document
anydocs docs /docs/app/routing.md --project next.js
# Re-install (updates existing entries)
anydocs install
~/.config/anydocs/anydocs.json (user-editable project list)~/.local/share/anydocs/anydocs-lock.yaml (auto-generated)~/.local/share/anydocs/repos/host/owner/repo~/.local/share/anydocs/docs/project-name~/.local/share/anydocs/db/default.db (SQLite FTS5)pages(path UNINDEXED, project UNINDEXED, title, body) USING fts5(tokenize='porter')docs: Raw Markdown to stdoutsearch: JSON array with {path, project, title, snippet, score}run matches running*<b>...</b> tagsindex <root> [pattern] command to recursively index Markdown files/)init command for directory setupinstall command with anydocs.json configexport-llms command for llms.txt generation~/.config/anydocs/anydocs.json defines projects with minimal required fieldsowner/repo (implies GitHub) or host/owner/reporepo required; name, ref, path have smart defaultsanydocs-lock.yaml tracks cloned refs and timestamps$XDG_DATA_HOME/anydocs/repos/host/owner/repo$XDG_DATA_HOME/anydocs/db/default.dbpages(path UNINDEXED, project UNINDEXED, title, body) USING fts5(tokenize='porter')init: Create directory structure and empty configinstall [--project name]: Clone repos and index docssearch <query> [-n N] [--project name]: Full-text searchdocs <path> [--project name]: Retrieve document# ... as titleinstall updates existing installations/-separated, starts with /<b>...</b> highlighting# Install dependencies
pnpm install
# Build TypeScript to JavaScript
pnpm run build
# Run tests
pnpm test:run # Run all tests once
pnpm test # Run tests in watch mode
pnpm test:ui # Open Vitest UI
# Linting and formatting
pnpm run lint # Check code
pnpm run lint:fix # Auto-fix issues
pnpm run format # Format code
# Development with tsx (no build needed)
pnpm run dev init
pnpm run dev install
pnpm run dev search "query"
# Run built CLI
node dist/index.js init
node dist/index.js search "query"
CREATE VIRTUAL TABLE pages USING fts5(
path UNINDEXED,
title,
body,
tokenize='porter'
);
FTS5 creates auxiliary tables: pages_content, pages_data, pages_idx, pages_docsize, pages_config.
FAQs
Documentation search CLI using SQLite FTS5 full-text search with Porter stemming and BM25 ranking
We found that anydocs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.