CLI configuration

Prakasa API is fully compatible with the OpenAI API standard. This means you can use your favorite command-line tools to access Claude 3.5, GPT-4o, and Gemini Pro directly from your terminal.

Below are the configuration guides for the most popular open-source CLI tools.


AIChat is a powerful, all-in-one CLI tool written in Rust. It features syntax highlighting, role management, and REPL mode.

Installation

macOS / Linux (Homebrew)

Bash

brew install aichat

Windows (Winget)

PowerShell

winget install aichat

Configuration

Run aichat once to generate the config file, then edit it:

  • Config Path:

    • macOS/Linux: ~/.config/aichat/config.yaml

    • Windows: %APPDATA%\aichat\config.yaml

Edit config.yaml:

YAML

Usage

Bash


2. Shell-GPT (sgpt)

Shell-GPT allows you to generate shell commands, code snippets, and documentation directly in your terminal using Python.

Installation

Requires Python 3.8+.

Bash

Configuration

Set the environment variables in your shell profile (~/.zshrc or ~/.bashrc):

Bash

Reload your shell:

Bash

Usage

Bash


3. LLM (Simon Willison's Tool)

LLM is a CLI utility and Python library for interacting with Large Language Models. It supports a plugin system for extended functionality.

Installation

Bash

Configuration

Configure the default OpenAI key to point to Prakasa:

Bash

Usage

Bash


4. Advanced: Curl (Raw Request)

For debugging or integration into scripts, you can always use raw curl.

Bash


💡 Pro Tip: Model Aliases

To save time, we recommend adding aliases to your shell configuration for frequently used models.

Add to ~/.zshrc:

Bash

Usage:

Bash

Last updated