trunkjet

Reference

tjet-admin — administration

Commands:

tjet-admin

trunkjet administration

Usage: tjet-admin [OPTIONS] <COMMAND>

Commands:
  bootstrap-tenant             Create a tenant (if absent) and register principals of --issuer in it; idempotent. This is how the first tenant administrator of a production installation is created
  import-git                   Bootstrap a Git repository's history into a repository whose stream was never integrated, or (--delta) propose the commits after the imported head as stacked changes
  import-report                Show the recorded migration report of a completed Git import (counts, the first recorded items, provenance). Needs stream_admin and read access to every path
  quota                        Tenant quota (escrowed upload admission): stored bytes and object count. Omit --bytes and --objects to show it
  fdb-backup                   Continuous FoundationDB backups (fdbbackup; TJET_FDBBACKUP sets the command prefix)
  doctor                       Health checks (spec 12 §1): installation checks (schema, FDB cluster, storage round trip, clock, cell epoch, queue lag, quota, durability), plus repository checks when a repository is named. FAIL blocks production writes; exit 1 when any check fails. Without `--as` (and without a repository) it runs as the operator: the installation checks except the per-organisation quota
  dr                           Disaster-recovery drills: restore the latest FoundationDB backup into a scratch cluster, verify it against production and the content store, clean up. Needs only the cluster files and store credentials (no principal); it never writes to the production cell or the content store
  audit-tenant                 Tenant audit log (newest last)
  retention                    Draft-revision retention policy and passes
  activity                     Repository activity feed maintenance
  storage                      Content inventory reconciliation (missing/orphaned representations) and scrub
  export-git                   Export a stream (or --rev) to a new bare Git repository, preserving retained originals
  export-native                Export a complete, verified native archive (NSCAR1) of a repository to a local file
  backup                       Metadata-boundary backups with content inventory pins
  restore                      Exact restore of a full native archive into this (isolated) installation, followed by integrity verification. Re-run with the same archive to resume an interrupted restore. Exact restore of a full backup into this (isolated) installation. The repository becomes visible READ_ONLY (spec 12 §6): check reads, history and ACL behaviour as bound principals, then `restore-activate` compares the designated digests and allocates a new authority epoch
  restore-activate             Write-activate a read-only restore: designated stream heads and release objects must equal the archive's; then a new cell authority epoch is allocated (every running server is fenced and must restart). `--confirm` repeats the repository name
  restore-verify               Verify a restored repository against its archive (heads, objects, rows, history)
  restore-status               Show restore staging state of a repository id
  restore-cancel               Cancel a restore that has not been activated (clears its invisible staging)
  repo                         Repository lifecycle (staged delete)
  mirror                       Live mirrors, installation operator; needs no --as
  showcase                     Build showcase, installation operator; needs no --as
  cell                         Cell authority (T017): epoch fencing and the read-only switch. Needs tenant_admin; recorded in the acting tenant's audit log. Opens the cell even when it is read-only
  schema                       Schema generation and migrations: status, and `migrate` (ordered, resumable steps, then the contract that raises the minimum reader and the write fence; one-way). Direct FoundationDB access like `cell`; opens a read-only cell for `status`
  audit-chain                  Tamper-evident audit chain (spec 10 §6): installation-wide, needs no --as
  pii                          Personal data at rest: installation-wide, needs no --as
  invite                       Installation invitations (B1): invite an address to the installation without an organisation, also when self-service signup is off. The link is mailed through the outbox (tjetd with TJET_SMTP_RELAY delivers it) and is never printed; it creates one account for exactly that address. Needs --pii-key-file and --public-origin (create), no --as
  org                          Organisations, installation operator; needs no --as
  account                      Accounts, installation operator; needs no --as
  agents                       Installation-wide agent switch (AG-1, D-1807; spec 22 §3.4): `off` stops every agent request and grant refresh in every organisation until `on`. Needs no --as
  installation                 Whole installations on this cluster. Names its target explicitly and ignores the global --installation/--cell; opens no cell and needs no --as
  principal-resolve-contested  Resolve a principal id that is active in two tenants of the cell (D-1230: contested, it signs in to neither): keep it in the --home tenant and disable the other tenant's principal with this id. Installation operator action (needs no --as); refused unless the id is contested and --home is one of its two tenants; audited in both tenants
  service                      Service principals of an organisation and their refreshable credentials: presubmit and showcase runners. Installation operator action; needs no --as. The organisation is named by its handle (an unknown one fails; nothing is created from a name that does not resolve). Every action is audited in the organisation
  principal-bind               Bind an imported (inactive) principal to an external identity and activate it
  help                         Print this message or the help of the given subcommand(s)

Options:
      --cluster-file <CLUSTER_FILE>
          [env: TJET_FDB_CLUSTER_FILE=]
      --installation <INSTALLATION>
          [env: TJET_INSTALLATION=] [default: dev]
      --cell <CELL>
          [env: TJET_CELL=] [default: c1]
      --store-dir <STORE_DIR>
          [env: TJET_STORE_DIR=]
      --store <STORE>
          [env: TJET_STORE=] [default: local]
      --s3-durability <S3_DURABILITY>
          [env: TJET_S3_DURABILITY=] [default: single-host]
      --metadata-tier <METADATA_TIER>
          Where objects this tool stores (restores, imports, migrations of other data) put new metadata objects: "fdb" (default) or "segments" (the rollback setting; set it as on every tjetd and tjet-worker) [env: TJET_METADATA_TIER=] [default: fdb] [possible values: fdb, segments]
      --metadata-tier-repo-max-bytes <METADATA_TIER_REPO_MAX_BYTES>
          As tjetd's `--metadata-tier-repo-max-bytes` [env: TJET_METADATA_TIER_REPO_MAX_BYTES=] [default: 1073741824]
      --deletion-recovery-days <DELETION_RECOVERY_DAYS>
          As tjetd's `[security] deletion_recovery_days`: how long a repository deleted with `repo delete` stays restorable. Set it as on tjetd [env: TJET_DELETION_RECOVERY_DAYS=] [default: 7]
      --fdb-encryption-at-rest <FDB_ENCRYPTION_AT_REST>
          As tjetd's `--fdb-encryption-at-rest`, for this tool's doctor [env: TJET_FDB_ENCRYPTION=]
      --issuer <ISSUER>
          Identity provider issuer of the acting principal (not needed by `dr verify`) [env: TJET_ADMIN_ISSUER=]
      --as <SUBJECT>
          Subject of the acting principal (must hold the required repository role) [env: TJET_ADMIN_SUBJECT=]
      --pii-key-file <PII_KEY_FILE>
          As tjetd's `--pii-key-file`, for `pii reseal` [env: TJET_PII_KEY_FILE=]
      --public-origin <PUBLIC_ORIGIN>
          As tjetd's `--public-origin`: the host of Git export noreply addresses [env: TJET_PUBLIC_ORIGIN=]
  -h, --help
          Print help
  -V, --version
          Print version

tjet-admin bootstrap-tenant

Create a tenant (if absent) and register principals of --issuer in it; idempotent. This is how the first tenant administrator of a production installation is created

Usage: tjet-admin bootstrap-tenant --principal <PRINCIPALS> <TENANT>

