Skip to content
tnhoang 🦁

How to download all exercism into your local

Programming, Productivity1 min read

Hi guys. I really like exercism when it has lots of test covered on each exercise.
However, downloading each exercise one by one pissed me off!

Then I found a way on Github that let us download them all at once.
Download all items for given track · Issue #718 · exercism/cli (github.com)
Big shout out for people in this thread!

Step 1: create new bash file with below content (Ex: vi download_exercism.sh)

1#!/usr/bin/env bash
2
3set -e
4set -u
5
6export track="$1"
7
8curl \
9 --silent --fail \
10 "https://exercism.org/api/v2/tracks/$track/exercises" \
11 | sed 's/"slug":"/\n/g' \
12 | sed 's/",.*$//' \
13 | grep -v '"exercises":' \
14 | while read -r slug; do
15 exercism download --track="$track" --exercise="$slug"
16 done

Step 2: make it executable

1chmod +x download_exercism.sh

Step 3: execute it with the track you want to download.

1./download_exercism.sh gleam

All exercises will be downloaded into your $HOME directory.

Note: if you got any error message related to the restriction of downloading lock exercises.
You have to click Disable Learning Mode to unlock all exercises before download them as the image below. Disable learning mode