All in One (beta)

No need to install node.js. Now available on 64bits linux, mac, and windows.



Install the latest LTS version of node.js (npm included):

Check before going next:

$ node -v
$ npm -v


There are different ways to install leetcode-cli:

From npm

This will install the latest STABLE version, but not include the latest DEV version.

$ npm install -g leetcode-cli
$ leetcode version

In case Ubuntu failed due to permission denied, try following:

$ curl -o- | bash
$ source ~/.bashrc
$ nvm install --lts

Find more details here.

From GitHub

This will install the latest DEV version from GitHub repo.

$ npm install -g skygragon/leetcode-cli
$ leetcode version

From source

Similar with above, while you can introduce your own changes as you wish.

$ git clone
$ cd leetcode-cli && ./bin/install
$ leetcode version

From source (all-in-one)

$ git clone
$ cd leetcode-cli && node ./bin/pkg

From docker

NOTE: This is just a tiny taste to let you feel that leetcode-cli is. Please use other ways above to install leetcode-cli if you like it.

$ alias leetcode='docker run -it --rm skygragon/leetcode-cli'
$ leetcode version

To persistent user data, you can mount a folder like this:

$ alias leetcode='docker run -it --rm -v /Users/skygragon/data:/root skygragon/leetcode-cli'