npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

teapicli

v1.0.0-alpha.4

Published

Teapicli is a terminal API client that manages collections.

Downloads

13

Readme

teapicli

Teapicli is a terminal API client. You can use it to make web requests and inspect responses. It allows you to store and group requests for faster access.

Installation

Install as a global npm package:

npm install -g teapicli

Teapicli is changing rapidly at the moment. In order to get the latest version from master:

git clone [email protected]:schemar/teapicli.git
cd teapicli
yarn
yarn link
yarn build

# Run with node:
node ./dist/cli.js

# Alternatively, link from $PATH, e.g.:
chmod u+x ./dist/cli.js
ln -s $(pwd)/dist/cli.js /usr/local/bin/teapicli

Usage

Basic usage:

teapicli ./my-collection.json

You can check ./examples/collection.json. The collection file defines the requests you will be able to make from within teapicli.

Help output:

Usage: teapicli [options] <collection>

Options:
  -V, --version        output the version number
  -g, --config <file>  alternative configuration file to use
  -t, --client <type>  the client to use for HTTP requests (default: "axios")
  -h, --help           display help for command

Example call:
  $ teapicli ./my-collection.json

Views

| View | Explanation | | ---- | ----------- | | Main view | The app opens in the main view. Here you see the collection and can send requests. | | Selector | In the selector you can select an item. For example, when you want to change the selected request of the collection, the selector will open with a list of all requests to select one from. | | Messages | Lists all messages (including errors and warnings) that teapicli put out. |

Commands

| View | Key | Command | Effect | | ---- | --- | ------- | ------ | | All views | : | command | Type out a command by its name (names from this table). | | All views | q | close | Close the current view and return to the previous view on the stack. When the last view is closed, the application exits. | | All views | m | listMessages | Open the messages view that lists previous messages. | | Main view | s | send | Send the currently selected request. | | Main view | g | nextTabRequest | Switch tabs (body, headers) to inspect request. | | Main view | h | nextTabResponse | Switch tabs (body, headers) to inspect response. | | Main view | p | showResponse | Display the body of the last response in $PAGER. | | Main view | r | selectRequst | Open the selector to select another request of the collection. | | Main view | v | selectEnvironment | Open the selector to select another environment of the collection. | | Main view | e | edit | Edit the collection in your $EDITOR. Make sure to persist with w if you want to keep the changes. | | Main view | w | write | Persist the current state of the collection to disk. | | Selector | j | down | Move pointer one line down. | | Selector | k | up | Move pointer one line up. | | Selector | s | select | Select item under the current pointer, e.g. the request, and close the selector. |

Configuration

Teapicli uses convict to manage configuration.

You can create a configuration file at $HOME/.config/teapicli/config.json. If you do, it will be read on every start of teapicli. You can still override it with the --config CLI option.

The configuration is a JSON file that can change the default configuration. Check Configuration.ts for the available options. For example, to map the quit command to a instead of q, it would look like the following:

{
  "keys": {
    "quit": "a"
  }
}