Skip to main content

🔥 Fonk 🔥

Fonk is an open-source command runner that is fully configured via pyproject.toml.

Usage

First add an entry into your pyproject.toml file that contains the command you want to run:

[tool.fonk.command.my_command]
description = "Run my command"
arguments = ["echo", "Hello, World!"]
type = "shell"

Then run the command using the following command:

uvx fonk my_command

Flags

You can define flags for your command. For example, to define a flag that changes the output of your command:

[tool.fonk]
flags = [
    { name = "love", shorthand = "l", description = "Show love" }
]

[tool.fonk.command.my_command]
description = "Run my command"
arguments = ["echo", "Hello, World!"]
type = "shell"
flags = [
    { on = "love", remove = ["Hello, World!"], add = ["I love you, World!"] }
]

Then run the command with the flag:

uvx fonk my_command --love

You'll note that we had to add the flag in the flags table as well as in the command table. This is because the flag is a global flag that can be used with any command. The on field in the flag table specifies the flag that the command should listen to. The remove field specifies the arguments that should be removed when the flag is used. The add field specifies the arguments that should be added when the flag is used.

There are a number of built in flags that change the behaviour of fonk itself, but can also affect your commands. These are:

  • --help or -h: Shows the help message for the command. Cannot reach your command.
  • --quiet or -q: Runs the command in quiet mode, which suppresses all output.
  • --verbose or -v: Runs the command in verbose mode, which shows all output.
  • --fail-quick or -x: Stops the command as soon as an error is encountered.
  • --concurrent or -j: Runs the command concurrently.

Contributing

We welcome contributions from the community. To contribute to Fonk, follow these steps:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Make your changes.
  4. Commit your changes (git commit -m 'feat: Add new feature').
  5. Push to the branch (git push origin feature-branch).
  6. Open a pull request.

Please ensure your code adheres to our coding standards. Since this is a task runner, the required CI steps are also defined as Fonk commands in the pyproject.toml file. Simply use uv run fonk to run all steps.

License

Fonk is licensed under the MIT License. See the LICENSE file for more details.

Contact

For any questions or feedback, please open an issue on the GitHub repository.

Metadata

Release files for fonk 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fonk 0.1.2
File Size Uploaded Provenance
fonk-0.1.2.tar.gz 61.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for fonk 0.1.2
File Interpreter ABI Platform
fonk-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 72.9 kB

Release files / fonk-0.1.2.tar.gz

Download URL fonk-0.1.2.tar.gz
Size 61.2 kB
Tags Source
SHA-256 checksum
How to use checksums
21dff59605b6ddb9c85c386247f61ae5ea8f44827127c4d56ce0d202d094e92e
BLAKE2b-256 checksum
How to use checksums
75d1d6fb0ea2da51ca0c695162c1235ab05875e27d0392a4ab22055f85aecd39
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.5.24

Release files / fonk-0.1.2-py3-none-any.whl

Download URL fonk-0.1.2-py3-none-any.whl
Size 11.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b4a775f37ce82eb718eea7efe68ab35e64ba31a3fe301f353fb784a9ee27ac34
BLAKE2b-256 checksum
How to use checksums
e617d1d70b33b7201ef9022bb8bf68a4e6d56f21a97bed6c310088d47a1aef1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.5.24

Security for fonk 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page