CLI overview
AIS CLI is the Swiss‑army knife for managing and monitoring every aspect of an AIStore cluster’s lifecycle — from initial bootstrap to day‑to-day operations, and from single-object I/O to distributed ML workflows.
In addition, CLI provides dataset management commands, performance monitoring, advanced operations, and more.
The entire (diverse and growing) command set is partitioned into top-level namespaces:
CLI namespaces
Hit <TAB> after typing ais and Bash/Zsh completion reveals namespaces — self‑contained toolboxes such as
bucket, cluster, etl, performance, or ml namespace (introduced in v3.30), and so on.
Drill into any namespace with <TAB> and --help to discover its verbs, flags, and usage examples.
ais show
Given an existing AIS instance, maybe the very first command you run would be ais show cluster. For example:
Use
--verboseto additionally showLOAD AVERAGEcolumns.
Press <TAB-TAB> to see all
ais showsubcommands:
Next, monitoring-wise, you’d maybe run ais show performance, etc.
Table of contents
- Getting Started
- CLI Reference
- CLI Config
- Environment variables
- First steps
- Global options
- Backend Provider
- Verbose errors
- Special keywords
- CLI Help Paging
AIS command-line interface (CLI) is a tool to easily manage and monitor every aspect of the AIS clusters’ lifecycle.
In addition, CLI provides dataset management commands, reading and writing primitives, and more.
Getting Started
To build CLI from the source, run the following two steps:
To build with debug, run:
Alternatively, install directly from GitHub:
For example, the following command extracts CLI binary to the specified destination and, secondly, installs bash autocompletions:
For more usage options, run: ./scripts/install_from_binaries.sh --help
You can also install bash and/or zsh autocompletions separately at any (later) time:
To uninstall autocompletions, follow the install_autocompletions.sh generated prompts, or simply run bash autocomplete/uninstall.sh.
Please note: using CLI with autocompletions enabled is strongly recommended.
Once installed, you should be able to start by running ais <TAB-TAB>, selecting one of the available (completion) options, and repeating until the command is ready to be entered.
TL;DR: see section CLI reference below to quickly locate useful commands. There’s also a (structured as a reference) list of CLI resources with numerous examples and usage guides that we constantly keep updating.
TIP: when starting with AIS, ais search command may be especially handy. It will list all possible variations of a command you are maybe looking for - by exact match, synonym, or regex.
See also:
The rest of the README assumes that user’s
PATHenvironment variable contains$GOPATH/bindirectory. Runexport PATH=$PATH:$GOPATH/binif this is not the case. You can find more about $GOPATH environment here.
CLI Reference
The recommended and quickest way to get started with CLI is to type ais and press <TAB-TAB>:
These are the current set of top-level commands. Each command has its own extended help (the --help option) and, usually, multiple sub-commands
(which, in turn, have their respective inline helps and subcommands).
The list of top-level commands provides an overview of the supported functionality and functional grouping. The following is a brief (non-exhaustive and possibly slightly outdated) summary:
Other CLI documentation:
ais help- Reference guide
- Monitoring
- Cluster and node management
- Mountpath (disk) management
- Attach, detach, and monitor remote clusters
- Start, stop, and monitor downloads
- Distributed shuffle
- User account and access management
- Jobs
Note: In CLI docs, the terms “xaction” and “job” are used interchangeably.
CLI Config
Notice:
- CLI configuration directory:
$HOME/.config/ais/cli - CLI configuration filename:
cli.json - Reset:
ais config cli reset - One‑liner view:
ais config cli --json | jq .
For the most updated system filenames and configuration directories, please see
fname/fname.gosource.
When used the very first time, or if the $HOME/.config/ais/cli/cli.json does not exist, the latter will be created with default parameters:
CLI config can be updated using ais config cli set command or even simply by changing the config file.
The next time you run it CLI will use the updated values.
To get back to system defaults, run ais config cli reset.
Environment variables
First and foremost, there’s AIS_ENDPOINT. If defined, it’ll take precedence over “cluster.url” (section CLI Config above).
Example:
In addition, environment can be used to override client-side TLS (aka, HTTPS) configuration - the knobs “client_crt”, etc. also listed in the table below:
Further references
- Generating self-signed certificates
- Deploying: 4 targets, 1 gateway, 6 mountpaths, AWS backend
- Accessing HTTPS-based cluster
- Testing with self-signed certificates
- Observability: TLS related alerts
- Updating and reloading X.509 certificates
- Switching cluster between HTTP and HTTPS
First steps
To get the list of supported commands, run:
Alternatively, you could start making use of auto-completions by typing
aisand pressing TAB key two times in a row.
To check if the CLI can correctly contact the cluster and to get cluster status, run following command:
Global options
Besides a set of options specific for each command, AIS CLI provides global options:
--no-color- by default AIS CLI displays messages with colors (e.g, errors are printed in red color). Colors are automatically disabled if CLI output is redirected or environment variableTERM=dumbis set. To disable colors in other cases, pass--no-colorto the application.
Please note that the place of a global options in the command line is fixed. Global options must follow the application name directly. At the same time, the location of a command-specific option is arbitrary: you can put them anywhere. Examples:
Backend Provider
The syntax provider://BUCKET_NAME (referred to as BUCKET in help messages) works across all commands.
For more details, please refer to each specific command’s documentation.
provider:// can be omitted if the default_provider config value is set (in such case the config value will be used implicitly).
Supported backend providers currently include:
ais://- AIStore provideraws://ors3://- Amazon Web Servicesazure://oraz://- Azure Blob Storagegcp://orgs://- Google Cloud Storageht://- HTTP(S) datasets
See also:
Verbose errors
CLI uses AIS API to execute operations on a cluster.
Of course, a remote API call - any API call, for that matter - may return errors. For developers, it may be sometimes useful to see a complete and unredacted error information.
Here’s an example where we are trying to rename a non-existing bucket:
But here’s how it’ll look once we put CLI in verbose mode:
Special keywords
“none” (ref apc.ResetToken) is a broad convention to clear (nullify, reset, empty) config fields - examples include:
- feature flags
- log modules (as in:
ais config cluster log) backend_bckproperty of a bucket (see usage/example)- slices (a.k.a. multi-value fields) embedded in nested configuration structures (e.g., “auth.required_claims.aud”, “auth.oidc.allowed_iss”, etc.).
and more.
CLI Help Paging
To view help content page-by-page, CLI uses the more command. Disable this by setting no_more to true in your configuration.