Pythonic task execution library for managing shell-oriented subprocesses and organizing executable Python code into CLI-invokable tasks
Overall
score
96%
A command-line tool for managing build and deployment tasks.
Build a CLI tool with the following commands:
Create a build command that:
--clean boolean flag to clean before building (defaults to False)--verbose flag that can be repeated to increase verbosity level (e.g., -v, -vv, -vvv for levels 1, 2, 3)--output-dir option to specify where to place build artifacts (defaults to "build")Create a deploy command that:
--skip-tests boolean flag to skip running tests before deployment--tag flag that can be specified multiple times to add deployment tagsRunning invoke build myproject --clean -vv --output-dir dist should print: project=myproject, clean=True, verbose=2, output_dir=dist @test
Running invoke deploy production --tag v1.0.0 --tag stable --skip-tests should print: environment=production, skip_tests=True, tags=['v1.0.0', 'stable'] @test
Running invoke build myapp should print: project=myapp, clean=False, verbose=0, output_dir=build @test
@generates
from invoke import task
@task
def build(c, project, clean=False, verbose=0, output_dir='build'):
"""Build a project with various options."""
pass
@task
def deploy(c, environment, skip_tests=False, tag=None):
"""Deploy to an environment with optional tags."""
passProvides task execution and CLI generation capabilities.
Install with Tessl CLI
npx tessl i tessl/pypi-invokedocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10