Projects

Projects group KB entries and session context. Metateam detects your current project automatically via .metateam.json pin files or git remote URLs.

List Projects

$ metateam project list [-c <CONTEXT>]

Create a Project

$ metateam project create <NAME> [--slug <SLUG>] [-c <CONTEXT>]

Creates a new KB project. The name becomes the slug (lowercase, hyphenated).

Rename a Project

$ metateam project rename <PROJECT> <NEW_SLUG> [--name <DISPLAY_NAME>] [-c <CONTEXT>]

Changes the slug and optionally the display name.

Delete a Project

$ metateam project delete <PROJECT> [-f] [-y] [-c <CONTEXT>]

Deletes a project. Use -f to force deletion even when entries exist. Pass -y to skip confirmation.

Context Override (-c, --context)

project subcommands support -c, --context <CONTEXT> to override detected project context.

Examples:

$ metateam project list -c personal
$ metateam project create "Internal Docs" -c metateam
$ metateam project rename metateam metateam-v2 --name "Metateam V2" -c metateam

Pin a Directory to a Project

$ metateam pin <PROJECT_ID>

Writes a .metateam.json file in your current directory that links it to a KB project. This tells Metateam which project's KB entries to inject during SessionStart.

<PROJECT_ID> can be a project slug (for example metateam) or an ID prefix (8+ hex chars).

Flag Purpose
--local Also adds .metateam.json to .gitignore

Examples:

$ metateam pin metateam           # Pin by slug
$ metateam pin 70d90af5            # Pin by ID prefix
$ metateam pin metateam --local  # Pin and gitignore the pin file

The pin file looks like:

{
  "project_id": "70d90af5-...",
  "slug": "metateam",
  "name": "Metateam"
}

How Project Detection Works

When a hook fires, Metateam checks for a project in this order:

  1. Explicit pin — a .metateam.json file in the current directory or any parent directory. Overrides everything.
  2. Git remote match — the repo's git remote URL matched against registered projects. Exact match required.
  3. Directory prefix match — is the current working directory a subdirectory of a registered project path? Longest match wins.
  4. Single project fallback — if there is exactly one project, it is used automatically.
  5. No match — no KB injected, only session search results. Sessions are still saved.

See also Concepts: Project Detection.