CLI Commands

The following table lists the currently supported CLI commands.(Table. 4).

Table 4 CLI Commands

Commands

Description

gas dataset

dataset operations.

gas ls

list operations.

gas cp

copy operations.

gas rm

remove operations.

gas draft

draft operations.

gas commit

commit operations.

gas tag

tag operations.

gas log

log operations.

gas branch

branch operations

gas dataset

Work with dataset operations.

Create a dataset.

gas dataset tb:[dataset_name]

List all datasets.

gas dataset

Delete a dataset.

gas dataset -d tb:[dataset_name]

gas ls

Work with list operations.

List the segments of a dataset.(default branch)

gas ls tb:[dataset_name]

List the segments of a specific dataset revision.

gas ls tb:[dataset_name]@[revision]

List the segments of a specific dataset draft.

See gas draft for more information.

gas ls tb:[dataset_name]#[draft_number]

List all files of a segment.

gas ls tb:[dataset_name]:[segment_name]
gas ls tb:[dataset_name]@[revision]:[segment_name]
gas ls tb:[dataset_name]#[draft_number]:[segment_name

Get a certain file.

gas ls tb:[dataset_name]:[segment_name]://[remote_path]
gas ls tb:[dataset_name]@[revision]:[segment_name]://[remote_path]
gas ls tb:[dataset_name]#[draft_number]:[segment_name]://[remote_path]

gas cp

Work with copy operations.

Upload a file to a segment. The local_path refers to a file.

The target dataset must be in draft status, see gas draft for more information.

gas cp [local_path] tb:[dataset_name]#[draft_number]:[segment_name]

Upload files to a segment. The local_path refers to a directory.

gas cp -r [local_path] tb:[dataset_name]#[draft_number]:[segment_name]

Upload a file to a segment with a given remote_path. The local_path can only refer to a file.

gas cp [local_path] tb:[dataset_name]#[draft_number]:[segment_name]://[remote_path]

gas rm

Work with remove operations.

Remove a segment.

The target dataset must be in draft status, see gas draft for more information.

gas rm -r tb:[dataset_name]#[draft_number]:[segment_name]

Remove a file.

gas rm tb:[dataset_name]@[revision]:[segment_name]://[remote_path]

gas draft

Work with draft operations.

Create a draft with a title.

gas draft tb:[dataset_name] -t [title]

List the drafts of a dataset.

gas draft -l tb:[dataset_name]

gas commit

Work with commit operations.

Commit a draft with a message.

gas commit tb:[dataset_name]#[draft_number] -m [message]

gas tag

Work with tag operations.

Create a tag on the current commit or a specific revision.

gas tag tb:[dataset_name] [tag_name]
gas tag tb:[dataset_name]@[revision] [tag_name]

List all tags.

gas tag tb:[dataset_name]

Delete a tag.

gas tag -d tb:[dataset_name]@[tag_name]

gas log

Work with log operations.

Show the commit logs.

gas log tb:[dataset_name]

Show commit logs from a certain revision.

gas log tb:[dataset_name]@[revision]

Limit the number of commit logs to show.

gas log -n <number> tb:[dataset_name]
gas log --max-count <number> tb:[dataset_name]

Show commit logs in oneline format.

gas log --oneline tb:[dataset_name]

gas branch

Work with branch operations.

Create a new branch from the default branch.

gas branch tb:[dataset_name] [branch_name]

Create a new branch from a certain revision.

gas branch tb:[dataset_name]@[revision] [branch_name]

Show all branches.

gas branch tb:[dataset_name]

Delete a branch.

gas branch --delete tb:[dataset_name]@[branch_name]