Skip to main content

Command-line tool for interacting with LLMs

Project description

azc - LLM Chat from the command-line

A command-line tool for interacting with LLMs.

Why should you use this?

  • If you're a command-line junkie, you don't need to switch to another tool to chat with your LLM
  • One tool, multiple LLMs (OpenAI, Anthropic, Ollama, Gemini) - Why settle for one when you can have them all?
  • Pay-as-you-go pricing for LLM providers (Cheaper in many cases)

Features

  • Multi-provider support
    • Ollama
    • OpenAI
    • Anthropic
    • Gemini
  • Streaming responses (see response as it is being generated)
  • Persistent command-line history (use up and down arrows to navigate)
  • Chat history & reset (full discussion, start new chat)
  • Switch provider and model (compare models and providers)
  • Markdown output (nicely formatted headings, lists, tables, etc.)
  • Command-line parameters (first prompt)

Possible future features

  • Support for more LLM providers
  • Command-line completion (for providers and models)
  • Support RTL languages
  • Save output to file
  • Patterns library (a-la fabrik)
  • Upload files
  • Aggregate responses from multiple providers
  • Support more modes (image generation, transcription, etc.)
  • Automated testing

Installation

pip install azc

Running

% azc
azc> how tall is the eifel tower?
openai:gpt-4o-mini: The Eiffel Tower is approximately 1,083 feet (330 meters) tall, including its antennas. The structure itself, without antennas, is about 1,063 feet (324 meters).
azc> q
Bye!
%

You can specify the first prompt as a command-line argument:

% azc "what is the capital of the moon?"
openai:gpt-4o-mini: The capital of the moon is called "New Moon".
azc>

Command-line parameters

  • default parameter: first prompt
  • -d / --double-enter - Press enter twice to submit - This is useful for those who want to use use multi-line prompts without pressing ctrl-j to add new line.
  • --provider - The provider to use (coming soon)
  • --model - The model to use (coming soon)

example:

% azc "knock knock"
providers configured: openai, ollama, anthropic, gemini
using: openai:gpt-4o-mini
type ? or h for help
...
openai:gpt-4o-mini (1st message)
Who's there?

azc>

Commands

  • q or exit - exit the program
  • h or ? - show help
  • l - list models
  • n - start new chat
  • p - Change provider
  • m - Change model
  • ctrl-n - new line

Setup

You will need to configure at least one LLM API.

You should create a .env file which contains your API Key/s.

See .env.sample for a sample file

Here are the links to the API sign-up pages (or download in case of Ollama):

Contributing

Contributions are welcome! Please feel free to submit a PR.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

azc-1.0.6.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

azc-1.0.6-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file azc-1.0.6.tar.gz.

File metadata

  • Download URL: azc-1.0.6.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for azc-1.0.6.tar.gz
Algorithm Hash digest
SHA256 66bbfdae106eccf4058def58b579b1acb4a6e387625226c20cab3888ec3d6b3d
MD5 095fd285655dd72d4194a8021b19ed2f
BLAKE2b-256 f769e4b91b2fa557163b02b0637b46295b984fd98d639d45971e05e57b5745a9

See more details on using hashes here.

File details

Details for the file azc-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: azc-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 13.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for azc-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 0ae8514fcbb8a7c911c7278050317f2c3c2816727be87941ceeb7193401dd1c9
MD5 e3d84427343f6d0d6fd7f4dc68e0d984
BLAKE2b-256 d75936f9b7c461da9d98dc9ac32d3ac8d543e178a1fa573fc28854018246bb68

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page