Skip to content

✨ Add launch command for iTerm dev environment setup#2

Open
rusackas wants to merge 1 commit into
mistercrunch:mainfrom
rusackas:feat/launch-command
Open

✨ Add launch command for iTerm dev environment setup#2
rusackas wants to merge 1 commit into
mistercrunch:mainfrom
rusackas:feat/launch-command

Conversation

@rusackas

Copy link
Copy Markdown

Summary

This PR adds a new claudette launch command that creates a complete development environment in iTerm2 with a single command.

Features

  • One-command setup: claudette launch project-name creates project if needed and opens complete dev environment
  • Auto project creation: If project doesn't exist, creates it with auto-assigned port
  • 3 pre-configured iTerm tabs:
    1. Shell tab - Basic shell with project activated
    2. Docker tab - Runs claudette docker up
    3. Claude Code tab - Opens Claude Code AI assistant
  • Smart port handling: Uses existing port or auto-assigns new one

Implementation Details

How it works

  1. Checks if project exists, creates it if needed (with auto port assignment)
  2. Creates a temporary Python script with iTerm2 automation
  3. Executes the script to open new iTerm window with 3 configured tabs
  4. Each tab automatically activates the project and runs its specific command

Requirements

  • macOS with iTerm2 installed
  • Python API enabled in iTerm2:
    • Open iTerm2 Preferences (⌘,)
    • Go to General → Magic
    • Check "Enable Python API"
  • iterm2 package: pip install iterm2 or pip install superset-claudette[iterm]

Changes

  • Added launch command in src/claudette/cli.py
  • Added iterm optional dependency group in pyproject.toml
  • Updated README.md with documentation for the launch command
  • Added feature mention in the Features section

Usage Examples

# Launch with new project (auto-assigns port)
claudette launch my-feature

# Launch with specific port
claudette launch my-feature 9005

# Launch existing project
claudette launch existing-project

Testing

  • Tested with new project creation ✅
  • Tested with existing projects ✅
  • Tested port auto-assignment ✅
  • Tested error handling when iTerm2 API not enabled ✅

Screenshots/Demo

The command successfully creates:

  • A new iTerm window titled "Claudette: project-name"
  • Tab 1: Shell with activated environment
  • Tab 2: Docker containers starting up
  • Tab 3: Claude Code AI assistant launching

Notes

  • This is a macOS-only feature due to iTerm2 dependency
  • The command gracefully handles when iTerm2 API is not enabled with helpful instructions
  • Project creation may take time (npm/pip installs) but the command handles this well

🤖 Generated with Claude Code

Add `claudette launch` command that creates a complete development
environment in iTerm2 with a single command:

- Automatically creates project if it doesn't exist
- Opens new iTerm window with 3 pre-configured tabs:
  - Tab 1: Shell with project activated
  - Tab 2: Docker containers running
  - Tab 3: Claude Code AI assistant
- Supports auto port assignment
- macOS/iTerm2 only feature

Requires iTerm2 with Python API enabled:
1. Open iTerm2 Preferences
2. Go to General → Magic
3. Enable "Enable Python API"

Install with: pip install superset-claudette[iterm]

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant