grepai-workspaces — Claude Code skill for GrepAI workspaces
A skill that walks your agent through GrepAI workspaces: several projects, one search index, queries across all of them or just one.
npx skills add yoanbernabeu/grepai-skills --skill grepai-workspaces -a claude-codeWhat grepai-workspaces does
The skill covers GrepAI workspaces, which group related projects under a single index. You create one with grepai workspace create my-workspace and attach projects with grepai workspace add. Then grepai watch --workspace my-workspace indexes everything at once, and grepai search --workspace my-workspace "query" returns hits tagged with the project they came from.
It documents the rest of the command set too: listing workspaces, showing details, checking status, removing a project, deleting a workspace. Config lives in ~/.grepai/workspaces/<name>/, where workspace.yaml holds project paths plus optional per-workspace overrides such as the embedder provider and ignore list. A separate section shows the MCP setup, with the server started as grepai mcp-serve --workspace my-workspace.
The skill advises descriptive workspace names and keeping only projects you would search together in one workspace. Move a project directory and the old path stays in the config until you remove it and add the new one — worth checking before you trust a search result. Run one daemon per workspace.
What it helps with
- group several repos under one search index
- query a whole monorepo or a single package inside it
- find where a shared type or function is used across projects
- re-index after project paths move
- wire GrepAI into an agent over MCP scoped to a workspace
Example prompts for the agent
- set up a GrepAI workspace for my monorepo
- index my-workspace and show me the status
- search the fullstack workspace for callers of validateToken
How to install grepai-workspaces
1Skills CLI (Vercel)
npx skills add yoanbernabeu/grepai-skills --skill grepai-workspaces -a claude-code2Manually: put the files in place
~/.claude/skills/grepai-workspaces/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/grepai-workspaces/
1Skills CLI (Vercel)
npx skills add yoanbernabeu/grepai-skills --skill grepai-workspaces -a codex2Manually: put the files in place
.agents/skills/grepai-workspaces/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add yoanbernabeu/grepai-skills --skill grepai-workspaces -a cursor2Manually: put the files in place
.cursor/skills/grepai-workspaces/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install yoanbernabeu/grepai-skills grepai-workspaces2Manually: put the files in place
.github/skills/grepai-workspaces/SKILL.md1Skills CLI (Vercel)
npx skills add yoanbernabeu/grepai-skills --skill grepai-workspaces -a gemini-cli2Platform CLI
gemini skills install https://github.com/yoanbernabeu/grepai-skills --path skills/advanced/grepai-workspacesManually: put the files in place
.devin/skills/grepai-workspaces/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add yoanbernabeu/grepai-skills --skill grepai-workspaces -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about grepai-workspaces
How do I install grepai-workspaces in Claude?
Run npx skills add yoanbernabeu/grepai-skills --skill grepai-workspaces -a claude-code. The skill lands in ~/.claude/skills/grepai-workspaces/SKILL.md.
What does grepai-workspaces do?
It explains how to create and maintain GrepAI workspaces: adding projects, building a combined index, searching all projects or one, configuration, and running it through MCP.
Why do my search results mix files from different projects?
That is how a workspace-wide search behaves. Narrow it with the --project flag, for example grepai search --workspace my-workspace --project frontend "form validation".
Source text
SKILL.md · MIT
---
name: grepai-workspaces
description: Configure multi-project workspaces in GrepAI. Use this skill for monorepos and multiple related projects.
---
# GrepAI Workspaces
This skill covers using GrepAI workspaces to manage multiple related projects with a unified search index.
## When to Use This Skill
- Working with monorepos
- Searching across multiple related projects
- Managing microservices architecture
- Organizing large codebases
## What are Workspaces?
Workspaces allow you to:
- Group multiple projects together
- Search across all projects at once
- Or search specific projects within the workspace
- Share configuration across projects
## Creating a Workspace
```bash
grepai workspace create my-workspace
```
Output:
```
✅ Workspace 'my-workspace' created
Location: ~/.grepai/workspaces/my-workspace/
Next: Add projects with 'grepai workspace add'
```
## Adding Projects
```bash
# Add first project
grepai workspace add my-workspace /path/to/frontend
# Add more projects
grepai workspace add my-workspace /path/to/backend
grepai workspace add my-workspace /path/to/shared-lib
```
Output:
```
✅ Added '/path/to/frontend' to workspace 'my-workspace'
Projects in workspace:
1. frontend (/path/to/frontend)
Run 'grepai watch --workspace my-workspace' to index all projects.
```
## Listing Workspaces
```bash
grepai workspace list
```
Output:
```
📁 Workspaces
1. my-workspace
- Projects: 3
- Status: Not indexed
2. work-projects
- Projects: 5
- Status: Indexed (updated 2h ago)
```
## Viewing Workspace Details
```bash
grepai workspace show my-workspace
```
Output:
```
📁 Workspace: my-workspace
Projects:
1. frontend
Path: /path/to/frontend
Files: 450
Last indexed: 2025-01-28 10:30
2. backend
Path: /path/to/backend
Files: 320
Last indexed: 2025-01-28 10:30
3. shared-lib
Path: /path/to/shared-lib
Files: 85
Last indexed: 2025-01-28 10:30
Total: 855 files, 4,200 chunks
```
## Indexing a Workspace
```bash
# Index all projects in workspace
grepai watch --workspace my-workspace
```
Output:
```
🔍 Indexing workspace 'my-workspace'
[1/3] frontend...
Found 450 files, 2,100 chunks
[2/3] backend...
Found 320 files, 1,500 chunks
[3/3] shared-lib...
Found 85 files, 600 chunks
Total: 855 files, 4,200 chunks indexed
Watching for changes...
```
### Background Indexing
```bash
grepai watch --workspace my-workspace --background
```
## Searching Workspaces
### Search All Projects
```bash
grepai search --workspace my-workspace "user authentication"
```
Results include project context:
```
Score: 0.89 | [backend] src/auth/middleware.go:15-45
──────────────────────────────────────────
func AuthMiddleware() ...
Score: 0.85 | [frontend] src/hooks/useAuth.ts:10-30
──────────────────────────────────────────
export function useAuth() ...
Score: 0.78 | [shared-lib] src/types/auth.ts:5-25
──────────────────────────────────────────
export interface AuthState ...
```
### Search Specific Project
```bash
grepai search --workspace my-workspace --project frontend "form validation"
```
Only searches the frontend project.
## Workspace Status
```bash
grepai workspace status my-workspace
```
Output:
```
📊 Workspace Status: my-workspace
Projects: 3
Total files: 855
Total chunks: 4,200
Index size: 45 MB
Per-project breakdown:
┌─────────────┬───────┬────────┬──────────┐
│ Project │ Files │ Chunks │ Updated │
├─────────────┼───────┼────────┼──────────┤
│ frontend │ 450 │ 2,100 │ 2h ago │
│ backend │ 320 │ 1,500 │ 2h ago │
│ shared-lib │ 85 │ 600 │ 2h ago │
└─────────────┴───────┴────────┴──────────┘
Daemon: Running (PID 12345)
```
## Removing Projects from Workspace
```bash
grepai workspace remove my-workspace /path/to/old-project
```
## Deleting a Workspace
```bash
grepai workspace delete my-workspace
```
This removes the workspace configuration but NOT the project files.
## Workspace Configuration
Workspaces store config in `~/.grepai/workspaces/<name>/`:
```
~/.grepai/workspaces/my-workspace/
├── workspace.yaml # Workspace config
├── index.gob # Combined index
└── symbols.gob # Combined symbols
```
### workspace.yaml
```yaml
name: my-workspace
created: 2025-01-28T10:00:00Z
projects:
- name: frontend
path: /path/to/frontend
- name: backend
path: /path/to/backend
- name: shared-lib
path: /path/to/shared-lib
# Optional: override global config per workspace
embedder:
provider: ollama
model: nomic-embed-text
ignore:
- node_modules
- dist
```
## MCP with Workspaces
Use workspaces with MCP servers:
```json
{
"mcpServers": {
"grepai": {
"command": "grepai",
"args": ["mcp-serve", "--workspace", "my-workspace"]
}
}
}
```
## Use Cases
### Monorepo
```bash
# Full monorepo
grepai workspace create monorepo
grepai workspace add monorepo /path/to/monorepo/apps/web
grepai workspace add monorepo /path/to/monorepo/apps/mobile
grepai workspace add monorepo /path/to/monorepo/packages/ui
grepai workspace add monorepo /path/to/monorepo/packages/core
```
### Microservices
```bash
# Related microservices
grepai workspace create services
grepai workspace add services /path/to/user-service
grepai workspace add services /path/to/order-service
grepai workspace add services /path/to/payment-service
grepai workspace add services /path/to/notification-service
```
### Frontend + Backend
```bash
# Full stack
grepai workspace create fullstack
grepai workspace add fullstack /path/to/frontend
grepai workspace add fullstack /path/to/backend
grepai workspace add fullstack /path/to/shared-types
```
## Cross-Project Search Examples
### Find All API Endpoints
```bash
grepai search --workspace services "REST API endpoint handler"
```
### Find Shared Type Usage
```bash
grepai search --workspace fullstack "User interface definition"
```
### Find Cross-Project Dependencies
```bash
# What calls the shared auth library?
grepai trace callers --workspace fullstack "validateToken"
```
## Best Practices
1. **Name descriptively:** `ecommerce-stack` not `ws1`
2. **Group related projects:** Only projects that you'd search together
3. **One daemon per workspace:** Run `grepai watch --workspace`
4. **Use project filter:** When you know which project to search
5. **Update after major changes:** Re-index after adding/removing files
## Common Issues
❌ **Problem:** Workspace not found
✅ **Solution:** Check workspace exists: `grepai workspace list`
❌ **Problem:** Project paths changed
✅ **Solution:** Remove old path, add new path:
```bash
grepai workspace remove my-workspace /old/path
grepai workspace add my-workspace /new/path
```
❌ **Problem:** Search returns mixed results
✅ **Solution:** Use `--project` flag to filter:
```bash
grepai search --workspace ws --project backend "query"
```
## Output Format
Workspace overview:
```
📁 Workspace: my-workspace
Configuration:
- Location: ~/.grepai/workspaces/my-workspace/
- Created: 2025-01-28
Projects (3):
┌─────────────┬──────────────────────────┬───────┐
│ Name │ Path │ Files │
├─────────────┼──────────────────────────┼───────┤
│ frontend │ /path/to/frontend │ 450 │
│ backend │ /path/to/backend │ 320 │
│ shared-lib │ /path/to/shared-lib │ 85 │
└─────────────┴──────────────────────────┴───────┘
Commands:
- Index: grepai watch --workspace my-workspace
- Search: grepai search --workspace my-workspace "query"
- Status: grepai workspace status my-workspace
```
© yoanbernabeu · MIT · yoanbernabeu/grepai-skills