Metadata-Version: 2.4
Name: sia-code
Version: 0.8.1
Summary: Local-first codebase intelligence with semantic search, multi-hop research, and 12-language AST support
Author: Sia Code Contributors
License: MIT
Project-URL: Homepage, https://github.com/DxTa/sia-code
Project-URL: Documentation, https://github.com/DxTa/sia-code#readme
Project-URL: Repository, https://github.com/DxTa/sia-code
Project-URL: Issues, https://github.com/DxTa/sia-code/issues
Keywords: code-search,semantic-search,code-indexing,codebase-intelligence,tree-sitter,ast,code-analysis,developer-tools,cli
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Documentation
Classifier: Topic :: Text Processing :: Indexing
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: usearch>=2.0.0
Requires-Dist: sqlite-vec>=0.1.3
Requires-Dist: pysqlite3-binary>=0.5.4; sys_platform != "win32"
Requires-Dist: sentence-transformers>=2.2
Requires-Dist: GitPython>=3.1.0
Requires-Dist: tree-sitter>=0.21.0
Requires-Dist: tree-sitter-python>=0.21.0
Requires-Dist: tree-sitter-javascript>=0.21.0
Requires-Dist: tree-sitter-typescript>=0.21.0
Requires-Dist: tree-sitter-go>=0.21.0
Requires-Dist: tree-sitter-rust>=0.21.0
Requires-Dist: tree-sitter-java>=0.21.0
Requires-Dist: tree-sitter-c>=0.21.0
Requires-Dist: tree-sitter-cpp>=0.21.0
Requires-Dist: tree-sitter-c-sharp>=0.21.0
Requires-Dist: tree-sitter-ruby>=0.21.0
Requires-Dist: tree-sitter-php>=0.21.0
Requires-Dist: click>=8.0
Requires-Dist: rich>=13.0
Requires-Dist: pathspec>=0.11
Requires-Dist: pydantic>=2.0
Requires-Dist: prompt-toolkit>=3.0
Requires-Dist: watchdog>=3.0
Requires-Dist: psutil>=5.9.0
Provides-Extra: mcp
Requires-Dist: mcp>=1.12.4; extra == "mcp"
Requires-Dist: filelock>=3.16.1; extra == "mcp"
Provides-Extra: pdf
Requires-Dist: pypdf>=3.0; extra == "pdf"
Provides-Extra: all
Requires-Dist: mcp>=1.12.4; extra == "all"
Requires-Dist: filelock>=3.16.1; extra == "all"
Requires-Dist: pypdf>=3.0; extra == "all"
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Requires-Dist: pytest-timeout>=2.1; extra == "dev"
Requires-Dist: black>=23.0; extra == "dev"
Requires-Dist: ruff>=0.1.0; extra == "dev"
Requires-Dist: build>=1.0; extra == "dev"
Requires-Dist: twine>=4.0; extra == "dev"
Requires-Dist: bump-my-version>=0.20; extra == "dev"
Requires-Dist: anthropic>=0.30; extra == "dev"
Requires-Dist: google-generativeai>=0.5; extra == "dev"
Requires-Dist: mcp>=1.12.4; extra == "dev"
Requires-Dist: filelock>=3.16.1; extra == "dev"

# Sia Code

Local-first codebase intelligence for CLI workflows.

Sia Code helps you:

- search and research code with lexical, semantic, or hybrid retrieval
- run multi-hop architecture research across files, symbols, and repos
- trace historical file and behavior changes (`memory trace`, `memory git-context`)
- inspect blast radius before refactors
- work across big repos, multi-repo workspaces, and git worktrees

## Why use it

- Local index. No hosted service required.
- Works well on big repos (think ~5,000 files, not only small projects).
- Aggregates `search`, `research`, and `status` across multiple repos in one workspace.
- Handles both architecture questions and history-aware change questions.
- Good fit for MCP clients and skill-based CLI agents.

## Install

```bash
# MCP + CLI
uv tool install "sia-code[mcp]"

# CLI only
uv tool install sia-code
```

If you prefer pip, `pip install sia-code` and `pip install "sia-code[mcp]"` also work.

## Quick start

### 1) Skill first

Source skill file:

- `skills/sia-code/SKILL.md`

Ask your agent to install from the file link.

### 2) MCP

```bash
uv tool install "sia-code[mcp]"
sia-code-mcp
```

Simple JSON reference:

```json
{
  "mcpServers": {
    "sia-code": {
      "command": "uvx",
      "args": ["--from", "sia-code[mcp]", "sia-code-mcp"]
    }
  }
}
```

Then point your MCP client at `sia-code-mcp`.
See `docs/MCP_INTEGRATION.md` and `docs/LLM_CLI_INTEGRATION.md`.

### 3) Direct CLI

```bash
# initialize + index
uvx sia-code init
uvx sia-code index .

# lexical search for exact symbols
uvx sia-code search --regex "AuthService|token"

# hybrid / semantic-style research
uvx sia-code research "how does authentication work?"

# historical change research
uvx sia-code memory trace "why did auth behavior change" --format table
uvx sia-code memory git-context src/auth.py
```

## Big repos, multiple repos, worktrees

- **Big repo:** built for real codebases with thousands of files, including ~5,000-file projects
- **Multi-repo workspace:** run `index .` from parent folder; Sia Code auto-detects git sub-repos, indexes each, then aggregates `search`, `research`, and `status`
- **Git worktrees / multi-agent sessions:** use shared or isolated indexes with `SIA_CODE_INDEX_SCOPE=shared|worktree`

```bash
# shared index across worktrees/agents
export SIA_CODE_INDEX_SCOPE=shared

# isolated index per worktree
export SIA_CODE_INDEX_SCOPE=worktree
```

## History-aware understanding

Use Sia Code for both code lookup and change understanding:

- `search` -> lexical, semantic, or hybrid retrieval
- `research` -> multi-hop architecture tracing across related files and symbols
- `memory sync-git` -> imports merges/tags as searchable timeline + changelog context
- `memory trace` -> explains likely causal history for behavior or symbol changes
- `memory git-context <file>` -> shows effective file history, likely owners, reverts, evolution narrative, and co-change blast radius
- `memory working-set "query"` -> emits compact shared JSON context for agent handoff

## More docs

- `docs/CLI_FEATURES.md`
- `docs/INDEXING.md`
- `docs/QUERYING.md`
- `docs/MEMORY_FEATURES.md`
- `docs/MCP_INTEGRATION.md`
- `docs/LLM_CLI_INTEGRATION.md`
- `docs/ARCHITECTURE.md`

## License

MIT
