Skip to main content

TaskPanel: A Robust Interactive Terminal Task Runner

Python Support License: MIT Code style: black

TaskPanel is a professional-grade, terminal-based tool designed to run, monitor, and manage multi-step parallel tasks defined in a simple CSV file. It provides a highly responsive and fault-tolerant TUI (Text-based User Interface) for complex workflows.

Key Features

Core Functionality

  • Parallel Execution: Runs each task (row in the CSV) in a parallel worker thread
  • Sequential Steps: Executes the steps (columns) within each task sequentially
  • Interactive TUI: A full-screen, responsive curses-based interface to monitor task status
  • Detailed Views: Context-aware panels show task information and step output
  • Advanced Navigation:
    • Vertical scrolling for hundreds of tasks
    • Horizontal scrolling for tasks with many steps

Robustness & Reliability

  • State Persistence: Intelligent resume capability after crashes or interruptions
  • Task State Management: Completed tasks preserved, interrupted tasks reset appropriately
  • Concurrency Control: Configurable worker limits to prevent resource exhaustion
  • Safe Threading: Deadlock-free threading with proper synchronization

Performance & Debugging

  • Log Management: Structured logging with unique directories per task
  • Efficient UI: Smart refresh mechanism for minimal CPU usage
  • Debug Features: Toggleable debug panel with detailed lifecycle information

New

  • YAML Workflow Support: Load workflows from YAML files with strict schema validation
  • CSV → YAML Conversion: Convert CSV workflows to YAML via CLI (requires PyYAML)

Installation

pip install taskpanel

or from source:

git clone https://github.com/Wenutu/TaskPanel.git
cd TaskPanel
pip install -e .

Note: UI runtime requires a POSIX-like OS (Linux/macOS).

Quick Start

  1. Define your workflow

    • CSV:
      TaskName,Info,Checkout,Build,Test
      MyApp,v1.0.0,./scripts/1_checkout.sh,./scripts/2_build.sh,./scripts/3_test.sh
      
    • YAML:
      steps: [Checkout, Build, Test]
      tasks:
        - name: MyApp
          info: v1.0.0
          steps:
            Checkout: "./scripts/1_checkout.sh"
            Build: "./scripts/2_build.sh"
            Test: "./scripts/3_test.sh"
      
  2. Run from command line

    # CSV
    taskpanel tasks.csv
    
    # YAML
    taskpanel tasks.yaml
    
  3. Or use as a Python library

    import taskpanel
    
    taskpanel.run(
        workflow_path="tasks.csv",  # or "tasks.yaml"
        max_workers=4,
        title="My Workflow"
    )
    

Example Project Structure

your_project/
├── tasks.csv         # or tasks.yaml
├── scripts/
│   ├── 1_checkout.sh
│   ├── 2_build.sh
│   ├── 3_test.sh
│   └── 4_deploy.sh
└── app.py

Task Definition Format

Define your workflow using CSV or YAML. In both formats, each task has sequential steps.

CSV

  • Header row with at least: TaskName, Info
  • Subsequent columns are step names; each cell is a shell command (empty means no step)

Example:

TaskName,Info,Checkout,Build,Test,Deploy
WebApp,v1.2.0,./scripts/1_checkout.sh,./scripts/2_build.sh,./scripts/3_test.sh,./scripts/4_deploy.sh
API-Server,v1.2.0,./scripts/1_checkout.sh,./scripts/2_build.sh --api,./scripts/3_test.sh --integration,./scripts/4_deploy.sh --api

YAML (strict schema)

Top-level keys:

  • steps: optional list of step names
  • tasks: required list of task objects

Each task:

  • name: string (required)
  • info or description: string (optional; use description for multiline)
  • steps: mapping of step_name (string) to command (string, nullable)

Example:

