Restless
A CLI-based http client
Installation
If you don't want to globally install the package, omit the -g
flag
Mac/Linux
sudo npm install -g restlss
Windows
npm i -g restlss
Info
Usage: restless <command>
Aliases: restlss
, rest
Version: 0.1.2
Notes
- The commands
rest
, restless
and restlss
are all interchangeable.
- Data persists when updgrading the CLI, because it is stored in a
/tmp/
file
- Used with commander.js
- Command output is meant to resemble Cliffy (Deno successor of commander.js)
command output.
- Cliffy is better than commander.js, but Restless uses commander because Node
provides a simpler user experience than Deno
- I highly recommend Cliffy
- All user data is stored in
/tmp/restless/data.json
Commands
Collection
Usage: restless collection <subcommand> [options]
Aliases c
Description: The collection
command can be used to manage collections.
Note: Collections are places to store template requests; each collection would
typically be for each project that you make. Say you have a project that is
called "Hello World" that has an API that requires testing. Create a collection
with a meaningful name in relation to the project, like: hello-world
. This
collection would be where you store all of your requests.
Add
- Usage:
restless collection add <name>
- Aliases:
a
,
- Description: Add a collection
- Arguments:
name
- Type:
string
- Description: Name of the collection to be added
Rename
- Usage:
restless collection rename <old-name> <new-name>
- Aliases: none,
- Description: Change the name of a collection
- Arguments:
old-name
- Type:
string
- Description: Name of the collection to be renamed
new-name
- Type:
string
- Description: The new name of the collection
Remove
- Usage:
restless collection remove <name>
- Aliases:
rm
,
- Description: Remove/delete a collection
- Arguments:
name
- Type:
string
- Description: Name of the collection to be removed
List
- Usage:
restless collection list
- Aliases:
l
,
- Description: List all collections
Use
- Usage:
restless collection use <name>
- Aliases:
u
,
- Description: Select a collection to be used
- Arguments:
name
- Type:
string
- Description: Name of the collection to be selected
Current
- Usage:
restless collection current
- Aliases:
c
,
- Description: Output the currently selected collection
Request
Usage: restless request <subcommand> [options]
Aliases r
Description: The request
command can be used to create, view, update, and
delete requests in the current selected collection.
Note: Requests get sent with the send
command.
Set
Remove
Check
Info
List
- Usage:
restless request list
- Aliases:
l
,
- Description: List all requests in the current collection
Send
-
Usage: restless send <request-name>
-
Alternate Usage: restless request send <request-name>
-
Aliases: s
,
-
Description: Sends a request
-
Arguments:
name
- Type:
string
- Description: Name of the request to be sent
Host
The host command is a way to set url variables, in a sense. For example, if you
have a project hosted on http://localhost:3000, and don't want to write the
full url every time you make a request, you can set a host to reference
http://localhost:3000, then reference the host, instead of the full url
- Usage:
restless host <sub-command>
- Aliases:
h
,
- Description: Manage all hosts
Set
Rename
Remove
List
- Usage:
restless host list
- Aliases:
l
,
- Description: List all hosts in the current selected collection
Cat
Cooper Runyan