Skip to content

Commit acc9e3a

Browse files
committed
doc: update readme for ncu-config
1 parent 2e06745 commit acc9e3a

File tree

1 file changed

+56
-12
lines changed

1 file changed

+56
-12
lines changed

README.md

Lines changed: 56 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,47 @@
77

88
CLI tools for Node.js Core collaborators.
99

10+
<!-- TOC -->
11+
12+
- [Usage](#usage)
13+
- [Install](#install)
14+
- [Setting up credentials](#setting-up-credentials)
15+
- [`ncu-config`](#ncu-config)
16+
- [`get-metadata`](#get-metadata)
17+
- [Git bash for Windows](#git-bash-for-windows)
18+
- [Features](#features)
19+
- [Contributing](#contributing)
20+
- [License](#license)
21+
22+
<!-- /TOC -->
23+
1024
## Usage
1125

26+
### Install
27+
1228
```
1329
npm install -g node-core-utils
1430
```
1531

16-
After running any of the tools for the first time, you will be asked to provide a
17-
GitHub username and password in order to create a personal access token.
32+
If you would prefer to build from the source, install and link:
33+
34+
```
35+
git clone [email protected]:nodejs/node-core-utils.git
36+
cd node-core-utils
37+
npm install
38+
npm link
39+
```
40+
41+
### Setting up credentials
42+
43+
Most of the tools need your GitHub credentials to work. You can either
1844

19-
If you prefer not to provide your login credentials, [follow these instructions](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/)
45+
1. Run any of the tools and you will be asked in a prompt to provide your
46+
username and password in order to create a personal access token.
47+
2. Or, create a personal access token yourself on Github, then set them up
48+
using an editor.
49+
50+
If you prefer option 2, [follow these instructions](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/)
2051
to create the token.
2152

2253
Note: We need to read the email of the PR author in order to check if it matches
@@ -32,18 +63,31 @@ Then create an rc file (`~/.ncurc` or `$XDG_CONFIG_HOME/ncurc`):
3263
}
3364
```
3465

35-
If you would prefer to build from the source, install and link:
66+
Note: you could use `ncu-config` to configure these variables, but it's not
67+
recommended to leave your tokens in your command line history.
3668

37-
```bash
38-
git clone [email protected]:nodejs/node-core-utils.git
39-
cd node-core-utils
40-
npm install
41-
npm link
69+
## `ncu-config`
70+
71+
Configure variables for node-core-utils to use. Global variables are stored
72+
in `~/.ncurc` while local variabels are stored in `$PWD/.ncu/config`.
73+
74+
```
75+
ncu-config <command>
76+
77+
Commands:
78+
ncu-config set <key> <value> Set a config variable
79+
ncu-config get <key> Get a config variable
80+
ncu-config list List the configurations
81+
82+
Options:
83+
--version Show version number [boolean]
84+
--help Show help [boolean]
85+
--global [boolean] [default: false]
4286
```
4387

4488
## `get-metadata`
4589

46-
This one is inspired by Evan Lucas's [node-review](https://github.com/evanlucas/node-review),
90+
This tool is inspired by Evan Lucas's [node-review](https://github.com/evanlucas/node-review),
4791
although it is a CLI implemented with the Github GraphQL API.
4892

4993
```
@@ -102,10 +146,10 @@ current known issues with git bash:
102146
- [x] Warn new commits after reviews
103147
- [ ] Check number of files changed (request pre-backport)
104148

105-
### Contributing
149+
## Contributing
106150

107151
See [CONTRIBUTING.md](./CONTRIBUTING.md).
108152

109-
### License
153+
## License
110154

111155
MIT. See [LICENSE](./LICENSE).

0 commit comments

Comments
 (0)