Skip to content

andreaskviby/dev

Repository files navigation

TMUX Smart Startup

A configuration-driven TMUX environment manager with JSON-based sessions, now integrated with BMAD Method (Breakthrough Method for Agile AI-Driven Development).

Terminal Preview Shell BMAD

Features

  • JSON-driven configuration - Add new sessions by creating JSON files
  • Vertical 4-pane layout - Up to 4 vertical panes per window
  • Auto-start commands - Run commands automatically at startup
  • Smart reconnection - Creates sessions if they don't exist, otherwise reconnects
  • Nord theme - Clean, modern status bar and color theme
  • Config manager - Interactive script to add/remove projects
  • 🆕 BMAD Method Integration - AI-driven product analysis with specialized agents
  • 🆕 make-product command - Launch 4-panel product analysis sessions

Structure

tmux-setup/
├── tmux-start.sh      # Main startup script
├── tmux-manage.sh     # Config manager script
├── tmux.conf          # TMUX configuration
├── startup            # Quick Claude Code launcher
├── quit               # Kill all tmux sessions
├── startup_prompt_*.md # Custom prompts for startup
├── make-product       # 🆕 BMAD product analysis launcher
├── config/
│   ├── example.json   # Example session template
│   ├── bmad.json      # BMAD Method session
│   └── *.json         # Add your own sessions...
├── _bmad/             # BMAD Method installation
└── README.md

Installation

# 1. Clone the repo
git clone https://github.com/your-repo/tmux-setup.git
cd tmux-setup

# 2. Install dependencies
brew install tmux jq    # macOS
# or
sudo apt install tmux jq  # Ubuntu/Debian

# 3. Install Node.js (required for BMAD)
# Node.js v20+ is required
# Visit https://nodejs.org or use your package manager

# 4. Install BMAD Method (already installed in this repo)
# If you need to reinstall:
npx bmad-method@alpha install

# 5. Link tmux.conf
ln -sf "$(pwd)/tmux.conf" ~/.tmux.conf

# 6. Make scripts executable
chmod +x tmux-start.sh tmux-manage.sh startup make-product

# 7. (Optional) Add to PATH
ln -sf "$(pwd)/tmux-start.sh" ~/.local/bin/tmux-start
ln -sf "$(pwd)/tmux-manage.sh" ~/.local/bin/tmux-manage
ln -sf "$(pwd)/make-product" ~/.local/bin/make-product

Usage

🆕 BMAD Product Analysis (make-product)

Launch a comprehensive 4-panel product analysis session with BMAD Method AI agents:

# Interactive mode - select project from ~/Herd
./make-product

# Direct mode - specify project path
./make-product ~/Herd/my-project
./make-product /path/to/any/project

What it does:

  • Creates 4 vertical panels in tmux
  • Launches Claude Code in each panel
  • Automatically starts BMAD workflows:
    • Panel 1: Product Brief & Workflow Init (*workflow-init)
    • Panel 2: Research & Market Analysis (*research)
    • Panel 3: Architecture & Planning (*plan)
    • Panel 4: Implementation Status (*workflow-status)

This enables parallel product analysis with specialized AI agents working on different aspects simultaneously.

Quick Startup with Claude Code

Launch Claude Code in multiple panes with customizable prompts:

./startup           # Default (uses startup_prompt_en.md)
./startup en        # English prompt
./startup sv        # Swedish prompt
./startup saas      # SaaS-specific prompt
./startup laravel   # Laravel-specific prompt

How it works:

  1. Shows all folders in ~/Herd/
  2. Enter folder numbers (comma-separated): 37,51,47
  3. Creates tmux session with 1-4 vertical panes
  4. Starts Claude Code in each pane
  5. Auto-sends the prompt from startup_prompt_<name>.md

Create custom prompts:

# Create a new prompt file
echo "Your custom prompt here" > startup_prompt_myworkflow.md

# Use it
./startup myworkflow

Available prompts:

File Usage Description
startup_prompt_en.md ./startup en English default prompt
startup_prompt_sv.md ./startup sv Swedish default prompt
startup_prompt_saas.md ./startup saas SaaS project starter

Starting Sessions

# Start all sessions
./tmux-start.sh

# Start specific session
./tmux-start.sh example
./tmux-start.sh bmad

# List configurations
./tmux-start.sh --list

# Show status
./tmux-start.sh --status

