The following table lists the currently supported CLI commands.(Table. %s <cli_commands_table>
).
Commands | Description |
---|---|
tensorbay_cli/cli_commands:gas auth |
authentication operations. |
tensorbay_cli/cli_commands:gas config |
config operations |
tensorbay_cli/cli_commands:gas dataset |
dataset operations. |
tensorbay_cli/cli_commands:gas ls |
list operations. |
tensorbay_cli/cli_commands:gas cp |
copy operations. |
tensorbay_cli/cli_commands:gas rm |
remove operations. |
tensorbay_cli/cli_commands:gas draft |
draft operations. |
tensorbay_cli/cli_commands:gas commit |
commit operations. |
tensorbay_cli/cli_commands:gas tag |
tag operations. |
tensorbay_cli/cli_commands:gas log |
log operations. |
tensorbay_cli/cli_commands:gas branch |
branch operations |
Work with authentication operations.
Authenticate the accesskey of the TensorBay account. If the accesskey is not provided, interactive authentication will be launched.
$ gas auth [ACCESSKEY]
Get the authentication information.
$ gas auth --get [--all]
Unset the authentication information.
$ gas auth --unset [--all]
Work with configuration operations.
gas config
supports modifying the configurations about network request and editor.
Add a single configuration, see the available keys and corresponding values about network request at request_configuration<advanced_features/request_configuration:Request Configuration>
.
$ gas config [key] [value]
For example:
$ gas config editor vim
$ gas config max_retries 5
Show all the configurations.
$ gas config
Show a single configuration.
$ gas config [key]
For example:
$ gas config editor
Unset a single configuration.
$ gas config --unset <key>
For example:
$ gas config --unset editor
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>
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<reference/glossary:revision>
.
$ gas ls tb:<dataset_name>@<revision>
List the segments of a specific dataset draft.
See tensorbay_cli/cli_commands: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>
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 tensorbay_cli/cli_commands: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
, which is the target path on TensorBay. The local_path
can refer to only one file.
$ gas cp <local_path> tb:<dataset_name>#<draft_number>:<segment_name>://<remote_path>
Work with remove operations.
Remove a segment.
The target dataset must be in draft status, see tensorbay_cli/cli_commands:gas draft
for more information.
$ gas rm -r tb:<dataset_name>#<draft_number>:<segment_name>
Remove a file.
$ gas rm tb:<dataset_name>#<draft_number>:<segment_name>://<remote_path>
Work with reference/glossary:draft
operations.
Create a draft with a title.
$ gas draft tb:<dataset_name> [-m <title>]
List the drafts of a dataset.
$ gas draft -l tb:<dataset_name>
Edit the draft of a dataset.
$ gas draft -e tb:<dataset_name>#<draft_number> [-m <title>]
Close the draft of a dataset.
$ gas draft -c tb:<dataset_name>#<draft_number>
Work with commit operations.
Commit a reference/glossary:draft
with a title.
$ gas commit tb:<dataset_name>#<draft_number> [-m <title>]
Work with reference/glossary:tag
operations.
Create a tag on the current commit or a specific revision<reference/glossary: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>
Work with log operations.
Show the commit logs.
$ gas log tb:<dataset_name>
Show commit logs from a certain reference/glossary: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>
Show commit logs of all revisions.
$ gas log --all tb:<dataset_name>
Show graphical commit logs.
$ gas log --graph tb:<dataset_name>
Work with reference/glossary:branch
operations.
Create a new branch from the default branch.
$ gas branch tb:<dataset_name> <branch_name>
Create a new branch from a certain reference/glossary: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>