ShazamDocs
← Back to Home

Documentation

Complete reference for the Shazam CLI, configuration, and API.

Prerequisites

Before installing Shazam, ensure you have the following tools and accounts set up.

💧
Elixir>= 1.16required

Shazam is built on Elixir/OTP. Erlang/OTP, SQLite (via Exqlite), and standard build tools come bundled with the Elixir installation. Install via asdf, mise, or your system package manager.

Install guide →
🦀
Rust>= 1.70required

Required for the TUI terminal interface. Install via rustup.

Install guide →
🤖
Claude Code CLIrequired

Shazam uses Claude Code to run AI agents. Install and configure with your Anthropic API key.

Install guide →
❄️
Nix (alternative)optional

Use Nix to get all dependencies automatically — no manual installs needed. Recommended for contributors.

Install guide →

Installation & Setup

Get Shazam running in under 5 minutes. The setup script auto-detects your environment.

Quick Install (one command)
curl -fsSL https://raw.githubusercontent.com/raphaelbarbosaqwerty/shazam-cli/main/setup.sh | bash

The script clones the repo, detects dependencies, builds, and installs to ~/bin/.

❄️Recommended: Install with Nix (easiest)

Don't have Elixir or Rust? Nix provides everything automatically — no manual installs needed.

1. Install Nix (one-time)
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh
2. Install Shazam (Nix handles Elixir, Rust, SQLite)
curl -fsSL https://raw.githubusercontent.com/raphaelbarbosaqwerty/shazam-cli/main/setup.sh | bash
After Installation
Initialize your project
shazam init

Creates a shazam.yaml — choose company name, mission, and team template.

Open the interactive shell
shazam

Launches the Rust TUI with real-time events, overlays, and autocomplete.

Updating
shazam update

Fetches the latest git tag (e.g., v0.6.0), checks it out, rebuilds, and installs. Always targets stable tagged releases, not HEAD.

Interactive Shell

The interactive shell is the primary way to use Shazam. It provides a Rust-powered TUI with real-time events, overlays, and ghost text autocomplete.

Core Commands

/startStart the orchestrator and begin processing tasks
/stopStop the orchestrator and all running agents
/resumeResume a paused orchestrator
/statusRefresh status bar
/restartRestart Shazam — stop all agents and re-init

Task Management

/tasksOpen the tasks overlay — browse, filter, and act on all tasks
/task <title>Create a new task with the given title
/approve <id>Approve a specific task by ID
/aaApprove all pending subtasks at once (alias: /approve-all)
/reject <id>Reject a pending subtask with an optional reason
/search <query>Search tasks by title
/export [file]Export tasks to markdown
/tasks --syncImport tasks from .shazam/tasks/ markdown files
/tasks --exportExport all tasks to .shazam/tasks/ as markdown files
/review <pr>Review a pull request by number or URL (uses Opus)
/review --learnLearn review patterns from recent merged PRs
/review --post <task_id>Post review to GitHub with inline comments and suggested changes
/review --check <pr>Verify if previous review comments were addressed
/review --resolve <pr>Resolve all conversation threads on a PR
/review --learnLearn patterns from merged PR reviews
/review --patternsShow learned review patterns
/workspacesList configured workspaces (multi-repo)
/knowledgeShow project knowledge files
/knowledge --updateAnalyze codebase and update skill memories
/qaList QA checklists and status
/qa --generate <id>Generate QA doc for a completed task
/qa --validate <id>Assign QA agent to validate a task
/qa --reportGenerate daily QA report
/qa --auto on|offToggle auto QA generation on task completion
/plan <description>Create a phased execution plan
/plan --listList all plans
/plan --show <id>Show plan details with phases
/plan --approve <id>Approve plan and create all tasks
/github syncRe-import tasks from GitHub Projects without restarting
Task Files: Tasks persist as markdown files in .shazam/tasks/. Create .md files manually and import with /tasks --sync, or export with /tasks --export. Version-control friendly.
File Mentions: Type @path/to/file in task descriptions to auto-expand file contents as context. Example: Fix the bug in @src/auth.ts — the agent receives the full file contents.
Image Attachments: Paste image file paths into tasks — they are auto-copied to .shazam/attachments/ and included as context for the agent.
Token Tracking: Real-time token usage and cost ($) per agent, shown in /memory and the status bar (Budget: X%). Metrics persist across sessions. Omit budget: from YAML for unlimited.

Task Actions (via /tasks overlay → Enter)

/pause-task <id>Pause a running task
/resume-task <id>Resume a paused task
/kill-task <id>Kill a running task immediately
/retry-task <id>Retry a failed or killed task
/delete-task <id>Delete a task from the board permanently

Agent Management

/agentsList all agents with their roles, status, and budget
/agent add <name>Add a new agent interactively
/agent edit <name>Edit an existing agent configuration
/agent remove <name>Remove an agent from the company
/agents --initGenerate .md config files for existing agents
/agent presetsBrowse available agent preset templates

Team Templates

/team create <domain>Create a new team from a domain template
/team templatesList all available team templates

Views & Navigation

