hypercode-cli

0.0.4 • Public • Published

hypercode-cli

hypercode-cli is a versatile command-line interface tool designed to interact seamlessly with the hypercode npm package. It offers an intuitive and user-friendly way to process a variety of query types like boolean, integer, string, float, and array evaluations directly from your terminal, now enhanced with the power of the inquirer library for easier navigation and execution.

Prerequisites

Before using hypercode-cli, make sure you have:

  • Node.js and npm installed on your system.
  • A Hyper API key. Obtain one by signing up for a Hyper account and generating an API key in your settings.

Installation

Install hypercode-cli globally using npm:

npm install -g hypercode-cli

Configuration

To set up your API key with the CLI:

  1. Create a .env file in the root directory of hypercode-cli.

  2. Add your Hyper API key as follows:

    HYPER_API_KEY=your_api_key_here

    Replace your_api_key_here with your actual Hyper API key, available in your Hyper API key settings.

Usage

Run hypercode-cli in your terminal and follow the interactive prompts:

hypercode-cli

You will be presented with a list of commands to choose from:

Select a command to run (Enter the number):
  1) list contexts
  -- Primitive Methods --
  2) string
  3) integer
  4) float
  5) boolean
  -- Array Methods --
  6) stringArray
  7) integerArray
  8) floatArray
  9) booleanArray
  -- Exit --
  10) Exit
  1. Select a command by entering the corresponding number.
  2. Input your query when prompted.
  3. Optionally, enter a context ID for context-specific queries.
  4. Receive and view the result in your terminal.

To exit the CLI, choose the 'Exit' option.

Example Session

Here's what a session with hypercode-cli might look like:

hypercode-cli
> 5 (selecting boolean)
> "Is the sky blue?" (entering query)
> (Optionally enter a context ID or leave blank)
> true (result)
> 10 (to Exit)
Exiting hypercode CLI...

The hypercode-cli makes it simple and efficient to interact with Hyper's powerful language model APIs, bringing advanced query capabilities right to your fingertips.

Package Sidebar

Install

npm i hypercode-cli

Weekly Downloads

6

Version

0.0.4

License

MIT

Unpacked Size

9.87 kB

Total Files

3

Last publish

Collaborators

  • niloysikdar
  • trevoruptain