npm scripts for Python. Task automation that just works.
- Shell Completion - TAB completion for commands and tasks in bash, zsh, fish, and PowerShell
- Task Aliases - Create short names for frequently used tasks (e.g.,
tfortest) - Interactive Prompts - Ask for user input and confirmations during task execution
- Project Templates - Kickstart projects with 4 production-ready templates (Django, FastAPI, Data Science, Python Library)
See full changelog | Upgrade guide
Stop fighting with Makefiles. taskx brings the simplicity of npm scripts to Python with the power you actually need.
# pyproject.toml
[tool.taskx.tasks]
test = "pytest tests/"
dev = "uvicorn app:app --reload"
lint = "ruff check ."
deploy = {
depends = ["lint", "test", "build"],
cmd = "twine upload dist/*"
}$ taskx list
Available tasks:
test Run test suite
dev Start development server
lint Run linting
deploy Deploy to PyPI
$ taskx deploy
β Running: lint
β Completed: lint (1.2s)
β Running: test
β Completed: test (3.4s)
β Running: build
β Completed: build (2.1s)
β Running: deploy
β Completed: deploy (0.8s)pip install taskxRequirements: Python 3.8 or higher
$ taskx --version
taskx version 0.2.0Create a new project with a template:
# List available templates
$ taskx init --list-templates
Available templates:
WEB:
django Django web application with migrations, testing, and deployment
fastapi FastAPI microservice with async support and Docker
DATA:
data-science ML project with Jupyter, MLflow, and pipeline automation
LIBRARY:
python-library Python package with PyPI publishing workflow
# Create project from template
$ taskx init --template django --name myproject
β Created django project with taskx configuration
# Or create a basic project
$ taskx init
β Created pyproject.toml with example tasksAdd tasks to your pyproject.toml:
[tool.taskx.tasks]
hello = "echo 'Hello from taskx!'"
test = "pytest"
dev = "python manage.py runserver"$ taskx hello
Hello from taskx!
$ taskx test
===== test session starts =====
...- Uses
pyproject.toml(Python standard) - Integrates with Poetry, Hatch, PDM
- No new config files needed
- Perfect Windows support (no Make headaches!)
- Works on macOS, Linux, Windows
- Consistent behavior everywhere
[tool.taskx.tasks]
lint = "ruff check ."
test = "pytest"
deploy = { depends = ["lint", "test"], cmd = "python deploy.py" }[tool.taskx.tasks]
check = {
parallel = ["ruff check", "mypy .", "pytest --quick"],
description = "Run all checks in parallel"
}3-4x faster than running sequentially!
[tool.taskx.env]
APP_NAME = "myapp"
PORT = "8000"
[tool.taskx.tasks]
dev = "uvicorn ${APP_NAME}:app --port ${PORT}"
prod = { cmd = "uvicorn ${APP_NAME}:app", env = { PORT = "80" } }[tool.taskx.tasks]
test = { cmd = "pytest", pre = "echo 'Starting tests...'", post = "coverage report" }
dev = { cmd = "uvicorn app:app --reload", watch = ["**/*.py"] }Run watch mode:
$ taskx watch dev
π Watching for changes...
βΆ Running initial execution...
β Initial execution completed
π Detected 1 change(s):
β src/app.py
βΆ Re-running task 'dev'...
β Execution completed successfully- Color-coded task status
- Progress bars for parallel tasks
- Helpful error messages
- Time tracking
# Install completion for your shell
$ taskx completion bash --install
β Completion installed: ~/.bash_completion.d/taskx
# Now get TAB completion for tasks!
$ taskx <TAB>
list run watch graph init completion
$ taskx run <TAB>
test dev lint deploySupports: bash, zsh, fish, PowerShell
[tool.taskx.aliases]
t = "test"
d = "dev"
fmt = "format"
[tool.taskx.tasks]
test = { cmd = "pytest", aliases = ["t"] } # Per-task alias
format = "black . && isort ."$ taskx t # Runs 'test'
β Alias 't' resolves to task 'test'
===== 51 tests passed =====[tool.taskx.tasks.deploy]
cmd = "sh deploy.sh ${ENVIRONMENT}"
prompt.ENVIRONMENT = {
type = "select",
message = "Deploy to which environment?",
choices = ["staging", "production"]
}
confirm = "Deploy to ${ENVIRONMENT}?"$ taskx deploy
? Deploy to which environment? (Use arrow keys)
βΊ staging
production
? Deploy to staging? (Y/n) y
β Running: deploy
β Completed: deploy# Start new Django project
$ taskx init --template django
# Prompts for project name, Celery, Docker options
# Generates complete project with 20+ tasks
# Start new FastAPI project
$ taskx init --template fastapi
# Creates API project with testing, Docker, database setup
# Start ML/Data Science project
$ taskx init --template data-science
# Jupyter, MLflow, complete ML pipeline
# Start Python library
$ taskx init --template python-library
# Package with PyPI publishing, testing, docs| Feature | taskx | Make | Poetry Scripts | Invoke | Taskipy |
|---|---|---|---|---|---|
| Python-native | β | β | β | β | β |
| Easy syntax | β | β | β | β | |
| Cross-platform | β | β | β | β | |
| Task dependencies | β | β | β | β | β |
| Parallel execution | β | β | β | β | β |
| Environment vars | β | β | β | β | β |
| Watch mode | β | β | β | β | β |
| Dependency graphs | β | β | β | β | β |
| Pre/post hooks | β | β | β | ||
| Shell completion β | β | β | β | ||
| Task aliases β | β | β | β | β | β |
| Interactive prompts β | β | β | β | β | |
| Project templates β | β | β | β | β | β |
| Security focused | β | β | β | β | β |
Legend: β
Full support |
[tool.taskx.tasks]
dev = "python manage.py runserver"
migrate = "python manage.py migrate"
shell = "python manage.py shell"
test = "pytest"
lint = { parallel = ["ruff check .", "mypy ."] }[tool.taskx.tasks]
notebook = "jupyter lab"
train = "python train_model.py"
evaluate = "python evaluate.py"
deploy = { depends = ["test", "evaluate"], cmd = "python deploy.py" }[tool.taskx.env]
APP_MODULE = "app.main:app"
[tool.taskx.tasks]
dev = "uvicorn ${APP_MODULE} --reload"
prod = { cmd = "uvicorn ${APP_MODULE}", env = { WORKERS = "4" } }
test = "pytest tests/ -v"More examples in examples/ directory.
taskx list- List all available tasks with descriptions and dependenciestaskx list --names-only- Output only task names (for shell completion)taskx list --include-aliases- Include aliases in output
taskx <task>- Run a specific task (with automatic dependency resolution)taskx run <task>- Explicit task executiontaskx run <task> --env KEY=VALUE- Override environment variables
taskx watch <task>- Watch files and auto-restart task on changestaskx graph- Visualize task dependencies (supports tree, mermaid, dot formats)taskx init- Initialize taskx configuration in your projecttaskx init --template <name>- Create project from template β NEWtaskx init --list-templates- Show available templates β NEW
taskx completion <shell>- Generate shell completion script β NEWtaskx completion bash --install- Install completion for bash- Supported: bash, zsh, fish, powershell
taskx --version- Show version informationtaskx --help- Show help for all commands
# Show ASCII tree of all tasks
$ taskx graph
# Show dependencies for specific task
$ taskx graph --task deploy
# Export as Mermaid diagram
$ taskx graph --format mermaid > tasks.mmd
# Export as Graphviz DOT
$ taskx graph --format dot > tasks.dot | dot -Tpng -o tasks.png[tool.taskx.tasks]
hello = "echo 'Hello!'"[tool.taskx.tasks]
test = { cmd = "pytest", description = "Run test suite" }[tool.taskx.tasks]
deploy = { depends = ["lint", "test"], cmd = "deploy.sh" }[tool.taskx.tasks]
check = { parallel = ["ruff", "mypy", "pytest"] }[tool.taskx.tasks]
prod = { cmd = "uvicorn app:app", env = { PORT = "80", WORKERS = "4" } }[tool.taskx.tasks]
test = "pytest"
test.pre = "echo 'Starting...'"
test.post = "coverage report"
test.on_error = "notify-send 'Tests failed!'"[tool.taskx.tasks]
dev = { cmd = "uvicorn app:app", watch = ["**/*.py"] }Full documentation: GitHub Repository
- Core task execution with dependencies
- Parallel task execution
- Watch mode with file monitoring
- Environment variable support
- Lifecycle hooks (pre/post/error/success)
- Dependency graph visualization
- Multi-layer security validation
- Beautiful terminal output
- Cross-platform support
- Shell completion scripts (bash, zsh, fish, PowerShell) β
- Task aliases (global and per-task) β
- Interactive prompts with confirmations β
- Project templates (Django, FastAPI, Data Science, Python Library) β
- Enhanced CLI with environment variable overrides
- Template system with Jinja2 sandboxing
- CI/CD-safe interactive prompt handling
- Task caching (skip unchanged tasks)
- Remote task execution
- Plugin system
- Enhanced error recovery
- Task profiling and performance analysis
- Multi-project workspace support
See PHASE_1_IMPLEMENTATION_SUMMARY.md for v0.2.0 implementation details.
We love contributions! Check out our Contributing Guide.
- π Report bugs
- π‘ Suggest features
- π Improve documentation
- π§ Submit pull requests
- β Star the project!
- Make syntax is complex and error-prone (tabs!)
- Poor Windows support
- Not Python-native
- taskx is simpler and more powerful
- Poetry scripts are too basic (no dependencies, parallelization)
- taskx is complementary - use Poetry for deps, taskx for tasks
- Invoke requires writing Python code for simple tasks
- taskx uses declarative config (faster, simpler)
- Use Invoke for complex logic, taskx for 90% of tasks
- Yes! taskx reads
pyproject.tomland works with all tools
- Yes! Cross-platform support designed from day one
- Works on Windows, macOS, and Linux
- <100ms startup time
- Parallel execution for independent tasks
- Efficient file watching with Rust-based watchfiles library
- Yes! Multi-layer security validation
- Prevents command injection attacks
- Blocks dangerous patterns (rm -rf /, fork bombs, etc.)
- Proper environment variable escaping
- Optional strict mode for production
Proprietary License - taskx is free to use but comes with restrictions.
- β Use taskx freely for personal or commercial projects
- β Install and run taskx without limitations
- β View the source code for reference and learning
- β Modify the source code or create derivative works
- β Copy or redistribute the software
- β Remove or alter license notices or attribution
- β Create competing products based on taskx
β οΈ Must preserve license notices - Cannot remove copyright or license informationβ οΈ Must include attribution - If using taskx in production, include: "Powered by taskx"
Full license terms: See LICENSE file for complete legal details.
Why proprietary? This license protects the integrity of taskx while allowing free usage. You get all the benefits without restrictions on how you use it, but the code itself remains protected from unauthorized modification or redistribution.
- GitHub: github.com/0xV8/taskx
- Issues: Report bugs or request features
Inspired by:
- npm scripts - Simplicity and developer experience
- Make - Power and reliability
- Invoke - Python-native task execution
- Poetry - Modern Python tooling
Built with:
- Click - CLI framework
- Rich - Beautiful terminal output
- watchfiles - Fast file watching
- questionary - Interactive prompts
- Jinja2 - Template engine
Made with β€οΈ for Python developers everywhere
Stop fighting with Makefiles. Start using taskx.