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 · How It Works · Commands · Placeholders · Local Development


What is Redo?

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

Instead of typing the same commands again and again:

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

Save them once:

redo new ship

Run them anytime:

redo run ship

Think of Redo as bookmarks for terminal workflows.


Quick Start

Install Redo from PyPI:

pip install redo-cli

Check the available commands:

redo --help

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 it without running anything:

redo run ship --dry

Getting Help

Use Redo’s built-in help whenever you forget a command:

redo --help

Show help for a specific command:

redo new --help
redo run --help
redo import --help

Running redo with no command shows the Redo banner.

Running this shows version, storage path, and credit:

redo --info

Demo Flow

Redo demo running workflow

A typical Redo session looks like this:

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

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

Every command supports command-specific help:

redo <command> --help

Core commands

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

Utility commands

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

Create a workflow:

redo new ship

Enter:

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

Redo stores it like this:

{
  "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 it runs:

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

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, then 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

Print the exact storage path:

redo path

Override the storage directory:

REDO_DATA_DIR=<path>

Initialize storage manually:

redo init

Check storage health:

redo doctor

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.


Git Push Tip

If Git says the current branch has no upstream branch, run the command Git suggests once:

git push --set-upstream origin master

After that, workflows containing git push can push normally.


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.4.tar.gz (27.2 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.4-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: redo_cli-0.1.4.tar.gz
  • Upload date:
  • Size: 27.2 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.4.tar.gz
Algorithm Hash digest
SHA256 e41bb41e4b754e36fb9bab3458726457e72ddf8bef6296ae80fb5b23689f0b62
MD5 f260a72d493936918826a12e6fe246fe
BLAKE2b-256 ca4305a12387050c3f72a378bba34f7c7271a0ba95c41d65e8ee69ef0ba02981

See more details on using hashes here.

File details

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

File metadata

  • Download URL: redo_cli-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 19.4 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 4e928590def0a6aea0f35d1d96b476d5de71f5fdaef7343377ca3f0c90ba81b8
MD5 d74be6d6e0edb7a0fe24deca5db29245
BLAKE2b-256 e262716024a93c0bf9b9184bdefc8e6236712acb20dba38e18b883e0d8baf65b

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