CLI application that generates beautiful guitar chord progressions using AI (OpenAI). It shows tablature, strumming patterns, capo suggestions, and harmonic degrees.
- Rust (1.70+)
- OpenAI API Key
cp .env.example .envEdit .env and add your API key:
OPENAI_API_KEY=sk-your-key-here
cargo run# Native (your architecture)
cargo build --release
# Apple Silicon (M1/M2/M3)
rustup target add aarch64-apple-darwin
cargo build --release --target aarch64-apple-darwin
# Intel Mac
rustup target add x86_64-apple-darwin
cargo build --release --target x86_64-apple-darwinBinary output: target/release/chords-generator or target/<target>/release/chords-generator
# Native
cargo build --release
# Cross-compile from macOS (requires cross-linker)
rustup target add x86_64-unknown-linux-gnu
# Option A: using cross (recommended)
cargo install cross
cross build --release --target x86_64-unknown-linux-gnu
# Option B: using musl for static binary (no dependencies)
rustup target add x86_64-unknown-linux-musl
cargo build --release --target x86_64-unknown-linux-muslBinary output: target/release/chords-generator or target/<target>/release/chords-generator
# From Windows
cargo build --release
# Cross-compile from macOS/Linux
rustup target add x86_64-pc-windows-msvc
# Using cross (recommended for cross-compilation)
cargo install cross
cross build --release --target x86_64-pc-windows-gnuBinary output: target/release/chords-generator.exe or target/<target>/release/chords-generator.exe
$ ./chords-generator
🎸 Chords Generator
Generate beautiful chord progressions with AI
🎵 Genre/Rhythm: bossa nova jazz
🎹 Key: A Minor
💫 Mood: Romántico (Romantic)
🔢 Number of chords: 4
⏳ Generating chord progression...
🎸 Romantic Bossa Nova in Am
Am7 (i) Dm7 (iv) G7 (VII) Cmaj7 (III)
e |---0--- ---1--- ---1--- ---0---
B |---1--- ---1--- ---0--- ---0---
G |---0--- ---2--- ---0--- ---0---
D |---2--- ---0--- ---0--- ---2---
A |---0--- ---x--- ---2--- ---3---
E |---x--- ---x--- ---3--- ---x---
Progresión: i → iv → VII → III
Rasgueo: ↓ ↓↑ ↑↓↑ (130 BPM)
Capo: No capo needed
💡 Let each chord ring out, use your thumb for bass notes on beats 1 and 3.
💾 Save to file? (y/n)
🔄 Generate another progression with the same preferences? (y/n)
src/
├── main.rs # Entry point + CLI flow
├── config.rs # Loads OPENAI_API_KEY from .env
├── models/
│ ├── chord.rs # Chord, ChordProgression
│ └── prompt.rs # UserPreferences
├── services/
│ ├── openai_service.rs # OpenAI API client
│ ├── prompt_service.rs # System/user prompt builder
│ └── display_service.rs # Terminal rendering + save to file
└── repository/
└── chord_repository.rs # JSON response parser
MIT