"Dar es mejor que recibir." - Anónimo
Dar is a command line toolbelt for managing different project workflows.
Why is it a toolbelt? Because Dar is not a tool that can be used by itself, but a place to store all the commands you use in a given project. Dar remembers the workflows across all the different projects you contribute to so you don't have to.
It is important to note that dar is user focused. The user is the one that registers and uses the commands to their own preference. Projects do not need to adopt dar for contributors of that project to benefit from it.
These instructions will help you get started with Dar so you can use it to manage your projects.
To install Dar you need to have Python 3.6 or higher and pip. Then you install it with:
$ pip install dar
Although Dar is written in Python, it is language agnostic and can be used in virtually any project.
The main Dar commands are register
and run
.
First, let's register an alias with dar register <alias> <command>
:
$ dar register greet echo "Hola mundo!"
This creates a .darconfig
file in the root directory or adds the alias to it if one already exists.
For example, this is the content of the file generated by the command above:
[greet]
echo "Hola mundo!"
Then, you can call that command by running dar run <alias>
:
$ dar run greet
Running: echo "Hola mundo!"
Hola mundo!
And that's it! You can register and run any commands you like and and they will be stored in the project's .darconfig
.
Alternatively, you can edit the .darconfig
directly to register aliases. This is helpful when you want to run multiple commands under a single alias.
Example:
[restartdocker]
sudo systemctl daemon-reload
sudo systemctl restart docker
- Click - For the command line interface.
- The
subprocess
andconfigparser
built-in modules.
You can use Dar to run its own tests by running:
$ dar run tests
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
- Alan Velasco - Initial work
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details