Skip to content
/

Crystal (stravu)

crystal · stravu/crystal · ★ 3.1k · last commit 2026-02-26

Primitive shape
No installable primitives
00

Summary

Crystal — Summary

Crystal (now deprecated, rebranded as Nimbalyst) was an Electron desktop application for managing multiple AI coding agent sessions (Claude Code and Codex) simultaneously against a single repository using git worktrees. Each session operated in an isolated branch/worktree to prevent conflicts, with a full-featured UI including diff viewer, multi-terminal panel system, prompt history, and SQLite-backed session persistence.

Problem it solved: Running parallel AI coding sessions required manual git worktree management and terminal juggling; Crystal automated worktree creation/cleanup, provided a unified interface for comparing approaches, and preserved session context across app restarts.

Distinctive trait: Crystal was the earliest polished Electron app in this batch explicitly purpose-built around the Claude Code SDK's worktree tutorial pattern — each session gets its own git worktree, its own branch, and can be squash-rebased back to main with one click.

Current status: Deprecated in February 2026, replaced by Nimbalyst (https://nimbalyst.com). The repo is archived-in-spirit but not formally archived on GitHub. Version analyzed: 0.3.5 (TypeScript/Electron).

differs_from_seeds: Crystal is closest to superpowers in target tool (Claude Code) but belongs to a completely different archetype — it is a multi-session manager/desktop-app rather than a skills/methodology plugin. Unlike superpowers (14 skills, 1 hook, zero UI surface), Crystal ships no prompt primitives at all; its value is entirely in the Electron GUI, worktree automation, and SQLite session store. Compared to claude-flow (MCP-anchored, 305 tools), Crystal is a thin desktop wrapper that delegates all intelligence to the underlying CLI agents rather than enriching them with tools.

01

Overview

Crystal — Overview

Origin

Created by Stravu (https://stravu.com). Open-sourced under MIT license. First shipped as a reference implementation of Anthropic's own tutorial "Run parallel Claude Code sessions with git worktrees." Version 0.3.5 analyzed; deprecated February 2026 and replaced by the commercial Nimbalyst product.

Philosophy

Crystal's README CLAUDE.md describes it as "a fully-implemented Electron desktop application for managing multiple AI code assistant instances (Claude Code and Codex) against a single directory using git worktrees." The core belief: running multiple AI sessions in parallel against isolated branches, then reviewing diffs and choosing the best approach, is superior to serial single-session development.

Manifesto-style quotes

From CLAUDE.md:

"Crystal provides a streamlined interface for running parallel AI assistant sessions with different approaches to the same problem."

"Each Claude Code session operates in its own git worktree. No merge conflicts, no stepping on each other's changes."

"Squash and rebase to main: Combine all commits and rebase onto main."

Core belief

Parallelism is valuable not just for speed but for comparison — running the same prompt through multiple agents in different worktrees lets developers choose the best approach rather than committing to the first output.

Target users

Individual developers and small teams who want to explore multiple AI-generated solutions simultaneously and merge only the winner.

02

Architecture

Crystal — Architecture

Distribution

  • Electron desktop app (macOS, Linux, Windows builds via electron-builder)
  • No npm global install; users download a release binary or build from source
  • Package name: crystal, version 0.3.5

Install

git clone https://github.com/stravu/crystal
cd crystal
pnpm install
pnpm run dev         # development
pnpm run build:mac   # production build

Directory tree

crystal/
├── frontend/        # Vite + React frontend (renderer process)
├── main/            # Electron main process (Node.js)
│   └── src/
│       └── services/
│           └── panels/
│               └── codex/  # Codex CLI integration
├── shared/          # Shared types between main/renderer
├── tests/           # Playwright e2e tests
├── scripts/         # Build helper scripts
├── docs/            # Developer guides (ADDING_NEW_CLI_TOOLS.md, etc.)
└── screenshots/     # App screenshots

Required runtime

  • Node.js (Electron bundles its own)
  • Git (for worktree operations)
  • Claude Code CLI and/or Codex CLI (external, installed separately)

Target AI tools

  • Claude Code (primary)
  • OpenAI Codex CLI

Key subsystems

  • SQLite (better-sqlite3): Persists sessions, prompt history, project configs
  • XTerm.js: Terminal emulator for each panel instance
  • Panel system: Multiple terminal panels per session, lazy-initialized, state-persisted
  • IPC: Electron IPC for real-time streaming between main and renderer
  • Git operations: Worktree create/delete, squash-rebase, diff computation (native git CLI)

Config files

  • CLAUDE.md (project guidance for AI agents contributing to Crystal itself)
  • AGENTS.md (same content for non-Claude agents)
  • SQLite database for session/project persistence (runtime, not checked in)
03

Components

Crystal — Components

Crystal ships no slash-commands, skills, hooks, or MCP servers — its components are UI views and backend services.

UI Views

Component Purpose
Output View Formatted terminal output with syntax highlighting
Messages View Raw JSON message inspection for debugging Claude Code SDK output
Diff View Git diff viewer with file-level statistics
Editor View File editor with syntax highlighting
Tool Panel Bar Tabs for multiple terminal instances per session

Backend Services (main process)

Service Purpose
SessionManager Create, archive, resume, track status of parallel AI sessions
WorktreeManager Automate git worktree create/delete/rebase operations
PanelManager Manage multiple XTerm.js terminal panels per session
ProjectManager Multi-project support with configuration persistence
PromptHistory Store and search all prompts across all sessions
GitDiffService Compute diffs, commit logs, uncommitted change detection
AINameGenerator Auto-name sessions based on prompt content
SQLiteStore Persist sessions, projects, prompt history, panel states

Codex Integration

Component Purpose
CodexAdapter Service adapter for OpenAI Codex CLI alongside Claude Code

Scripts (build/dev)

Script Purpose
setup-dev.sh One-time dev environment setup
check-license-compatibility.sh Validate OSS license compatibility
scripts/inject-build-info.js Inject version/build metadata at build time

No prompts/skills/hooks

Crystal has zero prompt files, zero skills, zero hooks, zero MCP servers. The AI intelligence lives entirely in the external CLI tools (Claude Code, Codex) that Crystal spawns as subprocesses.

05

Prompts

Crystal — Prompts

Crystal ships no prompt files of its own. The AI prompts are whatever the user types in the UI — Crystal relays them to the external CLI tools (Claude Code, Codex) via the CLI SDK.

What Crystal does inject

From CLAUDE.md (the project's own agent guidance for developers working on Crystal itself):

## References
Use these reference pages for more information:
- How to invoke Claude Code through the command line as an SDK: 
  https://docs.anthropic.com/en/docs/claude-code/sdk
- How to run multiple Claude Code instances with Git Worktrees: 
  https://docs.anthropic.com/en/docs/claude-code/tutorials#run-parallel-claude-code-sessions-with-git-worktrees

This is meta-guidance for AI agents contributing to Crystal's codebase, not user-facing prompt engineering.

Session context injection

Crystal injects minimal context per session: the working directory (worktree path) and the project name. It does not inject CLAUDE.md content or any prompt prefix by default.

Prompting technique: pass-through

Crystal uses a pure pass-through pattern — user text is forwarded verbatim to the underlying CLI tool's stdin. There is no prompt template, no system prompt injection, and no Iron-Law-style behavioral framing. The agent's behavior is 100% determined by whatever is configured in the user's existing Claude Code/Codex setup (their own CLAUDE.md, skills, etc.).

Prompt history

All prompts are stored in SQLite and can be searched and re-used across sessions. This is a management feature, not a prompt engineering feature.

09

Uniqueness

Crystal — Uniqueness & Positioning

differs_from_seeds

Crystal is most similar to superpowers in that it targets Claude Code and uses git worktrees for isolation. However, Crystal is architecturally opposite: superpowers injects behavioral methodology (Iron Laws, TDD gates, 14 skills) into the agent's context, while Crystal provides zero behavioral modification and is purely a session/worktree management UI. Compared to claude-flow (MCP-anchored, hive-mind consensus, 305 tools), Crystal is a thin shell with no tool augmentation. Among seeds, the closest functional analog is claude-conductor (Archetype 4 — markdown scaffold), but even there Crystal differs: claude-conductor is a file-based template for a single agent, while Crystal is a multi-session desktop app managing N parallel agents. Crystal introduces a genuinely new archetype in this corpus: "parallel session manager with comparison UX."

Positioning

  • The reference implementation of Anthropic's own "run parallel Claude Code sessions with git worktrees" tutorial
  • Positioned as a desktop tool for developers who want to A/B test different AI approaches to the same problem
  • No methodology, no rules, no enforcement — pure session management and comparison

Observable failure modes

  • No automated merge strategy: if two sessions produce conflicting changes, the user must resolve manually
  • No quality gate before the user picks a winner: the "best" session is selected by human inspection, not automated validation
  • Deprecated: active use is not recommended; Nimbalyst is the successor
  • No cross-platform parity: Linux support via AppImage but less tested than macOS

Inspired by

  • Anthropic's official git worktrees tutorial
  • General Electron multi-terminal app patterns (iTerm2-style split panes cited in README)

Competitors named in README

None explicitly. The README does reference Nimbalyst as the successor.

Status

Deprecated February 2026. Replaced by Nimbalyst (https://github.com/Nimbalyst/nimbalyst).

04

Workflow

Crystal — Workflow

Phases

Phase User Action Artifact
1. Project Setup Open Crystal, point to git repo, configure main branch Project record in SQLite
2. Session Creation Enter prompt, choose number of sessions (single or N with templates) N git worktrees created at branches derived from main
3. Parallel Execution Each session spawns Claude Code/Codex in its worktree Real-time terminal output per session
4. Monitoring View live status badges (initializing/running/waiting/stopped/error) Status in SQLite, displayed in sidebar
5. Review Open Diff View to inspect changes per session Git diff per worktree
6. Integration Choose: Squash-rebase to main, or create PR, or discard Commits squashed onto main branch (or kept in branch)
7. Cleanup Delete/archive sessions Worktrees pruned, SQLite records archived

Approval gates

  • No hard gates; all decisions are user-initiated
  • User explicitly chooses which session(s) to merge
  • Squash-rebase requires explicit user click
  • Discard requires explicit user action

Parallel dispatch mechanism

  • Sessions are created simultaneously; user writes a prompt once and selects "N sessions" with a numbered template
  • Each session spawns an independent subprocess (Claude Code or Codex) inside its own worktree directory
  • No automated coordination between sessions — they run fully independently

Session resume

  • User can re-open Crystal and continue any previous session (full conversation history loaded from SQLite)

Spec format

None — Crystal is a session manager, not a spec-driven workflow. No .spec or .plan files are created.

06

Memory Context

Crystal — Memory & Context

State storage

  • SQLite (better-sqlite3): The primary persistence layer. Stores sessions, projects, prompt history, panel states, terminal scrollback metadata.
  • File system: Each git worktree is a persistent directory at a path managed by Crystal. Worktree contents survive app restarts until explicitly deleted.

What is persisted

Data Location Lifetime
Sessions (metadata, status, prompts) SQLite Until archived/deleted
Project configs (path, main branch, run scripts) SQLite Until deleted
Prompt history (all prompts across all sessions) SQLite Until cleared
Terminal scrollback state SQLite Until session deleted
Panel configurations SQLite Until session deleted
AI session names SQLite Until changed
Git worktree content Git worktree directory Until session deleted

Context handoff

  • Sessions can be resumed: when a user reopens a session, Crystal loads the full conversation history from SQLite and passes it back to the CLI tool
  • The CLI tool (Claude Code) then has its own context window management; Crystal does not do any compaction

Compaction handling

Crystal does not handle context compaction. This is delegated entirely to the underlying CLI tool (Claude Code uses its own --context flags or PreCompact hooks if configured by the user).

Cross-session state

Prompt history is global across all sessions and searchable — this is the only explicit cross-session context sharing Crystal provides.

Memory type

File-based (git worktrees) + SQLite for structured metadata. No vector store, no graph DB.

07

Orchestration

Crystal — Orchestration

Multi-agent support

Yes — Crystal's primary value proposition is running N parallel AI sessions simultaneously.

Orchestration pattern

Parallel fan-out (no coordination): All sessions are dispatched with the same prompt to N independent worktrees. There is no inter-session communication, no orchestrator agent, and no automated merge decision. The human reviews diffs and picks the winner.

Isolation mechanism

Git worktree — each session operates in a separate worktree directory derived from the repository's main branch. Worktrees are created automatically when a session starts and pruned when deleted.

Coordination mechanism

None (human decides) — sessions are entirely independent. No file locking, no dependency graph, no quality gate.

Multi-model support

No — Crystal spawns whatever CLI tool and model the user has configured in their existing Claude Code/Codex setup. It does not assign different models to different sessions; all sessions use the same configured tool.

Execution mode

Interactive loop — the user submits prompts and receives responses; this is not a one-shot batch system.

Crash recovery

Sessions persist in SQLite and can be resumed after app crash or restart.

Context compaction

Not handled by Crystal; delegated to underlying CLI.

Consensus mechanism

None — comparison and selection is a human activity in Crystal's model.

Max concurrent agents

Unlimited (no hard cap in source; practically limited by available system resources and git worktree support).

08

Ui Cli Surface

Crystal — UI & CLI Surface

Desktop application

Crystal IS the UI — it is an Electron desktop application. This is its primary surface.

CLI binary

None (no bin field in package.json). Crystal is distributed as a desktop app, not a CLI tool.

Web dashboard

None — everything is in the Electron window.

Key UI features

Feature Description
Session sidebar Lists all sessions with status badges (color-coded: initializing/running/waiting/stopped/error)
Dual tab system Main view tabs (Output/Messages/Diff/Editor) plus a persistent tool panel bar
Multi-terminal panels Multiple XTerm.js terminal instances per session (50,000 line scrollback)
Diff viewer Syntax-highlighted git diff with file statistics per session
Prompt history Searchable list of all past prompts; one-click reuse
Project selector Switch between multiple projects in sidebar
Status indicators Animated color-coded badges with unread activity tracking

Observability

  • Messages View: raw JSON inspection of Claude Code SDK messages — this is debugging-level observability for developers
  • Session logs: real-time output via IPC streaming
  • No structured audit log or JSONL replay capability

IDE integration

None — Crystal is a standalone Electron app, not a VS Code extension or IDE plugin.

Mobile/remote

None — desktop only.

Comparison to seeds

Crystal's UI surface is the most prominent aspect of the framework — unlike superpowers (zero UI) or claude-flow (CLI+MCP), Crystal inverts the model: the entire value is in the GUI shell around existing CLI tools. It is closer in spirit to the Nimbalyst/Maestro/parallel-code cluster of desktop apps in this batch.

Related frameworks

same archetype · same primary tool · same memory type

Goose (Block/AAIF) ★ 46k

General-purpose AI agent (not just code) with security-first tool inspection, recipe-based shareable configurations, and 15+ LLM…

Vibe Kanban ★ 27k

Eliminate the overhead of planning, switching between agent terminals, and reviewing diffs by providing a single web dashboard…

1Code ★ 5.5k

Cursor-like desktop experience for Claude Code and Codex with cloud background agents, event-driven automations, and a full…

Maestro (RunMaestro) ★ 3.0k

Orchestrate unlimited parallel AI agent sessions with a keyboard-first desktop app including Group Chat coordination and Auto Run…

AgentsMesh ★ 2.1k

Multi-tenant workforce platform that gives every team member a squad of AI coding agents coordinated through channels, pod…

Open Cowork ★ 1.4k

Makes Claude Code accessible to knowledge workers on Windows/macOS with one-click install, VM sandbox, document skills, and IM…