Skip to main content

Usage

codaph mubit query <question> [options]
Performs semantic search against Mubit’s shared memory to find relevant context, past decisions, and code changes across your project history.

Arguments

question
string
required
The question or query to search for in Mubit memory.

Options

--cwd
string
Working directory path. Defaults to current directory.
--mubit-api-key
string
Mubit API key. Can also be set via MUBIT_API_KEY environment variable.
--mubit-project-id
string
Mubit project ID. Auto-detected from git remote if not specified.
--mubit-actor-id
string
Mubit actor ID. Auto-detected from git config if not specified.
--mubit-run-scope
string
default:"project"
Run scope: project or session.
  • project: Search across all sessions in the project
  • session: Search within specific session only
--json
boolean
default:"false"
Output results in JSON format.
--limit
integer
default:"10"
Maximum number of results to return.

Examples

Query recent changes

codaph mubit query "How did we implement authentication?"

Query with project scope

codaph mubit query "What bugs were fixed last week?" --limit 20

Query with JSON output

codaph mubit query "Database migration changes" --json

Query specific project

codaph mubit query "API endpoints" --mubit-project-id owner/repo

Query Types

Mubit supports various query types:

Code Changes

codaph mubit query "Recent changes to auth module"

Decisions

codaph mubit query "Why did we choose PostgreSQL?"

Bug Fixes

codaph mubit query "Login bug fixes"

Features

codaph mubit query "How does the payment flow work?"

Refactoring

codaph mubit query "Database layer refactoring"

Output Format

Results include:
  • Matching events and sessions
  • Relevance scores
  • Timestamps
  • Actor information
  • Code snippets or summaries

JSON Output Example

{
  "query": "How did we implement authentication?",
  "projectId": "owner/repo",
  "results": [
    {
      "sessionId": "ses_abc123",
      "eventId": "evt_xyz789",
      "relevance": 0.95,
      "timestamp": "2026-03-01T10:00:00.000Z",
      "actorId": "developer",
      "summary": "Implemented JWT-based authentication with refresh tokens",
      "snippet": "Added Auth middleware and token validation..."
    }
  ],
  "totalResults": 1
}

Requirements

Mubit API Key

You must have a Mubit API key configured:
# Set via environment variable
export MUBIT_API_KEY=your_key_here

# Or via setup command
codaph setup --mubit-api-key your_key_here

Synced Data

Query results depend on data synced to Mubit:
  1. Run initial push:
    codaph push
    
  2. Verify sync status:
    codaph status
    

Performance

  • Queries typically return in under 2 seconds
  • Results are ranked by semantic relevance
  • Recent events are weighted higher

Privacy

Mubit query:
  • Only searches data you’ve explicitly pushed
  • Respects project-level access controls
  • Does not access other projects’ data

Build docs developers (and LLMs) love