Comcek (cmk for short) is a commandline program that enables the storage of common/frequent commands in a YAML file for execution.
With Comcek you no longer need: advanced configurations for your bash_history, using lots of commands to search your bash history or storing your commands in multiple TXT files.
Comcek is a self-contained binary written in the Nim programming language. All you need is the binary and a YAML file to make it run.
- Comcek binary (available under "Releases")
- YAML file storing all your common commands
- Run the
cmk.nimble
file to install the dependencies - Dependencies: yaml, cligen
cd src
nim c -d:release cmk.nim
- Create a folder to store the binary file in, example:
mkdir ~/cmk-bin
- Place the binary file in
~/cmk-bin
- Export the PATH in your .profile or other file:
export PATH=/home/user/cmk-bin:$PATH
- Determine the configuration path for your system by running:
cmk upath
cd
into the folder shown above (on UNIX it is generally:~/.config/comcek
)- If the
/comcek
folder doesn't exist, create it so that it matchescmk upath
- Create a YAML file:
touch cmd.yaml
inside/comcek
Available at: https://github.com/Kentoseth/cmk/releases
Release will contain:
cmk
binary- Example
cmd.yaml
file
Comcek currently has 4 supported commands: display_all , display , execute, upath
cmk display_all
ORcmk all
- Will display everything stored in cmd.yamlcmk display --category=<category-name>
ORcmk display -c=<category-name>
- Will display entries for a specific categorycmk display --id=<id-value>
ORcmk display -i=<id-value>
- Will display entries for a specific IDcmk execute --id=<id-value>
ORcmk exec -i=<id-value>
- Will execute the command at the specified IDcmk upath
- Will show the configuration file path where the YAML file will be stored
Use cmk --help
for more information.
Below is an example YAML file to get you started:
ls:
- id: 1.1
cmd: ls
des: Displays some files in a specific folder
- id: 1.2
cmd: ls -la
des: Displays all files in a specific folder, including hidden files
pwd:
- id: 2.1
cmd: pwd
des: Tells me the entire path/location of where I am
You can create a PR or discuss it first by opening an Issue
PR Rules:
- Make sure the program compiles
- Test it locally to make sure the program runs
- If the code is not readable, the PR may be rejected
This project follows the UNIX philosophy of doing one thing only and (hopefully) doing it well.
This package is licensed under the open-source "GNU GPL, Version 3".
The full license text is available in the file LICENSE
Open an Issue to discuss
If you find this project interesting or useful, please star it and share it with colleagues and friends.