Skip to content

exhuma/taskfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Taskfiles

A collection of reusable Taskfile.dev tasks organized by category for easy inclusion in your projects.

Purpose

This repository provides a centralized collection of common task definitions that can be shared across multiple projects. Instead of duplicating task definitions in every project, you can include these taskfiles and immediately have access to standardized commands for building, linting, and more.

Structure

The repository is organized into category-based folders, each containing a Taskfile.yml with related tasks:

taskfiles/
├── docker/         # Docker and container-related tasks
└── python/         # Python development tasks

This structure allows for selective inclusion – you only include the taskfiles you need for your specific project.

Usage

There are two main ways to use these taskfiles in your project:

Method 1: Git Submodule

Add this repository as a git submodule to your project:

# Add the submodule
git submodule add https://github.com/exhuma/taskfiles.git .taskfiles

# Update submodule
git submodule update --init --recursive

Then include the desired taskfiles in your project's Taskfile.yml:

version: '3'

includes:
  py: .taskfiles/python/Taskfile.yml
  docker: .taskfiles/docker/Taskfile.yml

tasks:
  # Your project-specific tasks here

Method 2: Remote Includes

You can directly include taskfiles from GitHub without cloning:

version: '3'

includes:
  py:
    taskfile: https://raw.githubusercontent.com/exhuma/taskfiles/main/python/Taskfile.yml
  docker:
    taskfile: https://raw.githubusercontent.com/exhuma/taskfiles/main/docker/Taskfile.yml

tasks:
  # Your project-specific tasks here

Note: When using remote includes, tasks are prefixed with the namespace. For example, task py:test to run Python tests.

Examples

Python Project

version: '3'

includes:
  py: .taskfiles/python/Taskfile.yml

tasks:
  start:
    desc: Start the application
    cmds:
      - python main.py

Available Tasks

Each category provides a set of commonly-used tasks. To see all available tasks in a category:

task --list py    # List Python tasks
task --list docker # List Docker tasks

Customization

You can override or extend tasks from included taskfiles in your project's Taskfile.yml:

version: '3'

includes:
  py: .taskfiles/python/Taskfile.yml

tasks:
  py:test:
    desc: Run Python tests with custom options
    cmds:
      - pytest -v --cov=src tests/

Contributing

Contributions are welcome! If you have useful task definitions that could benefit others:

  1. Fork the repository
  2. Create a new category folder (if needed) or add to an existing one
  3. Ensure tasks are generic and reusable
  4. Submit a pull request

License

MIT License - see LICENSE file for details.

About

Collection of reusable tasks

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors