Skip to main content

Workspace Indexing

NikCLI’s workspace indexing system intelligently analyzes your codebase to build a searchable knowledge base. It combines file filtering, language detection, importance scoring, and vector embeddings to create an efficient context retrieval system.

How It Works

1. File Discovery & Filtering

The system scans your workspace and applies intelligent filtering:
Default Exclusions:

2. Language & Framework Detection

Automatic detection of languages and frameworks:

3. File Analysis

Each file is analyzed to extract:

4. Importance Scoring

Files are scored based on multiple factors:
Importance Categories:
  • 90-100: Entry points, core configuration
  • 70-89: Main source files, important modules
  • 50-69: Regular source files
  • 30-49: Utilities, helpers
  • 0-29: Tests, documentation, generated files

5. Vector Embedding Generation

Files are chunked and embedded for semantic search:

Indexing Strategies

Full Workspace Index

Index entire workspace:

Selective Indexing

Index specific paths:

Incremental Updates

Only re-index changed files:

Configuration

File Filter Options

Chunking Configuration

Cost Management

Monitoring & Optimization

Index Statistics

Cache Management

Watch Mode

Monitor file changes and re-index automatically:

Best Practices

1. Optimize Index Scope

2. Use Appropriate Filters

3. Leverage Caching

4. Monitor Costs

Troubleshooting

High Indexing Costs

Large Workspaces

Slow Indexing

Semantic Search

Advanced search capabilities

Embeddings

Embedding configuration

Token Management

Optimize token usage

Cache System

Performance optimization