/dashboardOpen agent dashboard with metrics and current tasks
/configView current shazam.yaml configuration
/orgDisplay the agent hierarchy tree
/memoryShow memory usage, per-agent token breakdown, and cumulative cost
/pluginsList loaded plugins and their event filters
/plugins reloadHot-reload plugins from .shazam/plugins/
/plugins install <owner>/<repo>Install plugin from GitHub repo
/plugins remove <name>Remove an installed plugin
/helpShow all available commands and shortcuts
/clearClear the event log in the shell

Command history is persistent across sessions.

Communication

/msg <agent> <message>Send a direct message or instruction to a specific agent
/auto-approve [on|off]Toggle automatic approval of PM-created subtasks

Exit

/quitExit the interactive shell
/exitExit the interactive shell (alias for /quit)

Keyboard Shortcuts

↑ / ↓Navigate command history
TabAccept ghost text autocomplete
PgUp / PgDnScroll the event log
Mouse scrollScroll events
EnterOpen task detail view (in /tasks overlay)
aApprove selected task (in /tasks overlay)
rReject selected task (in /tasks overlay)
pPause selected task (in /tasks overlay)
xKill selected task (in /tasks overlay)
dOpen task detail (alternative to Enter)
Ctrl+CExit the shell
ESCClose current overlay / go back

CLI Commands

Shazam provides Mix tasks for managing your AI agent orchestrator. All commands follow the mix shazam.<command> pattern.

shazam init

Create a new shazam.yaml configuration with an interactive wizard. Prompts for company name, mission, and team template.

Usage
mix shazam.init
Examples

Run the interactive setup wizard

mix shazam.init

shazam start

Boot the orchestrator server and create the company from shazam.yaml. Starts the OTP supervision tree, TaskBoard, SessionPool, and RalphLoops.

Usage
mix shazam.start [options]
Flags
-p, --portServer port for the HTTP API (default: 4040)
-f, --filePath to YAML config file (default: .shazam/shazam.yaml)
--no-resumeSkip automatic RalphLoop resume on startup
Examples

Start with default settings

mix shazam.start

Start on a custom port with a specific config

mix shazam.start -p 5000 -f my-team.yaml

Start without resuming previous tasks

mix shazam.start --port 4040 --no-resume

shazam stop

Stop a running company by sending an HTTP request to the running server instance.

Usage
mix shazam.stop [options]
Flags
-c, --companyName of the company to stop (default: auto-detected)
-p, --portServer port to connect to (default: 4040)
--allStop all running companies at once
Examples

Stop the auto-detected company

mix shazam.stop

Stop a specific company by name

mix shazam.stop -c MyCompany

Stop all running companies

mix shazam.stop --all

shazam status

Display current system status including company mission, agent table (name, role, status, domain, budget), RalphLoop status, task summary, and token usage.

Usage
mix shazam.status [options]
Flags
-c, --companyShow status for a specific company only (default: all companies)
Examples

Show status for all companies

mix shazam.status

Show status for a specific company

mix shazam.status -c MyTeam

shazam task

Create a new task in a running company. The task is added to the TaskBoard and automatically assigned based on role and availability.

Usage
mix shazam.task <title> [options]
Flags
-t, --toAssign task to a specific agent by name (default: auto-assigned)
-c, --companyTarget company name (default: auto-detected)
-d, --descriptionAdditional task description or details
Examples

Create a simple task

mix shazam.task "Implement user authentication"

Assign to a specific agent in a company

mix shazam.task "Fix login bug" --to senior_dev -c MyTeam

Create a task with a detailed description

mix shazam.task "Write tests" -t qa -d "Full coverage required"

shazam org

Display the agent hierarchy tree for a company, showing the chain of command from top-level agents down.

Usage
mix shazam.org [options]
Flags
-c, --companyCompany name to display (default: auto-detected)
Examples

Show the org chart

mix shazam.org

Show org chart for a specific company

mix shazam.org -c MyTeam

shazam logs

Stream live agent output and events in real-time. Supports filtering by agent name, company, or domain.

Usage
mix shazam.logs [agent_filter] [options]
Flags
-c, --companyFilter logs by company name
-d, --domainFilter logs by agent domain
Examples

Stream all agent logs

mix shazam.logs

Stream logs for a specific agent

mix shazam.logs senior_dev

Filter by domain and company

mix shazam.logs -d backend -c MyCompany

shazam agent.add

Dynamically add a new agent to a running company without restarting. Supports presets for quick setup.

Usage
mix shazam.agent.add <agent_name> [options]
Flags
-n, --nameAgent name (alternative to positional argument)
-r, --roleAgent role or title
-s, --supervisorName of the supervising agent
-d, --domainDomain or module ownership area
-b, --budgetToken budget for the agent (default: 100000)
-m, --modelAI model to use (e.g., claude-opus-4-1)
-c, --companyTarget company name (default: auto-detected)
--presetUse a preset template (e.g., senior_dev, qa, pm)
Examples

Add a designer agent with a supervisor

mix shazam.agent.add designer --role "UI Designer" --supervisor pm --budget 80000

Add a QA engineer reporting to PM

mix shazam.agent.add qa_engineer -r "Senior QA" -s pm

Add an agent from a preset template

mix shazam.agent.add researcher --preset market_analyst

shazam apply

Reconcile the running state with shazam.yaml. Creates or updates the company to match the current configuration file.

Usage
mix shazam.apply [options]
Flags
-f, --filePath to YAML config file (default: .shazam/shazam.yaml)
Examples

