For AI agents: the complete documentation index is available at https://docs.gage.io/llms.txt, the full documentation bundle is available at https://docs.gage.io/llms-full.txt, and this page is available as Markdown at https://docs.gage.io/commands/dataset.md.

gage dataset

The gage dataset command manages datasets. A dataset is a set of stored sessions and attachments that a scan runs over. gage scan creates a dataset from its session selection unless given one with --dataset. For background, see Scans.

gage dataset <COMMAND>

Commands that take dataset IDs accept unique ID prefixes and tag names.

dataset add

Add a dataset.

gage dataset add [OPTIONS] [SESSION]...

Without session arguments or selection options, the command adds an empty dataset. With them, the selected native sessions are added to the store and linked into the new dataset in a single step.

OptionDescription
-N, --native <SOURCE>Session source, as described in gage session
-p, --project <PROJECT>Limit sessions to a project path or name
--touches <DIR>Limit sessions to those that touch a directory, as described in gage session add
--since <SINCE>Select sessions active within a duration (e.g. 1h, 30m, 7d)
-a, --allSelect every available session
-n, --limit <N>Select the latest N sessions
-r, --sample <N>Select N sessions at random
--max-size <SIZE>Maximum stored size per session. Overrides storage.max_session_size.
-t, --tag <NAME>Tag the new dataset
--force-tagMove the tag if it exists
-y, --yesSkip confirmation prompt

To add sessions to an existing dataset, use gage session add --dataset. To add attachments, use gage attachment add --dataset. To add sessions and attachments already in the store, use gage dataset link.

dataset refresh

Re-add each dataset session from its source.

gage dataset refresh [OPTIONS] <DATASET>

Every member is re-read from the source. A session whose native content grew is updated in place. This is equivalent to running gage session add -d DATASET on every member’s native ID.

OptionDescription
-N, --native <SOURCE>Session source
--max-size <SIZE>Maximum stored size per session
-y, --yesSkip confirmation prompt

dataset list

List datasets.

gage dataset list [OPTIONS]

The listing shows each dataset’s session and attachment counts, tags, and origin. A dataset a scan created records that scan as its origin.

OptionDescription
-m, --moreShow more items. Repeat to show more per use.
-a, --allShow all items
-n, --limit <LIMIT>Limit the number of items shown (default: 20)
--full-idShow the full dataset ID

dataset show

Show a dataset: its tags, sessions, attachments, and the scans that ran over it.

gage dataset show <DATASET>

dataset delete

Delete datasets.

gage dataset delete [OPTIONS] <IDS>...

Member sessions and the scan runs that used the dataset are kept unless --sessions is given.

OptionDescription
--sessionsAlso remove member sessions from the store. A session another dataset holds is kept.
-y, --yesSkip confirmation prompt

Add stored sessions and attachments to a dataset.

gage dataset link [OPTIONS] <DATASET> <OBJECT>...

Each object is already in the store and is given as a tag, an ID, or a unique ID prefix. A session takes a member slot. An object that is already a member advances to its current commit.

OptionDescription
-y, --yesSkip confirmation prompt

Remove sessions and attachments from a dataset.

gage dataset unlink [OPTIONS] <DATASET> <OBJECT>...

The objects stay in the store.

OptionDescription
-y, --yesSkip confirmation prompt