# Kill all sessions
./tmux-start.sh --kill

Managing Projects

# Interactive mode
./tmux-manage.sh

# Add a project
./tmux-manage.sh add

# Remove a project
./tmux-manage.sh remove

# List all projects
./tmux-manage.sh list

The config manager will:

  1. Let you select which session to modify
  2. Show available folders in ~/Herd/
  3. Let you choose a pane template (Laravel, Node.js, etc.)
  4. Automatically update the JSON config

Sessions

Session Icon Description
example 📁 Example session template
bmad 🤖 BMAD Method Product Analysis

Create your own sessions by adding JSON files to config/.

JSON Configuration

Schema

{
  "session": "session-name",
  "icon": "🚀",
  "description": "Description",
  "windows": [
    {
      "name": "window-name",
      "directory": "~/Herd/project",
      "panes": [
        { "name": "pane-1", "command": "npm run dev" },
        { "name": "pane-2", "command": null },
        { "name": "pane-3", "command": "tail -f logs" },
        { "name": "pane-4", "command": null }
      ]
    }
  ]
}

Example: Laravel Project

{
  "session": "myproject",
  "icon": "🚀",
  "description": "My Laravel Project",
  "windows": [
    {
      "name": "webapp",
      "directory": "~/Herd/webapp",
      "panes": [
        { "name": "serve", "command": "php artisan serve" },
        { "name": "vite", "command": "npm run dev" },
        { "name": "queue", "command": "php artisan queue:work" },
        { "name": "logs", "command": "tail -f storage/logs/laravel.log" }
      ]
    }
  ]
}

Pane Templates

When adding projects via ./tmux-manage.sh add, you can choose from these templates:

Template Panes Description
Claude Code claude Single pane with Claude Code auto-start
Laravel + Claude serve, npm, logs, claude Full Laravel dev + Claude Code
Laravel Full serve, npm, queue, logs Laravel with queue worker
Laravel Basic serve, npm, logs, tinker Standard Laravel setup
Node.js dev, build, logs, shell Node.js development
Basic 4 empty shells Four blank panes
Minimal 2 empty shells Two blank panes

Keybindings

Command Description
Ctrl+a | Split vertically
Ctrl+a - Split horizontally
Ctrl+a c New window
Ctrl+a n/p Next/previous window
Ctrl+a 1-9 Go to window #
Alt+←→↑↓ Navigate panes
Shift+←→ Resize panes
Ctrl+a Tab Toggle last session
Ctrl+a J/K Next/previous session
Ctrl+a = Even out pane layout
Ctrl+a r Reload config
Ctrl+a Q Kill all sessions (quit)
Ctrl+h/j/k/l Navigate panes (Warp-compatible)

Customization

Add new session

  1. Create config/my-session.json
  2. Run ./tmux-start.sh my-session

Change theme

Edit color variables in tmux.conf:

# Nord colors
NORD0="#2E3440"   # Background
NORD8="#88C0D0"   # Accent
# ... etc

Tips

  • Save session state: Use tmux-resurrect
  • Auto start: Add to .bashrc/.zshrc:
    [[ -z "$TMUX" ]] && ~/tmux-setup/tmux-start.sh

BMAD Method Integration

This repository integrates the BMAD Method (Breakthrough Method for Agile AI-Driven Development) - a comprehensive AI-powered development framework with specialized agents and structured workflows.

What is BMAD?

BMAD is an open-source framework that brings structure and efficiency to AI-driven development through:

  • 21 Specialized Agents: Product Manager, Architect, Developer, QA, UX Designer, and more
  • 50+ Guided Workflows: From brainstorming to deployment
  • Scale-Adaptive Intelligence: Adjusts complexity based on project needs
  • Documentation-First: All context and decisions are versioned

BMAD Workflows Available

The make-product command leverages these BMAD workflows:

  1. *workflow-init - Analyzes your project and recommends an appropriate development track
  2. *research - Conducts market analysis and competitive research
  3. *plan - Creates architecture and planning documents
  4. *workflow-status - Tracks implementation progress and next steps

Learn More

BMAD Commands Reference

When in Claude Code with BMAD installed, you can use:

*workflow-init        # Initialize and analyze project
*research            # Start research workflow
*plan                # Begin planning workflow
*architect           # Architecture design
*develop             # Development workflow
*test                # Testing workflow
*workflow-status     # Check current status

License

MIT

About

My development setup environment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages