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

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

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.3.tar.gz (26.5 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.3-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: redo_cli-0.1.3.tar.gz
  • Upload date:
  • Size: 26.5 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.3.tar.gz
Algorithm Hash digest
SHA256 f79dd907734fd55c4af7aefa38cca23c0c82cf5c0df078c0ba8b21c9bdcd4d0a
MD5 6bbf13c028e87f1c364b991fd7f66ff8
BLAKE2b-256 9c0feaa2653edcbbbde9d475239a54a54274a647489949fd2adb6f24872aa5c7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: redo_cli-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 19.0 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7dedaa73d0a7cfc41ebaf730179b0d625df36c90468796cfd95f9ff3e9b60248
MD5 51723c9b05419a34e7f63a7055b843a7
BLAKE2b-256 71649d9237a709f36154cd4234942856939e8ee15bd5e562ab661d05e558d2fd

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