17 releases (4 breaking)

0.5.3 Jul 26, 2024
0.5.0 Jun 27, 2024

#201 in Command line utilities

50 downloads per month

MIT license

54KB
1.5K SLoC

Trieve CLI - README

Overview

Trieve CLI is a command-line interface (CLI) for interacting with the Trieve Search Product. It allows users to configure profiles, manage API keys, handle datasets, and interact with organizations directly from the command line.

Installation

To install the Trieve CLI, you need to have Rust installed on your machine. If you don't already have it installed, you can install it with:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Then, you can install the CLI from Cargo:

cargo install trieve

After building the project, you can run the CLI using the trieve command.

Usage

To use the Trieve CLI, you need to configure it with your credentials first.

trieve login

Then, you can use any of the available commands to interact with the Trieve service.

Features

General

  • Profile Management: Switch, delete, and list profiles for different configurations.
  • API Key Management: Generate new API keys for accessing the Trieve service.
  • Dataset Management: Create, list, delete, and add seed data to datasets.
  • Organization Management: Switch between different organizations.

Commands

General Structure

trieve <command> [subcommand] [flags]

NOTE: All of these commands are interactive and will work even without passing in the flags.

Commands and Subcommands

  1. Login

    trieve login --api-key <API_KEY> [--api-url <API_URL>] [--profile-name <PROFILE_NAME>]
    

    Configures the Trieve CLI with your API key.

  2. Dataset

    trieve dataset <subcommand> [flags]
    
    • Create

      trieve dataset create --name <DATASET_NAME>
      

      Creates a dataset in the Trieve service.

    • List

      trieve dataset list
      

      Lists all datasets in the Trieve service.

    • Delete

      trieve dataset delete --dataset-id <DATASET_ID>
      

      Deletes a dataset in the Trieve service.

    • Example (Add Seed Data)

      trieve dataset example --dataset-id <DATASET_ID>
      

      Adds seed data to a dataset in the Trieve service.

  3. API Key

    trieve apikey <subcommand> [flags]
    
    • Generate

      trieve apikey generate --name <API_KEY_NAME> --role <API_KEY_ROLE>
      

      Generates a new API key.

  4. Profile

    trieve profile <subcommand> [flags]
    
    • Switch

      trieve profile switch --profile-name <PROFILE_NAME>
      

      Switches to a different profile.

    • Delete

      trieve profile delete --profile-name <PROFILE_NAME>
      

      Deletes a profile.

    • List

      trieve profile list
      

      Lists all profiles.

  5. Organization

    trieve organization <subcommand> [flags]
    
    • Switch

      trieve organization switch --organization-id <ORGANIZATION_ID>
      

      Switches to a different organization.

Contributing

Contributions are welcome! Please fork the repository and submit a pull request with your changes.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For any questions or issues, please open an issue on the GitHub repository or contact the maintainers.


This README provides a basic overview of the Trieve CLI and its features. For detailed usage and examples, please refer to the command-specific help by running trieve <command> --help.

Dependencies

~16–32MB
~420K SLoC