🐚 asari
A human-friendly1 command line tool for the GitHub API.
1 It's script-friendly too.
Above: Use npx asari
in your shell to manage your work in GitHub.
"Asari" (あさり) is Japanese for "clam". Like a clam, asari
is happiest when it's inside a shell.
🐚 asari
lets you work with GitHub from your command line, and is delicious when lightly fried with garlic and spices.
Above: Running npx asari
from your command line shows you the top level of options and commands.
Above: Running npx asari <command>
shows you options for working with GitHub issues, projects and pull requests.
Installation
Global installation (recommmended)
npm install --global asari
When you run the tool, it will automatically notify you if there is a newer version of it available for you to update to.
You can disable notifications if you'd prefer not to be notified about updates.
No installation
npx asari
The npx
command lets you use this tool without installing it. However, each time you use npx
it downloads the whole package from the npm registry, which takes a while. That's why global installation is reccommended.
Note: If this tool is globally installed, npx asari
will use that globally installed version rather than downloading.
Commands
npx asari
npx asari <command>
npx asari --version
npx asari allowance
npx asari completion
Working with GitHub Issues
npx asari issues create <github-url> [--title] [--body] [--assignees]
npx asari issues open <github-url>
npx asari issues close <github-url>
npx asari issues list [--type]
npx asari issues list-for-repo <github-url>
Working with GitHub Projects
npx asari projects add [--column-url] [--url]
npx asari projects close <github-url>
npx asari projects create <github-url> [--body]
Working with GitHub Pull Requests
npx asari pulls close <github-url>
npx asari pulls create-comment <github-url> [--body]
npx asari pulls create-review-request <github-url> [reviewers|team-reviewers]
npx asari pulls create <github-url> [--base] [--body] [--title]
npx asari pulls delete-comment <github-url>
npx asari pulls delete-review-request <github-url> [reviewers|team-reviewers]
npx asari pulls merge <github-url> [--method]
npx asari pulls open <github-url>
Working with GitHub Repositories
npx asari repos list-topics <github-url>
npx asari repos <add-topics|remove-topics> <github-url> --topic new-app
npx asari repos <add-topics|remove-topics> <github-url> --topic new-app --topic good-one
npx asari repos <add-topics|remove-topics> <github-url> --topics new-app,good-one
npx asari repos <add-topics|remove-topics> <github-url> --topics "new-app, good-one"
Global Options
--json
--token
Note: You can omit the --token
argument, because it will default to $GITHUB_PERSONAL_ACCESS_TOKEN
.
In that case you will need to export the token to your environment:
export $GITHUB_PERSONAL_ACCESS_TOKEN=[your token here]
Developers
Command hierarchy and directory structure
This project loosely follows the example provided in the Yargs documentation for command hierarchy and directory structure.
Conventions
CamelCase, hyphen-case and under_scores
- All yargs commands and filenames are in
hyphen-case
. - All function names and variables are in
camelCase
. - The parameters used by Octokit are in
under_score
format.
Code formatting and linting
-
The .eslintrc.js file contains the settings for code linting.
-
Consider installing eslint
in your editor. Plugins are available for most popular editors.
-
Note: .eslintrc.js
extends the prettier
tool, which applies code formatting rules.
-
You can npm run eslint-check
to check there are no conflicts between eslint and prettier configurations.
-
The prettier
tool uses the "@adambraimbridge/prettierrc-2019-05" configuration.
-
Consider installing prettier
in your editor. Plugins are available for most popular editors.
Package.json scripts
npm run unit-test
npm run test
npm run lint
npm run lint-fix
npm run eslint-check