Gemini CLI Extension
The Constellation extension for Gemini CLI supercharges your AI-assisted development workflow with deep codebase understanding. It provides specialized skills, custom slash commands, and session hooks that leverage Constellation's code intelligence platform.
Source: github.com/ShiftinBits/constellation-gemini
Overview
| Feature | Description |
|---|---|
| 2 Skills | Procedural guidance for troubleshooting and impact analysis |
| 6 Commands | Custom slash commands for connectivity checks, architecture overview, and more |
| 4 Hooks | Intelligent context injection across sessions, sub-agents, and tool selection |
Installation
Prerequisites
- Gemini CLI installed
- A Constellation account
- Constellation CLI utility installed
- A project previously indexed in Constellation
Quick Start
-
Install the extension:
Enter the following in your terminal:gemini extensions install https://github.com/ShiftinBits/constellation-gemini -
Configure authentication:
Enter the following in your terminal:npx @constellationdev/cli auth -
Verify the connection:
Enter the following in Gemini CLI:/constellation:status
Uninstall
Enter the following in your terminal:gemini extensions uninstall constellation
Commands
The extension adds several slash commands to Gemini CLI for quick access to Constellation's features.
Status
/constellation:status
Check API connectivity and authentication status.
> /constellation:status
Status: Connected
- Authentication valid, project access confirmed
- Note: Use /constellation:diagnose to check indexing status
Diagnose
/constellation:diagnose
Perform a full health check of the Constellation connection, authentication, and project indexing.
Architecture
/constellation:architecture
Get a high-level overview of the codebase architecture, including language distribution and key modules.
Dependencies
/constellation:deps <file-path> [--reverse]
Analyze dependencies for a specific file. Use the --reverse flag to see what depends on the file.
Impact Analysis
/constellation:impact <symbol-name>
Analyze the impact of changing a specific symbol to understand the potential "blast radius" of a change.
Unused Code
/constellation:unused
Find dead code that is exported but never imported or used anywhere in the codebase.
Skills
Skills are procedural guidance that Gemini CLI activates based on conversation keywords.
Constellation Troubleshooting
Diagnostic procedures for Constellation-specific errors, indexing problems, MCP server issues, and connectivity failures. Includes a quick error code reference (AUTH_ERROR, PROJECT_NOT_INDEXED, SYMBOL_NOT_FOUND, FILE_NOT_FOUND, API_UNREACHABLE).
Impact Analysis
Pre-change risk assessment guidance. Triggered by questions like "impact of changing X", "what would break if I modify X", "blast radius", "risk of renaming X", or "safe to delete X". Walks through symbol lookup, dependent enumeration, test coverage, and recommendation reporting.
Hooks
Hooks transparently steer Gemini toward code_intel for structural code questions. All hooks are gated on CONSTELLATION_ACCESS_KEY being set (prefix ak:) and emit context only — they never block execution.
| Event | Matcher | Behavior |
|---|---|---|
SessionStart | .* | Establishes code_intel as the primary tool for code understanding when a session starts |
BeforeAgent | .* | Injects the same awareness into spawned sub-agents (built-ins don't inherit GEMINI.md) |
BeforeTool | grep_search|glob | Reminds Gemini to prefer code_intel for structural queries before falling back to text search |
BeforeTool | run_shell_command | Inspects tool_input.command and emits the same reminder when grep, rg, glob, awk, or findstr appears |