Arguments:
  <TENANT>  

Options:
      --principal <PRINCIPALS>  `SUBJECT[:ROLE...][:agent|:service]`, e.g. `0f3c...:tenant_admin`
  -h, --help                    Print help

tjet-admin import-git

Bootstrap a Git repository's history into a repository whose stream was never integrated, or (--delta) propose the commits after the imported head as stacked changes

Usage: tjet-admin import-git [OPTIONS] <REPO> <SOURCE>

Arguments:
  <REPO>    Repository name or id
  <SOURCE>  Path of the source Git repository (bare or non-bare) on this host

Options:
      --ref <GIT_REF>            [default: refs/heads/main]
      --stream <STREAM>          [default: main]
      --request-id <REQUEST_ID>  Reuse to resume/replay an interrupted request exactly
      --reject-gitlinks          Refuse submodules instead of leaving them out (by default each pinned commit is reported and the submodule is not part of the native tree)
      --preflight-only           Only run the early scan: report what the import would meet, import nothing
      --follow                   Follow import: publish the ref's current commit on a stream only follow imports have written (the first one needs a never-integrated stream), compare-and-set on the previous follow import's head; native work since fails closed (HEAD_MOVED). Idempotent: an unchanged ref imports nothing; without --request-id the request id is derived from the transition, and an unfinished import is resumed
      --delta                    Incremental import: the commits of --ref after the one the stream head was imported from (a linear first-parent range) become stacked OPEN changes under the stream's normal policy; the stream head does not move. Re-running proposes only commits not yet proposed
      --keep-lfs-pointers        Import Git LFS pointer files as files instead of refusing (objects not fetched)
      --migrate-lfs              Migrate Git LFS files from the source's local LFS store (`.git/lfs/objects`), verified against each pointer; a missing object refuses the import
      --omit-invalid-paths       Leave paths invalid under the path profile out (each reported) instead of refusing
      --truncate-parents         Keep the first 64 parents of octopus merges with more (reported) instead of refusing
  -h, --help                     Print help

tjet-admin import-report

Show the recorded migration report of a completed Git import (counts, the first recorded items, provenance). Needs stream_admin and read access to every path

Usage: tjet-admin import-report <REPO>

Arguments:
  <REPO>  

Options:
  -h, --help  Print help

tjet-admin quota

Tenant quota (escrowed upload admission): stored bytes and object count. Omit --bytes and --objects to show it

Usage: tjet-admin quota [OPTIONS]

Options:
      --bytes <BYTES>          Byte capacity
      --objects <OBJECTS>      Object-count capacity. Alone it keeps the byte capacity, so the tenant needs one (set --bytes too the first time)
      --reconcile <RECONCILE>  Refund expired unsealed uploads of this repository
  -h, --help                   Print help

tjet-admin fdb-backup

Continuous FoundationDB backups (fdbbackup; TJET_FDBBACKUP sets the command prefix)

Usage: tjet-admin fdb-backup <COMMAND>

Commands:
  start        Start a continuous FoundationDB backup of this installation's whole key range under TAG into URL (e.g. file:///backups/NAME or blobstore://...); it never stops by itself
  status       Show a backup's state and latest restorable version
  discontinue  Stop a continuous backup (it stays restorable to its last version)
  help         Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help

tjet-admin fdb-backup start

Start a continuous FoundationDB backup of this installation's whole key range under TAG into URL (e.g. file:///backups/NAME or blobstore://...); it never stops by itself

Usage: tjet-admin fdb-backup start --tag <TAG> --url <URL>

Options:
      --tag <TAG>  
      --url <URL>  
  -h, --help       Print help

tjet-admin fdb-backup status

Show a backup's state and latest restorable version

Usage: tjet-admin fdb-backup status --tag <TAG>

Options:
      --tag <TAG>  
  -h, --help       Print help

tjet-admin fdb-backup discontinue

Stop a continuous backup (it stays restorable to its last version)

Usage: tjet-admin fdb-backup discontinue --tag <TAG>

Options:
      --tag <TAG>  
  -h, --help       Print help

tjet-admin doctor

Health checks (spec 12 §1): installation checks (schema, FDB cluster, storage round trip, clock, cell epoch, queue lag, quota, durability), plus repository checks when a repository is named. FAIL blocks production writes; exit 1 when any check fails. Without `--as` (and without a repository) it runs as the operator: the installation checks except the per-organisation quota

Usage: tjet-admin doctor [OPTIONS] [REPO]

Arguments:
  [REPO]  

Options:
      --dr-status-file <DR_STATUS_FILE>
          Status file of the scheduled disaster-recovery drill (`dr verify`): with it the installation doctor adds the `dr_drill` check [env: TJET_DR_STATUS_FILE=]
      --dr-max-age-hours <DR_MAX_AGE_HOURS>
          `dr_drill` warns when no drill verified a restore within this many hours [env: TJET_DR_MAX_AGE_HOURS=] [default: 192]
  -h, --help
          Print help

tjet-admin dr

Disaster-recovery drills: restore the latest FoundationDB backup into a scratch cluster, verify it against production and the content store, clean up. Needs only the cluster files and store credentials (no principal); it never writes to the production cell or the content store

Usage: tjet-admin dr <COMMAND>

Commands:
  verify  Run one drill (the tjet-dr-verify.timer runs it on schedule). Exit 0 verified, 6 an integrity failure, 5 an environment failure, 2 refused configuration
  help    Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help

tjet-admin dr verify

Run one drill (the tjet-dr-verify.timer runs it on schedule). Exit 0 verified, 6 an integrity failure, 5 an environment failure, 2 refused configuration

Usage: tjet-admin dr verify [OPTIONS] --tag <TAG> --scratch-cluster-file <SCRATCH_CLUSTER_FILE>

Options:
      --tag <TAG>
          Tag of the installation's continuous FoundationDB backup (`fdb-backup start --tag`) [env: TJET_DR_BACKUP_TAG=]
      --scratch-cluster-file <SCRATCH_CLUSTER_FILE>
          Cluster file of the scratch cluster the drill restores into: its own empty cluster, never the production one (a `backup_agent` must run against it and read the backup) [env: TJET_DR_SCRATCH_CLUSTER_FILE=]
      --restore-dest-cluster-file <RESTORE_DEST_CLUSTER_FILE>
          The scratch cluster file as `fdbrestore` sees it (default: --scratch-cluster-file), when TJET_FDBRESTORE runs it elsewhere (e.g. in a container) [env: TJET_DR_RESTORE_DEST_CLUSTER_FILE=]
      --restore-dest-unchecked
          Accept a --restore-dest-cluster-file this host cannot read (e.g. a path inside a container). Without it such a destination is refused; a readable one must name the same cluster as --scratch-cluster-file [env: TJET_DR_RESTORE_DEST_UNCHECKED=]
      --status-file <STATUS_FILE>
          Where the result is recorded for `doctor` (check `dr_drill`) [env: TJET_DR_STATUS_FILE=] [default: /var/lib/trunkjet/dr/last-verify.json]
      --metrics-file <METRICS_FILE>
          Prometheus text file (node exporter textfile collector) with the tjet_dr_* gauges [env: TJET_DR_METRICS_FILE=]
      --wait-secs <WAIT_SECS>
          How long to wait for the backup to become restorable at the drill version [env: TJET_DR_WAIT_SECS=] [default: 900]
      --restore-timeout-secs <RESTORE_TIMEOUT_SECS>
          Upper bound of the restore itself (then it is aborted and the drill fails) [env: TJET_DR_RESTORE_TIMEOUT_SECS=] [default: 21600]
      --windows <WINDOWS>
          Sampled windows at data-size split points, besides the cell's start and its subspaces [default: 32]
      --window-keys <WINDOW_KEYS>
          Keys per window [default: 256]
      --closure-objects-per-repo <CLOSURE_OBJECTS_PER_REPO>
          Objects of each repository's content closure verified at most [env: TJET_DR_CLOSURE_OBJECTS=] [default: 20000]
      --closure-max-bytes <CLOSURE_MAX_BYTES>
          Bytes of content read at most over the whole drill [env: TJET_DR_CLOSURE_BYTES=] [default: 2147483648]
  -h, --help
          Print help

tjet-admin audit-tenant

Tenant audit log (newest last)

Usage: tjet-admin audit-tenant [OPTIONS]

Options:
      --limit <LIMIT>  [default: 100]
  -h, --help           Print help

tjet-admin retention

Draft-revision retention policy and passes

Usage: tjet-admin retention <COMMAND>

Commands:
  show   
  set    Set periods in hours
  apply  Apply the policy (only ever shortens draft-root expiry)
  help   Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help

tjet-admin retention show

Usage: tjet-admin retention show <REPO>

Arguments:
  <REPO>  

Options:
  -h, --help  Print help

tjet-admin retention set

Set periods in hours

Usage: tjet-admin retention set --intermediate-hours <INTERMEDIATE_HOURS> --reviewed-hours <REVIEWED_HOURS> --abandoned-hours <ABANDONED_HOURS> <REPO>

Arguments:
  <REPO>  

Options:
      --intermediate-hours <INTERMEDIATE_HOURS>  
      --reviewed-hours <REVIEWED_HOURS>          
      --abandoned-hours <ABANDONED_HOURS>        
  -h, --help                                     Print help

tjet-admin retention apply

Apply the policy (only ever shortens draft-root expiry)

Usage: tjet-admin retention apply <REPO>

Arguments:
  <REPO>  

Options:
  -h, --help  Print help

tjet-admin activity

Repository activity feed maintenance

Usage: tjet-admin activity <COMMAND>

Commands:
  backfill  Copy the repository's still-retained outbox events into its activity feed at their original versionstamps (idempotent; needs retention_admin)
  help      Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help

tjet-admin activity backfill

Copy the repository's still-retained outbox events into its activity feed at their original versionstamps (idempotent; needs retention_admin)

Usage: tjet-admin activity backfill <REPO>

Arguments:
  <REPO>  

Options:
  -h, --help  Print help

tjet-admin storage

Content inventory reconciliation (missing/orphaned representations) and scrub

Usage: tjet-admin storage <COMMAND>

Commands:
  reconcile     Compare backend inventory with the catalog; delete orphans only past grace and only when content deletion is enabled for the repository
  scrub         Verify stored objects through the verified read path
  impact        Report which live roots (change revisions, streams, releases, pins, holds) reach the given objects, or every QUARANTINED object
  meta-migrate  Relocate existing metadata objects (namespace pages, revisions, mutation pages, file manifests and chunk trees) to the FoundationDB metadata tier ("fdb") or back to content-store segments ("segments", before a rollback to a binary older than D-981; run it with a binary of D-1080 or later, as an older one leaves file manifests and chunk trees in FoundationDB). Bounded passes of compare-and-set relocations, idempotent and resumable
  usage         Key and value bytes of the repository's FoundationDB keyspace by family, and the metadata tier's counters
  quarantined   List the repository's quarantine set: quarantined objects, objects whose loss was accepted, and objects repaired while a collection ran
  accept-loss   Record the audited decision that a QUARANTINED object cannot be repaired: it is then treated as gone (CONTENT_GONE), the collector removes its corrupt bytes once deletion is enabled, and what only it reached becomes garbage. A verified re-supply of the same bytes still repairs it. Run `storage impact` first
  help          Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help

tjet-admin storage reconcile

Compare backend inventory with the catalog; delete orphans only past grace and only when content deletion is enabled for the repository

Usage: tjet-admin storage reconcile <REPO>

Arguments:
  <REPO>  

Options:
  -h, --help  Print help

tjet-admin storage scrub

Verify stored objects through the verified read path

Usage: tjet-admin storage scrub [OPTIONS] <REPO>

Arguments:
  <REPO>  

Options:
      --max-objects <MAX_OBJECTS>  [default: 100000]
  -h, --help                       Print help

tjet-admin storage impact

Report which live roots (change revisions, streams, releases, pins, holds) reach the given objects, or every QUARANTINED object

Usage: tjet-admin storage impact [OPTIONS] <REPO>

Arguments:
  <REPO>  

Options:
      --object <OBJECTS>         Objects to trace (full o1_ ids); default: every quarantined object
      --max-visits <MAX_VISITS>  [default: 10000000]
  -h, --help                     Print help

tjet-admin storage meta-migrate

Relocate existing metadata objects (namespace pages, revisions, mutation pages, file manifests and chunk trees) to the FoundationDB metadata tier ("fdb") or back to content-store segments ("segments", before a rollback to a binary older than D-981; run it with a binary of D-1080 or later, as an older one leaves file manifests and chunk trees in FoundationDB). Bounded passes of compare-and-set relocations, idempotent and resumable

Usage: tjet-admin storage meta-migrate [OPTIONS] --to <TO> <REPO>

Arguments:
  <REPO>  

Options:
      --to <TO>                        [possible values: fdb, segments]
      --rows-per-pass <ROWS_PER_PASS>  Catalog rows examined per pass (at most 100,000; object bytes per pass are bounded separately) [default: 10000]
      --max-passes <MAX_PASSES>        Stop after this many passes (default: until the end of the catalog)
      --cursor <CURSOR>                Hex cursor printed by an earlier, interrupted run
      --pause-ms <PAUSE_MS>            Milliseconds to wait between passes (paces the relocation against other load) [default: 0]
  -h, --help                           Print help

tjet-admin storage usage

Key and value bytes of the repository's FoundationDB keyspace by family, and the metadata tier's counters

Usage: tjet-admin storage usage <REPO>

Arguments:
  <REPO>  

Options:
  -h, --help  Print help

tjet-admin storage quarantined

List the repository's quarantine set: quarantined objects, objects whose loss was accepted, and objects repaired while a collection ran

Usage: tjet-admin storage quarantined <REPO>

Arguments:
  <REPO>  

Options:
  -h, --help  Print help

tjet-admin storage accept-loss

Record the audited decision that a QUARANTINED object cannot be repaired: it is then treated as gone (CONTENT_GONE), the collector removes its corrupt bytes once deletion is enabled, and what only it reached becomes garbage. A verified re-supply of the same bytes still repairs it. Run `storage impact` first

Usage: tjet-admin storage accept-loss --object <OBJECT> --reason <REASON> <REPO>

Arguments:
  <REPO>  

Options:
      --object <OBJECT>  The quarantined object (full o1_ id)
      --reason <REASON>  Why the object cannot be repaired (recorded in the audit event)
  -h, --help             Print help

tjet-admin export-git

Export a stream (or --rev) to a new bare Git repository, preserving retained originals

Usage: tjet-admin export-git [OPTIONS] <REPO> <OUT>

Arguments:
  <REPO>  
  <OUT>   

Options:
      --stream <STREAM>    [default: main]
      --rev <REV>          
      --empty-trees        Write native empty directories as empty Git trees (default: leave them out, each reported)
      --sidecar <SIDECAR>  Sidecar mapping/evidence bundle path (default `<out>.nscm-sidecar.json`)
      --follow             Incremental mirror export: `out` is a bare repository an earlier `--follow` export wrote (or does not exist yet). Only new revisions are written, imported commits keep their Git ids, refs move fast-forward only (a rewritten or foreign ref fails closed), the mapping stays in `<out>/tjet-export.json`
  -h, --help               Print help

tjet-admin export-native

Export a complete, verified native archive (NSCAR1) of a repository to a local file

Usage: tjet-admin export-native <REPO> <OUT>

Arguments:
  <REPO>  
  <OUT>   

Options:
  -h, --help  Print help

tjet-admin backup

Metadata-boundary backups with content inventory pins

Usage: tjet-admin backup <COMMAND>

Commands:
  create  Create a backup: archive + metadata boundary + retention pin on its content inventory. The archive directory is checked for independence from the content store; with --fdb-tag, the continuous FoundationDB backup must become restorable at or after the boundary (within --fdb-wait-secs) and its recovery version is recorded (spec 05 §8)
  list    
  verify  Re-read the backup archive completely and check it against its manifest and pin
  expire  Retire the backup's retention pin (requires `--confirm <backup-id>`)
  help    Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help

tjet-admin backup create

Create a backup: archive + metadata boundary + retention pin on its content inventory. The archive directory is checked for independence from the content store; with --fdb-tag, the continuous FoundationDB backup must become restorable at or after the boundary (within --fdb-wait-secs) and its recovery version is recorded (spec 05 §8)

Usage: tjet-admin backup create [OPTIONS] --dir <DIR> <REPO>

Arguments:
  <REPO>  

Options:
      --dir <DIR>                      Independent backup storage directory
      --request-id <REQUEST_ID>        Reuse to resume/replay an interrupted request exactly
      --fdb-tag <FDB_TAG>              Tag of the continuous FoundationDB backup (`tjet-admin fdb-backup start`)
      --fdb-wait-secs <FDB_WAIT_SECS>  [default: 300]
  -h, --help                           Print help

tjet-admin backup list

Usage: tjet-admin backup list <REPO>

Arguments:
  <REPO>  

Options:
  -h, --help  Print help

tjet-admin backup verify

Re-read the backup archive completely and check it against its manifest and pin

Usage: tjet-admin backup verify <REPO> <BACKUP_ID>

Arguments:
  <REPO>       
  <BACKUP_ID>  

Options:
  -h, --help  Print help

tjet-admin backup expire

Retire the backup's retention pin (requires `--confirm <backup-id>`)

Usage: tjet-admin backup expire --confirm <CONFIRM> <REPO> <BACKUP_ID>

Arguments:
  <REPO>       
  <BACKUP_ID>  

Options:
      --confirm <CONFIRM>  
  -h, --help               Print help

tjet-admin restore

Exact restore of a full native archive into this (isolated) installation, followed by integrity verification. Re-run with the same archive to resume an interrupted restore. Exact restore of a full backup into this (isolated) installation. The repository becomes visible READ_ONLY (spec 12 §6): check reads, history and ACL behaviour as bound principals, then `restore-activate` compares the designated digests and allocates a new authority epoch

Usage: tjet-admin restore [OPTIONS] <ARCHIVE>

Arguments:
  <ARCHIVE>  

Options:
      --no-verify  Skip the post-restore integrity verification
      --writable   Activate writable at once, skipping the read-only phase (not the recovery runbook)
  -h, --help       Print help

tjet-admin restore-activate

Write-activate a read-only restore: designated stream heads and release objects must equal the archive's; then a new cell authority epoch is allocated (every running server is fenced and must restart). `--confirm` repeats the repository name

Usage: tjet-admin restore-activate --confirm <CONFIRM> <REPO>

Arguments:
  <REPO>  

Options:
      --confirm <CONFIRM>  
  -h, --help               Print help

tjet-admin restore-verify

Verify a restored repository against its archive (heads, objects, rows, history)

Usage: tjet-admin restore-verify <ARCHIVE>

Arguments:
  <ARCHIVE>  

Options:
  -h, --help  Print help

tjet-admin restore-status

Show restore staging state of a repository id

Usage: tjet-admin restore-status <REPOSITORY_ID>

Arguments:
  <REPOSITORY_ID>  

Options:
  -h, --help  Print help

tjet-admin restore-cancel

Cancel a restore that has not been activated (clears its invisible staging)

Usage: tjet-admin restore-cancel <REPOSITORY_ID>

Arguments:
  <REPOSITORY_ID>  

Options:
  -h, --help  Print help

tjet-admin repo

Repository lifecycle (staged delete)

Usage: tjet-admin repo <COMMAND>

