Back to Documentation

CLI Tools Complete Guide

Learn how to use all hive-tools CLI commands with automatic prompt optimization

🛠️ CLI Tools Complete Guide

Master the hive-tools command line interface with comprehensive examples, automatic prompt optimization, and advanced features.

Quick Installation

# Install globally via npm
npm install -g @hivetechs/hive-ai

# Verify installation
hive-ai --version

Core Commands

hive-ai consensus

Ask questions with 4-stage consensus pipeline

hive-ai consensus "How do I deploy a React app?"

hive-ai models

Search and compare AI models

hive-ai models search "coding assistant"

hive-ai consensus

Get multi-model consensus answers

hive-ai consensus "What's the best database for my app?"

Advanced Features

Prompt Optimization

# Auto-optimize prompts
hive-ai consensus "code" --optimize

Automatically improves your prompts for better results

Model Selection

# Use specific model
hive-ai consensus "question" --model gpt-4

Choose from 323+ models across 55+ providers

Command Reference

# Basic usage
hive-ai consensus "your question here"
# File input
hive-ai consensus --file prompt.txt
# System prompts
hive-ai consensus "question" --system "You are a coding expert"
# Save conversation
hive-ai consensus "question" --save conversation.json
# Continue conversation
hive-ai consensus "follow up" --load conversation.json

Configuration & Settings

API Keys Setup

hive-ai configure --set-key openai sk-...

Default Model

hive-ai configure --default-model claude-3-sonnet

Output Format

hive-ai configure --output json --format pretty

Examples & Use Cases

Code Generation

hive-ai consensus "Create a REST API in Python with FastAPI"

Code Review

hive-ai consensus "Review this code for security issues" --file app.py

Documentation

hive-ai consensus "Write API documentation" --file routes.js

Start Building with AI Today

Get instant access to 323+ AI models with automatic prompt optimization. No complex setup required.

# Get started in seconds
npm install -g @hivetechs/hive-ai
hive-ai consensus "Hello, AI world!"

Ready to experience better AI answers?

Start your 7-day free trial today. No prompt engineering required!