UltiRequiem / chuy

🐻 Set alias to long commands and speed up your workflow! Support for JSON , TOML and INI configs file format and integrates with Poetry.

Home Page:https://pypi.org/project/chuy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Chuy

CodeQL CI Code Style PyPi Version License: MIT Lines of Code

Set alias to long commands and speed up your workflow, inspired in tools like yarn and npm.

Although Chuy is written in Python, it can be used for projects of any language, and even folders that are not projects!

Note: this tool is actively used by its primary author. He's happy to review pull requests / respond to issues you may discover.

Install

You can install Chuy from PyPI like any other package:

pip install chuy

To get the last version:

pip install git+https://github.com/UltiRequiem/chuy

If you use Linux, you may need to install this with sudo to be able to access the command throughout your system.

Example Configuration file

Using JSON format:

{
  "format": "poetry run black .",
  "lint": "poetry run pylint chuy tests",
  "tests": "poetry run pytest",
  "package": "poetry build && poetry publish"
}

Using TOML format:

[chuy]
format = "poetry run black ."
lint = "poetry run pylint chuy tests"
tests = "poetry run pytest"
package = "poetry build && poetry publish"

Using the pyproject.toml file:

[tool.chuy]
format = "poetry run black ."
lint = "poetry run pylint chuy tests"
tests = "poetry run pytest"
package = "poetry build && poetry publish"

Usually the configuration file goes in the root of your project but it can really go anywhere.

Usage

After having defined the commands in the configuration file, you can now execute them as follows:

chuy format
 $ poetry run black .
 ....

This varies depending on the commands you have written in the chuy file.

chuy lint
 $ poetry run pylint chuy tests
 ....

You can also pass multiple commands:

chuy lint format tests
 $ poetry run pylint chuy tests
 ....

 $ poetry run black .
 ....

 $ poetry run pytest
 ....

Tricks

If you do not pass any command, you will get a menu with all the available commands, then you will be asked which of them you want to execute, here you can pass more than one command if you want.

Screenshots

Normal usage:

Screenshot Normal Usage

And if you don't pass any command:

Screenshot Menu

License

This project is licensed under the MIT License.

About

🐻 Set alias to long commands and speed up your workflow! Support for JSON , TOML and INI configs file format and integrates with Poetry.

https://pypi.org/project/chuy

License:MIT License


Languages

Language:Python 100.0%