Project

patcmd

0.0
The project is in a healthy, maintained state
PatCmd allows you to define and execute tasks using a simple command-line interface.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

>= 0
 Project Readme

PatCmd

Gem Version Build Status License: MIT

PatCmd is a Ruby-based command-line interface (CLI) tool built with Thor, designed to manage and execute tasks efficiently. Whether you're automating scripts, managing deployments, or handling routine operations, PatCmd provides a streamlined and customizable solution.

Features

  • Task Management: Easily add, list, and execute tasks.
  • Configurable Environments: Define environment variables per task.
  • Extensible: Add new commands and functionalities as needed.
  • User-Friendly: Intuitive CLI with clear help documentation.

Installation

Ensure you have Ruby (version 3.0 or higher) installed on your system.

Install via RubyGems

gem install patcmd

From Source

  1. Clone the Repository:
git clone https://github.com/yourusername/patcmd.git
cd patcmd
  1. Build the Gem:
gem build patcmd.gemspec
  1. Install the Gem Locally:
gem install ./patcmd-0.1.0.gem

Usage

After installation, you can use patcmd directly from your terminal.

Initialize Configuration

Initialize the PatCmd configuration file. This creates a default configuration file where tasks are stored.

patcmd init

Example Output:

Configuration initialized at /home/username/.patcmd/config.yml

Add a New Task

patcmd add --name "Backup" \
  --description "Backup the database" \
  --category "Utility" \
  --path "/usr/local/bin" \
  --action "execute" \
  --command "backup_db" \
  --args db1 \
  --args db2 \
  --environments NODE:dev

List All Tasks

Display all configured tasks.

patcmd list

Execute a Task

patcmd exec Utility Backup execute

Help

Access help information for all commands or a specific command.

patcmd help
patcmd help add
patcmd help list

Configuration

PatCmd uses a YAML configuration file to store tasks and settings. The default configuration file is located at ~/.patcmd/config.yml. You can specify a different configuration file using the --config option.

Example:

patcmd list --config=/path/to/custom_config.yml