LeetCode CLI for Gophers.
The leetgode CLI needs the authorization to execute some sub commands. Specifically, it needs LEETCODE_SESSION
, and csrftoken
.
- Open chrome and paste the link below to the chrome linkbar.
chrome://settings/cookies/detail?site=leetcode.com
- Copy the contents of
LEETCODE_SESSION
, andcsrftoken
. - Export below environment values by the use of
LEETCODE_SESSION
, andcsrftoken
.
export LEETCODE_SESSION=${LEETCODE_SESSION}
export LEETCODE_TOKEN=${csrftoken}
leetgode help
Usage: leetgode is leetcode cli for gophers.
SubCommands:
exec Submit solution
generate Generate the skeleton code with the test file by id
help Help shows usages
list List problems
pick Pick a problem by id
test Test solution
You can download binary from release page and place it in $PATH directory.
go get -u https://github.com/budougumi0617/leetgode/cmd/leetgode
If you want to install on macOS, you can use Homebrew.
brew install budougumi0617/tap/leetgode
- Fork (https://github.com/budougumi0617/leetgode/fork)
- Create a feature branch
- Commit your changes
- Rebase your local changes against the master branch
- Run test suite with the
go test ./...
command and confirm that it passes - Run
gofmt -s
- Create new Pull Request