{"id":4793,"library":"taskipy","title":"Taskipy","description":"Taskipy is a task runner for Python projects that streamlines development workflows by defining and executing automation tasks. It uses a `pyproject.toml` file for configuration, offering an `npm run-script`-inspired interface for common operations like linting, testing, and building. The current version is 1.14.1, with a consistent release cadence addressing bug fixes and minor features.","status":"active","version":"1.14.1","language":"en","source_language":"en","source_url":"https://github.com/taskipy/taskipy","tags":["task runner","cli","automation","scripts","pyproject.toml"],"install":[{"cmd":"pip install taskipy","lang":"bash","label":"Pip"},{"cmd":"poetry add --dev taskipy","lang":"bash","label":"Poetry (as dev dependency)"},{"cmd":"conda install -c conda-forge taskipy","lang":"bash","label":"Conda"}],"dependencies":[{"reason":"Required Python version.","package":"python","optional":false},{"reason":"Used for process management and system utilities; allows Taskipy to manage child processes reliably.","package":"psutil","optional":false},{"reason":"Required for parsing TOML files (pyproject.toml) on Python versions older than 3.11 (which includes `tomllib` in stdlib).","package":"tomli","optional":true},{"reason":"Windows-specific dependency for shell command parsing.","package":"mslex","optional":true},{"reason":"Used for colored terminal output, primarily on Windows systems.","package":"colorama","optional":true}],"imports":[{"note":"Taskipy is primarily a CLI tool. This is the entry point for programmatic execution of the CLI.","symbol":"main","correct":"from taskipy.cli import main"},{"note":"The core class for executing tasks programmatically, though direct use is less common for end-users than CLI interaction.","symbol":"TaskRunner","correct":"from taskipy.task_runner import TaskRunner"}],"quickstart":{"code":"# pyproject.toml\n[tool.taskipy.tasks]\nhello = \"echo Hello, Taskipy!\"\ngreet = { cmd = \"python -c 'import os; print(f\\\"Hello, {os.environ.get(\\\"USER\\\", \\\"World\\\")}\\\")'\", help = \"Greets the current user\" }\n\n# In your terminal, from project root:\n# task -l\n# task hello\n# task greet","lang":"toml","description":"Define tasks in your `pyproject.toml` under the `[tool.taskipy.tasks]` section. Each task is a key-value pair where the key is the task name and the value is the shell command. Tasks can also be defined as tables to include a `help` message or specify a `cwd`. Run tasks using the `task <task_name>` command in your terminal."},"warnings":[{"fix":"Upgrade Taskipy to 1.14.1 or newer (`pip install --upgrade taskipy`) to ensure compatibility with `psutil` versions >6. Confirm your `pyproject.toml` or `requirements.txt` allows a compatible `psutil` range.","message":"The `psutil` dependency version constraint was updated in Taskipy 1.14.1 to allow versions greater than 6. Older Taskipy versions (prior to 1.14.1) might have had tighter constraints (e.g., `<7`), potentially leading to conflicts if `psutil` was updated independently to version 7 or higher.","severity":"breaking","affected_versions":"<1.14.1"},{"fix":"If `pre_` or `post_` hooks require arguments, define them as separate, explicit tasks and call them with arguments directly, or use Taskipy's variable system if the arguments are static and can be templated.","message":"Command-line arguments passed to a task are *not* automatically propagated to `pre_` and `post_` hooks. These hooks run without the arguments meant for the main task.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Explicitly set the `cwd` (current working directory) for individual tasks or globally in `[tool.taskipy.settings]` to ensure tasks always run relative to a specific path, typically the project root. Example: `[tool.taskipy.tasks.mytask] cmd = \"my_command\", cwd = \".\"` or `[tool.taskipy.settings] cwd = \".\"`.","message":"By default, tasks run from the current working directory where `task` is invoked, not necessarily from the project root where `pyproject.toml` resides. This can lead to unexpected behavior if tasks depend on relative paths.","severity":"gotcha","affected_versions":"All versions"},{"fix":"For complex, multi-line commands, consider moving them into a separate shell script (e.g., `.taskipy/scripts/my_complex_script.sh`) and then call that script from your `pyproject.toml` task: `complex_task = \"./.taskipy/scripts/my_complex_script.sh\"`.","message":"Defining multi-line commands directly within `pyproject.toml` can be awkward due to TOML's syntax favoring single-line string values.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Communicate the installation steps for Taskipy clearly (e.g., `pip install taskipy` or `poetry add --dev taskipy`) as part of your project's setup guide before instructing users to run `task` commands.","message":"Taskipy itself needs to be installed first. It doesn't solve the initial 'bootstrapping problem' of how to run the very first setup command if `make` or `just` are being replaced.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-12T00:00:00.000Z","next_check":"2026-07-11T00:00:00.000Z"}