Skip to content

The shell

The shell can be accessed over ssh by running:

ssh shell

It doesn't matter what user name you connect with, but you need to use an ssh key associated to your account. If you've followed the Getting Started guide, shell access should be working.

readline support

The shell doesn't yet have support for command history or many other features that you could expect from a proper shell. However, you can use the rlwrap program to mitigate this:

rlwrap ssh shell

This will make things like Up/Down arrow keys and CTRL-R to work as you would expect.


The greeting screen showed each time you log in to the shell also includes a list of all top-level commands:

••••••• •••••••

Welcome to!

This shell allows you to administer your account
and retrieve information about your nix builds.

Account name: bob
Free build time left: 49:59:59

Available shell commands:

  help       Show help
  list       List entities
  show       Show details about entities
  usage      Show resource usage
  ssh-keys   Manage your public ssh keys

Run 'help COMMAND' for help on individual shell commands.
For help on subcommands run 'COMMAND SUBCOMMAND --help'.

Check Your Account Usage

To see how much you've been using, run the usage command:> usage

Resources used since 2020-08-01
Build count       : 386
Successful builds : 288
Wall time         : 06:04:29
CPU time          : 37:49:20
Input size        : 10.5 GB
Output size       : 1.9 GB

By default, your usage for the current month is shown. You can also show last month's usage with the -l option, and total usage with the -t option:> usage -h
usage - Show resource usage

Usage: usage [(-t|--total) | (-l|--last-month) | (-m|--this-month)]

Available options:
  -t,--total               Show total usage
  -l,--last-month          Show last month's usage
  -m,--this-month          Show this month's usage (default)
  -u,--show-unbilled       Also include usage that won't be billed (restarted
                           builds etc)
  -h,--help                Show this help text

The most interesting number shown by the usage command is the CPU time, which is the sum of the wall time multiplied with the CPU count for every build. This is the time you will be charged for.

Manage SSH Keys

You can list, add and remove ssh keys associated with your account using the ssh-keys command:

ssh-keys - Manage your public ssh keys

Usage: ssh-keys SUBCOMMAND

Available options:
  -h,--help                Show this help text

Available subcommands:
  list                     List ssh keys
  add                      Add a key
  remove                   Remove a key

List Builds

Use the command list builds -r to list your currently running builds:> list builds -r
70196 2020-08-23 21:05:10Z 3.21 s 1 CPU [In queue]

70195 2020-08-23 21:05:10Z 3.66 s 1 CPU [In queue]

70194 2020-08-23 21:05:09Z 3.40 s 4 CPUs [Running]

70193 2020-08-23 21:05:08Z 4.18 s 2 CPUs [Running]

Remove the -r option to also show historic builds. By default, at most 500 builds are listed, but that can be adjusted with the -l option.