Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Install the CLI

The fastest way to get aviso is pip. The Python package bundles the CLI, so one install works even if you never write a line of Python.

From PyPI

pip install pyaviso
aviso --version

The wheel installs a console script that runs the Rust CLI in-process through the extension, so you do not need a Rust toolchain. See the Python install page for wheel coverage and details.

From crates.io

If you have a Rust toolchain and prefer a native binary:

cargo install aviso-cli
aviso --version

cargo install builds from source and puts the binary in ~/.cargo/bin/aviso. That directory is on your PATH when you installed Rust through rustup. Both install paths give you the same aviso command and behaviour.

From a git checkout

For an unreleased version, or when contributing:

git clone https://github.com/ecmwf/aviso-client.git
cd aviso-client
cargo install --path crates/aviso-cli

Verify

aviso --version
aviso --help

You should see the subcommands listed.

Where the binary lives

The binary is called aviso, not aviso-cli. The crate name carries the -cli suffix to leave the unprefixed aviso for the library, but the installed executable is plain aviso so it reads cleanly on the command line.

# Linux, macOS
which aviso
# pip install: <venv-or-user-base>/bin/aviso
# cargo install: /home/you/.cargo/bin/aviso

Shell completions

aviso completions <shell> prints a completion script for bash, zsh, fish or elvish. Save it where your shell looks for completions, then open a new shell. The right place depends on the shell and, for zsh, on how it is set up, so check the notes below if aviso <Tab> does nothing.

Run the commands with the same aviso you use day to day. If it lives in a virtual environment, activate it first; the script is generated by the binary, so it matches that version’s subcommands and flags.

Bash

mkdir -p ~/.local/share/bash-completion/completions
aviso completions bash > ~/.local/share/bash-completion/completions/aviso

This needs the bash-completion package, which most distributions install and load from /etc/bash.bashrc or /etc/profile.d. It picks up files in that directory by command name the first time you press Tab after the command. If complete -p aviso in a new shell says “no completion specification”, bash-completion is not loaded; install it, or source the file yourself from ~/.bashrc:

source ~/.local/share/bash-completion/completions/aviso

Zsh

Zsh only searches the directories in $fpath, and the file must be named _aviso. Which directory that is depends on your setup:

# Plain zsh: create the directory and add it to fpath before compinit in
# ~/.zshrc, then save the script there.
mkdir -p ~/.zsh/completions
aviso completions zsh > ~/.zsh/completions/_aviso
# in ~/.zshrc, above `compinit`:
#   fpath=(~/.zsh/completions $fpath)

# oh-my-zsh: its custom completions directory is already in fpath.
mkdir -p ~/.oh-my-zsh/custom/completions
aviso completions zsh > ~/.oh-my-zsh/custom/completions/_aviso

Zsh caches the list of completion functions in ~/.zcompdump. After adding a new file, delete that cache and start a new shell:

rm -f ~/.zcompdump*
exec zsh

To check it worked, whence -w _aviso in the new shell prints _aviso: function. If it prints nothing, the directory holding the file is not in $fpath; print -l $fpath lists the ones zsh searches.

Fish

aviso completions fish > ~/.config/fish/completions/aviso.fish

Fish loads the file on the next Tab; no restart is needed.

Elvish

aviso completions elvish > ~/.config/elvish/lib/aviso.elv

The script registers the completer when it is evaluated, so add eval (slurp < ~/.config/elvish/lib/aviso.elv) to ~/.config/elvish/rc.elv.

Upgrading

  • pip: pip install --upgrade pyaviso.
  • cargo: cargo install aviso-cli again. Cargo replaces the binary in place; add --force to rebuild from scratch.

Uninstalling

pip uninstall pyaviso        # pip install
cargo uninstall aviso-cli    # cargo install

A cargo-installed binary can also be deleted from ~/.cargo/bin/aviso by hand. Configuration and state files in ~/.config/aviso/ are left alone; remove them if you want a clean slate:

rm -rf ~/.config/aviso

What next