rund
Run CLI apps in detached terminal popup window with configurable size, position, and smart behavior.
A lightweight, cross-platform terminal launcher that opens CLI applications in separate terminal with automatic positioning, smart pause detection, and per-app configuration. Perfect for creating temporary workspaces, viewing files, or running quick scripts without cluttering your main terminal.
Features
- 🚀 Detached Terminal Windows - Launch apps in separate terminal windows that don't block your workflow
- 📐 Configurable Geometry - Set custom window size and position (per-app or globally)
- 🎯 Smart Pause Detection - Automatically determines when to pause based on app type and file size
- 💾 Automatic Backups - Creates backups when files are modified
- 📋 Clipboard Integration - Edit clipboard content directly
- 🎨 Per-App Configuration - Different geometry settings for different applications
- 🪟 Windows Terminal Support - Full support for both cmd.exe and Windows Terminal (wt)
- 🐧 Cross-Platform - Works on Windows, macOS, and Linux
- 🔧 Highly Customizable - Configure app classifications, pause behavior, and more
Installation
From Source
The binary will be at target/release/rund (or rund.exe on Windows).
Add to PATH
Windows:
# Add the directory containing rund.exe to your PATH
$env:Path += ";C:\path\to\rund"
Linux/macOS:
# Copy to a directory in PATH
From Crates.io
you may need to add Cargo's bin directory to your PATH:
Quick Start
# View a file with bat
# Edit a file with nvim
# Edit clipboard content
# Run a Python script
# Use specific output file
Usage
rund [OPTIONS] [APP] [ARGS...]
Options
-c, --clipboard- Read clipboard content to file before launching-o, --output FILE- Specify output file path-b, --backup DIR- Override backup directory-t, --top- Always-on-top window (macOS/Linux only)--config- Show config file location-h, --help- Show help message
Examples
# View file with bat (auto-size detection)
# Edit file with specific geometry (if configured)
# Edit clipboard and save to specific path
# Run command with arguments (relative paths work!)
# Python REPL with auto-pause
# Node script with output
Configuration
Configuration file is automatically created at:
- Windows:
%APPDATA%\rund\config.tomlor<exe_dir>\config.toml - Linux:
~/.config/rund/config.toml - macOS:
~/Library/Application Support/rund/config.toml
Basic Configuration
[]
# Default window geometry
= 800
= 600
= 100
= 100
= false
# Windows only: Terminal type
= "cmd" # or "wt" for Windows Terminal
# Pause behavior: "never", "always", or "auto"
= "auto"
# Backup directory
= "backups"
# Default app (optional)
# default_app = "nvim"
App Classifications
Customize which apps are editors, viewers, or always need pause:
# Editors: NEVER pause (they're interactive)
= "vim, nvim, nano, emacs, micro, helix, hx, code, subl"
# Viewers: Pause ONLY for small files (<30 lines)
= "bat, less, more, cat, type"
# Always pause: For scripts/interpreters that produce output
= "python, python3, node, ruby, perl, php"
Per-App Geometry
Configure specific geometry for individual apps:
[]
= 1200
= 800
= 200
= 150
= false
[]
= 1000
= 700
= true # Let system decide position
[]
= 900
= 600
= 300
= 200
Note: Per-app geometry works with:
- ✅ Windows Terminal (wt)
- ✅ Linux terminals (alacritty, kitty, etc.)
- ✅ macOS Terminal.app
- ⚠️ Windows cmd.exe (position via registry, less reliable)
Smart Pause Behavior
The auto pause behavior intelligently determines when to pause:
| App Type | Small File (<30 lines) | Large File (≥30 lines) |
|---|---|---|
| Editors (vim, nvim, nano) | No pause | No pause |
| Viewers (bat, less, cat) | Pause → close | Interactive pager → close |
| Always Pause (python, node) | Pause → close | Pause → close |
| Unknown | Pause → close | Pause → close |
No manual terminal closing required! All windows auto-close after use.
Platform-Specific Features
Windows
- cmd.exe: Uses registry for position control
- Windows Terminal (wt): Full position and size control
= "wt" # Enable Windows Terminal - Auto-position: When
auto_position = true, omits position parameters - Type command: Automatically pipes large files through
more
Linux
Supports multiple terminal emulators (auto-detected):
- alacritty (full geometry control)
- kitty (full geometry control)
- gnome-terminal
- konsole
- xterm
macOS
- Uses AppleScript to control Terminal.app
- Full geometry control with
bounds
Advanced Features
Clipboard Editing
Edit your clipboard content in your favorite editor:
# Edit clipboard in nvim
# Edit clipboard in bat (view-only)
# Save to specific file
Automatic Backups
When editing files with -o or -c flags, rund automatically:
- Calculates initial file hash
- Monitors the process
- Creates timestamped backup if file changed
Backups are saved to ./backups/ (or configured directory):
backups/
├── file_1703001234.txt
├── file_1703005678.txt
└── ...
Relative Path Support
Relative paths are automatically converted to absolute paths:
# These work from any directory!
Custom App Detection
Add your own apps to classifications:
# Add custom editor
= "vim, nvim, nano, kak, joe, micro"
# Add custom viewer
= "bat, less, glow, mdcat"
# Add custom script interpreter
= "python, python3, node, deno, bun"
Use Cases
Quick File Viewing
# View with syntax highlighting
# View log files
Temporary Editing
# Edit config quickly
# Edit from clipboard
Script Running
# Run Python script with visible output
# Start local server
# Run Node script
Code Review
# Different geometry for different tools
Troubleshooting
Windows Terminal Issues
If you get errors with Windows Terminal:
# Try cmd.exe instead
= "cmd"
Relative Paths Not Working
Make sure you're using the latest version - older versions didn't support relative path conversion.
Terminal Not Closing
Check your pause_behavior setting:
# For apps like bat/less, use:
= "auto" # or "never"
# NOT:
= "always" # This requires manual close
File Not Found with Type Command
For large files, use a proper pager:
# Instead of: rund type largefile.txt
Building from Source
Prerequisites
- Rust 1.70 or later
- Cargo
Dependencies
arboard- Clipboard supportsha2- File hashing for backups
Compile
For smaller binary size:
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Areas for improvement:
- Additional terminal emulator support
- More smart detection heuristics
- GUI configuration editor
- Plugin system for custom behaviors
License
MIT License - see LICENSE file for details
💻 Author
- GitHub: @cumulus13
- Email: cumulus13@gmail.com
Links
- Repository: https://github.com/cumulus13/rund
- Issues: https://github.com/cumulus13/rund/issues
- Documentation: https://docs.rs/rund
Star ⭐ this repo if you find it useful!