Apply the default config file

mix shazam.apply

Apply a specific config file

mix shazam.apply -f custom-team.yaml

shazam dashboard

Launch a live TUI dashboard with agent status, budget bars, task counts, RalphLoop status, and event log. Press q to quit, r to refresh.

Usage
mix shazam.dashboard [options]
Flags
-c, --companyCompany to display in the dashboard (default: auto-detected)
Examples

Launch the dashboard

mix shazam.dashboard

Launch dashboard for a specific company

mix shazam.dashboard -c MyTeam

Configuration

Shazam is configured via a shazam.yaml file at the root of your project.

shazam.yaml example
company:
  name: "my-project"
  mission: "Build great software"

agents:
  - name: pm
    role: "Project Manager"
    model: "claude-haiku-4-5-20251001"
    budget: 100000
    supervisor: null
    tools: [Read, Edit, Write, Bash, Grep, Glob]
    domain: "management"

  - name: senior_dev
    role: "Senior Developer"
    model: "claude-sonnet-4-20250514"
    budget: 150000
    supervisor: pm
    tools: [Read, Edit, Write, Bash, Grep, Glob]
    domain: "backend"
    modules: ["lib/core", "lib/api"]

  - name: qa
    role: "QA Engineer"
    model: "claude-sonnet-4-20250514"
    budget: 100000
    supervisor: pm
    tools: [Read, Bash, Grep, Glob]
    domain: "testing"

config:
  auto_approve: false
  auto_retry: true
  max_concurrent: 4
  max_retries: 2
  poll_interval: 5000
  module_lock: true
  peer_reassign: true

Configuration Fields

company.name
Company name identifier(string)
company.mission
Mission statement for the company(string)
agents[].name
Agent identifier used in CLI commands and task assignment(string)
agents[].role
Agent role/title (e.g., pm, senior_dev, qa)(string)
agents[].model
AI model for this agent(string)— default: claude-haiku-4-5-20251001
agents[].budget
Token budget for the agent(integer)— default: 100000
agents[].supervisor
Name of the supervising agent (null for top-level)(string | null)
agents[].tools
Available tools: Read, Edit, Write, Bash, Grep, Glob, WebSearch(list[string])
agents[].domain
Module ownership area for module locking(string)
agents[].skills
Assigned skill memory files(list[string])
agents[].modules
Owned code modules for exclusive access(list[string])
agents[].system_prompt
Custom system prompt override for this agent(string)
config.auto_approve
Skip approval queue for PM-created subtasks(boolean)— default: false
config.auto_retry
Automatically retry failed tasks with exponential backoff(boolean)— default: false
config.max_concurrent
Maximum agents working simultaneously (1-10)(integer)— default: 4
config.max_retries
Default retry attempts per failed task(integer)— default: 2
config.poll_interval
Task polling interval in milliseconds(integer)— default: 5000
config.module_lock
Prevent concurrent edits to same code module(boolean)— default: true
config.peer_reassign
Allow idle agents to pick up tasks from busy peers(boolean)— default: true

Agent Roles & Presets

Shazam ships with 11 pre-configured agent presets. Each preset defines default tools, model, and behavior.

Customizable: Agent configs are stored as editable .md files in .shazam/agents/. shazam init creates them from presets. Edit any file to customize prompts, restrictions, tools, and behavior — changes take effect on the next task. Use /agents --init to generate configs for existing projects. Multiple agents can share the same config via config: field in shazam.yaml.
📋pm

Project Manager — breaks down tasks, creates subtasks, coordinates team

👨‍💻senior_dev

Senior Developer — implements features, handles complex code changes

👩‍💻junior_dev

Junior Developer — handles simpler tasks, learns from senior feedback

🧪qa

Quality Assurance — writes tests, validates implementations, finds bugs

🎨designer

Designer — UI/UX work, CSS, component styling, visual consistency

🔍researcher

Researcher — investigates solutions, explores APIs, gathers information

🔧devops

DevOps — CI/CD pipelines, deployment, infrastructure configuration

✍️writer

Technical Writer — documentation, READMEs, API docs, guides

📊market_analyst

Market Analyst — market research, competitive analysis, business insights

🕵️competitor_analyst

Competitor Analyst — tracks competitors, identifies opportunities

🔍pr_reviewer

PR Reviewer — reviews pull requests with full codebase context, learns from team patterns

Team Templates

Create entire teams with one command. Templates auto-generate agents with the right roles, tools, models, and hierarchy — all scoped to a domain.

Quick Start

/team create <domain> --devs N --qa N --designer --researcher

Example Teams

💻Standard Dev Team(4 agents)
🎨Frontend Team(4 agents)
🏢Large Dev Team(6 agents)
🔬Research Team(4 agents)
🧪QA-Heavy Team(4 agents)
✍️Content Team(3 agents)

Full Project Setup (Multi-Domain)

For larger projects, create multiple teams across different domains. Each team is isolated — agents can only edit files within their domain.

Example: Full-Stack SaaS Project
# Backend team: 3 devs + 1 QA
/team create backend --devs 3 --qa 1

# Frontend team: 2 devs + 1 designer
/team create frontend --devs 2 --designer

# API team: 2 devs + 1 researcher
/team create api --devs 2 --researcher

# Mobile team: 2 devs + 1 QA
/team create mobile --devs 2 --qa 1

