Skip to main content

ai_plz

A simple command-line helper powered by LLM.

Introduction

ai_plz is a minimalist command-line helper that sends your need to LLM, asks for a shell command, and executes it if permitted. This helper is designed to be a one-time command generator, not a full AI agent. The command-line entrypoint of this package is "plz" (short for "please").

Usage

# Install
$ uv tool install ai_plz  # or: pipx install ai_plz

# Get help
$ plz --help
Usage: plz [OPTIONS] [USER_INPUT]...

  A simple command-line helper powered by LLM.

Options:
  -e, --env FILE            Path to optional env file
  -y, --run / -n, --no-run  Enable/Disable automatic execution
  -p, --prompt [en|zh]      Select prompt
  -z, --zh                  Shortcut for --prompt=zh
  --show-vars               Show environment vars
  --show-prompt             Show prompt
  --debug                   Enable debug logging
  -h, --help                Show this message and exit

# Example (User inputs will be concatenated by spaces)
$ plz Clear conda cache
Clear the conda cache to free up disk space and remove outdated packages.
>>> conda clean --all
Run the above command? [y/n]:

Configuration

Model settings should be provided through environment variables, which can be listed by plz --show-vars. Usually, you need to specify your own LLM provider through AI_PLZ_API_KEY, AI_PLZ_BASE_URL, and AI_PLZ_MODEL.

Variable name Type Description
AI_PLZ_API_KEY SecretStr LLM API key (Required)
AI_PLZ_BASE_URL str | None Base URL to LLM API
AI_PLZ_MODEL str The LLM model name (Required)
AI_PLZ_MAX_RETRIES int Max retries
AI_PLZ_AUTO_RUN bool | None Automatic execution (None for manual confirmation)

Caveats

When permitted, the command provided by LLM will be executed in a shell subprocess. It is recommended to check the command before execution, so a confirmation is required by default, as shown in the example usage above. You can pass the -y option to skip confirmation and take your own risk. You can also pass -n to skip execution without ask.

Metadata

Release files for ai_plz 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ai_plz 0.1.1
File Size Uploaded
ai_plz-0.1.1.tar.gz 21.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ai_plz 0.1.1
File Interpreter ABI Platform
ai_plz-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 28.9 kB

Release files / ai_plz-0.1.1.tar.gz

Download URL ai_plz-0.1.1.tar.gz
Size 21.6 kB
Tags Source
SHA-256 checksum
How to use checksums
409b134b9bb6e5b580c975ecbeb63b624cca27dab6c2873dabb26a92080c9b2c
BLAKE2b-256 checksum
How to use checksums
5a1a126dd2bcac2a7c9326828171a8430bd827180bcf91cd47ca4c490d3aef08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.6.17

Release files / ai_plz-0.1.1-py3-none-any.whl

Download URL ai_plz-0.1.1-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7a663ae8bac6318511edd08a1ea9adfde49a3494d085695f2b93abe95612231d
BLAKE2b-256 checksum
How to use checksums
4b44635e24f7f104139a33b1720c97cbc7e61f5b3128db5e8d3ed779179f1588
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.6.17

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page