Skip to content

termo is a command-line tool designed to help users record and run macros directly from the terminal

License

Notifications You must be signed in to change notification settings

ajaypremshankar/homebrew-termo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

termo

termo (or Terminal Macros) is a command-line tool designed to help users record and run macros directly from the terminal. This tool allows you to capture a sequence of commands, store them under a specific name, and then replay those commands as needed. It's particularly useful for automating repetitive tasks.

Demo

Features

  • Record Macros: Capture a series of commands under a specific name.
  • Run Macros: Replay the commands in a recorded macro with a single command.
  • Simple CLI Interface: Easily start, abort, finish, and run macros with straightforward commands.

Requirements

  • Python 3.12+
  • click package (handled automatically during installation)

Installation

To install termo using pip:

  1. Clone the repository:

    git clone https://github.com/ajaypremshankar/homebrew-termo.git
    cd homebrew-termo
  2. Install with pip:

    pip install .

Or you can install it directly from Homebrew:

brew install ajaypremshankar/homebrew-termo/termo

Usage

Once installed, the macro command will be available in your terminal. Here’s how to use it:

1. Start Recording a Macro

To start recording a macro, use:

tm new <name>

Replace <name> with the name you’d like to give to this macro.

Example:

tm new my_macro

2. Abort Recording

If you want to stop recording without saving, use:

tm cancel

This will discard all commands recorded since the last record start.

3. Finish Recording

To stop recording and save the commands to the macro, use:

tm save

The commands recorded between record start and record finish will be saved.

4. Run a Macro

To replay the commands stored in a macro, use:

tm exec <name>

Replace <name> with the name of the macro you want to run.

Example:

tm exec my_macro

Example Workflow

  1. Start recording a macro named backup:

    tm new backup
  2. Run the commands you want to record, for example:

    cp ~/Documents/important-file.txt ~/Backups/
    echo "Backup completed"
  3. Finish recording the macro:

    tm save
  4. Now, whenever you want to execute the backup macro, simply run:

    tm exec backup

Discover all the supported commands:

tm --help

Uninstalling

To uninstall termo, you can use pip:

pip uninstall termo

Or if installed via Homebrew:

brew uninstall termo

License

This project is licensed under the MIT License. See the LICENSE file for more details.

About

termo is a command-line tool designed to help users record and run macros directly from the terminal

Resources

License

Stars

Watchers

Forks

Packages

No packages published