pitchfork
A robust and developer-centric process manager that simplifies local service orchestration, auto-restarts, dependency management, and real-time monitoring of background daemons via a unified interface.
Pitchfork is a sophisticated and highly versatile process manager specifically engineered for developers. It simplifies the orchestration of background services, allowing users to manage complex application lifecycles with ease. By acting as a central hub for running and monitoring daemons, Pitchfork helps eliminate the friction typically associated with manual process control, ensuring that your development environment remains stable, performant, and organized across different projects. Developed by jdx, it is designed to function as a production-grade container entrypoint or a local development tool, seamlessly adapting to various workflow requirements. It handles complex dependency chains, automatic resource monitoring, and even provides integration with AI assistants via an MCP server.
The tool enables users to define, start, stop, and monitor background processes or services using a configuration-driven approach. It automatically handles process lifecycles, including auto-starting based on directory location, restarting on failure, managing dependencies, and providing real-time visibility through logs and a TUI dashboard.
Some of the key features are:
- Process Management: Start and stop daemons with automatic deduplication to ensure only necessary instances are running.
- Auto-Restart: Configure retries with exponential backoff or infinite restarts for critical services.
- Ready Checks: Validate that services are genuinely operational using HTTP endpoints, TCP ports, output matching, or custom shell commands.
- Shell Possession: Automatically activate or deactivate project-specific daemons based on your current working directory.
- Dependency Chaining: Explicitly define start-up sequences to ensure infrastructure components like databases or caches are ready before application code runs.
- File Watching: Automatically trigger reloads during development when specific source files or glob patterns are updated.
- Cron Scheduling: Run periodic tasks or background jobs using standard cron syntax.
- AI Integration: Built-in Model Context Protocol (MCP) server allows AI tools like Cursor or Claude to manage your infrastructure directly.
- Resource Enforcement: Set memory and CPU limits per process to protect system stability during development spikes.
- Container Support: Designed for deployment as PID 1 in containers, complete with zombie reaping and signal forwarding.
Pitchfork is primarily controlled through a CLI that reads from a pitchfork.toml file located in your project root or defined globally. Users define their daemons, specifying the execution command, environment variables, readiness criteria, and watch patterns. Once configured, commands like pitchfork start or pitchfork run manage the lifecycle of these daemons. The tool supports multiple levels of configuration, allowing for system-wide settings, user-level preferences, and project-specific overrides. Users can monitor the state of all managed daemons through a terminal-based UI (TUI) or by inspecting logs directly via the CLI.
Some common use cases include:
- Full-Stack Development: Automatically starting a database, a background worker, and an API server when entering a project directory.
- Microservices Orchestration: Managing a suite of inter-dependent services where the order of initialization is strictly defined.
- Remote Development: Utilizing file watching with polling on network filesystems to ensure hot-reloading works in containerized or remote environments.
- Scheduled Maintenance: Running cleanup scripts or database backups at specific intervals using built-in cron scheduling.
- AI-Assisted Ops: Allowing an LLM-powered editor to restart a failing service or examine logs without the developer manually leaving their IDE.
Comments
0Markdown is supported.