A CLI tool that allows you to run any command with state management and resume capability if interrupted.
- Universal command wrapping: Run any command with resumable session tracking
- Smart resume logic: Built-in plugins for common tools (wget, rsync, tar, curl)
- Session management: List, resume, and delete saved sessions
- Live output forwarding: See command output in real-time while logging to file
- Signal handling: Gracefully handle interruptions (Ctrl+C, SIGTERM)
# Clone and build
git clone https://github.com/Aliasgar-Jiwani/resumex.git
cd resumex
go build -o resumex
sudo mv resumex /usr/local/bin/resumex run wget https://example.com/bigfile.iso
resumex run rsync -avz source/ destination/
resumex run tar -czf backup.tar.gz /important/data/resumex listresumex resume <session-id>resumex delete <session-id>- Session Creation: When you run
resumex run <command>, it creates a unique session with metadata - Command Execution: The original command is executed with stdout/stderr captured to a log file
- Signal Handling: If interrupted (Ctrl+C), the session is marked as incomplete
- Smart Resume: When resuming, resumex uses command-specific plugins to add appropriate resume flags
- Logging: All output is saved to
~/.resumex/logs/<session-id>.log
- wget: Automatically adds
-c(continue) flag - rsync: Automatically adds
--partialflag - tar: Adds appropriate flags based on operation type
- curl: Automatically adds
-C -(continue from offset)
For unsupported commands, resumex will simply re-run the original command.
~/.resumex/
├── sessions/ # Session metadata (JSON files)
└── logs/ # Command output logs
# Start a large download
$ resumex run wget https://releases.ubuntu.com/22.04/ubuntu-22.04.3-desktop-amd64.iso
# If interrupted, resume it
$ resumex list
SESSION ID STATUS COMMAND START TIME WORKING DIR
a1b2c3d4 interrupted wget https://releases.u... 2023-12-01 14:30 /home/user/downloads
$ resumex resume a1b2c3d4
# This will run: wget https://releases.ubuntu.com/22.04/ubuntu-22.04.3-desktop-amd64.iso -cTo extend resumex with custom plugins:
import "github.com/Aliasgar-Jiwani/resumex/pkg/plugins"
// Register a custom plugin
plugins.RegisterPlugin("mycommand", func(sess *session.Session) string {
return sess.Command + " --resume-flag"
})MIT License