grepai-workspaces
Skill20 starsChanged 34 days agoMITView on GitHub
Configure multi-project workspaces in GrepAI. Use this skill for monorepos and multiple related projects.
- Reads credentials
In this repository26 other files it gives its agents.
- grepai-languagesSkill
- grepai-troubleshootingSkill
- grepai-config-referenceSkill
- grepai-ignore-patternsSkill
- grepai-initSkill
- grepai-embeddings-lmstudioSkill
- grepai-embeddings-ollamaSkill
- grepai-embeddings-openaiSkill
- grepai-installationSkill
- grepai-ollama-setupSkill
- grepai-quickstartSkill
- grepai-chunkingSkill
- grepai-watch-daemonSkill
- grepai-mcp-claudeSkill
- grepai-mcp-cursorSkill
- grepai-mcp-toolsSkill
- grepai-search-advancedSkill
- grepai-search-basicsSkill
- grepai-search-boostingSkill
- grepai-search-tipsSkill
- grepai-storage-gobSkill
- grepai-storage-postgresSkill
- grepai-storage-qdrantSkill
- grepai-trace-calleesSkill
- grepai-trace-callersSkill
- grepai-trace-graphSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Search or trace across all projects at once
- Very specific: line 136
All workspaces are stored in a single file, ~/.grepai/workspace.yaml (file mode 0600, since it may hold API keys):
- Distinctive: line 178
Before grepai v1.2.0, RPG symbol↔chunk links were empty in workspace mode, and with the Qdrant backend (workspace or single project) all …
- Very specific: line 182
Start the MCP server with --workspace so every tool with a workspace parameter defaults to it.
- Distinctive: line 252
Group related projects: Only projects that you'd search together
- Very specific: line 253
One daemon per workspace: Run grepai watch --workspace
- Distinctive: line 254
Use project filter: When you know which project to search
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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
- Index them into one shared vector store
- Search or trace across all projects at once
- Or search specific projects within the workspace
Prerequisites
Workspaces need a vector store that several projects can share:
- PostgreSQL with pgvector
- Qdrant
The GOB backend is not supported: it is a local file per project, so it cannot be shared.
Creating a Workspace
# Interactive prompts (backend, then embedding provider)
grepai workspace create my-workspace
# Qdrant + Ollama, all defaults
grepai workspace create my-workspace --yes
# Qdrant + OpenAI (API key read from OPENAI_API_KEY, official endpoint)
grepai workspace create my-workspace --backend qdrant --provider openai --model text-embedding-3-small
# PostgreSQL + Ollama
grepai workspace create my-workspace --backend postgres --dsn "postgres://grepai:grepai@localhost:5432/grepai"
# From a YAML or JSON file (store + embedder)
grepai workspace create my-workspace --from workspace-config.yaml| Flag | Description | Default |
--backend | qdrant or postgres | Required, unless --yes (then qdrant) |
--provider | ollama, openai or lmstudio | ollama |
--model | Embedding model | text-embedding-3-small for openai, nomic-embed-text otherwise |
--endpoint | Embedder endpoint | Provider default |
--dsn | PostgreSQL connection string | postgres://localhost:5432/grepai |
--qdrant-endpoint | Qdrant host | http://localhost |
--qdrant-port | Qdrant gRPC port | 6334 |
--collection | Qdrant collection name | workspace_<name> |
--yes | Use defaults for every value not set | |
--from | Read store and embedder from a file (other flags are ignored) | |
--ui | Interactive full-screen wizard |
Adding Projects
grepai workspace add my-workspace /path/to/frontend
grepai workspace add my-workspace /path/to/backend
grepai workspace add my-workspace ./shared-libRelative paths are converted to absolute paths. The project name is the directory name (frontend, backend) and must be unique in the workspace. A project does not need its own grepai init: without a .grepai/config.yaml, it uses default settings.
Managing Workspaces
grepai workspace list # list workspaces
grepai workspace show my-workspace # projects and settings
grepai workspace status my-workspace # checks that each project path exists
grepai workspace remove my-workspace frontend # remove a project, by name (not path)
grepai workspace delete my-workspace # remove the workspace entryworkspace delete only removes the entry from workspace.yaml: indexed data stays in PostgreSQL or Qdrant, and project files are untouched.
Indexing a Workspace
# Index, then keep watching (foreground)
grepai watch --workspace my-workspace
# Same, in the background
grepai watch --workspace my-workspace --background
grepai watch --workspace my-workspace --status
grepai watch --workspace my-workspace --stop
# Index once and exit (CI, git hooks)
grepai index --workspace my-workspaceChunks go to the shared store. Each project's symbol index (and RPG graph, if enabled) is written to <project>/.grepai/. grepai index --workspace continues past a failing project and returns an aggregate error. A project folder that is missing is skipped with a warning.
Searching Workspaces
Search All Projects
grepai search --workspace my-workspace "user authentication"Search Specific Projects
# One project
grepai search --workspace my-workspace --project frontend "form validation"
# Several projects (repeat --project)
grepai search --workspace my-workspace --project frontend --project backend "query"
# Path prefix inside one project
grepai search --workspace my-workspace --project frontend --path components/ "React hooks"
# Path prefix without --project: start with the project name
grepai search --workspace my-workspace --path frontend/src/ "query"With exactly one --project, a relative --path is relative to that project; otherwise it must start with a project name.
Workspace search uses the default search boost and does not use hybrid search or RPG enrichment.
Workspace Configuration
All workspaces are stored in a single file, ~/.grepai/workspace.yaml (file mode 0600, since it may hold API keys):
version: 1
workspaces:
my-workspace:
name: my-workspace
store:
backend: qdrant
qdrant:
endpoint: localhost
port: 6334
embedder:
provider: ollama
model: nomic-embed-text
endpoint: http://localhost:11434
dimensions: 768
chunking:
custom_extensions: [".tpl"] # optional, merged with each project's list
projects:
- name: frontend
path: /path/to/frontend
- name: backend
path: /path/to/backendAPI Keys With a Custom Endpoint
Environment keys (OPENAI_API_KEY, OPENROUTER_API_KEY, SYNTHETIC_API_KEY, REQUESTY_API_KEY) are only sent to the provider's official endpoint. A workspace embedder with a custom endpoint (Azure, LiteLLM, vLLM, a proxy…) needs api_key in ~/.grepai/workspace.yaml; use api_key: unused for a local server without authentication:
workspaces:
my-workspace:
embedder:
provider: openai
model: text-embedding-3-small
endpoint: https://your-resource.openai.azure.com/openai/v1
api_key: your-keyRPG in Workspaces
Before grepai v1.2.0, RPG symbol↔chunk links were empty in workspace mode, and with the Qdrant backend (workspace or single project) all chunks formed a single RPG node. After upgrading, the next grepai index --workspace <name> or grepai watch --workspace <name> repairs them, without re-embedding; no manual cleanup is needed.
MCP with Workspaces
Start the MCP server with --workspace so every tool with a workspace parameter defaults to it. No local .grepai/ is needed in this mode:
{
"mcpServers": {
"grepai": {
"command": "grepai",
"args": ["mcp-serve", "--workspace", "my-workspace"]
}
}
}Without --workspace, agents pass workspace (and optionally projects) explicitly; grepai_list_workspaces and grepai_list_projects help them discover valid names.
Use Cases
Monorepo
grepai workspace create monorepo --yes
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/coreMicroservices
grepai workspace create services --yes
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-serviceFrontend + Backend
grepai workspace create fullstack --yes
grepai workspace add fullstack /path/to/frontend
grepai workspace add fullstack /path/to/backend
grepai workspace add fullstack /path/to/shared-typesCross-Project Search Examples
Find All API Endpoints
grepai search --workspace services "REST API endpoint handler"Find Shared Type Usage
grepai search --workspace fullstack "User interface definition"Find Cross-Project Dependencies
# What calls the shared auth library?
grepai trace callers --workspace fullstack "validateToken"Best Practices
- Name descriptively:
ecommerce-stacknotws1 - Group related projects: Only projects that you'd search together
- One daemon per workspace: Run
grepai watch --workspace - Use project filter: When you know which project to search
- Index in CI:
grepai index --workspacefails loudly instead of leaving a partial index
Common Issues
❌ Problem: Workspace not found
✅ Solution: Check workspace exists: grepai workspace list
❌ Problem: Workspace refuses the GOB backend
✅ Solution: Use PostgreSQL or Qdrant (--backend qdrant)
❌ Problem: Project paths changed ✅ Solution: Remove the project by name, then add the new path:
grepai workspace remove my-workspace frontend
grepai workspace add my-workspace /new/path/frontend❌ Problem: Search returns mixed results
✅ Solution: Use --project flag to filter:
grepai search --workspace ws --project backend "query"❌ Problem: API keys from the environment ... are only sent to the official endpoint
✅ Solution: Set embedder.api_key for this workspace in ~/.grepai/workspace.yaml (see above)
Output Format
Workspace overview:
📁 Workspace: my-workspace
Configuration:
- File: ~/.grepai/workspace.yaml
- Store: qdrant (collection workspace_my-workspace)
- Embedder: ollama (nomic-embed-text)
Projects (3):
- frontend /path/to/frontend
- backend /path/to/backend
- shared-lib /path/to/shared-lib
Commands:
- Index: grepai watch --workspace my-workspace
- Search: grepai search --workspace my-workspace "query"
- Status: grepai workspace status my-workspaceDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

