Scripting the Crona CLI, query contexts, trigger timers, and parse JSON outputs.
Crona exposes its entire feature surface through the scriptable crona CLI. The CLI shares daemon state with the TUI, allowing automation scripts to read from or write to your active session.
Querying and Switching Context
Section titled “Querying and Switching Context”The CLI provides commands to inspect or alter the active pointer { repository -> stream -> issue }:
# Get the active checkout contextcrona context get
# Switch context by numeric IDscrona context switch-repo --id 1crona context switch-stream --id 2crona context switch-issue --id 45Controlling the Timer
Section titled “Controlling the Timer”You can command focus timers programmatically. Commands return structured JSON payloads when the --json flag is provided:
# Check if a session timer is runningcrona timer status --json
# Start the timer for the checked-out issue contextcrona timer start --from-context --json
# Pause or resume the active timercrona timer pause --jsoncrona timer resume --json
# Terminate the timer and log the sessioncrona timer end --jsonAutomating Exports
Section titled “Automating Exports”You can automate narrative report generation and data syncing via shell scripts or cron jobs:
# Generate a daily markdown reportcrona export daily
# Generate a summary dashboard for today or a rangecrona export summarycrona export summary --week
# Export database entries as structured CSV sheetscrona export csv
# Rebuild the deterministic iCalendar feedscrona export calendarReading a Summary
Section titled “Reading a Summary”Use crona summary when you want a terminal snapshot instead of a saved export:
# Inspect today, a calendar week, or a rolling periodcrona summarycrona summary --weekcrona summary --last-x-days 7
# Inspect an explicit inclusive rangecrona summary --start 2026-07-01 --end 2026-07-07Integration Patterns
Section titled “Integration Patterns”Shell Aliases for Execution
Section titled “Shell Aliases for Execution”Add context-aware shortcuts to your shell configuration (.zshrc or .bashrc):
alias start-focus="crona timer start --from-context"alias check-timer="crona timer status --json | jq '.elapsed_seconds'"Scheduled Local Backups
Section titled “Scheduled Local Backups”Set up a daily cron job to run the backup command and prune stale files:
0 22 * * * crona backup && find ~/Library/Application\ Support/Crona/backups/ -mtime +30 -delete