Skip to main content

Bookmarks for terminal workflows.

Project description

Redo

Redo is a CLI tool that saves repeated terminal workflows and runs them again with one command. It is built for developers who are tired of retyping the same setup, build, deploy, and cleanup commands.

Think of it as bookmarks for terminal workflows.

Why Redo Exists

Developers repeat the same command chains constantly: starting projects, running test suites, cleaning folders, pushing code, building apps, and following long README setup steps.

Redo lets you define those workflows once, then replay them whenever you need them. It supports smart placeholders, previews, safety checks for dangerous commands, and simple usage stats.

Installation

Install from PyPI:

pip install redo-cli

For local development, clone the project, create a virtual environment, and install dependencies:

python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
pip install -e .

You can run Redo locally with either form:

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

Running redo with no command shows the Redo ASCII banner. Running redo --info shows the banner, version, storage path, and credit.

Redo stores its workflow data in:

%APPDATA%/Redo/workflows.json on Windows, or ~/.redo/workflows.json when APPDATA is unavailable

Set REDO_DATA_DIR to override the storage directory. Run redo path to print the exact file Redo is using.

Run redo init to create the folder and file explicitly, or let Redo create them the first time it needs storage.

The first time you run redo new, Redo offers to show a quick guide. You can open that guide anytime with:

redo guide

Usage

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

Redo shows a live status table while commands run. Successful command output stays quiet by default; if a command fails, Redo stops the workflow and shows a focused error panel with the captured output.

Preview it without executing commands:

redo run ship --dry

Commands

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

Developer QoL 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 doctor checks the workflow file, counts saved commands/placeholders, and flags risky commands before they surprise you later.

redo autofix repairs common storage problems: 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 next to the main file before resetting it.

redo clearhistory clears every saved workflow from the file shown by redo path. Use redo clearhistory --yes to skip the confirmation prompt.

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 use letters, numbers, and underscores, and cannot start with a number:

{message}
{project_name}
{ticket_123}

Placeholder values are quoted before execution so prompt input is treated as one literal value instead of shell syntax. This prevents command separators, variable expansion, and globs from silently changing the command shape.

Workflow names cannot be blank or reuse Redo command names such as run, new, delete, or stats.

Demo Workflow

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

Example workflow data:

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

Safety

Redo detects risky commands before running them and asks for confirmation. Examples include:

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

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, a workflow containing git push can push normally.

Roadmap

  • Project-local and global workflow stores
  • Tags and search
  • Shell completion
  • Workflow sharing through repository templates
  • More detailed time-saved analytics

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.0.tar.gz (23.4 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.0-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for redo_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3ada98cf06c6de3c6be0db51755747442f72838144acc7979c3ff13c420fb3d6
MD5 5124c1b7a2d99e96ad27bd7b2fb6ba87
BLAKE2b-256 f4f788dd26433eeab05723bdfb92f0842a689de1c584fe6c75ac0fd6149f9bbc

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for redo_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2ef059a4015347338c13ce0c14e0e8d26f2dbb83c90878fbcec05a196aa50b3e
MD5 705af561592bdc0d5bfeb61d46c95271
BLAKE2b-256 7ca5b2a8b9bed0d3af0b28c91e5367c7394f01730c9079c913f0192bac1e3ef3

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