Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ To undo:
semble uninstall
```

Supported agents: Claude Code, Cursor, Gemini CLI, Kiro, OpenCode, GitHub Copilot, Codex, VS Code, Windsurf, Zed, Reasonix, Pi, and Command Code.
Supported agents: Claude Code, Cursor, Gemini CLI, Kiro, OpenCode, GitHub Copilot, Codex, VS Code, Windsurf, Zed, Reasonix, Pi, Command Code, and Antigravity.

> **Pi prerequisite:** Pi requires the MCP extension to be installed before semble can connect. Run `pi install npm:pi-mcp-extension` once, then `semble install`.

Expand Down Expand Up @@ -242,6 +242,24 @@ Then add to `~/.pi/agent/mcp.json`:

</details>

<details>
<summary>Antigravity</summary>

Add to `~/.gemini/config/mcp_config.json`:

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

</details>

<details>
<summary>Command Code</summary>

Expand Down Expand Up @@ -318,7 +336,7 @@ If `semble` is not on `$PATH`, use `uvx --from "semble[mcp]" semble` in its plac

### Sub-agent

For harnesses that support sub-agents (Claude Code, Cursor, Gemini CLI, Kiro, OpenCode, GitHub Copilot, Reasonix, Pi, Command Code), you can install a dedicated `semble-search` sub-agent. Copy the appropriate file from [`src/semble/agents/`](../src/semble/agents/) to your agent's agents directory:
For harnesses that support sub-agents (Claude Code, Cursor, Gemini CLI, Kiro, OpenCode, GitHub Copilot, Reasonix, Pi, Command Code, Antigravity), you can install a dedicated `semble-search` sub-agent. Copy the appropriate file from [`src/semble/agents/`](../src/semble/agents/) to your agent's agents directory:

> **Pi prerequisite:** Pi sub-agents require the Pi agents extension. Run `pi install npm:pi-agents` once before installing.

Expand All @@ -333,3 +351,4 @@ For harnesses that support sub-agents (Claude Code, Cursor, Gemini CLI, Kiro, Op
| Reasonix | `reasonix.md` | `~/.reasonix/skills/semble-search.md` |
| Pi | `pi.md` | `~/.pi/agents/semble-search.md` |
| Command Code | `commandcode.md` | `~/.commandcode/agents/semble-search.md` |
| Antigravity | `antigravity.md` | `~/.gemini/config/skills/semble-search/SKILL.md` |
43 changes: 43 additions & 0 deletions src/semble/agents/antigravity.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: semble-search
description: Code search agent for exploring any codebase. Use for finding code by intent, locating implementations, understanding how something works, or discovering related code. Prefer over run_shell_command/read_file for any semantic or exploratory question.
tools:
- run_shell_command
- read_file
---

Use `semble search` to find code by describing what it does or naming a symbol/identifier, instead of grep:

```bash
semble search "authentication flow" ./my-project
semble search "save_pretrained" ./my-project
semble search "save model to disk" ./my-project --top-k 10
```

Results are cached automatically on first run and invalidated when files change.

Use `--content docs` to search documentation and prose, `--content config` for config files (yaml, toml, etc.), or `--content all` to search code, docs, and config:

```bash
semble search "deployment guide" ./my-project --content docs
semble search "database host port" ./my-project --content config
semble search "authentication" ./my-project --content all
```

Use `semble find-related` to discover code similar to a known location (pass `file_path` and `line` from a prior search result):

```bash
semble find-related src/auth.py 42 ./my-project
```

`path` defaults to the current directory when omitted; git URLs are accepted.

If `semble` is not on `$PATH`, use `uvx --from "semble[mcp]" semble` in its place.

### Workflow

1. Start with `semble search` to find relevant chunks. The index is built and cached automatically.
2. Use `--content docs` for documentation, `--content config` for config files, or `--content all` for everything.
3. Inspect full files only when the returned chunk does not give enough context.
4. Optionally use `semble find-related` with a promising result's `file_path` and `line` to discover related implementations.
5. Use grep only when you need exhaustive literal matches or quick confirmation of an exact string.
9 changes: 9 additions & 0 deletions src/semble/installer/agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,15 @@ def _vscode_mcp_path() -> Path:
instructions_path=_HOME / ".commandcode" / "AGENTS.md",
subagent_path=_HOME / ".commandcode" / "agents" / "semble-search.md",
),
AgentTarget(
id="antigravity",
display_name="Antigravity",
binary="agy",
config_dir=_HOME / ".gemini" / "antigravity-cli",
mcp=McpConfig(_HOME / ".gemini" / "config" / "mcp_config.json", "mcpServers", _STDIO_SERVER_CONFIG),
instructions_path=_HOME / ".gemini" / "GEMINI.md",
Comment thread
Pringled marked this conversation as resolved.
subagent_path=_HOME / ".gemini" / "config" / "skills" / "semble-search" / "SKILL.md",
),
]


Expand Down
2 changes: 1 addition & 1 deletion src/semble/installer/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def run(mode: Mode) -> None:

agent_items = [
(f"{a.display_name}{' (detected)' if (detected := is_detected(a)) else ''}", a, detected and install)
for a in AGENTS
for a in sorted(AGENTS, key=lambda a: not is_detected(a))
]
chosen_agents = _checkbox(
f"Select agents to {'configure' if install else 'remove configuration from'}:", agent_items
Expand Down
1 change: 1 addition & 0 deletions tests/test_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ def test_merge_mcp_errors(claude_agent, content):
("reasonix", "mcpServers"),
("pi", "mcpServers"),
("commandcode", "mcpServers"),
("antigravity", "mcpServers"),
],
)
def test_merge_mcp_writes_under_agent_key(tmp_path, agent_id, key):
Expand Down
Loading