# Docs team: 1 dev (uses writer preset internally)
/agent add docs_writer --preset writer --domain docs

This creates 15 agents across 5 domains, all reporting to your PM. The hierarchy looks like:

pm (Project Manager)
├── backend_dev_1    (Senior Developer, domain: backend)
├── backend_dev_2    (Senior Developer, domain: backend)
├── backend_dev_3    (Senior Developer, domain: backend)
├── backend_qa_1     (QA Engineer, domain: backend)
├── frontend_dev_1   (Senior Developer, domain: frontend)
├── frontend_dev_2   (Senior Developer, domain: frontend)
├── frontend_designer (UI Designer, domain: frontend)
├── api_dev_1        (Senior Developer, domain: api)
├── api_dev_2        (Senior Developer, domain: api)
├── api_researcher   (Researcher, domain: api)
├── mobile_dev_1     (Senior Developer, domain: mobile)
├── mobile_dev_2     (Senior Developer, domain: mobile)
├── mobile_qa_1      (QA Engineer, domain: mobile)
└── docs_writer      (Content Writer, domain: docs)

Individual Agent Presets

You can also add individual agents using presets. Each preset comes with pre-configured role, tools, model, and system prompt.

# Add a QA engineer from preset
/agent add qa_lead --preset qa --domain backend --budget 200000

# Add a market analyst
/agent add market_1 --preset market_analyst

# Add a competitor analyst
/agent add comp_1 --preset competitor_analyst

# Add a DevOps engineer
/agent add infra_1 --preset devops --domain infra

# List all available presets
/agent presets

Available Flags

--devs NNumber of Senior Developer agents (default: 2). Each uses the senior_dev preset with Edit, Write, Bash tools.
--qa NNumber of QA Engineer agents (default: 0). Each uses the qa preset — writes tests, validates, reports bugs.
--designerAdd a UI Designer agent. Uses Figma MCP tools to analyze designs and produce specs.
--researcherAdd a Researcher agent. Uses WebSearch, WebFetch to investigate solutions and gather context.

REST API

Shazam exposes a REST API via Bandit/Plug for task management and monitoring.

GET/api/status

Get overall orchestrator status including all companies and agents.

GET/api/companies

List all registered companies with their agent counts and task stats.

GET/api/companies/:id/tasks

List all tasks for a specific company with filtering support.

POST/api/tasks

Submit a new task to the orchestrator. Accepts JSON body with title, description, role, and priority.

GET/api/tasks/:id

Get detailed information about a specific task including status, assignee, and results.

DELETE/api/tasks/:id

Cancel a pending or in-progress task.

POST/api/approval/:id/approve

Approve a pending subtask in the human-in-the-loop queue.

POST/api/approval/:id/reject

Reject a pending subtask with an optional reason.

GET/api/metrics

Get agent performance metrics including task counts, durations, and success rates.

WS/ws

WebSocket endpoint for real-time event streaming (task updates, agent status, logs).

Architecture

Shazam is built on Elixir/OTP, leveraging GenServer, ETS, and DynamicSupervisor for fault-tolerant agent management.

Core Modules

ApplicationOTP supervision tree, boots all subsystems on startup
OrchestratorParallel and pipeline agent execution via Claude Code SDK
CompanyGenServer managing agent hierarchy, tasks, and company lifecycle
RalphLoopPer-company polling loop for task picking and execution
TaskBoardETS-backed task CRUD with atomic checkout (pending → in_progress → completed)
TaskExecutorBuilds prompts, manages sessions, executes tasks via Claude Code
TaskSchedulerTask selection, peer reassignment, and module locking logic
SessionPoolReusable Claude session management with automatic recycling
HierarchyOrg chart management with cycle detection via Kahn's algorithm
SkillMemoryStructured knowledge graph stored in .shazam/memories/
StorePersistence abstraction layer (SQLite primary, JSON fallback)
EventBusPub/sub event system for real-time WebSocket streaming

Execution Flow

  1. Boot — OTP supervision tree starts TaskBoard, SessionPool, and per-company RalphLoops
  2. Task Submission — Tasks are added via CLI or API and stored in ETS-backed TaskBoard
  3. Scheduling — TaskScheduler selects tasks based on agent role, availability, and module locks
  4. Execution — TaskExecutor builds prompts and runs them via Claude Code sessions from the pool
  5. Delegation — PMs may output subtask JSON blocks, automatically parsed and assigned
  6. Completion — Results propagate via EventBus, metrics are recorded, sessions recycled

Multi-repo Workspaces

Agents can work across multiple repositories simultaneously. Each agent runs in its own workspace directory.

shazam.yaml
workspaces:
  backend:
    path: /home/user/projects/backend-api
    domains: ["lib/", "src/"]
  frontend:
    path: /home/user/projects/frontend-web
    domains: ["src/", "components/"]
  mobile:
    path: /home/user/projects/mobile-app

agents:
  pm:
    role: Project Manager

  backend_dev:
    role: Senior Developer
    supervisor: pm
    workspace: backend       # runs in backend repo

  frontend_dev:
    role: Senior Developer
    supervisor: pm
    workspace: frontend      # runs in frontend repo

  mobile_dev:
    role: Senior Developer
    supervisor: pm
    workspace: mobile        # runs in mobile repo

