pitchfork config add
- Usage:
pitchfork config add [FLAGS] <ID> [ARGS]… - Aliases:
a
Add a new daemon to ./pitchfork.toml
Creates a new daemon configuration section in the pitchfork.toml file. The daemon will be added to the nearest pitchfork.toml found in the filesystem hierarchy starting from the current directory.
Examples: pitchfork config add api bun run server Add daemon using positional args pitchfork config add api --run 'npm start' Add daemon with explicit run command pitchfork config add api -- bun run server Add daemon with explicit args after -- pitchfork config add api --run 'npm start' --retry 3 Add with retry policy pitchfork config add api --run 'npm start' --watch 'src/**/*.ts' Add with file watching pitchfork config add api --run 'npm start' --autostart --autostop Add with auto start/stop hooks pitchfork config add worker --run './worker' --depends api Add with daemon dependency
Arguments
<ID>
ID of the daemon to add (e.g., "api" or "namespace/api")
[ARGS]…
Arguments to pass to the daemon (alternative to --run)
Flags
--run <RUN>
Command to run (can also use positional args)
--retry <RETRY>
Number of retry attempts on failure (use "true" for infinite)
--watch… <WATCH>
Glob patterns to watch for changes (can be specified multiple times)
--dir <DIR>
Working directory for the daemon
--env… <ENV>
Environment variables in KEY=value format (can be specified multiple times)
--ready-delay <READY_DELAY>
Delay in seconds before considering daemon ready
--ready-output <READY_OUTPUT>
Regex pattern to match in output for readiness
--ready-http <READY_HTTP>
HTTP endpoint URL to poll for readiness
--ready-port <READY_PORT>
TCP port to check for readiness
--ready-cmd <READY_CMD>
Shell command to poll for readiness
--expected-port… <EXPECTED_PORT>
Ports the daemon is expected to bind to (can be specified multiple times or comma-separated)
--auto-bump-port
Automatically find an available port if the expected port is in use
--depends… <DEPENDS>
Daemon dependencies that must start first (can be specified multiple times)
--boot-start
Start this daemon automatically on system boot
--autostart
Autostart the daemon when entering the directory
--autostop
Autostop the daemon when leaving the directory
--on-ready <ON_READY>
Command to run when daemon becomes ready
--on-fail <ON_FAIL>
Command to run when daemon fails
--on-retry <ON_RETRY>
Command to run before each retry attempt
--cron-schedule <CRON_SCHEDULE>
Cron schedule expression (6 fields: second minute hour day month weekday)
--cron-retrigger <CRON_RETRIGGER>
Cron retrigger behavior: finish, always, success, fail
