crystal
Run multiple Codex and Claude Code AI sessions in parallel git worktrees. Test, compare approaches & manage AI-assisted development workflows in one desktop app.
Top Related Projects
The Crystal Programming Language
:gem: A collection of awesome Crystal libraries, tools, frameworks and software
A full-featured Crystal web framework that catches bugs for you, runs incredibly fast, and helps you write code that lasts.
Quick Overview
Crystal is a programming language that aims to combine the speed of C with the expressiveness of Ruby. It features a syntax similar to Ruby but with static type checking and compilation to native code, resulting in high-performance executables.
Pros
- Fast execution speed due to compilation to native code
- Ruby-like syntax for ease of learning and readability
- Strong static type system with type inference
- Built-in concurrency support through fibers and channels
Cons
- Smaller ecosystem compared to more established languages
- Limited platform support (primarily Linux and macOS)
- Longer compile times compared to interpreted languages
- Still evolving, with potential for breaking changes in future versions
Code Examples
- Hello World program:
puts "Hello, World!"
- Fibonacci sequence using recursion:
def fibonacci(n : Int32) : Int32
return n if n <= 1
fibonacci(n - 1) + fibonacci(n - 2)
end
puts fibonacci(10)
- HTTP server using the built-in HTTP module:
require "http/server"
server = HTTP::Server.new do |context|
context.response.content_type = "text/plain"
context.response.print "Hello, Crystal!"
end
puts "Listening on http://127.0.0.1:8080"
server.listen(8080)
Getting Started
-
Install Crystal:
- On macOS:
brew install crystal - On Ubuntu:
curl -fsSL https://crystal-lang.org/install.sh | sudo bash
- On macOS:
-
Create a new Crystal project:
crystal init app my_project cd my_project -
Run your Crystal program:
crystal run src/my_project.cr -
Build a release version:
crystal build --release src/my_project.cr
Competitor Comparisons
The Crystal Programming Language
Pros of Crystal
- Official repository for the Crystal programming language, ensuring up-to-date and authoritative content
- Significantly larger community and contributor base, leading to more frequent updates and improvements
- Comprehensive documentation and examples available within the repository
Cons of Crystal
- Larger codebase may be more challenging to navigate for newcomers
- Potentially slower to implement experimental features due to rigorous review processes
- May have stricter contribution guidelines, making it harder for casual contributors
Code Comparison
Crystal:
class Person
property name : String
property age : Int32
def initialize(@name, @age)
end
end
stravu/crystal:
class Person
getter name : String
getter age : Int32
def initialize(@name, @age)
end
end
The code snippets show minor differences in property declaration, with Crystal using property and stravu/crystal using getter. Both achieve similar results, but Crystal's approach allows for both reading and writing by default.
:gem: A collection of awesome Crystal libraries, tools, frameworks and software
Pros of awesome-crystal
- Comprehensive curated list of Crystal resources and libraries
- Regularly updated with community contributions
- Provides a quick overview of the Crystal ecosystem
Cons of awesome-crystal
- Not a functional Crystal project or library itself
- Requires manual curation and maintenance
Code comparison
Unfortunately, a direct code comparison is not relevant in this case, as awesome-crystal is a curated list of resources rather than a functional Crystal project. The crystal repository, on the other hand, is the main repository for the Crystal programming language itself.
Summary
awesome-crystal serves as an excellent resource for developers looking to explore the Crystal ecosystem, offering a wide range of libraries, tools, and resources. However, it's important to note that it's not a functional Crystal project like the crystal repository, which contains the actual language implementation.
While awesome-crystal provides valuable information for Crystal developers, it doesn't offer direct functionality or code contributions to the language itself. The crystal repository, being the official language repository, is more suitable for those looking to contribute to or understand the core language implementation.
A full-featured Crystal web framework that catches bugs for you, runs incredibly fast, and helps you write code that lasts.
Pros of Lucky
- Full-featured web framework with built-in ORM, routing, and templating
- Strong focus on type safety and compile-time checks
- Includes CLI tools for rapid development and code generation
Cons of Lucky
- Steeper learning curve due to its opinionated structure
- Less flexibility compared to using Crystal directly
- Smaller community and ecosystem than Crystal itself
Code Comparison
Lucky (web application setup):
class App < Lucky::BaseApp
def middleware
[
Lucky::ForceSSLHandler.new,
Lucky::HttpMethodOverrideHandler.new,
Lucky::LogHandler.new,
Lucky::SessionHandler.new,
Lucky::FlashHandler.new,
Lucky::ErrorHandler.new(action: Errors::Show),
Lucky::RouteHandler.new,
Lucky::StaticFileHandler.new("./public", false),
Lucky::CookieJarHandler.new
]
end
end
Crystal (basic HTTP server):
require "http/server"
server = HTTP::Server.new do |context|
context.response.content_type = "text/plain"
context.response.print "Hello world!"
end
puts "Listening on http://127.0.0.1:8080"
server.listen(8080)
Lucky provides a more structured approach with built-in middleware, while Crystal offers more flexibility for custom server setups.
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Crystal - Multi-Session AI Code Assistant Manager
Crystal is an Electron desktop application that lets you run, inspect, and test multiple AI coding assistant instances simultaneously using git worktrees. Crystal supports both Claude Code (Anthropic) and Codex (OpenAI) assistants. Crystal is an independent project created by Stravu. Stravu provides editable, collaborate AI notebooks with text, tables, diagrams.
https://github.com/user-attachments/assets/5ca66e5b-8d05-4570-8417-5e8dcd7726ef
The Crystal Workflow
- Create sessions from prompts, each in an isolated git worktree
- Iterate with your AI assistant (Claude Code or Codex) inside your sessions. Each iteration will make a commit so you can always go back.
- Review the diff changes and make manual edits as needed
- Squash your commits together with a new message and rebase to your main branch.
⨠Key Features
- ð¤ Multiple AI Assistants - Support for Claude Code (Anthropic) and Codex (OpenAI)
- ð Parallel Sessions - Run multiple AI assistant instances at once
- ð³ Git Worktree Isolation - Each session gets its own branch
- ð¾ Session Persistence - Resume conversations anytime
- ð§ Git Integration - Built-in rebase and squash operations
- ð Change Tracking - View diffs and track modifications
- ð Notifications - Desktop alerts when sessions need input
- ðï¸ Run Scripts - Test changes instantly without leaving Crystal
ð Quick Start
Prerequisites
- For Claude Code: Claude Code installed and logged in or API key provided
- For Codex: Codex installed (via npm:
@openai/codexor Homebrew) with ChatGPT account or API key - Git installed
- Git repository (Crystal will initialize one if needed)
1. Create a Project
Create a new project if you haven't already. This can be an empty folder or an existing git repository. Crystal will initialize git if needed.
2. Create Sessions from a Prompt
For any feature you're working on, create one or multiple new sessions:
- Each session will be an isolated git worktree
3. Monitor and Test Your Changes
As sessions complete:
- Configure run scripts in project settings to test your application without leaving Crystal
- Use the diff viewer to review all changes and make manual edits as needed
- Continue conversations with your AI assistant if you need additional changes
4. Finalize Your Changes
When everything looks good:
- Click "Rebase to main" to squash all commits with a new message and rebase them to your main branch
- This creates a clean commit history on your main branch
Git Operations
- Rebase from main: Pull latest changes from main into your worktree
- Squash and rebase to main: Combine all commits and rebase onto main
- Always preview commands with tooltips before executing
Installation
Download Pre-built Binaries
-
macOS: Download
Crystal-{version}.dmgfrom the latest release- Open the DMG file and drag Crystal to your Applications folder
- On first launch, you may need to right-click and select "Open" due to macOS security settings
-
Windows (Unofficial - Build from source): Windows is currently supported through local builds only. An installer will be provided in future releases.
- Follow the "Building from Source" instructions below
Homebrew
brew install --cask stravu-crystal
Building from Source
# Clone the repository
git clone https://github.com/stravu/crystal.git
cd crystal
# One-time setup
pnpm run setup
# Run in development
pnpm run electron-dev
Building for Production
# Build for macOS
pnpm build:mac
ð¤ Contributing
We welcome contributions! Please see our Contributing Guidelines for details.
Developing Crystal with Crystal
If you're using Crystal to develop Crystal itself, you need to use a separate data directory to avoid conflicts with your main Crystal instance:
# Set the run script in your Crystal project settings to:
pnpm run setup && pnpm run build:main && CRYSTAL_DIR=~/.crystal_test pnpm electron-dev
This ensures:
- Your development Crystal instance uses
~/.crystal_testfor its data - Your main Crystal instance continues using
~/.crystal - Worktrees won't conflict between the two instances
- You can safely test changes without affecting your primary Crystal setup
Using with Third-Party Deployments
To use Crystal with cloud providers or via corporate infrastructure, you should create a settings file with ENV values to correctly connect to the provider.
For example, here is a minimal configuration to use Amazon Bedrock via an AWS Profile:
{
"env": {
"CLAUDE_CODE_USE_BEDROCK": "1",
"AWS_REGION": "us-east-2", // Replace with your AWS region
"AWS_PROFILE": "my-aws-profile" // Replace with your profile
},
}
Check the deployment documentation for more information on getting setup with your particular deployment.
Additional Documentation
For a full project overview, see CLAUDE.md. Additional diagrams, database schema details, release instructions, and license notes can be found in the docs directory.
ð License
Crystal is open source software licensed under the MIT License.
Third-Party Licenses
Crystal includes third-party software components. All third-party licenses are documented in the NOTICES file. This file is automatically generated and kept up-to-date with our dependencies.
To regenerate the NOTICES file after updating dependencies:
pnpm run generate-notices
Disclaimer
Crystal is an independent project created by Stravu. Claude⢠is a trademark of Anthropic, PBC. Codex⢠is a trademark of OpenAI, Inc. Crystal is not affiliated with, endorsed by, or sponsored by Anthropic or OpenAI. This tool is designed to work with Claude Code and Codex, which must be installed separately.
Top Related Projects
The Crystal Programming Language
:gem: A collection of awesome Crystal libraries, tools, frameworks and software
A full-featured Crystal web framework that catches bugs for you, runs incredibly fast, and helps you write code that lasts.
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot