Weave CLI
A command-line tool for managing Weaviate vector databases, written in Go.
This tool provides a fast and easy way to manage content in text and image
collections of configured vector databases.
π What's New in v0.2.10
- π Enhanced PDF Processing: Improved PDF text extraction with better
fallback handling
- π¬ Human-Friendly Error Messages: Simplified, actionable error messages
with helpful suggestions
- π¬ Updated Demos: New demo recordings showcasing PDF processing
capabilities
- π§ Better UX: Fixed PDF success message formatting and improved user
experience
π¬ Demo
Watch Weave CLI in action with our interactive demos:
- πΉ Full Demo
(5 minutes): Complete feature showcase with PDF processing
- β‘ Quick Demo
(2 minutes): Rapid overview with environment variables
Features
- π Weaviate Cloud Support - Connect to Weaviate Cloud instances
- π Weaviate Local Support - Connect to local Weaviate instances
- π Mock Database - Built-in mock database for testing and development
- π Collection Management - List, create, view, and delete collections
- π Document Management - Create, update, list, show, and delete documents
- π Semantic Search - Query collections with natural language
- π PDF Processing - Extract text from PDF files with intelligent chunking
- π§ Configuration Management - YAML + Environment variable configuration
- π¨ Beautiful CLI - Colored output with emojis and clear formatting
Quick Start
Installation
# Clone and build
git clone https://github.com/maximilien/weave-cli.git
cd weave-cli
./build.sh
# The binary will be available at bin/weave
Configuration
Option 1: Environment Variables Only (Recommended)
export WEAVIATE_URL="https://your-cluster.weaviate.cloud"
export WEAVIATE_API_KEY="your-weaviate-api-key"
export OPENAI_API_KEY="sk-proj-your-openai-key"
Option 2: Configuration File
# Copy example config
cp config.yaml.example config.yaml
# Edit config.yaml with your settings
Basic Usage
# Check database health
./bin/weave health check
# List collections
./bin/weave cols ls
# Create a collection
./bin/weave cols create MyCollection --text
# Add documents
./bin/weave docs create MyCollection document.txt
./bin/weave docs create MyCollection document.pdf
# Search documents
./bin/weave cols q MyCollection "search query"
# List documents
./bin/weave docs ls MyCollection
Documentation
Database Support
- Weaviate Cloud - Production-ready cloud instances
- Weaviate Local - Self-hosted Weaviate instances
- Mock Database - Built-in testing database (no external dependencies)
Development
Setup Development Environment
# Install all required development tools (linters, PDF tools, etc.)
./setup.sh
This will install:
- Go tools:
golangci-lint, goimports, govulncheck, gosec
- PDF processing:
poppler (provides pdftotext for better PDF text extraction)
- Shell linting:
shellcheck
- YAML linting:
yamllint
- Markdown linting:
markdownlint
- Dependency checking:
go-mod-outdated
Build and Test
# Build the project
./build.sh
# Run tests
./test.sh
# Run linting
./lint.sh
# Record demos
./tools/asciinema.sh demo
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests and linting
- Submit a pull request
License
MIT License - see LICENSE file for details.
Acknowledgments
Built with β€οΈ by github.com/maximilien