11 unstable releases (3 breaking)

0.4.7 May 21, 2024
0.4.6 May 16, 2024
0.4.1 Apr 13, 2024
0.3.1 Apr 12, 2024
0.1.1 Apr 8, 2024

#110 in Command line utilities

Download history 77/week @ 2024-04-04 433/week @ 2024-04-11 9/week @ 2024-04-18 104/week @ 2024-05-02 91/week @ 2024-05-09 377/week @ 2024-05-16 36/week @ 2024-05-23 2/week @ 2024-05-30

610 downloads per month

MIT license

58KB
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

~15–31MB
~408K SLoC