0.5.30 • Published 6 months ago

@oyvinmar-forks/nel v0.5.30

Weekly downloads
-
License
ISC
Repository
github
Last release
6 months ago

Nel

Command line interface for common development tasks.

🏗️ Install

Install Nel globally using npm or your favorite package manager:

npm install --global @oyvinmar-forks/nel

Install Github CLI

Some of the commands in Nel require the Github CLI to be installed. You can install it by following the instructions here: https://cli.github.com/manual/installation

After installation you need to login to Github using the CLI:

gh auth login

Setup jira

For the jira commands to work you need to set up a token for your jira account and add email to a .nelrc file.

  1. Go to: https://id.atlassian.com/manage-profile/security/api-tokens
  2. Create a new token
  3. Add export JIRA_TOKEN=<your-token> to your .bashrc or .zshrc

Configuration

Nel will start in current working directory and search up the directory tree for config file. It supports multiple formats. For example .nelrc.json, .nelrc.yml, .nelrc.js, and .nelrc.cjs. For full list see cosmiconfig.

Jira email should always be specified in the config file. To change development defaults you can add a development section to the config file. See: nel dev for options.

Example config file .nelrc.yml:

jira:
  email: <your-jira-email>
development:
  ardoq: # Must match name specified in the projects package.json file
    environment: local
    subdomain: piedpiper
    open: false
  ardoq-discover:
    environment: engagement
    subdomain: marintech
  ardoq-login:
    environment: appsec
    subdomain: piedpiper
  ardoq-surveys:
    environment: test
    subdomain: martech
  my-awesome-project:
    port: 8080

🚀 Usage

nel --help
Options:
  -v, --version                      Print current version
  -h, --help                         display help for command

Commands:
  interactive|i                      Interactive prompt
  check                              Check setup and config
  open [options] [jira_key...]       Open project or jira ticket
  merge [options]                    Merge pull request
  dev [options]                      Start dev server
  watch                              Watch project
  build                              Build project
  deploy                             Deploy project
  release                            Release project
  vc                                 Interactively choose a version control
                                     command.
  branch [name]                      Create a new branch
  checkout-pr|cpr                    Checkout pull request
  delete-branches|d [options]        Delete local branches
  checkout|co [options]              Checkout branch
  jira                               Interactively choose a Jira command.
  link [options] <package-names...>  Link ardoq package
  unlink                             Unlink shared-ui package
  test [options]                     Test project

👤 Aliases

Don't want to type nel every time? Here are some suggested alias you can copy into your shells rc file(s):

alias dev='nel dev'
alias build='nel build'
alias watch='nel watch'
alias deploy='nel deploy'
alias merge='nel merge'
alias test='nel test'
alias cb='nel vc co'
alias cpr='nel vc cpr'

🛠️ Commands

interactive

Interactive prompt

Usage: nel interactive|i [options]

Interactively choose a command to run.

Options:
  -h, --help  display help for command

check

Check setup and config

Usage: nel check [options]

Check that Github CLI is installed and that we can find and read a config file.

Options:
  -h, --help  display help for command

open

Open project or jira ticket

Usage: nel open [options] [jira_key...]

Command for opening various development related tools or services. Currently supports opening jira ticket or current project in a browser

Options:
  -s, --subdomain <org-name>  Subdomain (organisation name) to open in browser
  -e, --environment <env>     Choose environment (choices: "local", "test",
                              "platform", "insight", "integration",
                              "engagement", "prod")
  -h, --help                  display help for command

merge

Merge pull request

Usage: nel merge [options]

Squashes the current branch into main/master. Prompts user for deploy/release of project and closing of related jira after merge.

Options:
  -y, --yes    Deploy and close jira after merge.
  -f, --force  Force merge without checking status.
  -h, --help   display help for command

dev

Start dev server

Usage: nel dev [options]

Starts a dev server in the current project if it finds a valid script in package.json. It opens a browser window after the dev server has started.