When you say "Add pagination to the users API and update the frontend table and mobile list", the PM assigns subtasks to each agent in their respective repo.

Command: /workspaces — list configured workspaces and validate paths.

Engineering Manager (Multi-team)

For projects with multiple teams, add an Engineering Manager above the PMs. The Manager receives all tasks and delegates to the correct PM based on context.

CEO (you) → Engineering Manager
  ├── PM Dashboard → 3 frontend devs (workspace: dashboard)
  └── PM VS Code   → 3 extension devs (workspace: vscode)

# shazam.yaml
agents:
  manager:
    role: Engineering Manager
    model: claude-haiku-4-5-20251001

  pm_dashboard:
    role: Project Manager — Dashboard
    supervisor: manager
    domain: dashboard
    workspace: dashboard

  pm_vscode:
    role: Project Manager — VS Code Extension
    supervisor: manager
    domain: vscode-extension
    workspace: vscode

  dashboard_dev_1:
    supervisor: pm_dashboard
    workspace: dashboard
    # ...
Note: The Manager is only needed with multiple teams. Single-team projects use PM directly at the top.

Execution Plans

Create phased implementation plans with dependencies. The PM agent breaks down your request into ordered phases, and you approve to create all tasks at once.

Commands

/plan <description>Create a phased plan — PM analyzes and proposes phases with dependencies
/plan --listList all saved plans
/plan --show <id>Show plan details with phases and task assignments
/plan --approve <id>Approve plan — creates all tasks with correct dependencies (auto-approved)

How It Works

  1. Create/plan Build a user auth system with JWT
  2. Review — PM generates phases (e.g., Phase 1: DB schema, Phase 2: API endpoints, Phase 3: Tests)
  3. Auto-save — Plan is saved to .shazam/plans/ as markdown
  4. Approve/plan --approve plan_1 creates all tasks with depends_on set
  5. Execute — RalphLoop respects dependencies, executing phases in order

QA System

Auto-generated QA checklists for completed tasks. A QA agent validates each checklist item and marks pass/fail.

Commands

/qaList QA checklists and their status
/qa --generate <task_id>Generate QA doc for a completed task (test cases with checkboxes)
/qa --validate <task_id>Assign QA agent to run validation — marks [x] for passing, creates bug reports for failures
/qa --reportGenerate daily QA summary report
/qa --auto on|offToggle auto-generation — creates QA docs automatically when tasks complete
Config: Set qa_auto: true in shazam.yaml to enable auto-generation by default. QA docs are saved to .shazam/qa/ with a README index tracking overall progress.

QA Doc Format

# QA: Implement JWT auth (task_5)

## Test Cases
| # | Test Case | Expected | Status |
|---|-----------|----------|--------|
| 1 | Login with valid credentials | Returns JWT token | [x] Pass |
| 2 | Login with invalid password | Returns 401 | [x] Pass |
| 3 | Access protected route without token | Returns 403 | [ ] Fail |

## Bug Reports
- Test 3: Missing auth middleware on /api/users endpoint

Environment Variables

SHAZAM_PORT
Override default server port (default: 4040)

Troubleshooting

Agents are idle — tasks not being picked up

Check that RalphLoop is running and agents match the task domain.

# Check system status
mix shazam.status

# Verify the agent roles and domains match your task
# Re-apply config if you changed shazam.yaml
mix shazam.apply
Module lock conflict — task rejected

Another agent is already working on the same code module. Shazam prevents concurrent edits.

# Check which agent holds the lock
mix shazam.status

# Wait for the current task to complete, or disable module locking:
# In shazam.yaml: config.module_lock: false
Rate limit errors from Claude API

Too many concurrent requests to the Claude API.

# Reduce concurrent agents in shazam.yaml:
# config.max_concurrent: 2
SQLite errors on startup

SQLite3 library not found. Shazam will fall back to JSON storage.

# Install SQLite3 (macOS)
brew install sqlite3

# Install SQLite3 (Ubuntu/Debian)
sudo apt-get install libsqlite3-dev

# Or just let Shazam use JSON fallback — it works automatically
Port 4040 already in use

Another process is using the default API port.

# Use a different port
mix shazam.start --port 5050

# Or set via environment variable
export SHAZAM_PORT=5050
asdf shim error: No such file or directory

asdf version manager is installed but broken or outdated. The Elixir shim points to a missing asdf binary.

# Option A: Reinstall asdf
brew reinstall asdf

# Option B: Remove asdf and install Elixir directly
brew install elixir

# Option C: Reshim after fixing
asdf reshim elixir

# Option D: Reinstall Shazam (uses Nix if available)
curl -fsSL https://raw.githubusercontent.com/raphaelbarbosaqwerty/shazam-cli/main/setup.sh | bash
macOS: "shazam" runs Apple ShazamKit instead

macOS ships /usr/bin/shazam (ShazamKit). Your PATH may have /usr/bin before ~/bin.

# Use the 'shz' alias (installed automatically)
shz init
shz shell

# Or fix your PATH (add to ~/.zshrc)
export PATH="$HOME/bin:$PATH"
Elixir version mismatch (requires ~> 1.18)

The claude_code SDK requires Elixir 1.18+. Your system has an older version.

