Reference
CLI Reference
Complete reference for all Semantiq CLI commands.
semantiq index
Index a directory to create or update the semantic database.
semantiq index [PATH] [OPTIONS]
Arguments:
[PATH] Directory to index (default: current directory)
Options:
-v, --verbose Show detailed output
-f, --force Force re-index all files
--exclude Patterns to exclude (can be repeated)
-h, --help Print helpExamples
# Index current directory
semantiq index
# Index with verbose output
semantiq index . --verbose
# Force re-index everything
semantiq index --force
# Exclude specific directories
semantiq index --exclude node_modules --exclude distsemantiq search
Search for code patterns, symbols, or text in the indexed codebase.
semantiq search <QUERY> [OPTIONS]
Arguments:
<QUERY> Search query (supports regex)
Options:
-l, --limit Maximum number of results (default: 20)
-t, --type Filter by symbol type (function, class, etc.)
--json Output results as JSON
-h, --help Print helpExamples
# Search for a pattern
semantiq search "authentication"
# Search with limit
semantiq search "handler" --limit 5
# Filter by type
semantiq search "User" --type class
# Output as JSON
semantiq search "config" --jsonsemantiq find-refs
Find all references to a symbol including definitions and usages.
semantiq find-refs <SYMBOL> [OPTIONS]
Arguments:
<SYMBOL> Symbol name to find references for
Options:
-l, --limit Maximum number of results (default: 50)
--json Output results as JSON
-h, --help Print helpExamples
# Find all references to a function
semantiq find-refs handleRequest
# Find references to a class
semantiq find-refs UserService
# Output as JSON
semantiq find-refs Config --jsonsemantiq deps
Analyze the dependency graph for a file.
semantiq deps <FILE> [OPTIONS]
Arguments:
<FILE> File path to analyze
Options:
--imports Show only imports (what this file depends on)
--dependents Show only dependents (what depends on this file)
--depth Maximum depth for transitive dependencies
--json Output results as JSON
-h, --help Print helpExamples
# Analyze a file's dependencies
semantiq deps src/auth/handler.ts
# Show only imports
semantiq deps src/index.ts --imports
# Show only dependents
semantiq deps src/utils.ts --dependentssemantiq explain
Get detailed explanation of a symbol including definition, docs, and usage patterns.
semantiq explain <SYMBOL> [OPTIONS]
Arguments:
<SYMBOL> Symbol name to explain
Options:
--json Output results as JSON
-h, --help Print helpExamples
# Explain a function
semantiq explain handleAuth
# Explain a class
semantiq explain DatabaseConnectionsemantiq serve
Start Semantiq as an MCP server for integration with AI assistants.
semantiq serve [OPTIONS]
Options:
--stdio Use stdio for MCP communication (default)
--port Use HTTP transport on specified port
-h, --help Print helpExamples
# Start MCP server (stdio)
semantiq serve
# Start with HTTP transport
semantiq serve --port 8080