Integration Overview

SuperSmall is designed to seamlessly integrate with your existing development workflow, providing enhanced context-aware capabilities for AI-assisted development.

Supported Integrations

[Claude Code Integration](claude-code.md)

Enhance Claude Code with optimized context generation: - Automatic context selection based on queries - File relationship understanding - Token optimization for Claude's limits - Formatted output for Claude's parser

[Kandi CLI Integration](kandi-cli.md)

Optimize prompts and context for Kandi CLI: - Command-specific optimization (chat, code, review) - Streaming support for real-time processing - Model-aware token management - Compatible output formats

[CI/CD Workflows](cicd.md)

Integrate SuperSmall into your build pipeline: - GitHub Actions integration - GitLab CI configuration - Jenkins pipeline support - Docker containerization

Integration Benefits

Reduced API Costs

- 50%+ reduction in token usage - Optimized context selection - Elimination of redundant information - Smart caching strategies

Improved AI Responses

- More relevant context - Better understanding of code relationships - Accurate symbol resolution - Complete dependency information

Faster Development

- Pre-indexed repositories - Instant context generation - Cached results - Incremental updates

Integration Patterns

Direct CLI Integration


Generate context and pipe to tool

supersmall query "auth logic" | claude-code

Export context for later use

supersmall kandi "implement feature" > context.json

Script Integration


import subprocess
import json

Generate context

result = subprocess.run( ["supersmall", "query", "database layer", "--output-format", "json"], capture_output=True, text=True )

context = json.loads(result.stdout)

Use context with AI tools


API Integration (Future)


// Planned API support
const supersmall = require('@supersmall/sdk');

const context = await supersmall.query('authentication flow', { maxTokens: 50000, includeContents: true });


Quick Start Examples

For Claude Code Users


Index your repository

supersmall init

Generate context for a file

supersmall claude-code src/main.ts --include-related

Query for specific functionality

supersmall claude-code "How does the cache work?" --type query

For Kandi CLI Users


Optimize a code generation prompt

supersmall kandi "create user API" --command code

Get context for code review

supersmall kandi pull_request.diff --command review

For CI/CD Pipelines


Add to your workflow

- name: Generate PR Context run: | supersmall init supersmall query "${{ github.event.pull_request.title }}" \ --output-format json > pr-context.json

Integration Architecture


┌─────────────────┐     ┌──────────────┐     ┌─────────────┐
│   Your Code     │────▶│  SuperSmall  │────▶│  AI Tools   │
│   Repository    │     │    Index     │     │Claude/Kandi │
└─────────────────┘     └──────────────┘     └─────────────┘
        │                      │                     │
        │                      │                     │
        ▼                      ▼                     ▼
   Source Files          Optimized Context      AI Responses

Best Practices

1. Initialize Early

- Run supersmall init when setting up projects - Include in project setup scripts - Document in README files

2. Update Regularly

- Use incremental updates in development - Full re-index after major refactoring - Automate updates in CI/CD

3. Share Indexes

- Export indexes for team use - Cache in CI/CD systems - Version with your code

4. Monitor Performance

- Track token usage reduction - Measure query response times - Optimize language selection

Troubleshooting

Common Issues

Index not found


Solution: Initialize repository

supersmall init

Outdated context


Solution: Update index

supersmall update --incremental

Large token counts


Solution: Adjust parameters

supersmall query "..." --max-tokens 50000 --threshold 0.7

Getting Help

- Check command help: supersmall help - View verbose output: --verbose flag - File issues: [GitHub Issues]([repository-url]/issues)

Future Integrations

Planned Support

- VS Code extension - IntelliJ plugin - Neovim integration - Web API service

Community Integrations

- Emacs package - Sublime Text plugin - Terminal multiplexer integration

Next Steps

1. Choose Your Integration - [Claude Code Guide](claude-code.md) for Claude users - [Kandi CLI Guide](kandi-cli.md) for Kandi users - [CI/CD Guide](cicd.md) for automation

2. Set Up Your Workflow - Install SuperSmall - Initialize your repository - Configure your preferred integration

3. Optimize Your Usage - Fine-tune parameters - Create custom scripts - Share with your team

© 2024 SuperSmall | GitHub | Community