SuperSmall is a code analysis and indexing tool that optimizes context generation for Claude and Anthropic APIs. It works by:
.supersmall/index.json
git clone [repository-url] cd supersmall-cli-osx-alpha swift build -c release sudo cp .build/release/supersmall /usr/local/bin/
Requirements:
Initialize and index a repository for optimized context generation.
Option | Description | Default |
---|---|---|
--languages |
Comma-separated list of languages to analyze | swift,typescript,javascript,python,go,rust |
--force |
Force re-indexing even if index exists | false |
--max-file-size |
Maximum file size to analyze (in MB) | 10 |
Example:
supersmall init --languages typescript,javascript --force
Generate optimized context for a natural language query.
Option | Description | Default |
---|---|---|
--max-tokens |
Maximum context size in tokens | 100000 |
--threshold |
Relevance threshold (0.0-1.0) | 0.5 |
--include-contents |
Include file contents in output | false |
Example:
supersmall query "How does authentication work?" --max-tokens 50000 --include-contents
Update the repository index with incremental changes.
Option | Description | Default |
---|---|---|
--incremental |
Only update modified files since last index | false |
Example:
supersmall update --incremental
Show repository index statistics.
Option | Description | Default |
---|---|---|
--detailed |
Show detailed statistics breakdown | false |
Example:
supersmall stats --detailed
Export repository index to a file.
Option | Description | Default |
---|---|---|
--compress |
Compress the output file | false |
Example:
supersmall export index-backup.json --compress
Import repository index from a file.
Option | Description | Default |
---|---|---|
--merge |
Merge with existing index | false |
Example:
supersmall import index-backup.json --merge
Generate optimized context for Claude Code. This command formats output specifically for use with Claude Code.
Option | Description | Default |
---|---|---|
--type |
Context type: file, query, or auto | auto |
--max-tokens |
Maximum context size in tokens | 100000 |
--include-related |
Include related files automatically | false |
Example:
supersmall claude-code src/auth.ts --include-related
Optimize prompts and context for Kandi CLI.
Option | Description | Default |
---|---|---|
--command |
Kandi command type: chat, ask, code, review | chat |
--max-tokens |
Maximum context size in tokens | 100000 |
--stream |
Stream output for real-time processing | false |
--model |
API model to optimize for | claude-3-opus-20240229 |
Example:
supersmall kandi "implement user registration" --command code --max-tokens 150000
These options are available for all commands:
Option | Description | Default |
---|---|---|
--repo |
Path to repository | . (current directory) |
--output-format |
Output format: terminal, json, claude, kandi | terminal |
--verbose |
Enable verbose output | false |
--dangerously-skip-permissions |
Skip permission checks (use with caution) | false |
# 1. Initialize your repository cd /path/to/your/project supersmall init # 2. Generate context for a query supersmall query "How does the authentication system work?" # 3. Use with Claude Code supersmall claude-code src/main.ts --include-related # 4. Export index for CI/CD supersmall export ci-index.json --compress
SuperSmall output can be piped or copied to AI assistants:
# Generate context and copy to clipboard (macOS) supersmall query "database schema" --include-contents | pbcopy # Use with Claude Code (when it supports external context) supersmall claude-code src/api/users.ts --output-format claude > context.txt