Multi-window terminal IDE using tmux as window manager with F-key navigation. Includes tree browser, file manager, workflow orchestrator, prompt writer, git interface, and AI-assisted screen customization.
This skill has been flagged as potentially dangerous. It contains patterns that could compromise your security or manipulate AI behavior.Safety score: 35/100.
KillerSkills scans all public content for safety. Use caution before installing or executing flagged content.
A sophisticated terminal IDE built on tmux with 9 specialized windows accessible via F-keys. Features include tree browsing, dual-panel file management, workflow orchestration, prompt writing, git interface, and AI-assisted screen customization.
The IDE creates a tmux session with these windows:
- Multi-file selection with Space
- Copy files between panels (c)
- Rename (r), Delete (d), Search (/)
- Clickable path navigation
```bash
brew install tmux fzf ripgrep glow
pip install textual prompt-toolkit
```
Create this file structure:
```
claude_ide/
├── tui_env.py # tmux launcher
├── tree_view.py # Tree+viewer+file manager
├── config_panel.py # Theme config + AI customization
├── ai_customizer.py # AI code modification module
├── workflow_chain.py # Workflow orchestrator
├── workflow_models.py # Workflow data models
├── workflow_storage.py # Workflow persistence
├── workflow_executor.py# tmux execution engine
├── favorites.py # Folder favorites browser
├── prompt_writer.py # Prompt writing tool
├── recorder.py # Screen recorder
├── lizard_tui.py # Lizard TUI app
├── status_viewer.py # Session metrics viewer
├── start.sh # convenience script
└── CLAUDE.md # documentation
```
The launcher script:
1. Creates tmux session `claude-ide-{pid}` with base-index 1
2. Creates windows at indices 1-6, 9
3. Binds F-keys to select windows
4. Configures status bar showing `F#:Name` format
5. Loads saved theme and status position from config
6. Attaches to session
Key pattern for creating windows:
```python
subprocess.run(["tmux", "new-window", "-t", f"{SESSION}:2", "-n", "Tree"])
TREE_SCRIPT = SCRIPT_DIR / "tree_view.py"
subprocess.run([
"tmux", "send-keys", "-t", f"{SESSION}:2",
f" python3 '{TREE_SCRIPT}'", "Enter"
])
subprocess.run(["tmux", "bind-key", "-n", "F2", "select-window", "-t", f"{SESSION}:2"])
```
Create a Textual app with two screens:
**MainScreen**: Tree browser + file viewer
**DualPanelScreen**: Dual-panel file manager
File operation pattern:
```python
def copy_files(self, files: list[Path], target_dir: Path):
"""Copy files in background thread with progress dialog"""
def copy_task():
for i, file in enumerate(files):
shutil.copy2(file, target_dir / file.name)
progress = int((i + 1) / len(files) * 100)
self.app.call_from_thread(self.update_progress, progress)
threading.Thread(target=copy_task, daemon=True).start()
```
Create three modules:
**workflow_models.py**: Data models
```python
@dataclass
class WorkflowNode:
id: str
name: str
project_path: str
prompt: str
dependencies: list[str]
@dataclass
class WorkflowChain:
name: str
nodes: list[WorkflowNode]
```
**workflow_executor.py**: tmux execution
```python
class TmuxExecutor:
def execute_node(self, node: WorkflowNode):
# Create tmux window for node
# Run command: cd {project_path} && claude {prompt}
# Monitor output
```
**workflow_chain.py**: Textual UI with three screens
Implement these classes:
**CodeBackup**: Timestamped backups in `backups/` directory
```python
def create_backup(self, file_path: Path) -> Path:
timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
backup_path = BACKUP_DIR / f"{file_path.stem}_{timestamp}.py.bak"
shutil.copy2(file_path, backup_path)
return backup_path
```
**AICodeModifier**: Claude API integration
```python
def generate_modification(self, file_path: Path, prompt: str) -> str:
original_code = file_path.read_text()
response = anthropic.messages.create(
model="claude-sonnet-4-5",
messages=[{
"role": "user",
"content": f"Modify this code:\n{original_code}\n\nChange: {prompt}"
}]
)
return response.content
```
**ScreenReloader**: Hot-reload via tmux
```python
def reload_screen(self, screen_name: str, script_path: Path):
# 1. Get window index by name (not hardcoded)
window_idx = get_window_index_by_name(screen_name)
# 2. Kill process by PID
pane_pid = get_pane_pid(window_idx)
kill_process_tree(pane_pid)
# 3. Restart app
send_keys(window_idx, f"python3 {script_path}")
```
Use `prompt_toolkit` to create editor with custom key bindings:
```python
bindings = KeyBindings()
@bindings.add('c-s')
def save_prompt(event):
"""Save current prompt"""
pass
@bindings.add('c-g')
def ai_enhance(event):
"""AI enhance prompt"""
pass
@bindings.add('c-r')
def send_to_terminal(event):
"""Send text to F1 terminal window"""
subprocess.run([
"tmux", "send-keys", "-t", f"{session}:1",
event.app.current_buffer.text, "Enter"
])
```
**Start IDE:**
```bash
./start.sh
tui
tui /path/to/project
tui octopus /Users/adrian/work/octopus
```
**Add New F-Key Window:**
1. Create window in `tui_env.py`:
```python
subprocess.run(["tmux", "new-window", "-t", f"{SESSION}:7", "-n", "MyApp"])
subprocess.run(["tmux", "send-keys", "-t", f"{SESSION}:7", " python3 my_app.py", "Enter"])
```
2. Bind F-key:
```python
subprocess.run(["tmux", "bind-key", "-n", "F7", "select-window", "-t", f"{SESSION}:7"])
```
3. Update F12 toggle command to include new F-key
Embedding PTY terminals in Python TUI frameworks is problematic because both compete for terminal I/O. tmux is designed for terminal multiplexing, making it the optimal solution.
Files with these extensions show "Cannot display binary file":
File operations run in background threads. UI updates use `self.app.call_from_thread()` to safely update from background thread.
Each instance creates unique `claude-ide-{pid}` tmux session with PID suffix. Cleanup via `atexit` and signal handlers (SIGHUP, SIGTERM).
```bash
ls backups/
cp backups/tree_view_20251231_234142.py.bak tree_view.py
tmux send-keys -t SESSION:WINDOW C-c
tmux send-keys -t SESSION:WINDOW "python3 tree_view.py" Enter
```
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/claude-ide-tmux-based-multi-window-terminal-ide/raw