cli

module
v0.0.26 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2024 License: Apache-2.0

README

Pinecone CLI

pinecone is Pinecone on the command line. See the Pinecone CLI PRD

Building the CLI

  1. Install golang if you do not have it already

  2. Install goreleaser

brew install goreleaser/tap/goreleaser
  1. Build the CLI
goreleaser build --single-target --snapshot --clean

For manual testing in development, you can run commands like this

./dist/pinecone_darwin_arm64/pinecone login
./dist/pinecone_darwin_arm64/pinecone index list
# etc

Usage

# See help
./dist/pinecone_darwin_arm64/pinecone --help

# Set authorization credentials - set an API key directly, or log in via the OAuth flow
./dist/pinecone_darwin_arm64/pinecone config set-api-key
./dist/pinecone_darwin_arm64/pinecone login

# Check currently configured API key
./dist/pinecone_darwin_arm64/pinecone config get-api-key

# Do index operations
./dist/pinecone_darwin_arm64/pinecone index --help

# Create serverless indexes.
./dist/pinecone_darwin_arm64/pinecone index create-serverless --help
./dist/pinecone_darwin_arm64/pinecone index create-serverless --name example-index --dimension 1536 --metric cosine --cloud aws --region us-west-2
./dist/pinecone_darwin_arm64/pinecone index create-serverless --name="example-index" --dimension=1536 --metric="cosine" --cloud="aws" --region="us-west-2"
./dist/pinecone_darwin_arm64/pinecone index create-serverless -n example-index -d 1536 -m cosine -c aws -r us-west-2

# Describe index
./dist/pinecone_darwin_arm64/pinecone index describe --name "example-index"
./dist/pinecone_darwin_arm64/pinecone index describe --name "example-index" --json

# List indexes
./dist/pinecone_darwin_arm64/pinecone index list
./dist/pinecone_darwin_arm64/pinecone index list --json

# Delete index
./dist/pinecone_darwin_arm64/pinecone index delete --name "example-index"

# Interact with Assistants / Knowledge Models
./dist/pinecone_darwin_arm64/pinecone km -- help
./dist/pinecone_darwin_arm64/pinecone km list
./dist/pinecone_darwin_arm64/pinecone km describe --name "my-assistant"

# Create a knowledge model
./dist/pinecone_darwin_arm64/pinecone km create --name "new-knowledge-model"

# Target a knowledge model and check associated files
./dist/pinecone_darwin_arm64/pinecone km target --name "new-knowledge-model"
./dist/pinecone_darwin_arm64/pinecone km files

# Chat with a knowledge model

./dist/pinecone_darwin_arm64/pinecone km chat --message "Give me the table of contents in a table format, and a brief summary of chapter 2"

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL