Linux

Installing the Exercism CLI

View the latest CLI release to choose and download the appropriate package for your operating system.

If you're unsure what architecture your processor has, the command uname -m should tell you.

Extract the binary using tar -xzvf FILENAME, e.g.

1
tar -xzvf exercism-linux-32bit.tgz

Place the binary in your PATH, e.g.:

1
2
3
mkdir ~/bin
mv exercism ~/bin/
export PATH=$HOME/bin:$PATH

You will want to stick the export PATH=$HOME/bin:$PATH line into your shell configuration. E.g. if your shell is bash, you could run:

1
echo 'export PATH=$HOME/bin:$PATH' >> ~/.bashrc

To check which shell you have, run echo $SHELL.

Package Managers

These are not officially supported, and sometimes (often) lag behind the latest release.

There's a freshports build, an AUR package, and an openSUSE package.

Verify

Verify that the binary was installed properly by running:

1
exercism --version

To see all the commands available to you, run exercism without any options:

1
exercism

Configuring the CLI

Configure the exercism client so that it knows which account to post your solutions to:

1
exercism configure --key=YOUR_API_KEY

Your exercism API key can be found in your account.

By default the CLI will fetch exercises to ~/exercism. You can configure a different directory by passing the --dir option:

1
exercism configure --dir=~/some/other/place

Setting up Exercism CLI completion (optional)

Bash

If you use a Bash shell, you can use the CLI Bash-completion script.

First download the script [view source]:

1
2
mkdir -p ~/.config/exercism/
curl http://cli.exercism.io/exercism_completion.bash > ~/.config/exercism/exercism_completion.bash

Load up the completion in your .bashrc, .bash_profile or .profile by adding the following snippet:

1
2
3
if [ -f ~/.config/exercism/exercism_completion.bash ]; then
  . ~/.config/exercism/exercism_completion.bash
fi

After opening a new Bash shell, you should be able to type exercism s then press Tab, and Bash completion will give you exercism submit.

Zsh

If you use a Zsh shell, you can use the CLI Zsh-completion script.

First download the script [view source]:

1
2
mkdir -p ~/.config/exercism/
curl http://cli.exercism.io/exercism_completion.zsh > ~/.config/exercism/exercism_completion.zsh

Load up the completion in your .zshrc, .zsh_profile or .profile by adding the following snippet:

1
2
3
if [ -f ~/.config/exercism/exercism_completion.zsh ]; then
  . ~/.config/exercism/exercism_completion.zsh
fi

If you are using the popular oh-my-zsh framework to manage your Zsh plugins, you don't need to add the above snippet, all you need to do is create a file exercism_completion.zsh inside ~/.oh-my-zsh/custom.

After opening a new Zsh shell, you should be able to type exercism s and Zsh completion will give you exercism submit.

Continue

You can now continue by choosing a language.

Uninstalling the Exercism CLI

Remove the file from the ~/bin directory with the following command:

1
rm ~/bin/exercism

Help

If you need help, view the help on exercism.io, join the exercism.io chat on gitter: Join the chat at https://gitter.im/exercism/support

Want to add more help topics?

The code for this documentation is in the exercism.io repository on GitHub. Submit a pull request or open an issue with suggestions!

(Check out the ./x/docs/cli.rb and ./app/views/site/cli.erb files.)