Skip to main content

Artisan Commands

Chronicle ships fifteen Artisan commands. All signatures below are verified against src/Console/Commands/.

Quick reference

CommandDescription
chronicle:installPublish config and migrations
chronicle:checkpointCreate a signed checkpoint
chronicle:export {path}Export ledger as verifiable dataset
chronicle:verifyVerify ledger integrity (or a single entry)
chronicle:verify-export {path}Verify an exported dataset
chronicle:statsDisplay ledger statistics
chronicle:show {id}Display a single entry
chronicle:pruneDelete old entries by retention policy
chronicle:report {path}Generate a signed compliance report
chronicle:key:generateGenerate an Ed25519 keypair
chronicle:key:listList all keys in the signing key ring
chronicle:key:rotate {newKeyId}Create a boundary checkpoint and print the activation instruction
chronicle:checkpoints:backfillBackfill v1.11 range columns + checkpoint_id for pre-1.11 data
chronicle:anchor:retryRe-attempt outstanding checkpoint anchors
chronicle:anchor:verifyVerify stored checkpoint anchors against their providers

chronicle:install

php artisan chronicle:install [--force] [--migrate]

Publishes config/chronicle.php and the Chronicle migrations.

OptionDescription
--forceOverwrite any already-published files
--migrateRun php artisan migrate immediately after publishing

chronicle:checkpoint

php artisan chronicle:checkpoint [--anchor]

Creates a signed checkpoint anchoring the current ledger chain head. Chronicle reuses an existing checkpoint if one already exists for the same chain hash.

OptionDescription
--anchorAlso anchor the new checkpoint synchronously with every configured provider (see External Anchoring)

Requires signing keys to be configured. Cannot be run against an empty ledger.


chronicle:export

php artisan chronicle:export {path}

Exports the full ledger to the given directory as a verifiable dataset.

ArgumentDescription
pathDirectory where entries.ndjson, manifest.json, and signature.json will be written

The directory is created if it does not exist. See Exports for output format details.


chronicle:verify

php artisan chronicle:verify [--entry=<ULID>] [--checkpoints-only] \
[--from-checkpoint=<ULID>] [--to-checkpoint=<ULID>] \
[--since-last-checkpoint] [--anchors] [--resume]

Verifies ledger integrity. With no flags it verifies the full ledger from genesis. The other flags select cheaper, scoped passes — see Scalable Verification for when to use each and its cost.

OptionDescription
--entry=<ULID>Verify a single entry's payload and chain hash in isolation
--checkpoints-onlyVerify only the checkpoint chain — O(checkpoints), reads no entries
--from-checkpoint=<ULID>Verify the segment seeded from this checkpoint
--to-checkpoint=<ULID>With --from-checkpoint, the checkpoint that ends the segment (default: current head)
--since-last-checkpointTrust the latest checkpoint and verify only the trail after it
--anchorsAdditionally verify external anchors for the checkpoints in scope
--resumeContinue from the last recorded verification run (full verify if none)

The incremental modes require checkpoints backfilled with the v1.11 range columns; until then they fall back to a full verify with a warning.


chronicle:verify-export

php artisan chronicle:verify-export {path}

Validates an exported dataset: file presence, manifest/signature structure, dataset hash, full chain integrity, and signature.

ArgumentDescription
pathPath to the export directory produced by chronicle:export

chronicle:stats

php artisan chronicle:stats [--json]

Displays ledger statistics including total entry count, oldest/newest entry timestamps, checkpoint count, top actions, and 30-day activity.

OptionDescription
--jsonOutput stats as JSON instead of formatted text

chronicle:show

php artisan chronicle:show {id}

Displays the full detail of a single entry.

ArgumentDescription
idULID of the entry to display

chronicle:prune

php artisan chronicle:prune [--older-than=N] [--before=Y-m-d] [--dry-run] [--force]

Deletes old entries by retention policy. Entries anchored to a checkpoint are protected by default.

OptionDescription
--older-than=NDelete entries older than N days
--before=Y-m-dDelete entries created before the given date (ISO 8601 accepted)
--dry-runPreview what would be deleted without deleting
--forceDelete even checkpoint-anchored entries

See Pruning & Retention for full details.


chronicle:report

php artisan chronicle:report {path} [--from=] [--to=]

Generates a signed HTML compliance report.

Argument/OptionDescription
pathFile path where the HTML report will be written
--from=Start of reporting period (Y-m-d or ISO 8601)
--to=End of reporting period (Y-m-d or ISO 8601)

See Compliance Reports for full details.


chronicle:key:generate

php artisan chronicle:key:generate [--id=<keyId>]

Generates an Ed25519 keypair and prints the base64-encoded private and public keys alongside a ready-to-paste signing.keys config entry. The private key is never written to disk or any environment file.

OptionDescription
--id=Key ID to use in the config snippet. Defaults to chronicle-key-YYYYMMDD if omitted.

The command reminds you to store the private key in a secret manager (AWS Secrets Manager, HashiCorp Vault, 1Password, etc.).


chronicle:key:list

php artisan chronicle:key:list [--with-counts]

Lists all keys configured in signing.keys with their ID, algorithm, provider, and status.

StatusMeaning
● ACTIVEThis key is referenced by signing.active and used to sign new artifacts.
verify-onlyNo private_key configured. Can verify old artifacts; cannot sign new ones.
inactiveHas signing material but is not the active key.
OptionDescription
--with-countsAdd a Checkpoints column showing the number of checkpoints signed by each key.

chronicle:key:rotate

php artisan chronicle:key:rotate {newKeyId}

Validates the target key, creates a mandatory boundary checkpoint signed by the current active key, then prints the CHRONICLE_ACTIVE_KEY instruction needed to complete the rotation.

ArgumentDescription
newKeyIdID of the key to rotate to. Must exist in signing.keys and have signing material.

The command refuses with an actionable error if:

  • newKeyId is not present in signing.keys
  • newKeyId is already the active key
  • newKeyId has no private_key or key_arn (verify-only)
  • The ledger is empty (nothing to checkpoint)

See Signing & Keys for the full rotation workflow.


chronicle:checkpoints:backfill

php artisan chronicle:checkpoints:backfill [--chunk=1000] [--dry-run]

Populates the v1.11 range columns (head_id, entry_count, previous_checkpoint_id) and stamps checkpoint_id onto covered entries for checkpoints created before 1.11. Chunked and idempotent — safe to re-run.

OptionDescription
--chunk=1000Number of entries to stamp per update batch
--dry-runReport what would change without writing

See the Upgrade Guide.


chronicle:anchor:retry

php artisan chronicle:anchor:retry [--status=failed]

Re-attempts outstanding checkpoint anchors. Anchoring must be enabled and a provider configured (see External Anchoring).

OptionDescription
--status=Retry anchors in this status: pending or failed (default failed)

chronicle:anchor:verify

php artisan chronicle:anchor:verify [--checkpoint=<ULID>]

Verifies stored checkpoint anchors against their providers.

OptionDescription
--checkpoint=<ULID>Verify anchors for a single checkpoint (default: all anchored checkpoints)