Command Line Alias Manager and Plugin System - Written in Golang

aly - Command Line Alias Manager and Packager

Aly offers the simplest way to manage, share, and obtain command line aliases!

Warning: This project is still in early development. Minimal testing has been done on Windows!

Table of Contents

I. Features

II. Installation

III. Usage

IV. Creating Plugins

V. Adding an Official Plugin

Features

  • Aliases shared, loaded, and stored as JSON files for easy customization and readability
  • Configure w/ the tool or manually
  • Download remote Alias plugins to load a bunch all at once!
  • Update plugins remotely or from local files!

Installation

First, install Go and then run:

go get -u github.com/M4cs/aly
go install github.com/M4cs/aly

Next, add this to your shell's profile:

aly -l
source ~/.alyases

See below for usage information!

Usage

Installing a Plugin

# From Remote URL
aly -a 'https://raw.githubusercontent.com/M4cs/aly/master/example_unix_plugin.json'

# From Local File
aly -a '/path/to/plugin.json' -f

# Enable the plugin
aly -e 'Plugin Name'

Enabling/Disabling Plugins

# Enable
aly -e 'Plugin Name'

# Disable
aly -d 'Plugin Name'

Update Plugins

# Update A Single Plugin from their URL
aly -u 'Plugin Name'

# Update A Single Plugin from Local File
aly -u '/path/to/plugin.json' -f

# Update All Plugins
aly -t

See All Installed Plugins

aly -i

See Plugin Info

aly -p 'Plugin Name'

Delete A Plugin Completely

aly -r 'Plugin Name'

Creating a Plugin

All plugins are in the JSON format. You can create a plugin very easily using the below formatting.

{
    "plugin_name": "Your Plugin Name",
    "author": "github/M4cs",
    "description": "A small description about your plugin",
    "version": "1.0.0",
    "aliasmap": [
        {
            "alias": "ec",
            "description": "Example Alias",
            "command": "echo",
            "platform": "*",
            "subalias": {
                "t": "'testing'",
                "hw": "'hello, world!'",
                "a": "$1"
            } 
        }
    ]
}

Top-Level

  • plugin_name - The name of your plugin. This is what it will be referred to for updating, enabling, disabling, etc. Keep it short and unique!
  • author - Your name. I recommend using your github/USERNAME
  • description - A small description about your plugin
  • version - Version number for plugin. This should be semantic syntax.
  • aliasmap - Your map of aliase groups for the plugin.
  • platform - Refers to the platform that the alias will work on. Supports: windows, unix, *, or any GOOS platforms.

aliasmap

An alias group includes a base alias, base command, and subaliases. If there are subaliases, they will be concatenated with the base alias.

  • alias - The base alias for your command. This will run whatever is in command.
  • command - The base command for your alias. This will run whenever the alias is run.
  • description - Description of your alias group.
  • subaliases - subalias:args dictionary. This will add the subalias to the alias specified and add the args string to your base command string.

Using the JSON example above:

  • ec will run echo
  • ect will run echo 'testing'
  • echw will run echo 'hello, world!'
  • eca will run echo $1 using whatever argument you send to it (or Windows equivalent)

Adding Your Plugin To The Official Repository

You should add a folder with your username into ./official_plugins/. For example, I'd add ./official_plugins/M4cs/. Inside of this folder, you will add your different plugins using .json files. You should include a README.md with some information about what your plugin(s) offer!

  1. Make a Pull Request using the Add a Plugin Template Here
  2. Fill Out Pull Request Template w/ Your Fork
  3. Submit Pull Request and Await Review!
Owner
Max Bridgland
QA Engineer @ Reggora | Multi-Language Developer | FOSS Advocate
Max Bridgland
Similar Resources

Watcher - A simple command line app to watch files in a directory for changes and run a command when files change!

Watcher - Develop your programs easily Watcher watches all the files present in the directory it is run from of the directory that is specified while

Mar 27, 2022

painless task queue manager for shell commands with an intuitive cli interface (execute shell commands in distributed cloud-native queue manager).

EXEQ DOCS STILL IN PROGRESS. Execute shell commands in queues via cli or http interface. Features Simple intuitive tiny cli app. Modular queue backend

Dec 14, 2022

A client for managing authzed or any API-compatible system from your command line.

zed A client for managing authzed or any API-compatible system from your command line. Installation zed is currently packaged by as a head-only Homebr