# Option A: Use Nix (handles everything automatically)
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh
curl -fsSL https://raw.githubusercontent.com/raphaelbarbosaqwerty/shazam-cli/main/setup.sh | bash

# Option B: Update Elixir manually
brew upgrade elixir

# Option C: Use asdf
asdf install elixir 1.18.3
asdf global elixir 1.18.3
TUI not loading — falls back to plain text

The shazam-tui Rust binary was not built or not found in PATH.

# Rebuild everything
cd ~/.shazam-cli && ./build.sh

# If cargo is missing, install Rust first
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env
cd ~/.shazam-cli && ./build.sh
"shazam update" crashes with MatchError (tag rejected / would clobber)

A git tag was force-pushed upstream and your local copy conflicts. Versions before v0.8.0 used git fetch without --force.

# Manual one-time fix:
cd ~/.shazam-cli
git fetch origin --tags --force
git checkout v0.8.0
./build.sh

# After this, "shazam update" works normally — the fix is included in v0.8.0+
"shazam --version" shows old version after update

Your PATH has /usr/bin/shazam (Apple ShazamKit) or an old binary before ~/bin.

# Check which binary is being used
which shazam

# Fix: ensure ~/bin is first in PATH
echo 'export PATH="$HOME/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc

# Verify
shazam --version

Plugins