Options:
  -n, --no-open               Don't open browser after starting dev server.
  -s, --subdomain <org-name>  Subdomain (organisation name) to open in the
                              browser.
  -p, --port <number>         Port number to open in the browser (default:
                              3000). Should be the port the dev server is
                              using.
  -e, --environment <env>     Choose environment (choices: "local", "test",
                              "platform", "insight", "integration",
                              "engagement", "prod")
  -h, --help                  display help for command

watch

Watch project

Usage: nel watch [options]

Runs the watch script in a project.

Options:
  -h, --help  display help for command

build

Build project

Usage: nel build [options]

Runs the build script in a project.

Options:
  -h, --help  display help for command

deploy

Deploy project

Usage: nel deploy [options]

Run the deploy or release script in a project after checking that there are no local or remote changes.

Options:
  -h, --help  display help for command

release

Usage: nel release [options]

Release project

Options:
  -h, --help  display help for command

vc

Interactively choose a version control command.

Usage: nel vc [options] [command]

Options:
  -h, --help                   display help for command

Commands:
  branch [name]                Create a new branch
  checkout-pr|cpr              Checkout pull request
  delete-branches|d [options]  Delete local branches
  checkout|co [options]        Checkout branch

branch

Create a new branch

Usage: nel branch [options] [name]

Interactively create a new branch linked to an existing jira issue or lets you create a new issue.

Options:
  -h, --help  display help for command

checkout-pr

Checkout pull request

Usage: nel checkout-pr|cpr [options]

Interactively checkout a open pull request

Options:
  -h, --help  display help for command

delete-branches

Delete local branches

Usage: nel delete-branches|d [options]

Interactively delete branches

Options:
  -y, --yes   Delete without confirmation.
  -h, --help  display help for command

checkout

Checkout branch

Usage: nel checkout|co [options]

Interactively checkout a local or remote branch

Options:
  -r, --remote  List remote branches
  -h, --help    display help for command

jira

Interactively choose a Jira command.

Usage: nel jira [options] [command]

Jira commands

Options:
  -h, --help     display help for command

Commands:
  close <key>    Closes the jira issue
  new [options]  Create a new jira issue through interactive prompts

link

Usage: nel link [options] <package-names...>

Link ardoq package

Options:
  -w, --watch        Watch for changes in linked package
  -p, --path <path>  Relative path to ardoq packages (default:
                     "../ardoq-packages")
  -h, --help         display help for command

unlink

Usage: nel unlink [options]

Unlink shared-ui package

Options:
  -h, --help  display help for command

test

Test project

Usage: nel test [options]

Runs the test script in a project.

Options:
  -w, --watch  Watch tests if supported by the project
  -h, --help   display help for command

📓 Logging

You can specify the log level for the nel command by setting the NEL_LOG_LEVEL environment variable. The default is info. Supported levels are debug, info, warn, and error.

Example:

$ NEL_LOG_LEVEL=debug nel
0.5.30

6 months ago

0.5.29

7 months ago

0.5.27

7 months ago

0.5.28

7 months ago

0.5.25

8 months ago

0.5.26

8 months ago

0.5.21

1 year ago

0.5.22

1 year ago

0.5.20

1 year ago

0.5.23

1 year ago

0.5.24

1 year ago

0.5.18

1 year ago

0.5.19

1 year ago

0.5.17

1 year ago

0.5.16

1 year ago

0.5.14

1 year ago

0.5.15

1 year ago

0.5.13

2 years ago

0.5.11

2 years ago

0.5.12

2 years ago

0.5.10

2 years ago

0.5.9

2 years ago

0.5.8

2 years ago

0.5.7

2 years ago

0.5.6

2 years ago

0.5.4

2 years ago

0.5.3

2 years ago

0.5.5

2 years ago

0.5.0

2 years ago

0.5.2

2 years ago

0.5.1

2 years ago

0.4.0

2 years ago

0.3.6

2 years ago

0.3.5

2 years ago

0.3.4

2 years ago

0.3.3

2 years ago

0.3.2

2 years ago

0.3.1

2 years ago

0.3.0

2 years ago

0.2.1

3 years ago

0.2.0

3 years ago