Install the Attini CLI

Installation time: ca 1 minute

Prerequisites

The Attini CLI depends on:

  1. The AWS CLI (If you are using AWS SSO you need AWS CLI version 2).
  2. Configured AWS CLI credentials.

Installation the Attini CLI

/bin/bash -c "$(curl -fsSL https://docs.attini.io/blob/attini-cli/install-cli.sh)"

Get started by running:

attini --help

To install the Attini Framework using the CLI, see install the Attini Framework.

Installation options

To use some of our installation options, you need to download the script and apply the desired flags:

curl -fsSO https://docs.attini.io/blob/attini-cli/install-cli.sh
chmod +x install-cli.sh
./install-cli.sh # [ -t installation target directory ] [ -v attini cli version ] [ -s silent ] [ -n no hints ]  [ -d debug ]

After the installation, it’s safe to delete the installation script (rm install-cli.sh)

-t

Type: String

The directory to which the script will save the Attini CLI.

This directory should be on you system PATH.

If this flag is omitted, the script will check if:

  • You are NOT acting as root.
  • The directory $HOME/bin exists.
  • The directory $HOME/bin is on you system PATH.

If all of the above is true, the script will save the Attini CLI to $HOME/bin, if not, the Attini CLI will be saved to /usr/local/bin which requires privileged access (root/admin).

Required: No

Default: $HOME/bin || /usr/local/bin

-v

Type: String

The version of the Attini CLI. Find available versions with the API, or in our Change log.

Required: No

Default: latest

-s

Silent; do not print download progress bar or info logging.

Required: No

Default: false

-n

No hints; do not print hints.

Required: No

Default: false

-d

Debug, will set x flag in the script for debugging.

Required: No

Default: false

Example
# Download and make executable
curl -fsSO https://docs.attini.io/blob/attini-cli/install-cli.sh
chmod +x install-cli.sh

# Install Attini CLI in $HOME/exe, with the latest version, and don't print logging and hints
./install-cli.sh -t "$HOME/exe" -v "latest" -s

# Clean up the script
rm -f install-cli.sh

Setup Attini CLI autocomplete

After you installed the Attini CLI, you can activate autocomplete by running this command:

source <(attini generate-completion)

If you have any issues with this command, see our common issues section.

To automatically run this command in new shells do the following:

RC_FILE=~/."${SHELL##*/}"rc;
echo "Adding attini auto complete to $RC_FILE"
echo 'source <(attini generate-completion)' >> $RC_FILE;
Note

If you are using zsh you might get this warning:

zsh compinit: insecure directories, run compaudit for list.
Ignore insecure directories and continue [y] or abort compinit [n]?

Fix this with this script:

compaudit | xargs chmod go-w

This command limits the access to some system files that zsh warns you about. We recommend that you do your own research regarding this issue or talk to your company’s systems administrators for approval before applying this fix.


Trouble shot the installation

If the Attini CLI is not working, please follow these steps:

  1. See if you can find the error in our common issues section.
  2. Run uname -m and uname -s in your terminal and verify that your computer is supported by the Attini CLI, see supported platforms.
  3. If your computer should be supported but is still having issue, please report this to support@attini.io.
  4. If your computer is not supported, please send a feature request to us on support@attini.io.

Windows installation

The Attini CLI does not currently support Windows. We recommend Windows users to use Windows Subsystem for Linux then follow the Linux installation guide. Running Linux on a virtual machine ex, virtualbox is also a viable option.


Manual installation

The Attini CLI is a pre-compiled executable available at:

https://docs.attini.io/api/v1/cli/get-cli/$(uname -m)/$(uname -s)/latest

The uname -m represent your current CPU architecture.

The uname -s represent your current operating system.

Find more information about supported CPU architectures and operating systems here.

latest represents the Attini CLI version, you can find more information about the available versions using our CLI API CLI change log.

To install the Attini CLI, you have to:

  1. Download the CLI.
  2. Put it in a directory on your system path.

Verify the installation

Verify the installation by running:

attini --version

Uninstall the Attini CLI

To uninstall the Attini CLI you just need to delete the attini file.

rm $(command -v attini)

If you have enabled Attini CLI autocomplete, you should remove the line source <(attini generate-completion) from your startup file (~/.bashrc or ~/.zshrc).


Supported operating systems and CPU architectures

The Attini CLI works on the following operating systems and CPU architectures:

  • Linux running on x86_64 architecture
  • Linux running on aarch64/arm64 architecture
  • Darwin (Mac) running on x86_64 architecture
  • Darwin (Mac) running on aarch64/arm64 architecture (Requires Rosetta 2, find more information here).
Note

We plan to build support for more operating systems and CPU architectures. If you have any requirements please send an email to support@attini.io and we will try to prioritize accordingly.

You can find your operating system and CPU Architecture by running uname -s and uname -m in a terminal. Please include this information in the support email.


Attini CLI Information API

List the available operating systems and cpu architectures:

curl https://docs.attini.io/api/v1/cli/get-supported-platforms

Get available Attini CLI versions:

curl https://docs.attini.io/api/v1/cli/get-cli-versions/{cpu_architecture}/{operating_systems}
Example
curl https://docs.attini.io/api/v1/cli/get-cli-versions/$(uname -m)/$(uname -s)
curl https://docs.attini.io/api/v1/cli/get-cli-versions/x86_64/Linux
curl https://docs.attini.io/api/v1/cli/get-cli-versions/x86_64/Darwin

Get re-routed to the Attini CLI location:

curl https://docs.attini.io/api/v1/cli/get-cli/{cpu_architecture}/{operating_systems}/{version}
Example
curl https://docs.attini.io/api/v1/cli/get-cli/$(uname -m)/$(uname -s)/latest
curl https://docs.attini.io/api/v1/cli/get-cli/x86_64/Linux/2.5.9
curl https://docs.attini.io/api/v1/cli/get-cli/x86_64/Darwin/2.5.8

Find additional info at our changelog.