Extend Shazam with middleware hooks into the agent lifecycle. Plugins are Elixir modules compiled at runtime from .shazam/plugins/*.ex.

Quick Start
mkdir -p .shazam/plugins

# Create a plugin file
cat > .shazam/plugins/01_logger.ex << 'EOF'
defmodule ShazamPlugin.Logger do
  use Shazam.Plugin

  @impl true
  def after_task_complete(task_id, result, _ctx) do
    File.write(".shazam/events.log",
      "[#{DateTime.utc_now()}] Task #{task_id} done\n", [:append])
    {:ok, result}
  end
end
EOF

# Start shazam — plugins load automatically on /start
shazam

Lifecycle Events

Plugins hook into 8 lifecycle events. "before" hooks can mutate input or halt the operation. "after" hooks can mutate output. "notify" hooks are observe-only.

EventPhaseCan MutateDescription
on_initstartupCalled when /start boots agents
before_task_createbeforeattrs or haltBefore a task is created
after_task_createaftertaskAfter a task is created
before_task_completebeforeresult or haltBefore marking task complete
after_task_completeafterresultAfter task is marked complete
before_querybeforeprompt or haltBefore prompt is sent to agent
after_queryafterresponseAfter agent responds
on_tool_usenotify— (observe)When an agent uses a tool

Writing a Plugin

Implement only the callbacks you need. Files are loaded in alphabetical order (prefix with 01_, 02_ to control order).

Webhook Example
# .shazam/plugins/02_webhook.ex
defmodule ShazamPlugin.Webhook do
  use Shazam.Plugin

  @impl true
  def after_task_complete(task_id, result, ctx) do
    url = ctx.plugin_config["webhook_url"]
    if url do
      payload = Jason.encode!(%{
        text: "Task #{task_id} completed in #{ctx.company_name}"
      })
      spawn(fn ->
        System.cmd("curl", ["-s", "-X", "POST", "-d", payload, url])
      end)
    end
    {:ok, result}
  end
end
Prompt Injection Example
# .shazam/plugins/03_auto_context.ex
defmodule ShazamPlugin.AutoContext do
  use Shazam.Plugin

  @impl true
  def before_query(prompt, _agent_name, _ctx) do
    case File.read(".shazam/project_context.md") do
      {:ok, context} -> {:ok, "## Context\n#{context}\n\n#{prompt}"}
      _ -> {:ok, prompt}
    end
  end
end

Plugin Context

Every callback receives a context map:

%{
  company_name: "MyProject",
  agents: [%{name: "pm", role: "Project Manager", ...}, ...],
  tasks: [%{id: "task_1", title: "...", status: :pending, ...}, ...],
  plugin_config: %{"webhook_url" => "..."}  # from shazam.yaml
}

YAML Configuration

Configure plugins in shazam.yaml. Use events: to filter which events trigger the plugin.

plugins:
  - name: webhook              # matches ShazamPlugin.Webhook
    enabled: true
    events:                    # only these events (omit for all)
      - after_task_complete
      - after_task_create
    config:
      webhook_url: "https://hooks.slack.com/services/..."

  - name: auto_context
    events: [before_query]     # only prompt injection

  - name: logger
    # no events: = runs on all implemented callbacks
    enabled: true

Commands

CommandDescription
/pluginsList loaded plugins with their event filters
/plugins reloadHot-reload plugins from disk (no restart needed)
/plugins install <owner>/<repo>Install plugins from a GitHub repo (all plugin files or specific with --path)
/plugins remove <name>Remove an installed plugin

Return Values

ReturnEffect
{:ok, data}Continue pipeline with (possibly modified) data
{:halt, reason}Stop pipeline, cancel operation (before events only)
:okContinue (for on_init, on_tool_use)

Available Example Plugins

Install with /plugins install ShazamAI/shazam-core or copy individual files to .shazam/plugins/.

PluginFileDescription
GitHub Projects05_github_projects.exSync tasks with GitHub org-level Projects board
JSON Logger06_json_logger.exStructured event logs in .shazam/logs/events.json (secrets auto-scrubbed)
Secrets Obfuscation07_secrets_obfuscation.exMasks API keys, tokens, passwords before sending to AI providers
Webhook02_webhook.exPOST notifications to Slack/HTTP endpoints
Auto-context03_auto_context.exInject project context into agent prompts

Context & RAG

Agents automatically learn across tasks. Context accumulates as they complete work — decisions, discoveries, patterns, and tech stack are extracted and reused in future tasks. Works with all providers.

How It Works

  1. Task completes — ContextManager extracts summary and routes to a topic file
  2. Learnings extracted — regex patterns detect decisions, tech stack, warnings from output
  3. Deduplication — new learnings compared with existing via Jaccard similarity (>0.7 = skip)
  4. Next task — agent receives: learnings + history + team activity + TF-IDF relevant context

Storage Structure

.shazam/context/
  agents/
    senior_1/
      index.md              # auto-generated links + key learnings
      _learnings.md         # "Project uses Supabase", "JWT uses jose"
      implement_jwt_auth.md # topic: auth work
      build_rest_api.md     # topic: API endpoints
    pm/
      index.md
      _learnings.md
      plan_auth_system.md
  team_activity.md          # chronological log (auto-trimmed)

What Agents Receive

## What You Know
- Project uses Vue.js
- Project uses Supabase
- API uses JWT with 1h expiration via jose library
- careful: /api/users has no rate limiting

## Your Recent Work
### [2026-03-20] Fix JWT expiration — changed TTL to 24h

## Recent Team Activity
### [2026-03-20] pm: Plan auth system — delegated 3 subtasks

## Related Context (TF-IDF)
### [2026-03-20] senior_2: Setup database — created users table

TF-IDF Retrieval

Pure Elixir implementation — zero external dependencies. Indexes all .md files recursively and returns the most relevant chunks by score.

FeatureDescription
Stopword removal100+ common words filtered out
Augmented TFPrevents bias toward long documents
Partial matching"auth" finds "authentication" (with bonus)
Budget-awareReturns chunks within configurable char limit

Auto-Extracted Learnings

Patterns detected from agent output:

PatternExample
Decisions"chose JWT over session-based auth"
Discoveries"found that the API requires rate limiting"
Tech stackFiles touched: .vue → "Project uses Vue.js"
Warnings"careful: this endpoint has no auth middleware"

Configuration

config:
  context_history: 5      # last N tasks per agent
  team_activity: 10       # last N team tasks
  context_budget: 4000    # max chars injected into prompt

Providers

Shazam supports multiple AI CLI tools as interchangeable providers. Each agent can use a different provider — mix Claude, Codex, Cursor, and Gemini in the same team.

Available Providers

ProviderCLISessionsNotes
claude_codeclaudeYesDefault. Persistent sessions via SessionPool. Best for context-heavy tasks.
codexcodexNoStateless. Each task spawns a new CLI process.
cursorcursorNoStateless. Requires Cursor CLI installed.
geminigeminiNoStateless. Requires Gemini CLI installed.

Configuration

# shazam.yaml

provider: claude_code          # default for all agents

agents:
  pm:
    role: Project Manager
    provider: claude_code      # explicit — uses Claude

  senior_1:
    role: Senior Developer
    supervisor: pm
    provider: codex            # uses Codex CLI

  senior_2:
    role: Senior Developer
    supervisor: pm
    provider: cursor           # uses Cursor CLI

  senior_3:
    role: Senior Developer
    supervisor: pm
    # no provider: field = inherits global default (claude_code)

How It Works

  1. Resolution — TaskExecutor resolves the provider from agent config (or global default)
  2. Session check — Session-based providers (Claude) use SessionPool for reuse; stateless providers skip it
  3. Execution — Provider receives the prompt and returns {:ok, text, files}
  4. Normalization — All providers return the same result format, so RalphLoop handles output identically
Custom providers: Implement the Shazam.Provider behaviour with 6 callbacks (start_session, stop_session, execute, supports_sessions?, name, available?) and register in the Resolver.

Web Dashboard

A companion web dashboard built with Vue 3 + Tailwind CSS. Connects to the CLI's REST API and WebSocket for real-time monitoring.

Features

Real-time event feed via WebSocket
Task management — create, approve, reject, pause, kill, retry
Agent monitoring with status, sparklines, and metrics
Org chart visualization, configuration viewer, cost tracking

Quick Start

# Start Shazam CLI (starts the API server on :4040)
shazam

# In another terminal
git clone https://github.com/ShazamAI/shazam-dashboard.git
cd shazam-dashboard
npm install
npm run dev
# Open http://localhost:3000
Note: The dashboard connects to localhost:4040 and works alongside the TUI — both can run simultaneously.

Changelog

v1.1.12026-03-24
Latest

Breaking Changes (Command Renames)

  • /pause removed (use /stop instead)
  • /plugin install renamed to /plugins install
  • /plugin remove renamed to /plugins remove
  • /memory-bank renamed to /knowledge
  • /restart -f removed (just use /restart)
  • /approve --all removed (use /aa or /approve-all)
  • /tasks --clear-all removed (use /tasks --clear)

Improvements

  • /approve <id> now requires explicit task ID
  • /status vs /dashboard clearly differentiated
  • Runtime config changes show "session only" warning
v1.1.02026-03-24

Features

  • /restart command — stop all agents and re-init
  • /github sync — re-import tasks from GitHub Projects without restarting
  • /plugins install — install plugins directly from GitHub repos
  • /plugins remove — remove installed plugins
  • TUI horizontal scroll — input no longer freezes with long text
  • Workspace include: field (renamed from domains:, backward compatible)

Core v0.2.0

  • excluded_paths in domain config
  • Dashboard advanced metrics (avg duration, tasks/hour, tokens/task, retry rate)
  • QA real test generation — QA agents write and run actual tests
  • Plugin name matching normalized (github_projects matches GitHubProjects)
  • Example plugins: GitHub Projects, JSON Logger, Secrets Obfuscation
v1.0.02026-03-23

Breaking Changes

  • Architecture split — backend engine extracted to ShazamAI/shazam-core
  • CLI now depends on shazam-core as separate package
  • New installation layout: ~/.shazam-install/{shazam-core, shazam-cli}
  • setup.sh updated to clone both repos

Ecosystem

v0.9.32026-03-21

Features

  • AGENT_QUERY re-execution — agents receive answers and continue working
  • Workspace enforcement — CRITICAL prompt prevents cross-repo file creation
  • Orphan process cleanup — kills all child CLI processes on exit
  • Removed SQLite — JSON-only persistence
  • AgentWorker implements Access — permanent fix for struct bracket access
  • Task counter isolation per workspace
  • Circuit Breaker, Health Check, Graceful Degradation, Task Deduplication
  • Engineering Manager role, nested tech_stack, /retry-all
v0.9.12026-03-21

Engineering Manager, circuit breaker, health check, task deduplication, graceful degradation, 6 bug fixes.

v0.9.02026-03-21

Enhanced TUI: sparkline status bar, task detail view with markdown, inline keybindings, scroll persistence. 49 new tests (371 total).

v0.8.02026-03-20

Git-awareness, agent-to-agent queries, project auto-detection, agent sparkline pulse.

v0.7.02026-03-20

Context persistence — agents learn across tasks with TF-IDF retrieval, auto-extracted learnings, atomized topic files. Works with all providers.

v0.6.02026-03-20

Features

  • Multi-provider support — use different AI CLIs per agent
  • 4 built-in providers: Claude Code, Codex, Cursor, Gemini
  • provider: field in YAML — set globally or per-agent
  • Session-based (Claude) use SessionPool; stateless (Codex, Cursor, Gemini) create ephemeral executions
  • Fully backward-compatible — Claude Code remains the default
v0.5.12026-03-20

Features

  • Plugin System — extensible middleware for the agent lifecycle
  • Plugins as Elixir modules in .shazam/plugins/*.ex, compiled at runtime
  • 8 lifecycle events: on_init, before/after task create, before/after task complete, before/after query, on_tool_use
  • "before" hooks mutate input or halt; "after" hooks mutate output
  • Zero-cost when no plugins loaded (persistent_term fast path)
  • /plugins and /plugins reload commands
  • Per-plugin config via shazam.yaml plugins: section
  • Event filtering — events: field restricts when a plugin runs
v0.5.02026-03-20

Plugin system — extensible middleware for the agent lifecycle with 8 lifecycle events, runtime compilation of .shazam/plugins/*.ex, zero-cost when no plugins loaded.

v0.4.22026-03-20

Refactoring

  • Removed ~1400 lines of dead ANSI fallback code from repl.ex
  • Split monolithic commands.ex (1466 lines) into 5 focused modules
  • Extracted TaskBoard.Persistence and Company.Builder
  • Cleaned debug logging from RalphLoop
  • Zero compile warnings — largest file reduced from 1525 to ~545 lines
v0.4.12026-03-19

Bug Fixes

  • Critical: Tasks not executing since v0.3.0 — AgentWorker struct Access crash fixed
  • RalphLoop race condition — paused state no longer reverts after /start
  • Clean OTP shutdown — Application.stop before System.halt
v0.4.02026-03-19

Features

  • QA system — auto-generated checklists, agent validation, bug reports
  • Execution plans — /plan with phases, dependencies, auto-approve
  • Knowledge — /knowledge --update analyzes codebase
v0.2.02026-03-19

Features

  • PR Reviewer agent — review PRs with Opus, inline comments, suggested changes
  • Editable agent configs — .md files in .shazam/agents/
  • Multi-repo workspaces — agents across multiple repositories
  • Markdown task files — .shazam/tasks/ with sync/export
  • Memory monitoring — /memory command + Mem: MB in status bar
  • Task search, export, detail view
  • Persistent command history
  • Multi-project isolation
  • Agent visibility — tool_use and text in real-time feed
  • 11 agent presets including pr_reviewer

Bug Fixes

  • Session crash fix — bulletproof event loop
  • RalphLoop noproc — safe calls with spawn
  • Status bar atom vs string normalization
  • /aa approve all pattern matching fix

Infrastructure

  • Nix flake for reproducible dev environment
  • shazam update — auto-update command
  • shz alias for macOS compatibility
  • PostHog analytics on site
  • GitHub Actions CI
v0.1.02026-03-17

Initial release — Elixir/OTP core, Rust TUI, 30+ commands, hierarchical agent teams, human-in-the-loop approval, session pooling, REST API + WebSocket.

© 2026 Shazam GitHub →