Dec 31, 2022

Go package to make lightweight ASCII line graph ╭┈╯ in command line apps with no other dependencies.

Go package to make lightweight ASCII line graph ╭┈╯ in command line apps with no other dependencies.

asciigraph Go package to make lightweight ASCII line graphs ╭┈╯. Installation go get github.com/guptarohit/asciigraph Usage Basic graph package main

Jan 8, 2023

🐉 BLAZINGLY FAST CLI plugin manager for (neo)vim

viper BLAZINGLY FAST CLI plugin manager for (neo)vim. Usage Viper does all the nice and basic things you'd expect from a (neo)vim plugin manager, and

Jun 9, 2022

F2 is a cross-platform command-line tool for batch renaming files and directories quickly and safely. Written in Go!

F2 is a cross-platform command-line tool for batch renaming files and directories quickly and safely. Written in Go!

F2 is a cross-platform command-line tool for batch renaming files and directories quickly and safely.

Dec 31, 2022

fofax is a fofa query tool written in go, positioned as a command-line tool and characterized by simplicity and speed.

fofax is a fofa query tool written in go, positioned as a command-line tool and characterized by simplicity and speed.

fofaX 0x00 Introduction fofax is a fofa query tool written in go, positioned as

Jan 8, 2023

git-xargs is a command-line tool (CLI) for making updates across multiple Github repositories with a single command.

git-xargs is a command-line tool (CLI) for making updates across multiple Github repositories with a single command.

Table of contents Introduction Reference Contributing Introduction Overview git-xargs is a command-line tool (CLI) for making updates across multiple

Dec 31, 2022

git-xargs is a command-line tool (CLI) for making updates across multiple GitHub repositories with a single command

git-xargs is a command-line tool (CLI) for making updates across multiple GitHub repositories with a single command

git-xargs is a command-line tool (CLI) for making updates across multiple GitHub repositories with a single command. You give git-xargs:

Feb 5, 2022
ag is a tool for defining an alias for a group of commands

AG Introduction ag is a command line tool that similar to Makefile. with ag you can make an alias for group of commands with custom flags. This tool i

Jul 17, 2022
A command line tool that builds and (re)starts your web application everytime you save a Go or template fileA command line tool that builds and (re)starts your web application everytime you save a Go or template file

# Fresh Fresh is a command line tool that builds and (re)starts your web application everytime you save a Go or template file. If the web framework yo

Nov 22, 2021
Simple command-line snippet manager, written in Go.
Simple command-line snippet manager, written in Go.

pet : CLI Snippet Manager Simple command-line snippet manager, written in Go You can use variables (<param> or <param=default_value> ) in snippets. Ab

Dec 29, 2022
An open-source GitLab command line tool bringing GitLab's cool features to your command line
An open-source GitLab command line tool bringing GitLab's cool features to your command line

GLab is an open source GitLab CLI tool bringing GitLab to your terminal next to where you are already working with git and your code without switching

Dec 30, 2022
A command line tool to prompt for a value to be included in another command line.

readval is a command line tool which is designed for one specific purpose—to prompt for a value to be included in another command line. readval prints

Dec 22, 2021
Gofetch is a pretty command-line "Go and System information" tool written in Go
Gofetch is a pretty command-line

GoFetch Show off your Go information with this cool command-line tool! Report Bug || Request Feature Table of Contents About the Project Built With Ge

Nov 1, 2022
🖼️ A command-line system information tool written in bash 3.2+
🖼️  A command-line system information tool written in bash 3.2+

A command-line system information tool written in bash 3.2+ Neofetch is a command-line system information tool written in bash 3.2+. Neofetch displays

Dec 30, 2022
The Todo List / Task Manager for Geeks in command line
The Todo List / Task Manager for Geeks in command line

The CLI To-Do List / Task Manager for Geeks ??‍?? Developer / DevOps / Sysadmin? A command line hero? ?? Live with the dark terminal? ?? Think in Mark

Dec 15, 2022
QOwnNotes command-line snippet manager.
QOwnNotes command-line snippet manager.

QOwnNotes command-line snippet manager GitHub | Changelog | Releases You can use the QOwnNotes command-line snippet manager to execute command snippet

Oct 26, 2022
A simple command line functionality to convert your Kaspersky Password Manager exported file to CSV format

A simple command line functionality to convert your Kaspersky Password Manager exported file to CSV format

Apr 20, 2022