The CLI provides a way to do the problems on exercism.io.
Important: If you're looking for instructions on how to install the CLI. Please read Installing the CLI
This CLI ships as a binary with no additional runtime requirements. This means that if you're doing the Haskell problems on exercism you don't need a working Python or Ruby environment simply to fetch and submit exercises.
Go version 1.6 or higher
Follow the directions on http://golang.org/doc/install
- fork this repo
go get github.com/exercism/cli/exercism
cd $GOPATH/src/github.com/exercism/cli
git remote set-url origin https://github.com/<your-github-username>/cli
go get -t ./...
- Make the change.
- Submit a pull request.
Please provide tests for the changes where possible.
To run the tests locally, use go test ./...
At the moment the CLI commands are not tested, so if you're adding a new command don't worry too hard about tests.
If you want to test a change by using your own fork to try exercism
commands,
such as exercism fetch
or exercism submit
, against the exercism.io site, it
is advisable that you set up and run a local development environment,
and configure the CLI to submit to your local machine, which would let you
easily delete and recreate submissions, without fear of breaking the exercism.io
site.
To build the binary for your platform run
go install github.com/exercism/cli/exercism
or
go build -o out/exercism exercism/main.go
The resulting binary can be found in out/exercism
(Linux, Mac OS X) or out/exercism.exe
(Windows).
In order to cross-compile for all platforms, run bin/build-all
. The binaries
will be built into the release
directory.
- Language is the name of a programming language. E.g. C++ or Objective-C or JavaScript.
- Track ID is a normalized, url-safe identifier for a language track. E.g.
cpp
orobjective-c
orjavascript
. - Problem is an exercism exercise.
- Problem Slug is a normalized, url-safe identifier for a problem.
- Iteration is a solution that a user has written for a particular problem in a particular language track. A user may have several iterations for the same problem.