Skip to main content

Bookmarks for terminal workflows.

Project description

Redo

A CLI tool for saving repeated terminal workflows and running them again with one command.

Redo banner

Stop retyping commands. Save workflows once, run them anytime.

PyPI version Python 3.11+ CLI Workflow Automation Active

Quick Start · Demo · Features · Commands · Local Development


What is Redo?

Redo is a command-line tool that turns repeated terminal command chains into reusable workflows.

Instead of typing this every time:

git add .
git commit -m "fixed bug"
git push

Save it once:

redo new ship

Then run it anytime:

redo run ship

Think of Redo as bookmarks for terminal workflows.


Demo Flow

Redo demo running workflow

redo new ship
redo list
redo show ship
redo run ship --dry
redo run ship
redo stats

Add a real screenshot or GIF at assets/demo-run.png. Best shot: the live workflow status table while redo run ship is running.


Quick Start

Install from PyPI:

pip install redo-cli

Create a workflow:

redo new ship

Enter commands one by one:

Description: Commit and push code
Command: git add .
Command: git commit -m "{message}"
Command: git push
Command: :done

Run it later:

redo run ship

Preview before running:

redo run ship --dry

Why It Matters

Developers repeat command chains constantly:

Project setup npm install, copy env files, start dev servers
Git workflows git add, git commit, git push
Build flows run tests, build apps, deploy projects
Cleanup flows remove build folders, reinstall dependencies, reset local state

Redo removes the small friction that adds up over time.


Features

Feature What it does
Named workflows Save repeated command chains as reusable workflows
One-command replay Run saved workflows with redo run <name>
Smart placeholders Use values like {message} or {project_name}
Dry run mode Preview commands before executing them
Safety checks Detect risky commands before they surprise you
Focused errors Stop on failure and show the command that broke
Usage stats Track run counts and time-saved estimates
Import/export Back up and move workflows between machines
Doctor/autofix Check and repair workflow storage issues

Commands

Core

redo init
redo new <name>
redo list
redo show <name>
redo run <name>
redo run <name> --dry
redo delete <name>
redo stats

Developer QoL

redo search <query>
redo copy <source> <target>
redo rename <old-name> <new-name>
redo path
redo export workflows-backup.json
redo import workflows-backup.json
redo import workflows-backup.json --replace
redo doctor
redo autofix
redo guide
redo clearhistory

Example Workflow

redo new ship
Description: Commit and push code
Command: git add .
Command: git commit -m "{message}"
Command: git push
Command: :done

Saved data:

{
  "ship": {
    "description": "Commit and push code",
    "commands": [
      "git add .",
      "git commit -m \"{message}\"",
      "git push"
    ],
    "runs": 0
  }
}

Run it:

redo run ship

Redo asks for the placeholder value:

message: fixed clumsy ui

Then runs:

git add .
git commit -m "fixed clumsy ui"
git push

Screenshots

Redo list command Redo dry run preview

Redo focused error panel

Suggested files to add:

assets/banner.png
assets/demo-run.png
assets/list-command.png
assets/dry-run.png
assets/error-panel.png

For a CLI project, a short terminal GIF is the strongest visual. Recommended GIF:

assets/demo.gif

Show this sequence:

redo new ship
redo list
redo run ship --dry
redo run ship

Then embed it near the top:

<p align="center">
  <img src="assets/demo.gif" alt="Redo terminal demo" width="85%" />
</p>

Placeholders

Use placeholders when part of a command changes each run.

git commit -m "{message}"
npm create vite@latest {project_name}
cd {project_name}

Redo asks once for each unique placeholder and replaces every occurrence across the workflow.

Valid placeholder names:

{message}
{project_name}
{ticket_123}

Invalid placeholder names:

{123ticket}
{project-name}
{}

Placeholder values are quoted before execution so user input is treated as one literal value instead of shell syntax.


Safety

Redo detects risky commands before running them.

Examples:

rm -rf
del /s
format
sudo
git reset --hard

If a risky command is found, Redo asks for confirmation before continuing.

Use dry-run mode whenever you want to inspect a workflow first:

redo run cleanup --dry

Storage

Redo stores workflow data in:

%APPDATA%/Redo/workflows.json

If APPDATA is unavailable, Redo falls back to:

~/.redo/workflows.json

Override the storage directory:

REDO_DATA_DIR=<path>

Print the exact storage path:

redo path

Repair common storage issues:

redo autofix

redo autofix can fix missing files, blank files, malformed JSON, and workflow entries with missing fields. If JSON is malformed, Redo saves a non-overwriting workflows.broken.json backup before resetting the main file.


Local Development

Requirements:

Python 3.11+

Clone the repository:

git clone https://github.com/VibeSlayer-code/Redo.git
cd Redo

Create and activate a virtual environment:

python -m venv .venv
.venv\Scripts\activate

Install dependencies:

pip install -r requirements.txt
pip install -e .

Run locally:

python main.py --help
redo --help
redo --info

Run tests:

pytest

How It Works

Redo is split into small modules instead of one large script.

storage.py       workflow JSON storage
placeholders.py  placeholder detection and replacement
runner.py        command execution and dry runs
ui.py            terminal output and tables
main.py          CLI commands

The workflow lifecycle:

load workflow
process placeholders
preview or run commands
stop on failure
update run count

This keeps the codebase simple while still supporting useful CLI features like dry runs, safety checks, repair tools, and stats.


Roadmap

  • Project-local workflow files
  • Shell completion
  • Workflow tags
  • Workflow templates
  • Shared workflows for repositories
  • More detailed time-saved analytics
  • Better safety rules for destructive commands

License

Source-available, all rights reserved.

You may view the source code, but you may not copy, modify, distribute, or use it without permission.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

redo_cli-0.1.2.tar.gz (27.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

redo_cli-0.1.2-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

Details for the file redo_cli-0.1.2.tar.gz.

File metadata

  • Download URL: redo_cli-0.1.2.tar.gz
  • Upload date:
  • Size: 27.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for redo_cli-0.1.2.tar.gz
Algorithm Hash digest
SHA256 4d0aea8ba9e5e087d64ce1d0a16223cf202679831f069b4d2732e701e6fb6d6b
MD5 ac131d45479cdaa826f620d2dbbda67a
BLAKE2b-256 461518383feee8db9b179efd03c62d9a576a111acd001736915d43c298c6200c

See more details on using hashes here.

File details

Details for the file redo_cli-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: redo_cli-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 19.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for redo_cli-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8f6506e19acf33470883514bb21e208235175ee3b56b477d3748f45e508a06cc
MD5 2594437b10fa35b74ae9119acf21fc49
BLAKE2b-256 9d43ee5de06271b22c002e30df27671ea9e3b1595df1f39f2f4aafcf79d1600a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page