node-help
Offline documentation for your Node REPL.
node-help
Installing, Uninstalling and Updating To install node-help
, run:
npm install -g node-help
To uninstall node-help
, run:
npm uninstall -g node-help
To update node-help
to the latest published version, run:
npm update -g node-help
API
?
: append to the end of a built-in Node object to get documentation on it.docs
: show a list of long-form markdown articles to read.docs <topic>
: render the article name in Markdown for the terminal
The offline documentation module for the Node.js REPL
Features
node-help
is a custom Node.js REPL inspired by iPython that lets you append a question mark to any valid JavaScript token to get information about it.
- Documentation for un-aliased built-in lookups, e.g.
node-help > process.env?
. - Basic Native JavaScript introspection support displaying objects' valueOf(), toString(), method and property values.
- Colorized short-and-longform documentation
- short-form docs are accessed with an appended
?
and are rendered in colorized plain text - long-form docs are accessed via the
.docs <topic_name>
command and are rendered in colorized markdown in the terminal
- short-form docs are accessed with an appended
- Command history and
global
context are enabled.
Level of Support
At present documentation is available for Node v8, v9 and 10. Native JavaScript documentation is coming soon, but there is rudimentary introspection for Native JavaScript objects (See the 'additional information' section of the output for any given search query').
Usage
.docs
command
The Using the .docs
command, you can list the available longform docs like this:
available Node.js docs:
+ addons
+ assert
+ async_hooks
+ buffer
+ child_process
+ cli
+ cluster
+ console
+ crypto
+ debugger
+ deprecations
+ dgram
+ dns
+ documentation
+ domain
+ errors
+ esm
+ events
+ fs
...
.docs <topic>
command
The By running .docs http2
, for example, you can read long-form documentation on the http2
module from the Node.js website as colorized Markdown in your terminal. Like, wee!
# HTTP/2 Stability: 1 - Experimental The http2 module provides an implementation of the HTTP/
?
to search the Node API (shorter-form)
Use the node-help > process? 2 for Nodejs global | process Name: processNodejs Object Type: global: process Description:Object The process object See the process object section ChildProcess | process Name: processNodejs Object Type: ChildProcess: `process` ChildProcess Description:All workers are created using child_process the returned objectfrom this if the 'disconnect' event occurson process and .exitedAfterDisconnect is not true. This protects againstaccidental disconnection. [ Additional Information ] toString: '[object process]'valueOf: '[object process]'Constructor: processlocal properties (non-methods): _events arch debugPort execPath pid stderr version _eventsCount argv domain features platform stdin versions _exiting argv0 env mainModule ppid stdout _maxListeners config execArgv moduleLoadList release title local methods:_debugEnd binding initgroups _debugPause chdir kill _debugProcess cpuUsage memoryUsage _fatalException cwd nextTick _getActiveHandles dlopen openStdin _getActiveRequests emitWarning reallyExit _kill exit setUncaughtExceptionCaptureCallback _linkedBinding getegid setegid _rawDebug geteuid seteuid _startProfilerIdleNotifier getgid setgid _stopProfilerIdleNotifier getgroups setgroups _tickCallback getuid setuid abort hasUncaughtExceptionCaptureCallback umask assert hrtime uptime node-help >
Contributions
See Contributing. The search algorithm for node-help
is not perfect so there will be bugs. Please feel free to raise issues on the github issues page.