Skip to content

Tinker Box CLI

CLI

Most users will find it convenient to use Tinker boxes directly from their web browser. However, for those super users who require advanced functionalities, we offer the Tinker Command Line Interface (CLI). The Tinker CLI allows you to easily start, stop and connect to your Tinker box from your terminal.

Installation

MacOS

Run the command below in your terminal:

curl -OL https://github.com/axiotl/tinker-cli/releases/latest/download/tinker_darwin_amd64 && mv tinker_darwin_amd64 /usr/local/bin/tinker && chmod +x /usr/local/bin/tinker

Or download the binary here

Windows

Download the installer from the link below, launch the installer and follow the installation instructions

Windows Installer

After add the executable’s location to the PATH:

  1. Go to Setting > System > About > Advanced System Settings > Environment Variables
  2. In the upper list, double click “Path” and click New
  3. Enter “C:\Program Files (x86)\Axiotl” (without quotes)
  4. Press Ok and close the settings

Linux

Run the command below in your terminal:

curl -OL https://github.com/axiotl/tinker-cli/releases/latest/download/tinker_linux_amd64 && mv tinker_linux_amd64 /usr/local/bin/tinker && chmod +x /usr/local/bin/tinker

Or download the binary here, and copy it to a location on your PATH (e.g. /usr/local/bin)

Usage

After installation, verify your installation is correct by typing:

tinker

directly into your terminal. You will see a list of available commands printed in your console. Continue to login using your credentials by typing the following command:

tinker login

Enter your email address, then check your email for your one-time use password. After logging in, type the following command to view a table of available tinker boxes:

tinker ls
NAMESTATUSIP ADDRESS
testlabstopped-

Whether you are starting your tinker box for the first time or resuming your tinker box after a break, you will use tinker resume to change the status of your tinker box from “stopped” to “running”.

For example:

tinker resume testlab

Wait a moment, then confirm that your tinker box is running by typing tinker ls once again.

tinker ls

NAMESTATUSIP ADDRESS
testlabrunning-

Once your tinker box is running, connect to it by typing tinker connect ‘name-of’tinkerbox’

If you receive a message regarding host authenticity, type yes and hit enter. Once you see the welcome message, you’ll know you’re connected.

/,
///, AXIOTL INC
/////, This is your own little computer.
///°´|// Lab data is read-only, but you're
´ '/ encouraged to re-write scripts.

CLI Tinker Box Actions

CommandDescription
tinker lsList available Tinker Boxes
tinker resume <name>Start a Tinker Box
tinker pause <name>Stop a Tinker Box
tinker connect <name>Connect to a Tinker Box

Terminal Completion

The Tinker CLI supports terminal completion for several shells

Note: If you are on MacOS, you are probably using ZSH as your default shell, not bash. You can find out by typing echo $SHELL in your terminal.

ZSH

Oh My Zsh
  • Create completions directory if you don’t have it
mkdir -p ~/.oh-my-zsh/completions
  • Download the completion script
curl -L https://github.com/axiotl/tinker-cli/releases/latest/download/zsh_completions -o ~/.oh-my-zsh/completions/_tinker
Manual Installation
  • Create completions directory if you don’t have it. If you already have a completions directory, you can skip this step.
mkdir -p ~/.zsh/completions
  • Download the completion script
curl -L https://github.com/axiotl/tinker-cli/releases/latest/download/zsh_completions -o ~/.zsh/completions/_tinker
  • Update fpath in your .zshrc
echo 'fpath=(~/.zsh/completions $fpath)' >> ~/.zshrc
  • Rebuild zcompdump:
rm -f ~/.zcompdump; compinit

Bash

  • Add script contents to

    • ~/.bash_completion:
    curl -L https://github.com/axiotl/tinker-cli/releases/latest/download/bash_completions >> ~/.bash_completion
    • or /etc/bash_completion.d/tinker:
    curl -L https://github.com/axiotl/tinker-cli/releases/latest/download/bash_completions -o /etc/bash_completion.d/tinker