hwy
A friendly command-line tool for SuperHi.
Goals
The goals of the project are:
- Provide an terminal-based interface to SuperHi
- Act as a learning tool for students (to contribute to and to use)
- Support all platforms SuperHi students use: macOS, Windows, and Linux
Usage
$ npm install -g @jack_jennings/hwy
$ hwy COMMAND
running command...
$ hwy (-v|--version|version)
@jack_jennings/hwy/0.1.2 darwin-x64 node-v8.4.0
$ hwy --help [COMMAND]
USAGE
$ hwy COMMAND
...
Commands
hwy help [COMMAND]
display help for hwy
USAGE
$ hwy help [COMMAND]
ARGUMENTS
COMMAND command to show help for
OPTIONS
--all see all commands in CLI
See code: @oclif/plugin-help
hwy login
Logs in to SuperHi
USAGE
$ hwy login
OPTIONS
-h, --help show CLI help
-p, --password=password account password
-u, --username=username account username
EXAMPLES
$ hwy login -u eisenhower -p ********
$ hwy login -u eisenhower
$ hwy login
See code: src/commands/login.ts
hwy projects
Lists projects created in the SuperHi editor
USAGE
$ hwy projects
OPTIONS
-h, --help show CLI help
See code: src/commands/projects.ts
Development
After checking out the repository, run npm install
to install dependencies. Tests are defined with mocha (some with fancy-test) and can be run with npm test
.
All code should be cleaned up with tslint
before being committed. The test command checks that all of the code conforms to the style rules.
Adding a Command
The oclif framework provides a command for scaffolding new commands:
npx oclif command NAME # <- where NAME is the name of the command
There is a command
module that provides some shared functionality in a base class. Each command in hwy
should inherit from this base class, which requires modifying the code the above command generates.
// Change the import from @oclif to command module
// import {Command, flags} from '@oclif/command'
import {flags} from '@oclif/command'
import {Command} from '../command'
Releasing
Releases are made with the following npm
commands. This process will package the command for each platform and publish to the npm
registry.
npm version (major|minor|patch) # bumps version, updates README, adds git tag
npm publish
Additional information can be found in the Release oclif documenation.
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/jackjennings/hwy. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
License
This tool is available as open source under the terms of the MIT License.
Code of Conduct
Everyone interacting in the hwy project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.