Local-first codebase intelligence with semantic search, multi-hop research, and 12-language AST support
Project description
Sia Code
v0.2 - Local-first codebase search with semantic understanding and multi-hop code discovery.
Features
- Semantic Search - Natural language queries with OpenAI embeddings (auto-fallback to lexical)
- Multi-Hop Research - Automatically discover code relationships and call graphs
- 12 Languages - Python, JS/TS, Go, Rust, Java, C/C++, C#, Ruby, PHP (full AST support)
- Interactive Mode - Live search with result navigation and export
- Watch Mode - Auto-reindex on file changes
- Portable - Single
.mv2file storage, no database required
Installation
# From PyPI (recommended)
pip install sia-code
# Or with uv
uv tool install sia-code
# Or from source
uv tool install git+https://github.com/DxTa/sia-code.git
# Verify installation
sia-code --version
Quick Start
# Initialize and index
sia-code init
sia-code index .
# Search
sia-code search "authentication logic" # Semantic search
sia-code search --regex "def.*login" # Regex search
# Multi-hop research (discover relationships)
sia-code research "how does the API handle errors?"
# Check index health
sia-code status
Commands
| Command | Description |
|---|---|
sia-code init |
Initialize index in current directory |
sia-code index . |
Index codebase (first time) |
sia-code index --update |
Re-index only changed files (10x faster) |
sia-code index --clean |
Full rebuild from scratch |
sia-code index --watch |
Auto-reindex on file changes |
sia-code search "query" |
Semantic or regex search |
sia-code research "question" |
Multi-hop code discovery with --graph |
sia-code interactive |
Live search mode with result navigation |
sia-code status |
Index health and staleness metrics |
sia-code compact |
Remove stale chunks when index grows |
sia-code config show |
View configuration |
Configuration
Semantic search requires OpenAI API key (optional):
export OPENAI_API_KEY=sk-your-key-here
sia-code init
sia-code index .
Without API key: Searches automatically fallback to lexical/regex mode. No crashes.
Edit config at .sia-code/config.json to:
- Change embedding model (
openai-small,openai-large,bge-small) - Exclude patterns (
node_modules/,__pycache__/, etc.) - Adjust chunk sizes
View config: sia-code config show
Output Formats
sia-code search "query" --format json # JSON output
sia-code search "query" --format table # Rich table
sia-code search "query" --format csv # CSV for Excel
sia-code search "query" --output results.json # Save to file
Supported Languages
Full AST Support (12): Python, JavaScript, TypeScript, JSX, TSX, Go, Rust, Java, C, C++, C#, Ruby, PHP
Recognized: Kotlin, Groovy, Swift, Bash, Vue, Svelte, and more (indexed as text)
Troubleshooting
| Issue | Solution |
|---|---|
| No API key warning | Normal - searches fallback to lexical mode |
| Index growing large | Run sia-code compact to remove stale chunks |
| Slow indexing | Use sia-code index --update for incremental |
| Stale search results | Run sia-code index --clean to rebuild |
How It Works
- Parse - Tree-sitter generates AST for each file
- Chunk - cAST algorithm creates semantic chunks (functions, classes)
- Embed - Optional OpenAI embeddings for semantic search
- Store - Single portable
.mv2file with Memvid - Search - Hybrid BM25 + vector similarity
Links
- ROADMAP.md - Future development plans
- KNOWN_LIMITATIONS.md - Current limitations and workarounds
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 sia_code-0.2.1.tar.gz.
File metadata
- Download URL: sia_code-0.2.1.tar.gz
- Upload date:
- Size: 35.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd768047207a7db1663bc518d90ae47b105e935774ea8d02e70d1e7e0e17ab9e
|
|
| MD5 |
50cbf4884d9c82229c922e064f2d77d2
|
|
| BLAKE2b-256 |
23ba952b66fda013e59c38831ab04b92a39359e6effd755c2ad62a8ae670989c
|
Provenance
The following attestation bundles were made for sia_code-0.2.1.tar.gz:
Publisher:
release.yml on DxTa/sia-code
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sia_code-0.2.1.tar.gz -
Subject digest:
fd768047207a7db1663bc518d90ae47b105e935774ea8d02e70d1e7e0e17ab9e - Sigstore transparency entry: 814555209
- Sigstore integration time:
-
Permalink:
DxTa/sia-code@a9f20ad97565b6b5bc9768c24f8ec6ac35206836 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/DxTa
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a9f20ad97565b6b5bc9768c24f8ec6ac35206836 -
Trigger Event:
release
-
Statement type:
File details
Details for the file sia_code-0.2.1-py3-none-any.whl.
File metadata
- Download URL: sia_code-0.2.1-py3-none-any.whl
- Upload date:
- Size: 38.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a41fc5260889aad6877962e5a8c0b7462d1f744da0cc3529ffd4e37a48531372
|
|
| MD5 |
4ea468e7277347d71899904d953d1300
|
|
| BLAKE2b-256 |
ccca4a84842d713d0e0fb69cf9dc9d639fe80aac81ff04cb650b4065fb02e2dd
|
Provenance
The following attestation bundles were made for sia_code-0.2.1-py3-none-any.whl:
Publisher:
release.yml on DxTa/sia-code
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sia_code-0.2.1-py3-none-any.whl -
Subject digest:
a41fc5260889aad6877962e5a8c0b7462d1f744da0cc3529ffd4e37a48531372 - Sigstore transparency entry: 814555212
- Sigstore integration time:
-
Permalink:
DxTa/sia-code@a9f20ad97565b6b5bc9768c24f8ec6ac35206836 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/DxTa
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a9f20ad97565b6b5bc9768c24f8ec6ac35206836 -
Trigger Event:
release
-
Statement type: