exo provenance add

Table of Contents

Full exo provenance add --help output, generated from exo-cli v0.145.1.

Create one provenance record from flags and write it as a new file
under .exohub/provenance/.

Paths are resolved to content identifiers from the index: an annex key for
annexed files, a git blob id for git files, or a git tree id for a folder
path ending in "/" (a folder collection). Untracked paths, and paths whose
worktree content differs from the index, are rejected with a hint to run
'exo add' first; for a folder, every file under it must be tracked and
unchanged. Nothing is written on rejection.

--generated collection:<name> resolves .exohub/collections/<name>.json (a
named collection manifest, listing "paths"/"globs") at the worktree+index,
and writes a Collection node with every resolved member's content id in
hadMember; a manifest path that is untracked, missing or whose worktree
content differs from the index is rejected the same way an ordinary
--generated path is, naming the offending member.

--revision-of links a generated entity to a previous version with
wasRevisionOf: an IRI is taken as-is, '<ref>:<path>' resolves path at that
ref (a folder's previous tree id, for example), 'collection:<name>' and
'<ref>:collection:<name>' resolve a named collection the same way
--generated does (at the worktree+index, or at ref, respectively), and a
plain path resolves from the index like the other flags. A --revision-of
value that resolves to the same id as a --generated entity is rejected: an
entity cannot be a revision of itself, and an unchanged path usually means
'<ref>:<path>' was meant instead.

The person agent defaults to the exo login identity (preferred_username as
the identifier, the token's full name as a label). Without a login token,
pass --agent person:<unix id>. An AI agent or tool identifies itself with
--agent software:<name>, optionally --model and --on-behalf-of
person:<unix id>.

Beyond the plain used/wasGeneratedBy/hadPlan shortcuts above, --role
role=path and --output-role role=path state the role an input or output
entity played (a qualifiedUsage/qualifiedGeneration node alongside the
required shortcut); --param name=value and --result name=value record a
step's typed parameters and non-file results as value entities used or
generated with hadRole the parameter/result name (the value keeps its JSON
type: a bare number or true/false parses as that type, anything else is
kept as a string); --environment <path-or-IRI> records the software
environment (for example docker://host/image@sha256:...) as an input with
hadRole "environment"; --plan-repository, --plan-commit and --plan-url
state a traceable pointer to the --plan entity's code. Without --plan, a
pointer is synthesized: --plan-repository plus --plan-commit identifies it
(with --plan-url, if given, as its label, for example the script or
process name), or --plan-url alone identifies it when --plan-url is itself
an addressable URL; --source <iri> sets the activity's hadPrimarySource,
for a record describing a run captured elsewhere. Using any of these marks
the record with exo:minVersion.

This command never modifies an existing record file; a correction is a new
record with --supersedes.

Before writing, each --generated entity is checked against existing
provenance (worktree records, including untracked ones): if a
non-superseded record already states wasGeneratedBy for it, add fails and
writes nothing, naming the conflicting record. Pass --supersedes with that
record's id to replace it (the correction workflow), or --skip-existing to
drop already-covered --generated entries and write a record for the rest —
if every entity is already covered, --skip-existing writes nothing and
exits 0, so a generation loop can be re-run safely.

Usage:
  exo provenance add [flags]


Flags:
      --agent string               person:<unix id> or software:<name> asserting this record; defaults to the exo login identity
      --assertion string           recorded, imported or asserted (default "asserted")
      --derived-from stringArray   path or IRI the generated entities were derived from (repeatable); defaults to --used
      --dry-run                    print the record that would be written; write and stage nothing
      --ended string               activity end time (RFC3339)
      --environment stringArray    path or IRI of the software environment used by this activity (repeatable), for example docker://host/image@sha256:...
      --evidence string            evidence for an inferred claim (exo:evidence)
      --generated stringArray      path generated by this activity (repeatable); a folder path must end in "/"; collection:<name> resolves a named collection's manifest (.exohub/collections/<name>.json)
  -h, --help                       help for add
      --json                       emit machine-readable JSON
      --model string               model identifier for a software agent (exo:model)
      --no-derived-from            do not record a wasDerivedFrom relationship
      --on-behalf-of string        person:<unix id> the software agent acted on behalf of
      --output-role stringArray    role=path the role a --generated entity played as an output of this activity (repeatable)
      --param stringArray          name=value parameter used by this activity (repeatable); value is parsed as JSON when possible, else kept as a string
      --plan string                path or IRI of the plan (script, workflow) that was run (hadPlan)
      --plan-commit string         commit of the plan's code in its repository (exo:commit)
      --plan-repository string     git repository URL hosting the plan's code (exo:repository)
      --plan-url string            the plan's addressable URL, or its script/process path within --plan-repository (label)
      --result stringArray         name=value non-file result generated by this activity (repeatable); value is parsed as JSON when possible, else kept as a string
      --revision-of stringArray    path, IRI, collection:<name>, or <ref>:<path>/<ref>:collection:<name>, this generated entity is a revision of (repeatable)
      --role stringArray           role=path the entity played as an input of this activity (repeatable)
      --skip-existing              drop --generated entries that already have provenance instead of failing; exit 0 and write nothing if none remain
      --source string              IRI of the run this activity was recorded from elsewhere (hadPrimarySource)
      --started string             activity start time (RFC3339)
      --supersedes stringArray     record id this record supersedes (repeatable)
      --used stringArray           path or IRI used as input by this activity (repeatable)

Global Flags:
      --config-dir string   Root directory for all config, cache and credentials (overrides EXO_CONFIG_DIR)
      --context string      Use specific context (overrides selected context)

Docs for agents (llms.txt): https://genentech.github.io/exohub/llms.txt

Full manual: https://genentech.github.io/exohub/docs/reference/cli/exo-provenance-add/