Skip to main content

OmniPrompt

OmniPrompt is a command-line utility for quickly testing and interacting with various large language model (LLM) APIs from different providers. "Omni" reflects the tool's ability to connect to all different AI providers, and "Prompt" is the core action.

Features

  • Test prompts against multiple AI providers from a single interface.
  • Support for major providers: Google, OpenAI, Anthropic, Groq, and more.
  • List available models for each provider.
  • Generate images using Google's Imagen model.
  • Run a single prompt against all configured providers simultaneously.
  • Secure and discoverable API key configuration using environment variables.

Setup

  1. Clone the repository:

    git clone https://github.com/andkamau/omniprompt.git
    cd omniprompt
    
  2. Install the package: You can install OmniPrompt in editable mode for development:

    pip install -e .
    

    This will install all dependencies and create the omniprompt command.

  3. Configure API Keys: OmniPrompt reads API keys from environment variables. It looks for a config.yaml file in the following locations:

    • ~/.config/omniprompt/config.yaml
    • ~/.omniprompt.yaml
    • The current directory (./config.yaml)

    Step 1: Create your config file Copy the provided config.yaml to one of the locations above.

    Step 2: Set the Environment Variables Set the environment variables with your actual API keys as defined in your config.yaml.

    Example:

    export OPENAI_API_KEY="sk-..."
    export GOOGLE_API_KEY="AIza..."
    

Usage

Once installed, you can use the omniprompt command from anywhere.

Basic Prompt

omniprompt -P openai -m gpt-4o -p "What are the three laws of thermodynamics?"

List Available Models

omniprompt -l google

Image Generation

omniprompt -P google -i "A futuristic cityscape at sunset, digital art."

Test All Providers

python omniprompt.py -a -p "Write a haiku about a robot learning to paint."

Arguments

Full Argument Short Argument Description
--provider -P The API provider (e.g., google, openai).
--model -m The specific model to use (e.g., gpt-4o).
--prompt -p The text prompt to send to the model.
--list-models -l List available models for a given provider.
--generate-image -i The prompt for image generation.
--all-providers -a A flag to send a prompt to all configured providers.

Metadata

Release files for omniprompt 1.0.0

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

Source distribution (sdist)

Source distribution for omniprompt 1.0.0
File Size Uploaded
omniprompt-1.0.0.tar.gz 12.3 kB Details

Built distribution (wheel)

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

Total release size: 22.4 kB

Release files / omniprompt-1.0.0.tar.gz

Download URL omniprompt-1.0.0.tar.gz
Size 12.3 kB
Tags Source
SHA-256 checksum
How to use checksums
dd66ca68e0b58c8e4b0554ac3fad3f7010fc611fd73646e924bb000698fb8658
BLAKE2b-256 checksum
How to use checksums
48a7a13591de558197f82969f1ad51623786b08f23d6cf663764f1cf19e53cdc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release files / omniprompt-1.0.0-py3-none-any.whl

Download URL omniprompt-1.0.0-py3-none-any.whl
Size 10.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
21b00a719cc7df0b76a22a7486d4d7c9cab4b037be8485c87c8448e71210360e
BLAKE2b-256 checksum
How to use checksums
0d46a9f8815d0ff58c8779cf71dc96d3e679fe8d638e394b754423c5a3375369
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release history Release notifications | RSS feed

This release

1.0.0 This release

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