Skip to content
/ dar Public

Dar is a command line toolbelt for managing different project workflows.

License

Notifications You must be signed in to change notification settings

alanbato/dar

Repository files navigation

Dar

Code style: black PyPI Travis CI Build Documentation Status Updates

"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.

Getting Started

These instructions will help you get started with Dar so you can use it to manage your projects.

Installing

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.

Usage

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

Built With

  • Click - For the command line interface.
  • The subprocess and configparser built-in modules.

Development Tools

  • Pytest - For painless testing.
  • Black - Uncompromising code formatting.

Running the tests

You can use Dar to run its own tests by running:

$ dar run tests

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

  • Alan Velasco - Initial work

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

Dar is a command line toolbelt for managing different project workflows.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published