@latentforce/shift
v1.0.9
Published
Shift CLI - AI-powered code intelligence with MCP support
Maintainers
Readme
@latentforce/shift
AI-powered code intelligence CLI and MCP server for Claude.
Installation
npm install -g @latentforce/shiftQuick Start
Guest mode (zero-config)
cd /path/to/your/project
shift-cli init --guest # Auto-creates guest key + project, scans, and indexesWith an API key
# Create a new project and index it (prompts for template selection)
shift-cli init --api-key YOUR_KEY --project-name "My App"
# Fully non-interactive (CI/CD friendly)
shift-cli init --api-key YOUR_KEY --project-name "My App" --template TEMPLATE_IDInteractive (original behavior)
shift-cli start # Configure API key and project interactively
shift-cli init # Index project filesAdd to Claude Code
claude mcp add-json shift '{"type":"stdio","command":"shift-cli","args":["mcp"],"env":{"SHIFT_PROJECT_ID":"YOUR_PROJECT_ID"}}'Or using npx:
claude mcp add-json shift '{"type":"stdio","command":"npx","args":["@latentforce/shift","mcp"],"env":{"SHIFT_PROJECT_ID":"YOUR_PROJECT_ID"}}'Add to Claude Desktop
Add to your config file (%APPDATA%\Claude\claude_desktop_config.json on Windows, ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"shift": {
"command": "shift-cli",
"args": ["mcp"],
"env": {
"SHIFT_PROJECT_ID": "YOUR_PROJECT_ID"
}
}
}
}CLI Commands
| Command | Description |
|---------|-------------|
| shift-cli start | Start daemon and configure project |
| shift-cli init | Scan and index project files |
| shift-cli update-drg | Update the dependency relationship graph |
| shift-cli stop | Stop the daemon |
| shift-cli status | Show current status |
| shift-cli config | Manage configuration |
CLI Flags
shift-cli init
| Flag | Description |
|------|-------------|
| --guest | Use guest authentication (auto-creates project) |
| --api-key <key> | Provide API key directly |
| --project-name <name> | Create new project or match existing by name |
| --project-id <id> | Use existing project UUID |
| --template <id> | Migration template ID for project creation |
| -f, --force | Force re-indexing even if already indexed |
shift-cli start
| Flag | Description |
|------|-------------|
| --guest | Use guest authentication (auto-creates project) |
| --api-key <key> | Provide API key directly |
| --project-name <name> | Create new project or match existing by name |
| --project-id <id> | Use existing project UUID |
| --template <id> | Migration template ID for project creation |
shift-cli update-drg
| Flag | Description |
|------|-------------|
| -m, --mode <mode> | baseline (all files) or incremental (git-changed only, default) |
Update DRG
After initializing your project, update the dependency graph to keep code intelligence in sync:
shift-cli update-drg # Incremental (default) — only git-changed files
shift-cli update-drg --mode baseline # Full re-scan of all JS/TS filesScans .js, .jsx, .ts, .tsx, .mjs, .cjs files.
MCP Tools
| Tool | Description |
|------|-------------|
| blast_radius | Analyze what files would be affected if a file is modified or deleted |
| dependencies | Get all dependencies for a file with relationship summaries |
| file_summary | Get a summary of a file with optional parent directory context |
Each tool accepts an optional project_id parameter. If not provided, it falls back to the SHIFT_PROJECT_ID environment variable.
MCP tools return formatted markdown and include:
- Path normalization — backslashes, leading
./and/are handled automatically - Actionable error messages — missing graph prompts you to run
update-drg, missing files explain possible causes
