agentleFS
yoanbernabeuyoanbernabeu/grepai-skills/skills/advanced/grepai-workspaces/SKILL.md

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

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
  1. Distinctive:

    Search or trace across all projects at once

    line 22
  2. Very specific:

    All workspaces are stored in a single file, ~/.grepai/workspace.yaml (file mode 0600, since it may hold API keys):

    line 136
  3. Distinctive:

    Before grepai v1.2.0, RPG symbol↔chunk links were empty in workspace mode, and with the Qdrant backend (workspace or single project) all …

    line 178
  4. Very specific:

    Start the MCP server with --workspace so every tool with a workspace parameter defaults to it.

    line 182
  5. Distinctive:

    Group related projects: Only projects that you'd search together

    line 252
  6. Very specific:

    One daemon per workspace: Run grepai watch --workspace

    line 253
  7. Distinctive:

    Use project filter: When you know which project to search

    line 254

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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
FlagDescriptionDefault
--backendqdrant or postgresRequired, unless --yes (then qdrant)
--providerollama, openai or lmstudioollama
--modelEmbedding modeltext-embedding-3-small for openai, nomic-embed-text otherwise
--endpointEmbedder endpointProvider default
--dsnPostgreSQL connection stringpostgres://localhost:5432/grepai
--qdrant-endpointQdrant hosthttp://localhost
--qdrant-portQdrant gRPC port6334
--collectionQdrant collection nameworkspace_<name>
--yesUse defaults for every value not set
--fromRead store and embedder from a file (other flags are ignored)
--uiInteractive 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-lib

Relative 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 entry

workspace 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-workspace

Chunks 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/backend

API 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-key

RPG 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/core

Microservices

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-service

Frontend + 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-types

Cross-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

  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. Index in CI: grepai index --workspace fails 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-workspace

Download now (ZIP)

Does 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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.