Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/manrajgrover/hackerearth-cli
CLI for compiling and running code on HackerEarth
https://github.com/manrajgrover/hackerearth-cli
cli hackerearth hackerearth-api nodejs
Last synced: 7 days ago
JSON representation
CLI for compiling and running code on HackerEarth
- Host: GitHub
- URL: https://github.com/manrajgrover/hackerearth-cli
- Owner: manrajgrover
- License: mit
- Created: 2016-05-24T11:39:06.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-12T13:38:00.000Z (over 6 years ago)
- Last Synced: 2024-10-05T14:47:23.368Z (5 months ago)
- Topics: cli, hackerearth, hackerearth-api, nodejs
- Language: JavaScript
- Size: 3.58 MB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# HackerEath-CLI
[](https://travis-ci.org/manrajgrover/HackerEarth-CLI) [](https://www.npmjs.com/package/hackerearth-cli) [](https://www.npmjs.com/package/hackerearth-cli) 
> CLI for compiling and running code using [HackerEarth API](https://www.hackerearth.com/docs/api/developers/code/legacy/).## Demo

## Install
Run the following command
```shell
$ npm install -g hackerearth-cli
```## API Key
You can get your HackerEarth API Key by visiting [HackerEath API](https://www.hackerearth.com/api/register/) page.
## Usage
### Commands available
```shell
$ hackerearthCommands:
run Run code on HackerEarth server
compile Compile code on HackerEarth server
config Change config fileOptions:
-h, --help Show help [boolean]```
#### Command `run`
```shell
$ hackerearth runOptions:
-h, --help Show help [boolean]
-s, --source Source Code file path [required]
-i, --input Input file path [required]
-l, --language Language. Change `config` for default.
-o, --output Output file path [required]Examples:
hackerearth run -s A.cpp -i Input00.in -o Output.txt -l CPP11```
#### Command `compile`
```shell
$ hackerearth compileOptions:
-h, --help Show help [boolean]
-s, --source Source Code file path [required]
-l, --language Language. Change `config` for default.Examples:
hackerearth compile -s A.cpp -l CPP11
```#### Command `config`
Run `$ sudo hackerearth config` to change configuration of your installation. This includes default language and API Key.```shell
$ sudo hackerearth config [options]Options:
-h, --help Show help [boolean]
-l, --list List language and their code [boolean]Examples:
sudo hackerearth config -l
```## Development
Run:
```sh
$ git clone https://github.com/manrajgrover/HackerEarth-CLI.git
$ cd HackerEarth-CLI
$ npm link
```This will setup a symbolic link to the CLI. Any changes in source files will now be reflected when running the `hackerearth` command.
To lint your code, run
```sh
$ npm run lint
```## License
[MIT](https://github.com/manrajgrover/HackerEarth-CLI/blob/master/LICENSE) © [Manraj Singh](https://github.com/manrajgrover)