Skip to main content

CLI Reference

Core Commands

CommandDescription
nightshift setupGuided global configuration
nightshift runExecute scheduled tasks
nightshift previewShow upcoming runs
nightshift budgetCheck token budget status
nightshift taskBrowse and run tasks
nightshift doctorCheck environment health
nightshift statusView run history
nightshift logsStream or export logs
nightshift statsToken usage statistics
nightshift daemonBackground scheduler

Run Options

nightshift run shows a preflight summary before executing, then prompts for confirmation in interactive terminals.

nightshift run                          # Preflight + confirm + execute (1 project, 1 task)
nightshift run --yes # Skip confirmation
nightshift run --dry-run # Show preflight, don't execute
nightshift run --max-projects 3 # Process up to 3 projects
nightshift run --max-tasks 2 # Run up to 2 tasks per project
nightshift run --random-task # Pick a random eligible task
nightshift run --ignore-budget # Bypass budget limits (use with caution)
nightshift run --project ~/code/myapp # Target specific project (ignores --max-projects)
nightshift run --task lint-fix # Run specific task (ignores --max-tasks)
FlagDefaultDescription
--dry-runfalseShow preflight summary and exit without executing
--yes, -yfalseSkip confirmation prompt
--max-projects1Max projects to process (ignored when --project is set)
--max-tasks1Max tasks per project (ignored when --task is set)
--random-taskfalsePick a random task from eligible tasks instead of the highest-scored one
--ignore-budgetfalseBypass budget checks with a warning
--project, -pTarget a specific project directory
--task, -tRun a specific task by name

Non-interactive contexts (daemon, cron, piped output) skip the confirmation prompt automatically.

Preview Options

nightshift preview                # Default view
nightshift preview -n 3 # Next 3 runs
nightshift preview --long # Detailed view
nightshift preview --explain # With prompt previews
nightshift preview --plain # No pager
nightshift preview --json # JSON output
nightshift preview --write ./dir # Write prompts to files

Task Commands

nightshift task list              # All tasks
nightshift task list --category pr
nightshift task list --cost low --json
nightshift task show lint-fix
nightshift task show lint-fix --prompt-only
nightshift task run lint-fix --provider claude
nightshift task run lint-fix --provider codex --dry-run

Budget Commands

nightshift budget                 # Current status
nightshift budget --provider claude
nightshift budget snapshot --local-only
nightshift budget history -n 10
nightshift budget calibrate

Global Flags

FlagDescription
--verboseVerbose output
--providerSelect provider (claude, codex)
--timeoutExecution timeout (default 30m)