CLI task runner & automation tool
Project description
Koi fish
Command line task runner & automation tool
How to use
- Describe jobs as tables/dictionaries in a config file called 'koi.toml'.
(Put the config inside the root directory of your project)
[test]
description = "run tests"
dependencies = "uv sync --all-extras --dev"
commands = "uv run pytest -v ."
cleanup = "rm -rf .pytest_cache/"
- description, dependencies and cleanup could be optional but not commands
[no-deps]
commands = "echo 'Hello world'"
- dependencies, commands and cleanup could be strings or (in case of more than one) a list of strings
commands = ["uv run ruff check", "uv run ruff format"]
- You could provide a [run] table inside the config file with a 'suite' - list of selected jobs to run
[run]
suite = ["lint", "format", "test"]
Example koi.toml (used as a main automation tool during the development of this project)
[install]
description = "setup .venv and install dependencies"
commands = "uv sync --all-extras --dev"
[format]
description = "format code"
commands = ["uv run ruff check", "uv run ruff format"]
[lint]
description = "run mypy"
commands = "uv run mypy ."
[teardown]
description = "remove venv and cache"
commands = "rm -rf .venv/ .ruff_cache/ .mypy_cache/"
[run]
description = "jobs pipeline"
suite = ["install", "format", "lint"]
- Run the tool in the terminal with a simple 'koi' command
$ koi
(logs omitted...)
$ All jobs succeeded! ['lint', 'format', 'test']
Detoxing took: 14.088007061000098
- In case of failing jobs you get general stats
(logs omitted...)
$ Unsuccessful detoxing took: 13.532951637999759
Failed jobs: ['format']
Successful jobs: ['lint', 'test']
or
$ Unsuccessful detoxing took: 8.48367640699962
Failed jobs: ['format']
Successful jobs: ['lint']
Skipped jobs: ['test']
- You could run specific jobs in the command line
$ koi --job format
or a list of jobs
$ koi -j format test
NB: If there is a 'run' table in the config file jobs specified in the command line take precedence
- other available options
# run all jobs from the config file
$ koi --run-all # short form: -r
# hide output logs from running commands
$ koi --silent # -s
# don't print shell commands - similar to @<command> in Makefile
$ koi --mute-commands # -m
# skip a job from config file - can be combined e.g. with --run-all
$ koi -r --skip test
- commands showing data
# display all jobs from the config file
$ koi --all # -a
# ['install', 'format', 'test', 'cleanup', 'run']
# display all jobs from the 'suite' table
$ koi --suite # -t
# ['install', 'format', 'test']
# display config for a given job
$ koi --describe format # -d
# FORMAT
# description: format code
# commands: uv run ruff check
# uv run ruff format
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
koi_fish-1.0.2.tar.gz
(8.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file koi_fish-1.0.2.tar.gz.
File metadata
- Download URL: koi_fish-1.0.2.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a513837fd49b9ad86e631d93d8f0f0fc9f12388a2b02d856d8c96832f9d16c56
|
|
| MD5 |
7439abf121d53e2e5fb7b5a24d916323
|
|
| BLAKE2b-256 |
dfa789e06eb9c2f7032576820a4d3ee604277084df9fd1eab766c0600ed05b0b
|
File details
Details for the file koi_fish-1.0.2-py3-none-any.whl.
File metadata
- Download URL: koi_fish-1.0.2-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc7c775a9b3d5df791eb616992f5a979c5ca451c11f7b6036e726ea61ac533b1
|
|
| MD5 |
5e9c7e13bdb35d17875bb7d1cac55122
|
|
| BLAKE2b-256 |
11fd7aab3f8cb85bd7685b0fcee01fe0397a67d84e3e3f96831f8b585b70c243
|