Files
wehub-resource-sync 97e91a83f3
Ruff / Ruff (push) Has been cancelled
Test / Core Tests (push) Has been cancelled
Test / Offline Coverage Tests (Python 3.10) (push) Has been cancelled
Test / Offline Coverage Tests (Python 3.11) (push) Has been cancelled
Test / Offline Coverage Tests (Python 3.12) (push) Has been cancelled
Test / Offline Coverage Tests (Python 3.13) (push) Has been cancelled
Test / Offline Coverage Tests (Python 3.9) (push) Has been cancelled
Test / Full Coverage (Python 3.11) (push) Has been cancelled
Test / Core Provider Tests (OpenAI) (push) Has been cancelled
Test / Core Provider Tests (Anthropic) (push) Has been cancelled
Test / Core Provider Tests (Google) (push) Has been cancelled
Test / Core Provider Tests (Other) (push) Has been cancelled
Test / Anthropic Tests (push) Has been cancelled
Test / Gemini Tests (push) Has been cancelled
Test / Google GenAI Tests (push) Has been cancelled
Test / Vertex AI Tests (push) Has been cancelled
Test / OpenAI Tests (push) Has been cancelled
Test / Writer Tests (push) Has been cancelled
Test / Auto Client Tests (push) Has been cancelled
ty / type-check (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:36:38 +08:00

2.8 KiB

title, description
title description
Instructor CLI Tools Command-line utilities for monitoring API usage, fine-tuning models, and accessing documentation.

Instructor CLI Tools

Getting Started

Installation

The CLI tools are included with the Instructor package:

pip install instructor

API Setup

Set your OpenAI API key as an environment variable:

export OPENAI_API_KEY="your-api-key-here"

Available Commands

Instructor provides several command-line utilities:

Command Description Guide
instructor usage Track API usage and costs Usage Guide
instructor finetune Create and manage fine-tuned models Fine-Tuning Guide
instructor docs Quick access to documentation See below

Usage Command

Monitor your OpenAI API usage directly from the terminal:

# View total usage for the current month
instructor usage

# View usage breakdown by day
instructor usage --by-day

# Calculate cost for a specific model
instructor usage --model gpt-5.4-mini

For detailed usage statistics and options, see the Usage Guide.

Fine-Tuning Command

Create and manage fine-tuned models with an interactive interface:

# Start the fine-tuning interface
instructor finetune

This launches an interactive application that guides you through the fine-tuning process. Learn more in the Fine-Tuning Guide.

Documentation Command

Quickly access Instructor documentation from your terminal:

# Open main documentation
instructor docs

# Search for specific topic
instructor docs validation

# Open specific page
instructor docs concepts/models

This command opens the Instructor documentation in your default web browser, making it easy to find information when you need it.

Support & Contribution