Fast code intelligence via SCIP indexes
Project description
scip-cli
Fast code intelligence CLI for TypeScript/JavaScript and Python projects. Query SCIP indexes directly via SQLite for instant results.
Features
- Fast: Direct SQLite queries, eliminating skippable overhead
- Simple: Single binary with subcommands
- Auto-indexing: Automatically indexes projects on first query
- Token-efficient: Clean, minimal output optimized for AI consumption
Installation
1. Install scip-cli
pip install scip-cli
2. Install prerequisites (optional)
scip-cli can automatically download the required indexing tools when needed, or you can install them globally for faster performance:
Option A: Let scip-cli handle it (recommended)
Just use scip-cli - it will automatically download the required tools via npx on first use. No global installation needed.
Option B: Install globally for better performance
# TypeScript/JavaScript indexer (also handles plain JS via --infer-tsconfig)
npm install -g @sourcegraph/scip-typescript
# Python indexer
npm install -g @sourcegraph/scip-python
# SCIP CLI for index conversion
npm install -g @sourcegraph/scip
Verify installation:
scip-cli --help
scip-typescript --version # Only if you chose Option B
scip --version # Only if you chose Option B
Usage
All commands are subcommands of scip-cli:
scip-cli <command> [arguments]
Commands
refs <symbol>- Find all references to a symboldef <symbol>- Find symbol definition with source codesearch <pattern>- Search symbols by name patternsymbols <file>- List all symbols in a filerdeps <file>- Find files that depend on a filemembers <symbol>- List members of a class/interfacereindex- Force re-indexing of the current projectskill [path]- Install or dump the SKILL.md
Examples
# Find where useDictation is used
scip-cli refs useDictation
# Get definition of useDictation
scip-cli def useDictation
# Search for symbols matching "Dictation"
scip-cli search Dictation
# List symbols in a file
scip-cli symbols src/hooks/useDictation.ts
# Find files that import from useDictation.ts
scip-cli rdeps src/hooks/useDictation.ts
# List members of a class
scip-cli members UseDictationOptions
# Install skill file
scip-cli skill ~/.claude/skills/scip/SKILL.md
How It Works
- On first query, automatically detects project language from
package.json(TS/JS) orpyproject.toml/setup.py(Python) - Indexes using
scip-typescript(adds--infer-tsconfigfor JS-only projects) orscip-python - Converts the SCIP index to SQLite using
scip expt-convert - Caches the database in
~/.cache/scip-cli/projects/<hash>/index.db - Subsequent queries are instant SQLite lookups
Performance
Inspired by scip-query, scip-cli is a lightweight Python reimplementation optimized for speed. Compared to the original bash wrapper scripts:
refs: 6.4s → 0.03s (213x faster)def: 2.8s → 0.05s (56x faster)search: 2.6s → 0.03s (87x faster)symbols: 0.3s → 0.02s (15x faster)rdeps: 0.2s → 0.02s (10x faster)members: 3.1s → 0.03s (103x faster)
The speedup comes from direct SQLite queries instead of shell command chains, eliminating subprocess overhead.
Architecture
scip_cli/
├── __init__.py
├── __main__.py # CLI entry point
├── lib.py # Core utilities (indexing, symbol resolution)
└── commands/ # Subcommand implementations
├── refs.py
├── def_cmd.py
├── search.py
├── symbols.py
├── rdeps.py
├── members.py
├── reindex.py
└── skill.py
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scip_cli-1.0.3.tar.gz.
File metadata
- Download URL: scip_cli-1.0.3.tar.gz
- Upload date:
- Size: 17.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
22e2941c73773fcb943d3548b0774cb2a5fbe3b8dfa9def4f5359bb73afcbcfb
|
|
| MD5 |
d5ea20e0e2139ac0d05fcb38b795e957
|
|
| BLAKE2b-256 |
41d90c3391a63916e5e474e30427923aa19081f17470f1ae55baeebed53c2f50
|
File details
Details for the file scip_cli-1.0.3-py3-none-any.whl.
File metadata
- Download URL: scip_cli-1.0.3-py3-none-any.whl
- Upload date:
- Size: 18.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd63fcc7e186142e8cf0fb12c45923fdc7af76b01609aba9d87db7b17410e04c
|
|
| MD5 |
4b28d566d80ffc652e6bc8850931da3b
|
|
| BLAKE2b-256 |
c862f36b4d6fc7404708387d36402a1444b8ec0a570d8bd9ce57ca96e7244b67
|