Skip to content

CLI Commands

All commands accept the global flags (--api-url, --api-key, --output). Examples below assume authentication is configured via config file or environment variable.

Semantic code search across your indexed repository.

Terminal window
irag search "authentication middleware" --repo-id <id>
Flag Description
--query Search query (also accepted as a positional argument)
--repo-id Repository ID (required)
--workspace-id Workspace ID (narrows scope)
--language Filter by language (e.g. java, go, python)
--limit Maximum number of results (default: 10)

Example:

Terminal window
irag search "database connection pooling" --repo-id abc123 --language go --limit 5

Look up symbols (functions, classes, methods, interfaces) by name or fully qualified name.

Look up a symbol by its fully qualified name.

Terminal window
irag symbols fqn "com.example.UserService.findById" --repo-id <id>

Returns the symbol’s signature, file location, documentation, and metadata.

Search symbols by name pattern.

Terminal window
irag symbols search "UserService" --repo-id <id>
Flag Description
--kind Filter by symbol kind: function, class, method, interface
--language Filter by language

Example:

Terminal window
irag symbols search "Handler" --repo-id abc123 --kind method --language go

Find all references to a symbol.

Terminal window
irag symbols refs "com.example.UserService" --repo-id <id>

Returns a list of files and locations where the symbol is referenced.

Query the code graph for call relationships, dependencies, paths, and data flow.

Show all callers of a symbol, optionally traversing multiple levels.

Terminal window
irag graph callers "com.example.UserService.findById" --depth 3
Flag Description
--depth How many levels of callers to traverse (default: 1)

Show all symbols called by a given symbol.

Terminal window
irag graph callees "com.example.UserService.findById" --depth 2
Flag Description
--depth How many levels of callees to traverse (default: 1)

Find the call path between two symbols.

Terminal window
irag graph path --from "Controller.handle" --to "Repository.save"
Flag Description
--from Starting symbol FQN (required)
--to Target symbol FQN (required)

Show module-level dependency relationships.

Terminal window
irag graph deps "pkg/auth" --direction downstream
Flag Description
--direction upstream (what this module depends on) or downstream (what depends on this module)

Detect dependency cycles in the repository.

Terminal window
irag graph cycles --repo-id <id>

Trace data flow through a symbol, showing how data propagates via parameters and return values.

Terminal window
irag graph dataflow "com.example.UserService.findById"

Analyze the impact of changing a symbol or file. Shows affected callers, dependent modules, and downstream entry points.

Terminal window
irag impact "com.example.User" --repo-id <id>

Use this before making changes to understand the blast radius.

List technical debt items (TODO, FIXME, HACK markers) with file locations and context.

Terminal window
irag debt --repo-id <id>
Flag Description
--severity Filter by severity: low, medium, high, critical

Example:

Terminal window
irag debt --repo-id abc123 --severity high -o json

Inspect application configuration keys detected in the codebase.

List all configuration keys found in the repository.

Terminal window
irag config list --repo-id <id>

Get details for a specific configuration key, including where it is defined and consumed.

Terminal window
irag config get "spring.datasource.url" --repo-id <id>

Find configuration keys that lack documentation or descriptions.

Terminal window
irag config undocumented --repo-id <id>

Browse database schemas detected from DDL, migrations, and ORM definitions.

List all database schemas in the repository.

Terminal window
irag schema list --repo-id <id>

List tables in the database schema.

Terminal window
irag schema tables --repo-id <id>

Show detailed information about a table, including columns, types, constraints, and relationships.

Terminal window
irag schema detail "users" --repo-id <id>

Search schemas by name pattern.

Terminal window
irag schema search "user" --repo-id <id>

Explore event-driven architecture: producers, consumers, and event flow.

List all event producers in the repository.

Terminal window
irag events producers --repo-id <id>

List all event consumers in the repository.

Terminal window
irag events consumers --repo-id <id>

Trace the flow of a specific event from producer through consumers.

Terminal window
irag events flow "OrderCreated" --repo-id <id>

Inspect API contracts detected from OpenAPI/Swagger specifications.

List all API contracts in the repository.

Terminal window
irag contracts list --repo-id <id>

Get details for a specific API endpoint contract.

Terminal window
irag contracts get "/api/users" --repo-id <id>

Compare API contracts between two branches to detect breaking changes.

Terminal window
irag contracts diff --base main --head feature/auth --repo-id <id>
Flag Description
--base Base branch for comparison (required)
--head Head branch for comparison (required)

Manage indexing operations for a repository.

Show the current indexing status, including last run time, indexed file count, and any errors.

Terminal window
irag index status --repo-id <id>

Trigger a full reindex of the repository. This re-analyzes all files regardless of changes.

Terminal window
irag index full --repo-id <id>

Trigger an incremental index that only processes files changed since the last run.

Terminal window
irag index incremental --repo-id <id>

Lock indexing for a repository. Prevents any index operations from running, useful during migrations or maintenance.

Terminal window
irag index lock --repo-id <id>

Unlock indexing for a previously locked repository.

Terminal window
irag index unlock --repo-id <id>

Manage authentication. Supports browser-based login with SSO.

Open a browser to authenticate with IntelliRag. Supports SSO through your organization’s identity provider. Tokens are stored at ~/.config/irag/credentials.json.

Terminal window
irag auth login
Flag Description
--auth-url OAuth2 authorization server URL (default: auto-detected)

Remove locally stored credentials.

Terminal window
irag auth logout

Show current authentication status, including account email and token expiry.

Terminal window
irag auth status