gitmyhub

invoke

Python ★ 4.8k updated 3mo ago

Pythonic task management & command execution.

Python library for defining automation tasks as plain Python functions and running them from the command line, a Makefile replacement that keeps your build scripts in the same language as your project.

PythonPyPIsetup: easycomplexity 2/5

Invoke is a Python library for running shell commands and organizing automation scripts into named tasks that you can call from the command line. The idea is similar to tools like Make or Rake, which let developers define steps such as "run tests" or "build the project" and trigger them with a short command. Invoke brings that same pattern into Python, so you write your tasks as plain Python functions rather than using a separate configuration language with its own syntax rules.

The project draws inspiration from earlier tools including Fabric 1.x, a Python library originally built for deploying software to remote servers. Invoke focuses on the local side: running shell-oriented subprocesses and grouping executable Python code into a clean command-line interface. The goal is to let a team keep their automation in the same language as the rest of their project, alongside the source code, rather than in a separate file format.

Once you define tasks in a Python file, Invoke exposes them as commands anyone on the team can run from a terminal. This removes the need for a Makefile while staying entirely within Python. The project is published on PyPI and can be installed with a standard Python package manager. It has a project website with introductory documentation and example code, plus a separate versioned API reference site for detailed technical documentation. The README is intentionally short and points to those external resources for the full feature walkthrough.

The codebase is tested through CircleCI and code coverage is measured via Codecov. The project maintainer maintains a public roadmap on a personal site.

Where it fits