1 unstable release

new 0.1.0 Feb 16, 2025

#2498 in Command line utilities

MIT license

13KB
281 lines

cutlie

Cutlie is a short cut tool for you.

Installation

To install Cutlie, you need to have Rust and Cargo installed on your system. You can install Rust and Cargo by following the instructions on the official Rust website.

Once you have Rust and Cargo installed, you can install Cutlie by running the following command:

cargo install cutlie

Usage

Cutlie provides a command-line interface for managing and running shortcuts for specific commands. Here are the available commands:

Add a new command

cutlie add <name> --value <command> [--description <description>]

Example:

cutlie add myssh --value "ssh user@192.168.1.1" --description "SSH to my server"

Delete a command

cutlie delete <name>

Example:

cutlie delete myssh

Update a command

cutlie update <name> --value <new_command>

Example:

cutlie update myssh --value "ssh user@192.168.1.2"

Run a command

cutlie run <name>

Example:

cutlie run myssh

List all commands

cutlie list

Example:

cutlie list

Dependencies

Cutlie depends on the following libraries:

  • clap (version 4.5.28) with the "derive" feature
  • dialoguer (version 0.11.0)
  • serde (version 1.0.217) with the "derive" feature
  • strsim (version 0.11.1)
  • toml (version 0.8.20)

License

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

Project Structure

The project structure is as follows:

  • src/main.rs: The main entry point of the application.
  • src/lib.rs: Contains the module declarations for the project.
  • src/parser.rs: Handles command-line argument parsing using the clap library.
  • src/runner.rs: Executes the commands using the std::process::Command module.
  • src/tomlrw.rs: Reads and writes the configuration file (.cutlie.toml) using the toml and serde libraries.

Dependencies

~3–10MB
~101K SLoC