Installing and updating the CLI

Prerequisites

Attini CLI depends on:

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

  2. Configured AWS CLI credentials

If you ever used the AWS CLI in your AWS accounts before this step is already finished.


Installation and update

Admin/Root installation

rm -f /usr/local/bin/attini; curl -L#o /usr/local/bin/attini https://docs.attini.io/api/v1/cli/get-cli/$(uname -m)/$(uname -s)/latest; chmod +x /usr/local/bin/attini

Verify the installation


Non Admin/Root installation

  1. Create or find a directory in your home folder that is on your system path

  2. Configure the script below with your path from step 1

LOCAL_PATH=~/bin
rm -f ${LOCAL_PATH}/attini; curl -L#o ${LOCAL_PATH}/attini https://docs.attini.io/api/v1/cli/get-cli/$(uname -m)/$(uname -s)/latest; chmod +x ${LOCAL_PATH}/attini

Verify the installation


Trouble shot the installation

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

  1. Run uname -m and uname -s in your terminal and verify that your computer is supported by the Attini CLI, see Supported platforms.

  2. If your computer should be supported but are still having issue, please report this to support@attini.io.

  3. 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.


Setup 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:

Mac users who use zsh

echo 'source <(attini generate-completion)' >> ~/.zshrc

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.

Linux and Mac users who use bash

echo 'source <(attini generate-completion)' >> ~/.bashrc

Create a directory on your path that does not require root/admin access

The example blow will create a directory called “bin” in your one home. This is a standard directory for non root binary’s, however you can name your directory whatever you like.


Mac users who use zsh

LOCAL_PATH=~/bin
mkdir -p $LOCAL_PATH
export PATH="$HOME/bin:$PATH"
echo 'export PATH="$HOME/bin:$PATH"' >> ~/.zshrc

Linux and Mac users who use bash

LOCAL_PATH=~/bin
mkdir -p $LOCAL_PATH
export PATH="$HOME/bin:$PATH"
echo 'export PATH="$HOME/bin:$PATH"' >> ~/.bashrc

Verify the installation

Verify the installation by running:

attini --version

Supported operating systems and CPU architectures

Attini CLI works the operating systems:

  • Darwin (Mac)

  • Linux

Attini CLI works the CPU architectures:

  • x86_64

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.


CLI Information API

List the available operating systems and cpu architectures:

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

Get available CLI versions:

curl https://docs.attini.io/api/v1/cli/get-cli-versions/{cpu_architcture}/{operating_systems}

Examples:

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 CLI location:

curl https://docs.attini.io/api/v1/cli/get-cli/{cpu_architcture}/{operating_systems}/{version}

Examples:

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/1.0.1
curl https://docs.attini.io/api/v1/cli/get-cli/x86_64/Darwin/1.0.0