steps: [Checkout, Build, Test, Deploy]  # optional; will be derived if omitted
tasks:
  - name: WebApp
    info: v1.2.0
    steps:
      Checkout: "./scripts/1_checkout.sh"
      Build: "./scripts/2_build.sh"
      Test: "./scripts/3_test.sh"
      Deploy: "./scripts/4_deploy.sh"
  - name: API-Server
    description: |
      Version: v1.2.0
      Owner: Bob
    steps:
      Checkout: "./scripts/1_checkout.sh"
      Build: "./scripts/2_build.sh --api"
      Test: "./scripts/3_test.sh --integration"
      Deploy: "./scripts/4_deploy.sh --api"

Validation rules:

  • Only top-level keys steps and tasks are allowed
  • Only task keys name, info, description, steps are allowed
  • steps mapping must have string keys and string or null values

Usage

Command Line Interface

# Basic usage (CSV or YAML)
taskpanel tasks.csv
taskpanel tasks.yaml

# Options
taskpanel tasks.csv --workers 8 --title "My Build Pipeline"

# Convert CSV to YAML (requires PyYAML)
taskpanel tasks.csv --to-yaml tasks.yaml

--to-yaml notes:

  • Input must be a CSV file
  • Output YAML contains only steps and tasks at top level
  • Single-line Info becomes info; multiline Info becomes description
  • Empty step cells are omitted from a task’s steps mapping (still listed in top-level steps)

Python Library

#!/usr/bin/env python3
import taskpanel

def main():
    try:
        taskpanel.run(
            workflow_path="tasks.csv",  # or "tasks.yaml"
            max_workers=4,
            title="My Workflow Runner"
        )
    except FileNotFoundError as e:
        print(f"Error: Task file not found - {e}")
    except KeyboardInterrupt:
        print("Interrupted by user")

if __name__ == "__main__":
    main()

Interactive Controls

Key Action
↑ ↓ Navigate tasks
← → Navigate columns
Home / End Jump to first/last task
PgUp / PgDn Page scroll
r Rerun selected step and subsequent steps
k Kill currently running task
d Toggle debug panel
[ / ] Scroll output log
{ / } Scroll debug log
q Quit

Project Architecture

  • Model (src/taskpanel/model.py): Task execution, state management, persistence
  • View (src/taskpanel/view.py): Terminal UI rendering with curses
  • Controller (src/taskpanel/runner.py): Event loop and user input handling
  • CLI (src/taskpanel/cli.py): Command-line interface

Development

git clone https://github.com/Wenutu/TaskPanel.git
cd TaskPanel
pip install -e ".[dev]"
# or
make install-dev

Make Commands

  • make test - Run tests
  • make lint - Run linting tools
  • make format - Format code
  • make build - Build package
  • make clean - Clean build artifacts

Compatibility

  • OS: POSIX-like only (Linux, macOS)
  • YAML: Parsing and conversion require PyYAML (pip install pyyaml)

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for taskpanel 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for taskpanel 1.0.2
File Size Uploaded Provenance Actions
taskpanel-1.0.2.tar.gz 52.6 kB Without provenance Details for taskpanel-1.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for taskpanel 1.0.2
File Interpreter ABI Platform Actions
taskpanel-1.0.2-py3-none-any.whl Python 3 none any Details for taskpanel-1.0.2-py3-none-any.whl

Total release size: 76.0 kB

Release files / taskpanel-1.0.2.tar.gz

Download URL taskpanel-1.0.2.tar.gz
Size 52.6 kB
Tags Source
SHA-256 checksum
How to use checksums
7771709c0052983408a7c8a48ff2759645be0f881d63edc53f145f796081661d
BLAKE2b-256 checksum
How to use checksums
3cb7ae670fa3335ceb23f89c9ab6a640a4d3703621ec4f1bb7ca1decd84faef5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.10.0 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.20 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.15

Release files / taskpanel-1.0.2-py3-none-any.whl

Download URL taskpanel-1.0.2-py3-none-any.whl
Size 23.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e91b76614d22a195b7fe94140a3119ae6d8eb4b8d6c48d4c51efe3bfe2d64e84
BLAKE2b-256 checksum
How to use checksums
1aa8ee6c6975aafaffa45c377b1671ff98118b8e63c457774fe0a76f80a7cdb6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.10.0 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.20 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.15

Security for taskpanel 1.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page