Commands:
  delete           Delete a repository as organisation administrator `--as`: it disappears at once, its name stays reserved and it can be restored until the recovery window ends (`--deletion-recovery-days`, the installation's setting); then the maintenance pass starts the permanent purge. Needs --confirm repeating the exact name. Under an organisation's second-admin rule the answer is PENDING_APPROVAL
  archive          Archive a repository (read-only, reversible); `--unarchive` reverses it. Deleting does not need it (`repo delete` hides the repository at once). Needs the same right as the web's archive (repository admin)
  restore-deleted  Installation operator (no --as needed): restore a deleted repository of any organisation within its recovery window (audited, organisation administrators notified)
  purge-now        Installation operator (no --as needed): start the permanent purge of a repository at once, skipping the recovery window and any approval rule (legal or abuse cases). Needs --confirm repeating the exact name and --reason (audited, administrators notified). Retention pins, legal holds and backups still refuse it
  list-deleted     Installation operator (no --as needed): every pending and restorable deletion
  list             Installation operator (no --as needed), read-only: every repository of the cell with its organisation, name, id, state (LIVE, PENDING_APPROVAL; with --include-deleted also RECOVERABLE, DELETING, DELETED), archived flag and creation time
  tombstone        Show the tombstone (state, purge job) of a deleted repository id
  purge-resume     Resume a purge the collector's anomaly guard stopped (tombstone phase GC_DISABLED), after investigating the anomaly: re-enables destructive collection for this deleted repository (audited) and queues a new purge attempt. Needs tenant_admin; a purge that is not stopped is shown unchanged
  help             Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help

tjet-admin repo delete

Delete a repository as organisation administrator `--as`: it disappears at once, its name stays reserved and it can be restored until the recovery window ends (`--deletion-recovery-days`, the installation's setting); then the maintenance pass starts the permanent purge. Needs --confirm repeating the exact name. Under an organisation's second-admin rule the answer is PENDING_APPROVAL

Usage: tjet-admin repo delete [OPTIONS] --confirm <CONFIRM> <REPO>

Arguments:
  <REPO>  

Options:
      --confirm <CONFIRM>        
      --request-id <REQUEST_ID>  Reuse to replay an interrupted request exactly
  -h, --help                     Print help

tjet-admin repo archive

Archive a repository (read-only, reversible); `--unarchive` reverses it. Deleting does not need it (`repo delete` hides the repository at once). Needs the same right as the web's archive (repository admin)

Usage: tjet-admin repo archive [OPTIONS] <REPO>

Arguments:
  <REPO>  

Options:
      --unarchive  
  -h, --help       Print help

tjet-admin repo restore-deleted

Installation operator (no --as needed): restore a deleted repository of any organisation within its recovery window (audited, organisation administrators notified)

Usage: tjet-admin repo restore-deleted <REPOSITORY_ID>

Arguments:
  <REPOSITORY_ID>  

Options:
  -h, --help  Print help

tjet-admin repo purge-now

Installation operator (no --as needed): start the permanent purge of a repository at once, skipping the recovery window and any approval rule (legal or abuse cases). Needs --confirm repeating the exact name and --reason (audited, administrators notified). Retention pins, legal holds and backups still refuse it

Usage: tjet-admin repo purge-now --confirm <CONFIRM> --reason <REASON> <REPOSITORY_ID>

Arguments:
  <REPOSITORY_ID>  

Options:
      --confirm <CONFIRM>  
      --reason <REASON>    
  -h, --help               Print help

tjet-admin repo list-deleted

Installation operator (no --as needed): every pending and restorable deletion

Usage: tjet-admin repo list-deleted

Options:
  -h, --help  Print help

tjet-admin repo list

Installation operator (no --as needed), read-only: every repository of the cell with its organisation, name, id, state (LIVE, PENDING_APPROVAL; with --include-deleted also RECOVERABLE, DELETING, DELETED), archived flag and creation time

Usage: tjet-admin repo list [OPTIONS]

Options:
      --prefix <PREFIX>  Only repositories whose name starts with this
      --include-deleted  Also deleted repositories (restorable ones and purged tombstones)
  -h, --help             Print help

tjet-admin repo tombstone

Show the tombstone (state, purge job) of a deleted repository id

Usage: tjet-admin repo tombstone <REPOSITORY_ID>

Arguments:
  <REPOSITORY_ID>  

Options:
  -h, --help  Print help

tjet-admin repo purge-resume

Resume a purge the collector's anomaly guard stopped (tombstone phase GC_DISABLED), after investigating the anomaly: re-enables destructive collection for this deleted repository (audited) and queues a new purge attempt. Needs tenant_admin; a purge that is not stopped is shown unchanged

Usage: tjet-admin repo purge-resume <REPOSITORY_ID>

Arguments:
  <REPOSITORY_ID>  

Options:
  -h, --help  Print help

tjet-admin mirror

Live mirrors, installation operator; needs no --as

Usage: tjet-admin mirror <COMMAND>

Commands:
  add   Register a live read-only mirror of SOURCE (host/owner/repo) in organisation --org (its handle or id; an unknown one fails) without being its member: the same checks as `tjet mirror add` (a public mirror only in the installation's public-mirror organisation), the repository bound to the operator (its creator; the mirror sync acts as it), audited in the organisation as `audit.mirror_registered` by this operator. Idempotent for the same source and settings
  help  Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help

tjet-admin mirror add

Register a live read-only mirror of SOURCE (host/owner/repo) in organisation --org (its handle or id; an unknown one fails) without being its member: the same checks as `tjet mirror add` (a public mirror only in the installation's public-mirror organisation), the repository bound to the operator (its creator; the mirror sync acts as it), audited in the organisation as `audit.mirror_registered` by this operator. Idempotent for the same source and settings

Usage: tjet-admin mirror add [OPTIONS] --org <ORG> <SOURCE>

Arguments:
  <SOURCE>  

Options:
      --org <ORG>                
      --private                  A private mirror of the organisation (default: shared public mirror)
      --name <NAME>              Repository name (default: the source's repository name)
      --branch <BRANCH>          Branch to follow (default: the upstream's default branch)
      --request-id <REQUEST_ID>  Reuse to replay an interrupted request exactly
  -h, --help                     Print help

tjet-admin showcase

Build showcase, installation operator; needs no --as

Usage: tjet-admin showcase <COMMAND>

Commands:
  configure  Create or replace a showcase from a `showcase.configure` request body (JSON file; a missing request_id is minted). Same checks as the API (runner-owned Bazel flags refused)
  enqueue    Queue runs of one upstream commit (default modes warm and incremental)
  rows       The rows of a showcase, newest first (also disabled ones and private mirrors: the operator's view before publication). --format csv prints the export CSV
  help       Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help

tjet-admin showcase configure

Create or replace a showcase from a `showcase.configure` request body (JSON file; a missing request_id is minted). Same checks as the API (runner-owned Bazel flags refused)

Usage: tjet-admin showcase configure <FILE>

Arguments:
  <FILE>  

Options:
  -h, --help  Print help

tjet-admin showcase enqueue

Queue runs of one upstream commit (default modes warm and incremental)

Usage: tjet-admin showcase enqueue [OPTIONS] <SOURCE> <COMMIT>

Arguments:
  <SOURCE>  
  <COMMIT>  

Options:
      --mode <MODES>               
      --observed-ms <OBSERVED_MS>  
  -h, --help                       Print help

tjet-admin showcase rows

The rows of a showcase, newest first (also disabled ones and private mirrors: the operator's view before publication). --format csv prints the export CSV

Usage: tjet-admin showcase rows [OPTIONS] <SOURCE>

Arguments:
  <SOURCE>  

Options:
      --limit <LIMIT>    
      --format <FORMAT>  [default: json]
  -h, --help             Print help

tjet-admin cell

Cell authority (T017): epoch fencing and the read-only switch. Needs tenant_admin; recorded in the acting tenant's audit log. Opens the cell even when it is read-only

Usage: tjet-admin cell <COMMAND>

Commands:
  status               Show the stored cell authority record (epoch, read-only flag)
  advance-epoch        Advance the authority epoch from exactly --from to --from + 1. Every server opened at the old epoch is fenced: it can no longer accept revisions or publish (restart it). A retry after the epoch already reached --from + 1 succeeds without advancing again
  set-read-only        Turn the cell read-only switch on or off (idempotent). While on, no server accepts or publishes, and tjetd refuses to start
  raise-min-reader     The contract step that opens FoundationDB-tier writes: raise the cell's minimum reader generation (2; 3 lets job and session records carry their tenant). Only once every tjetd, tjet-worker and tjet-admin of the installation runs this version: older binaries refuse the cell from then on
  close-metadata-tier  The first step of a downgrade below D-981: close the FoundationDB metadata tier (no new kind-1 write commits from then on). `raise-min-reader` reopens it
  lower-min-reader     The last step of a downgrade below D-981: lower the minimum reader generation (1). Refused unless the tier is closed and no repository has rows in schema 2. Below 3 it also strips the tenant from job and session records; lowering to 2 needs no metadata-tier step
  add                  Register (or update) a cell in the routing directory. A cell in the directory's cluster also gets its directory reference (it keeps its `("dir", ...)` rows in the directory cell); the cell is created if it does not exist
  list                 List the cells and the routing version
  keygen               Generate the installation's routing key (Ed25519): writes the private key (PKCS#8, mode 0600) for tjetd's TJET_ROUTING_KEY_FILE and registers the public key
  move-org             Move an organisation (with its repositories, issues, mirrors and labels) to another cell, or resume an interrupted move
  move-status          Show a move (by id) or the moves of an organisation, or every move
  rollback             Roll a move back: before activation stop it (source writable again); after activation and within the retention window move the organisation back
  move-verify          Compare the retained source copy with the target (after activation)
  move-purge           Purge the retained source copy (after the retention window, or --force)
  align-version        Advance a cell's cluster version past another cell's (before a move between clusters; FoundationDB recovers the advanced cluster once)
  help                 Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help

tjet-admin cell status

Show the stored cell authority record (epoch, read-only flag)

Usage: tjet-admin cell status

Options:
  -h, --help  Print help

tjet-admin cell advance-epoch

Advance the authority epoch from exactly --from to --from + 1. Every server opened at the old epoch is fenced: it can no longer accept revisions or publish (restart it). A retry after the epoch already reached --from + 1 succeeds without advancing again

Usage: tjet-admin cell advance-epoch --from <FROM>

Options:
      --from <FROM>  
  -h, --help         Print help

tjet-admin cell set-read-only

Turn the cell read-only switch on or off (idempotent). While on, no server accepts or publishes, and tjetd refuses to start

Usage: tjet-admin cell set-read-only <STATE>

Arguments:
  <STATE>  [possible values: on, off]

Options:
  -h, --help  Print help

tjet-admin cell raise-min-reader

The contract step that opens FoundationDB-tier writes: raise the cell's minimum reader generation (2; 3 lets job and session records carry their tenant). Only once every tjetd, tjet-worker and tjet-admin of the installation runs this version: older binaries refuse the cell from then on

Usage: tjet-admin cell raise-min-reader <GENERATION>

Arguments:
  <GENERATION>  

Options:
  -h, --help  Print help

tjet-admin cell close-metadata-tier

The first step of a downgrade below D-981: close the FoundationDB metadata tier (no new kind-1 write commits from then on). `raise-min-reader` reopens it

Usage: tjet-admin cell close-metadata-tier

Options:
  -h, --help  Print help

tjet-admin cell lower-min-reader

The last step of a downgrade below D-981: lower the minimum reader generation (1). Refused unless the tier is closed and no repository has rows in schema 2. Below 3 it also strips the tenant from job and session records; lowering to 2 needs no metadata-tier step

Usage: tjet-admin cell lower-min-reader <GENERATION>

Arguments:
  <GENERATION>  

Options:
  -h, --help  Print help

tjet-admin cell add

Register (or update) a cell in the routing directory. A cell in the directory's cluster also gets its directory reference (it keeps its `("dir", ...)` rows in the directory cell); the cell is created if it does not exist

Usage: tjet-admin cell add [OPTIONS] --api-url <API_URL> --content-store <CONTENT_STORE> <NAME>

Arguments:
  <NAME>  

Options:
      --api-url <API_URL>
          Base URL of the cell's API servers (relocation answers name it)
      --content-store <CONTENT_STORE>
          Identity of the cell's content store (cells of one move must name the same)
      --cell-cluster-file <CELL_CLUSTER_FILE>
          Cluster file of the cell (default: the directory's)
      --state <STATE>
          [default: ACTIVE] [possible values: ACTIVE, DRAINING, RETIRED]
  -h, --help
          Print help

tjet-admin cell list

List the cells and the routing version

Usage: tjet-admin cell list

Options:
  -h, --help  Print help

tjet-admin cell keygen

Generate the installation's routing key (Ed25519): writes the private key (PKCS#8, mode 0600) for tjetd's TJET_ROUTING_KEY_FILE and registers the public key

Usage: tjet-admin cell keygen [OPTIONS] --out <OUT>

Options:
      --out <OUT>        
      --key-id <KEY_ID>  [default: routing-1]
  -h, --help             Print help

tjet-admin cell move-org

Move an organisation (with its repositories, issues, mirrors and labels) to another cell, or resume an interrupted move

Usage: tjet-admin cell move-org [OPTIONS]

Options:
      --org <ORG>
          Organisation id or handle (with --to)
      --to <TO>
          Target cell (with --org)
      --resume <RESUME>
          Resume this move instead of starting one
      --retain-secs <RETAIN_SECS>
          Read-only retention of the source copy (rollback window), seconds [default: 86400]
      --version-wait-ms <VERSION_WAIT_MS>
          Wait this long for the target cluster's version to pass the source's, ms [default: 10000]
  -h, --help
          Print help

tjet-admin cell move-status

Show a move (by id) or the moves of an organisation, or every move

Usage: tjet-admin cell move-status [OPTIONS]

Options:
      --move <ID>  
      --org <ORG>  
  -h, --help       Print help

tjet-admin cell rollback

Roll a move back: before activation stop it (source writable again); after activation and within the retention window move the organisation back

Usage: tjet-admin cell rollback --move <ID>

Options:
      --move <ID>  
  -h, --help       Print help

tjet-admin cell move-verify

Compare the retained source copy with the target (after activation)

Usage: tjet-admin cell move-verify --move <ID>

Options:
      --move <ID>  
  -h, --help       Print help

tjet-admin cell move-purge

Purge the retained source copy (after the retention window, or --force)

Usage: tjet-admin cell move-purge [OPTIONS] --move <ID>

Options:
      --move <ID>  
      --force      
  -h, --help       Print help

tjet-admin cell align-version

Advance a cell's cluster version past another cell's (before a move between clusters; FoundationDB recovers the advanced cluster once)

Usage: tjet-admin cell align-version --cell <CELL> --past <PAST>

Options:
      --cell <CELL>  
      --past <PAST>  
  -h, --help         Print help

tjet-admin schema

Schema generation and migrations: status, and `migrate` (ordered, resumable steps, then the contract that raises the minimum reader and the write fence; one-way). Direct FoundationDB access like `cell`; opens a read-only cell for `status`

Usage: tjet-admin schema <COMMAND>

Commands:
  status   Stored generation, minimum reader, write fence, this binary's generation, pending steps and an interrupted migration. Exit 0; `migration_needed` says whether to migrate
  migrate  Run the pending migration steps of this binary's generation in batches, resuming an interrupted migration, then contract: older binaries refuse to open the cell and, if still running, to write. Run it only once every tjetd, tjet-worker and tjet-admin of the installation runs this version. There is no downgrade afterwards (restore a backup)
  help     Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help

tjet-admin schema status

Stored generation, minimum reader, write fence, this binary's generation, pending steps and an interrupted migration. Exit 0; `migration_needed` says whether to migrate

Usage: tjet-admin schema status

Options:
  -h, --help  Print help

tjet-admin schema migrate

Run the pending migration steps of this binary's generation in batches, resuming an interrupted migration, then contract: older binaries refuse to open the cell and, if still running, to write. Run it only once every tjetd, tjet-worker and tjet-admin of the installation runs this version. There is no downgrade afterwards (restore a backup)

Usage: tjet-admin schema migrate [OPTIONS]

Options:
      --batch <BATCH>              Items per batch transaction [default: 500]
      --max-batches <MAX_BATCHES>  Stop after this many batches (resume with another call); exit 3 when stopped early
  -h, --help                       Print help

tjet-admin audit-chain

Tamper-evident audit chain (spec 10 §6): installation-wide, needs no --as

Usage: tjet-admin audit-chain <COMMAND>

Commands:
  seal    Seal pending audit entries into hash-chained blocks (maintenance also does this)
  verify  Recompute every sealed block of every shard; exit 1 with INTEGRITY_ERROR on any modified, removed or inserted entry. Prints each shard's head digest: record it outside FoundationDB to detect a wholesale rewrite later
  help    Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help

tjet-admin audit-chain seal

Seal pending audit entries into hash-chained blocks (maintenance also does this)

Usage: tjet-admin audit-chain seal

Options:
  -h, --help  Print help

tjet-admin audit-chain verify

Recompute every sealed block of every shard; exit 1 with INTEGRITY_ERROR on any modified, removed or inserted entry. Prints each shard's head digest: record it outside FoundationDB to detect a wholesale rewrite later

Usage: tjet-admin audit-chain verify

Options:
  -h, --help  Print help

tjet-admin pii

Personal data at rest: installation-wide, needs no --as

Usage: tjet-admin pii <COMMAND>

Commands:
  reseal  Re-seal every stored email address of a sign-in method under the active key of --pii-key-file (key rotation; also converts rows stored in the clear before ID-7). Exit 1 with INTEGRITY_ERROR when a row was sealed with a key the file no longer holds
  help    Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help

tjet-admin pii reseal

Re-seal every stored email address of a sign-in method under the active key of --pii-key-file (key rotation; also converts rows stored in the clear before ID-7). Exit 1 with INTEGRITY_ERROR when a row was sealed with a key the file no longer holds

Usage: tjet-admin pii reseal

Options:
  -h, --help  Print help

tjet-admin invite

Installation invitations (B1): invite an address to the installation without an organisation, also when self-service signup is off. The link is mailed through the outbox (tjetd with TJET_SMTP_RELAY delivers it) and is never printed; it creates one account for exactly that address. Needs --pii-key-file and --public-origin (create), no --as

Usage: tjet-admin invite <COMMAND>

Commands:
  create  Invite EMAIL; prints the invitation id, masked address and expiry
  list    The installation invitations (masked addresses, states, accounts created)
  revoke  A pending invitation stops working
  help    Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help

tjet-admin invite create

Invite EMAIL; prints the invitation id, masked address and expiry

Usage: tjet-admin invite create [OPTIONS] --email <EMAIL>

Options:
      --email <EMAIL>          
      --ttl-hours <TTL_HOURS>  Lifetime in hours (1 to 720) [default: 168]
  -h, --help                   Print help

tjet-admin invite list

The installation invitations (masked addresses, states, accounts created)

Usage: tjet-admin invite list

Options:
  -h, --help  Print help

tjet-admin invite revoke

A pending invitation stops working

Usage: tjet-admin invite revoke --id <ID>

Options:
      --id <ID>  The invitation id from `create` or `list`
  -h, --help     Print help

tjet-admin org

Organisations, installation operator; needs no --as

Usage: tjet-admin org <COMMAND>

Commands:
  rename  Rename an organisation and/or change its display name, as `org.update` does for its administrators: the old handle is retired (redirects for members, never reassigned), repository ids and remotes are unchanged; audited in the organisation's log. Refused for a personal organisation (rename the account) and for one still being created
  help    Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help

tjet-admin org rename

Rename an organisation and/or change its display name, as `org.update` does for its administrators: the old handle is retired (redirects for members, never reassigned), repository ids and remotes are unchanged; audited in the organisation's log. Refused for a personal organisation (rename the account) and for one still being created

Usage: tjet-admin org rename [OPTIONS] <ORG>

Arguments:
  <ORG>  The organisation: its id, or its current or a retired handle

Options:
      --handle <HANDLE>  The new handle
      --name <NAME>      The new display name
      --allow-reserved   Allow a reserved brand name (`trunkjet`, `tjet`, `tjet-*`, `trunkjet-*`, the operator's TJET_RESERVED_NAMES_FILE) for the installation's own organisation. Route words, one-character names and look-alikes stay refused. Needs --reason, which is audited
      --reason <REASON>  Why the reserved name is claimed (audited; 3..=500 bytes)
  -h, --help             Print help

tjet-admin account

Accounts, installation operator; needs no --as

Usage: tjet-admin account <COMMAND>

Commands:
  rename  Rename an account's handle, as `account.update` does for its owner: the old handle is retired (redirects for people who share an organisation, never reassigned)
  help    Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help

tjet-admin account rename

Rename an account's handle, as `account.update` does for its owner: the old handle is retired (redirects for people who share an organisation, never reassigned)

Usage: tjet-admin account rename [OPTIONS] --handle <HANDLE> <ACCOUNT>

Arguments:
  <ACCOUNT>  The account: its id or its current handle

Options:
      --handle <HANDLE>  The new handle
      --allow-reserved   Allow a reserved brand name (see `org rename --allow-reserved`)
      --reason <REASON>  Why the reserved name is claimed (audited; 3..=500 bytes)
  -h, --help             Print help

tjet-admin agents

Installation-wide agent switch (AG-1, D-1807; spec 22 §3.4): `off` stops every agent request and grant refresh in every organisation until `on`. Needs no --as

Usage: tjet-admin agents <STATE>

Arguments:
  <STATE>  [possible values: on, off]

Options:
  -h, --help  Print help

tjet-admin installation

Whole installations on this cluster. Names its target explicitly and ignores the global --installation/--cell; opens no cell and needs no --as

Usage: tjet-admin installation <COMMAND>

Commands:
  purge       Remove every row of an installation from the cluster: its Directory Layer tree `nscm/<NAME>` (every cell, including the account directory) and its cell link keys, in one transaction. For aborted or retired installations whose content store is already gone; there is no undo (restore an FDB backup). Refused (exit 4) when a cell's lease clock advanced within --idle-secs or changes during --observe-secs (a tjetd serves it), for a --protect name, or when the installation changes under the purge; exit 2 when --confirm does not repeat the name. --dry-run runs every check and prints the plan and the key/byte count without writing. Audit lines go to stderr
  list        List every installation of the cluster, largest first: cells, estimated bytes (FDB byte sample), last activity (newest lease clock or commit marker), whether a tjetd serves it now (lease clock within 30 s), and what `purge-idle` with the same --idle-secs/--protect would decide. Read-only
  purge-idle  Purge every installation idle for at least --idle-secs: no lease clock and no commit marker newer than the window, not served, not protected. Installations without either signal are never selected. Candidates are watched for --observe-secs, then each is purged in its own transaction that refuses if it changed. Content stores are not touched. --dry-run prints the selection only
  help        Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help

tjet-admin installation purge

Remove every row of an installation from the cluster: its Directory Layer tree `nscm/<NAME>` (every cell, including the account directory) and its cell link keys, in one transaction. For aborted or retired installations whose content store is already gone; there is no undo (restore an FDB backup). Refused (exit 4) when a cell's lease clock advanced within --idle-secs or changes during --observe-secs (a tjetd serves it), for a --protect name, or when the installation changes under the purge; exit 2 when --confirm does not repeat the name. --dry-run runs every check and prints the plan and the key/byte count without writing. Audit lines go to stderr

Usage: tjet-admin installation purge [OPTIONS] --installation <NAME> --confirm <CONFIRM>

Options:
      --installation <NAME>          The installation to remove (required; the global --installation is not used)
      --confirm <CONFIRM>            Repeat the installation name exactly
      --dry-run                      Check and print what would be removed; write nothing
      --protect <PROTECT>            Never purge this installation (repeatable; also TJET_PROTECTED_INSTALLATIONS, comma-separated) [env: TJET_PROTECTED_INSTALLATIONS=]
      --idle-secs <IDLE_SECS>        A lease clock advanced within this many seconds of this host's clock counts as live [default: 900]
      --observe-secs <OBSERVE_SECS>  Watch the lease clocks this long for a change (at least 2) [default: 3]
  -h, --help                         Print help

tjet-admin installation list

List every installation of the cluster, largest first: cells, estimated bytes (FDB byte sample), last activity (newest lease clock or commit marker), whether a tjetd serves it now (lease clock within 30 s), and what `purge-idle` with the same --idle-secs/--protect would decide. Read-only

Usage: tjet-admin installation list [OPTIONS]

Options:
      --protect <PROTECT>      Never select this installation (repeatable; `name*` matches a prefix; also TJET_PROTECTED_INSTALLATIONS, comma-separated) [env: TJET_PROTECTED_INSTALLATIONS=]
      --idle-secs <IDLE_SECS>  Idle window for the `idle_sweep` column [default: 21600]
  -h, --help                   Print help

tjet-admin installation purge-idle

Purge every installation idle for at least --idle-secs: no lease clock and no commit marker newer than the window, not served, not protected. Installations without either signal are never selected. Candidates are watched for --observe-secs, then each is purged in its own transaction that refuses if it changed. Content stores are not touched. --dry-run prints the selection only

Usage: tjet-admin installation purge-idle [OPTIONS]

Options:
      --protect <PROTECT>
          Never purge this installation (repeatable; `name*` matches a prefix; also TJET_PROTECTED_INSTALLATIONS, comma-separated) [env: TJET_PROTECTED_INSTALLATIONS=]
      --idle-secs <IDLE_SECS>
          Idle for at least this many seconds (at least 900) [default: 21600]
      --observe-secs <OBSERVE_SECS>
          Watch the candidates this long for a change (at least 2) [default: 3]
      --dry-run
          Select and print; write nothing
      --max <MAX>
          At most this many installations in this run (largest first) [default: 5000]
      --confirm-cluster <CONFIRM_CLUSTER>
          Repeat the description of the --cluster-file (the part before `:`); required unless --dry-run, so the sweep never runs against a cluster by accident
  -h, --help
          Print help

tjet-admin principal-resolve-contested

Resolve a principal id that is active in two tenants of the cell (D-1230: contested, it signs in to neither): keep it in the --home tenant and disable the other tenant's principal with this id. Installation operator action (needs no --as); refused unless the id is contested and --home is one of its two tenants; audited in both tenants

Usage: tjet-admin principal-resolve-contested --id <ID> --home <HOME>

Options:
      --id <ID>      
      --home <HOME>  
  -h, --help         Print help

tjet-admin service

Service principals of an organisation and their refreshable credentials: presubmit and showcase runners. Installation operator action; needs no --as. The organisation is named by its handle (an unknown one fails; nothing is created from a name that does not resolve). Every action is audited in the organisation

Usage: tjet-admin service <COMMAND>

Commands:
  create      Create service principal NAME in the organisation (idempotent) and bind it with --role in each --repo (`org/repo`, all in that organisation)
  list        The organisation's service principals
  credential  
  help        Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help

tjet-admin service create

Create service principal NAME in the organisation (idempotent) and bind it with --role in each --repo (`org/repo`, all in that organisation)

Usage: tjet-admin service create [OPTIONS] --org <ORG> --repo <REPOS> <NAME>

Arguments:
  <NAME>  

Options:
      --org <ORG>     The organisation's handle (`@acme` or `acme`)
      --repo <REPOS>  Repository `org/name` (repeatable, at least one)
      --role <ROLE>   Repository role: reader (default), developer or auditor (never one that integrates or administers) [default: reader]
  -h, --help          Print help

tjet-admin service list

The organisation's service principals

Usage: tjet-admin service list --org <ORG>

Options:
      --org <ORG>  
  -h, --help       Print help

tjet-admin service credential

Usage: tjet-admin service credential <COMMAND>

Commands:
  issue   Issue a refreshable credential of service NAME and write it to --out (created, mode 0600, format tjet-service-token-v1): its access token lives 2 hours and refreshes itself after `tjet login --token-file`; the refresh secret rotates on every use
  list    The organisation's service credentials (never a secret)
  revoke  Revoke a credential: its tokens stop at the next request
  help    Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help

tjet-admin service credential issue

Issue a refreshable credential of service NAME and write it to --out (created, mode 0600, format tjet-service-token-v1): its access token lives 2 hours and refreshes itself after `tjet login --token-file`; the refresh secret rotates on every use

Usage: tjet-admin service credential issue [OPTIONS] --org <ORG> --server <SERVER> --out <OUT> <NAME>

Arguments:
  <NAME>  

Options:
      --org <ORG>        
      --server <SERVER>  The API URL the runner uses (the file's token is only ever sent there), e.g. the in-cluster https://trunkjet-tjetd-c1.trunkjet.svc:8640
      --out <OUT>        The file to create (must not exist)
      --days <DAYS>      Lifetime of the credential in days (1 to 365) [default: 90]
      --repo <REPOS>     Scope it to these of the service's repositories (default: all of them)
  -h, --help             Print help

tjet-admin service credential list

The organisation's service credentials (never a secret)

Usage: tjet-admin service credential list [OPTIONS] --org <ORG>

Options:
      --org <ORG>    
      --name <NAME>  Only this service's
  -h, --help         Print help

tjet-admin service credential revoke

Revoke a credential: its tokens stop at the next request

Usage: tjet-admin service credential revoke --org <ORG> <CREDENTIAL_ID>

Arguments:
  <CREDENTIAL_ID>  

Options:
      --org <ORG>  
  -h, --help       Print help

tjet-admin principal-bind

Bind an imported (inactive) principal to an external identity and activate it

Usage: tjet-admin principal-bind --bind-issuer <BIND_ISSUER> --bind-subject <BIND_SUBJECT> <PRINCIPAL_ID>

Arguments:
  <PRINCIPAL_ID>  

Options:
      --bind-issuer <BIND_ISSUER>    
      --bind-subject <BIND_SUBJECT>  
  -h, --help                         Print help