Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Lhammai CLI logo

License Tests Publish to PyPI

✨ Interact with any LLM from your terminal


Lhammai CLI allows you to interact with any LLM directly from your terminal using a simple, intuitive interface. Powered by the any-llm library, it seamlessly connects to various LLM providers, including OpenAI, Anthropic, and local servers such as Ollama, llamafile, and others. For a full list of supported providers, see the official any-llm documentation.

The name Lhammai comes from "Lhammas," Noldorin for "account of tongues", a work of fictional sociolinguistics, written by J. R. R. Tolkien in 1937.

Getting Started

Prerequisites

Installation

You can install the package from PyPI using pip (recommended):

pip install "lhammai-cli[ollama]"

From Source

  1. Clone the repository and navigate to the source directory:

    git clone https://github.com/dpoulopoulos/lhammai-cli.git && cd lhammai-cli
    
  2. Install the dependencies using uv:

    uv sync --group ollama
    
  3. Activate the virtual environment:

    source .venv/bin/activate
    

This installs the necessary dependencies to communicate with a local model via Ollama.

Usage

To begin, you'll need to run the Ollama server. For this example, you can use Docker for a quick setup.

This approach has some limitations, especially on a Mac. Since Docker Desktop doesn't support GPUs, it's better to run Ollama as a standalone application if you're using a Mac. For more detailed instructions, check the official Ollama documentation.

  1. Run the following command to start the Ollama server in a Docker container:

    a. CPU only:

    docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama
    

    b. Nvidia GPU:

    docker run -d --gpus=all -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama
    
  2. Run a model:

    docker exec -it ollama ollama run gemma3:4b
    
  3. Interact with the model:

    lhammai Hello!
    

Configure your application by creating a .env file in the root directory and adding your options: cp .default.env .env

You can also pipe content to lhammai from standard input. This is useful for analyzing logs, summarizing files, etc.:

cat dev.log | lhammai -p "explain:"

License

See the LICENSE file for details.

Metadata

Release files for lhammai-cli 0.1.0a10

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

Source distribution (sdist)

Source distribution for lhammai-cli 0.1.0a10
File Size Uploaded Provenance
lhammai_cli-0.1.0a10.tar.gz 7.7 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for lhammai-cli 0.1.0a10
File Interpreter ABI Platform
lhammai_cli-0.1.0a10-py3-none-any.whl Python 3 none any Details

Total release size: 18.3 kB

Release files / lhammai_cli-0.1.0a10.tar.gz

Download URL lhammai_cli-0.1.0a10.tar.gz
Size 7.7 kB
Tags Source
SHA-256 checksum
How to use checksums
febecdd9b3330c3ffb33962f46813b8be698a6351f0907efaed424079aad0d23
BLAKE2b-256 checksum
How to use checksums
94ef53aec9526a6eefae0774e2eee33ead19921794b2ebca61f232f3320afa4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 26, 2025.

Transparency log

Release files / lhammai_cli-0.1.0a10-py3-none-any.whl

Download URL lhammai_cli-0.1.0a10-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4a04e23a441314f7278a4e80b482f1f11ca9530ab0f6ca4aec0abfd2430fb167
BLAKE2b-256 checksum
How to use checksums
22842a272522efe0464b6e8e42b021a67ad994d30c33c6ea5da18bfbd495ce7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 26, 2025.

Transparency log

Security for lhammai-cli 0.1.0a10

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for lhammai_cli-0.1.0a10.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 26, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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