tessl install tessl/pypi-invoke@2.2.0Pythonic task execution library for managing shell-oriented subprocesses and organizing executable Python code into CLI-invokable tasks
Agent Success
Agent success rate when using this tile
96%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.25x
Baseline
Agent success rate without this tile
77%
A deployment automation script that can perform system operations with safety controls. The script should support previewing commands before execution and continuing operations even when individual commands fail.
The script should support a preview mode that shows what commands would be executed without actually running them.
deploy_application(c, preview=True) with commands ["echo 'test'", "mkdir /tmp/testdir"] returns completed_steps containing both commands, but the directory /tmp/testdir is not created @testdeploy_application(c, preview=False) with command ["mkdir /tmp/testdir"] creates the directory /tmp/testdir @testThe script should be able to continue executing subsequent commands even when earlier commands fail.
deploy_application(c, resilient=True) with commands ["exit 1", "echo 'success'"] returns completed_steps containing both commands and success=True @testdeploy_application(c, resilient=False) with commands ["exit 1", "echo 'success'"] stops after the first command and returns success=False with only one item in completed_steps @test@generates
from invoke import Context
def deploy_application(c: Context, commands: list, preview: bool = False, resilient: bool = False) -> dict:
"""
Deploy the application with configurable safety controls.
Args:
c: The invoke context for running commands
commands: List of shell commands to execute
preview: If True, show commands without executing them
resilient: If True, continue execution even if commands fail
Returns:
A dictionary with keys 'success' (bool) and 'completed_steps' (list of str)
"""
passProvides task execution and shell command management capabilities.