with one click
grepai-workspaces
// Configure multi-project workspaces in GrepAI. Use this skill for monorepos and multiple related projects.
// Configure multi-project workspaces in GrepAI. Use this skill for monorepos and multiple related projects.
Reference for all GrepAI MCP tools. Use this skill to understand available MCP tools and their parameters.
Advanced search options in GrepAI. Use this skill for JSON output, compact mode, and AI agent integration.
Find function callees with GrepAI trace. Use this skill to discover what functions a specific function calls.
Find function callers with GrepAI trace. Use this skill to discover what code calls a specific function.
Build complete call graphs with GrepAI trace. Use this skill for recursive dependency analysis.
Supported programming languages in GrepAI. Use this skill to understand which languages can be indexed and traced.
| name | grepai-workspaces |
| description | Configure multi-project workspaces in GrepAI. Use this skill for monorepos and multiple related projects. |
This skill covers using GrepAI workspaces to manage multiple related projects with a unified search index.
Workspaces allow you to:
grepai workspace create my-workspace
Output:
ā
Workspace 'my-workspace' created
Location: ~/.grepai/workspaces/my-workspace/
Next: Add projects with 'grepai workspace add'
# 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.
grepai workspace list
Output:
š Workspaces
1. my-workspace
- Projects: 3
- Status: Not indexed
2. work-projects
- Projects: 5
- Status: Indexed (updated 2h ago)
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
# 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...
grepai watch --workspace my-workspace --background
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 ...
grepai search --workspace my-workspace --project frontend "form validation"
Only searches the frontend project.
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)
grepai workspace remove my-workspace /path/to/old-project
grepai workspace delete my-workspace
This removes the workspace configuration but NOT the project files.
Workspaces store config in ~/.grepai/workspaces/<name>/:
~/.grepai/workspaces/my-workspace/
āāā workspace.yaml # Workspace config
āāā index.gob # Combined index
āāā symbols.gob # Combined symbols
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
Use workspaces with MCP servers:
{
"mcpServers": {
"grepai": {
"command": "grepai",
"args": ["mcp-serve", "--workspace", "my-workspace"]
}
}
}
# 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
# 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
# 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
grepai search --workspace services "REST API endpoint handler"
grepai search --workspace fullstack "User interface definition"
# What calls the shared auth library?
grepai trace callers --workspace fullstack "validateToken"
ecommerce-stack not ws1grepai watch --workspaceā Problem: Workspace not found
ā
Solution: Check workspace exists: grepai workspace list
ā Problem: Project paths changed ā Solution: Remove old path, add new path:
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:
grepai search --workspace ws --project backend "query"
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