grepai-workspaces
Configure multi-project workspaces in GrepAI. Use this skill for monorepos and multiple related projects.
What this skill does
# 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
```
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.