Loading...
Loading...
Comprehensive CLI reference and search strategies for osgrep semantic code search. Use for detailed CLI options, index management commands, search strategy guidance (architectural vs targeted queries), and troubleshooting. Complements the osgrep plugin which handles daemon lifecycle.
npx skill4agent add tdimino/claude-code-minoan osgrep-referencegrepskeletontracesymbolsdoctorlist.osgrep/~/.osgrep/data--resetGrepGlobRead.osgrep/cd /path/to/project # REQUIRED: cd into the project first
osgrep "your query" # Now search worksosgrep "your semantic query"
osgrep search "your query" path/to/scope # Scope to subdirectory
osgrep skeleton src/file.py # Compress file to signatures
osgrep trace functionName # Show call graph
osgrep symbols # List all symbolsosgrep "user registration flow"
osgrep "webhook signature validation"
osgrep "database transaction handling"
osgrep "how are plugins loaded" packages/srcIMPLEMENTATION path/to/file:line
Score: 0.95
Preamble:
[code snippet or content preview]
...Readosgrep "authentication authorization checks"osgrep "session validation logic"
osgrep "API authentication middleware"osgrep "logic for merging user and default configuration"...osgrep "validation logic" -m 20 # Max 20 results total (default: 10)
osgrep "validation logic" --per-file 3 # Up to 3 matches per file (default: 1)osgrep "API endpoints" --compact # File paths only
osgrep "API endpoints" --content # Full chunk content (not just snippets)
osgrep "API endpoints" --scores # Show relevance scores
osgrep "API endpoints" --plain # Disable ANSI colorsosgrep "validation logic" -s # Sync files to index before searching
osgrep "validation logic" -d # Dry run (show what would sync)osgrep index # Incremental update
osgrep index -r # Full re-index from scratch (--reset)
osgrep index -p /path/to/repo # Index a specific directory
osgrep index -d # Preview what would be indexed (--dry-run)osgrep skeleton src/server.py # Show function/class signatures only
osgrep skeleton src/server.py --no-summary # Omit call/complexity summaries
osgrep skeleton "auth logic" -l 5 # Query mode: skeleton of top 5 matching files# → calls | C:N | ORCHosgrep trace handleRequest # Who calls this? What does it call?osgrep symbols # All symbols (default limit: 20)
osgrep symbols "Request" # Filter by pattern
osgrep symbols -p src/api/ -l 50 # Filter by path, increase limitosgrep list # Show all indexed repositories
osgrep doctor # Check health and configuration
osgrep setup # Pre-download models (~150MB)
osgrep serve # Run background daemon (port 4444)
osgrep serve -p 8080 # Custom port (or OSGREP_PORT=8080)
osgrep serve -b # Run in background (--background)
osgrep serve status # Check if daemon is running
osgrep serve stop # Stop daemon
osgrep serve stop --all # Stop all daemonsGET /healthPOST /search{ query, limit, path, rerank }.osgrep/server.jsonportpidosgrep install-claude-code # Install as Claude Code plugin
osgrep install-opencode # Install for Opencode# Mental processes (Open Souls / Daimonic)
osgrep "mental processes that orchestrate conversation flow"
osgrep "subprocesses that learn about the user"
osgrep "cognitive steps using structured output"
# React/Next.js
osgrep "where do we fetch data in components?"
osgrep "custom hooks for API calls"
osgrep "protected route implementation"
# Backend
osgrep "request validation middleware"
osgrep "authentication flow"
osgrep "rate limiting logic"osgrep "payment processing"
osgrep "notification sending"
osgrep "user permission checks"
osgrep "order fulfillment workflow"osgrep "error handling patterns"
osgrep "logging configuration"
osgrep "database migrations"
osgrep "environment variable usage"# Good - conceptual
osgrep "how does the server start"
osgrep "component state management"
# Less effective - too literal
osgrep "server.init"
osgrep "useState"# Too vague
osgrep "code"
# Clear intent
osgrep "user registration validation logic"osgrep "how do we handle payment failures?"
osgrep "what happens when a webhook arrives?"
osgrep "where is user input sanitized?".osgrep/.osgrep/~/.osgrep/data/osgrep setuposgrep setuposgrep indexosgrep index --resetosgrep doctor # Diagnose problems
npm install -g osgrep # Reinstall if neededosgrep index