Package Exports
- lrclient
- lrclient/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (lrclient) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
LRestClient
Command-line, json-based REST-Client written in Typescript.
Usage
$ npm install -g lrclient
$ lrc COMMAND
running command...
$ lrc (--version)
lrclient/0.0.1 linux-x64 node-v19.1.0
$ lrc --help [COMMAND]
USAGE
$ lrc COMMAND
...Commands
lrc env getlrc env set ENVIRONMENTlrc help [COMMAND]lrc pluginslrc plugins:install PLUGIN...lrc plugins:inspect PLUGIN...lrc plugins:install PLUGIN...lrc plugins:link PLUGINlrc plugins:uninstall PLUGIN...lrc plugins:uninstall PLUGIN...lrc plugins:uninstall PLUGIN...lrc plugins updatelrc run REQUESTPATH [PAYLOADNAME]
lrc env get
Returns the currently selected environment.
USAGE
$ lrc env get
DESCRIPTION
Returns the currently selected environment.
EXAMPLES
$ lrc env getproduction
Headers:
Authorization: Bearer {{bearerToken}}
User-Agent: Mozilla Firefox
Variables:
bearerToken=...
baseUrl=http://www.github.com
user=lmnch
repository=LRClient
requestUrl={{baseUrl}}/{{user}}/{{repository}}lrc env set ENVIRONMENT
Updates the current working environtment
USAGE
$ lrc env set [ENVIRONMENT]
ARGUMENTS
ENVIRONMENT Name of the environment file in 'environments' directory.
DESCRIPTION
Updates the current working environtment
EXAMPLES
$ lrc env set
production
Headers:
Authorization: Bearer {{bearerToken}}
User-Agent: Mozilla Firefox
Variables:
bearerToken=...
baseUrl=http://www.github.com
user=lmnch
repository=LRClient
requestUrl={{baseUrl}}/{{user}}/{{repository}}
Updated config ⚙️lrc help [COMMAND]
Display help for lrc.
USAGE
$ lrc help [COMMAND] [-n]
ARGUMENTS
COMMAND Command to show help for.
FLAGS
-n, --nested-commands Include all nested commands in the output.
DESCRIPTION
Display help for lrc.See code: @oclif/plugin-help
lrc plugins
List installed plugins.
USAGE
$ lrc plugins [--core]
FLAGS
--core Show core plugins.
DESCRIPTION
List installed plugins.
EXAMPLES
$ lrc pluginsSee code: @oclif/plugin-plugins
lrc plugins:install PLUGIN...
Installs a plugin into the CLI.
USAGE
$ lrc plugins:install PLUGIN...
ARGUMENTS
PLUGIN Plugin to install.
FLAGS
-f, --force Run yarn install with force flag.
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Installs a plugin into the CLI.
Can be installed from npm or a git url.
Installation of a user-installed plugin will override a core plugin.
e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command
will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in
the CLI without the need to patch and update the whole CLI.
ALIASES
$ lrc plugins add
EXAMPLES
$ lrc plugins:install myplugin
$ lrc plugins:install https://github.com/someuser/someplugin
$ lrc plugins:install someuser/somepluginlrc plugins:inspect PLUGIN...
Displays installation properties of a plugin.
USAGE
$ lrc plugins:inspect PLUGIN...
ARGUMENTS
PLUGIN [default: .] Plugin to inspect.
FLAGS
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Displays installation properties of a plugin.
EXAMPLES
$ lrc plugins:inspect mypluginlrc plugins:install PLUGIN...
Installs a plugin into the CLI.
USAGE
$ lrc plugins:install PLUGIN...
ARGUMENTS
PLUGIN Plugin to install.
FLAGS
-f, --force Run yarn install with force flag.
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Installs a plugin into the CLI.
Can be installed from npm or a git url.
Installation of a user-installed plugin will override a core plugin.
e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command
will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in
the CLI without the need to patch and update the whole CLI.
ALIASES
$ lrc plugins add
EXAMPLES
$ lrc plugins:install myplugin
$ lrc plugins:install https://github.com/someuser/someplugin
$ lrc plugins:install someuser/somepluginlrc plugins:link PLUGIN
Links a plugin into the CLI for development.
USAGE
$ lrc plugins:link PLUGIN
ARGUMENTS
PATH [default: .] path to plugin
FLAGS
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Links a plugin into the CLI for development.
Installation of a linked plugin will override a user-installed or core plugin.
e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
command will override the user-installed or core plugin implementation. This is useful for development work.
EXAMPLES
$ lrc plugins:link mypluginlrc plugins:uninstall PLUGIN...
Removes a plugin from the CLI.
USAGE
$ lrc plugins:uninstall PLUGIN...
ARGUMENTS
PLUGIN plugin to uninstall
FLAGS
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Removes a plugin from the CLI.
ALIASES
$ lrc plugins unlink
$ lrc plugins removelrc plugins:uninstall PLUGIN...
Removes a plugin from the CLI.
USAGE
$ lrc plugins:uninstall PLUGIN...
ARGUMENTS
PLUGIN plugin to uninstall
FLAGS
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Removes a plugin from the CLI.
ALIASES
$ lrc plugins unlink
$ lrc plugins removelrc plugins:uninstall PLUGIN...
Removes a plugin from the CLI.
USAGE
$ lrc plugins:uninstall PLUGIN...
ARGUMENTS
PLUGIN plugin to uninstall
FLAGS
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Removes a plugin from the CLI.
ALIASES
$ lrc plugins unlink
$ lrc plugins removelrc plugins update
Update installed plugins.
USAGE
$ lrc plugins update [-h] [-v]
FLAGS
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Update installed plugins.lrc run REQUESTPATH [PAYLOADNAME]
Performs a REST call to a endpoint
USAGE
$ lrc run [REQUESTPATH] [PAYLOADNAME] [-v <value>] [-p <value>]
ARGUMENTS
REQUESTPATH Path to request config in 'endpoints' directory
PAYLOADNAME Optional payload for the request which should be in '*requestPath*/payloads'
FLAGS
-p, --payload=<value> Payload which should be used for the request
-v, --localVariable=<value>... Local variables to overwrite endpoint or environment variables
DESCRIPTION
Performs a REST call to a endpoint
EXAMPLES
$ lrc run module1/request1 --localVariable "user: lukas"
production
Headers:
Authorization: Bearer {{bearerToken}}
User-Agent: Mozilla Firefox
Variables:
bearerToken=...
baseUrl=http://www.github.com
user=lmnch
repository=LRClient
requestUrl={{baseUrl}}/{{user}}/{{repository}}
module1/request1
GET {{requestUrl}}
Requesting...
GET http://www.github.com/lukas/LRClient
Authorization: Bearer ...
User-Agent: Mozilla Firefox
// TODO: add result
$ lrc run module1/request1 -v "user: lukas" -v "repository: lmnch.github.io"
production
Headers:
Authorization: Bearer {{bearerToken}}
User-Agent: Mozilla Firefox
Variables:
bearerToken=...
baseUrl=http://www.github.com
user=lmnch
repository=LRClient
requestUrl={{baseUrl}}/{{user}}/{{repository}}
module1/request1
GET {{requestUrl}}
Requesting...
GET http://www.github.com/lukas/lmnch.github.io
Authorization: Bearer ...
User-Agent: Mozilla Firefox
// TODO: add resultSee code: dist/commands/run/index.ts