🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

trieve-cli

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

trieve-cli

Beta command-line interface for Trieve API that enables users to upload files and interact with them using agentic RAG (Retrieval Augmented Generation). Simplifies document management and Q&A workflows.

0.0.6
latest
npm
Version published
Weekly downloads
234
Maintainers
1
Weekly downloads
 
Created
Source

Trieve Logo

Sign Up (1k chunks free) | Documentation | Discord | Matrix

Github stars Join Discord Join Matrix

Trieve CLI

A command-line interface for interacting with the Trieve API. The CLI enables users to upload files, check upload status, ask questions against their knowledge base, and configure their Trieve setup.

Installation

npm install -g trieve-cli

Configuration

Before using the CLI, you need to configure it with your Trieve credentials:

trieve configure

This interactive command will prompt you for:

  • Your Trieve Organization ID
  • Your Trieve Dataset ID
  • Your Trieve API Key
  • User ID (for topic ownership)

Alternatively, you can set these as environment variables:

  • TRIEVE_ORGANIZATION_ID
  • TRIEVE_DATASET_ID
  • TRIEVE_API_KEY

Commands

Upload Files

Upload a file to your Trieve dataset:

trieve upload [filePath] [-t, --tracking-id <trackingId>]

If no file path is provided, the CLI will prompt you to enter one interactively.

Check Upload Status

Check the status of your uploaded files:

trieve check-upload-status [-t, --tracking-id <trackingId>]

Without options, this will display an interactive menu to select files to check. If a tracking ID is provided, it will check the status of that specific file.

Ask Questions

Ask a question against your Trieve dataset:

trieve ask [question]

If no question is provided, the CLI will prompt you to enter one interactively. The response will be streamed back with reference information that you can expand by pressing 'j'.

Update Tool Configuration

Customize the RAG system prompt and tool configurations:

trieve update-tool-config [-t, --tool-description <toolDescription>] [-q, --query-description <queryDescription>] [-s, --system-prompt <systemPrompt>]

This allows you to customize:

  • Tool description: Instructions for when the LLM should use the search tool
  • Query description: How the LLM should formulate search queries
  • System prompt: Custom system prompt for the AI assistant

Features

  • 🔒 Secure Configuration: Local storage of API keys and configuration
  • 📤 File Uploads: Upload documents to your Trieve dataset
  • 📋 Status Tracking: Monitor the processing status of uploaded files
  • 🤔 Interactive Q&A: Ask questions and receive answers based on your uploaded documents
  • 📚 Reference Display: View source references for answers with expandable details
  • 🔧 Customizable RAG: Configure system prompts and tool behavior

Demo

Watch our demo video to see the Trieve CLI in action:

Trieve CLI Demo Video

Watch the Trieve CLI Demo Video on YouTube.

Examples

Upload a PDF and ask questions about it:

# Upload a document
trieve upload ./documents/report.pdf

# Check if processing is complete
trieve check-upload-status

# Ask a question about the content
trieve ask "What are the key findings in the report?"

Customize the RAG behavior:

# Update the tool configuration for more specific search behavior
trieve update-tool-config --query-description "Create precise search queries focusing on technical terms and definitions"

Development

To build the CLI from source:

# Install dependencies
npm install

# Build the TypeScript code
npm run build

# Run locally
npm start

License

MIT

FAQs

Package last updated on 16 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts