Skip to content

LeetCode CLI for Gophers. This CLI can generate a skeleton code with test code.

License

Notifications You must be signed in to change notification settings

budougumi0617/leetgode

Repository files navigation

leetgode

PkgGoDev test

Description

LeetCode CLI for Gophers.

VS.

Requirement

The leetgode CLI needs the authorization to execute some sub commands. Specifically, it needs LEETCODE_SESSION, and csrftoken.

  1. Open chrome and paste the link below to the chrome linkbar.
    • chrome://settings/cookies/detail?site=leetcode.com
  2. Copy the contents of LEETCODE_SESSION, and csrftoken.
  3. Export below environment values by the use of LEETCODE_SESSION, and csrftoken.
export LEETCODE_SESSION=${LEETCODE_SESSION}
export LEETCODE_TOKEN=${csrftoken}

Usage

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

Install

You can download binary from release page and place it in $PATH directory.

go get

go get -u https://github.com/budougumi0617/leetgode/cmd/leetgode

macOS

If you want to install on macOS, you can use Homebrew.

brew install budougumi0617/tap/leetgode

Contribution

  1. Fork (https://github.com/budougumi0617/leetgode/fork)
  2. Create a feature branch
  3. Commit your changes
  4. Rebase your local changes against the master branch
  5. Run test suite with the go test ./... command and confirm that it passes
  6. Run gofmt -s
  7. Create new Pull Request

License

MIT

Author

Yoichiro Shimizu(@budougumi0617)

About

LeetCode CLI for Gophers. This CLI can generate a skeleton code with test code.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages