Skip to content

Repository files navigation

plz

Generate shell scripts from natural language using any OpenAI-compatible API.

Usage

plz "list all files in current directory"
plz "find all rust files and count lines of code"
plz -y "compress this folder into a tar.gz archive"

Configuration

Config priority: CLI args > env vars > config file > defaults

CLI Flags

FlagShortDescription
--base-url-uAPI base URL
--api-key-kAPI key
--model-mModel name (required)
--provider-pProvider name (display only)
--temperature-tSampling temperature (0.0-2.0)
--max-tokensMax tokens in response
--thinkReasoning effort (low/medium/high) for reasoning models
--no-think-xDisable reasoning even if configured
--configCustom config file path
--force-ySkip confirmation prompt

Environment Variables

PLZ_BASE_URL, PLZ_API_KEY, PLZ_MODEL, PLZ_PROVIDER, PLZ_TEMPERATURE, PLZ_MAX_TOKENS, PLZ_THINK

Config File

Location: ~/.config/plz/config.toml

base_url = "https://api.openai.com"api_key = "sk-..."model = "gpt-4o"temperature = 0.7max_tokens = 4096think = "high"

Examples

# OpenAI
plz -m gpt-4o -k sk-... "show disk usage"# Ollama (local)
plz -u http://localhost:11434 -m qwen2.5-coder:7b "list all files"# Groq
plz -u https://api.groq.com/openai/v1 -k gsk_... -m llama-3.1-70b "find largest files"# With reasoning/thinking (o1, o3, and other reasoning models)
plz --think high "debug this complex issue"# Disable thinking even if configured
plz -x "simple task"

Reasoning / Thinking Mode

For OpenAI reasoning models (o1, o3, etc.), you can enable extended thinking to improve output quality on complex tasks.

Enabling thinking

# CLI flag
plz --think high "complex task"# Environment variableexport PLZ_THINK=high
# Config file (~/.config/plz/config.toml)
think = "medium"

Accepted values: low, medium, high

Disabling thinking

If thinking is enabled in your config or env, you can override it for a single run:

plz -x "simple task"
plz --no-think "quick task"

Develop

Requires Rust. Build with cargo build, run with cargo run.

License

MIT

About

Better Copilot for your terminal

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages