Skip to main content

TRMX - Terminal Chat Interface

A powerful terminal-based chat interface that lets you interact with various AI models directly from your command line. TRMX stores your conversations locally and makes it easy to manage multiple chat sessions.

Features

  • Multiple LLM providers: OpenAI, Anthropic, TogetherAI, Groq, Fireworks, Cerebras, Google
  • Chat history: Store and retrieve conversations locally
  • Dynamic model listing: Uses airtrain's ListModelsSkillFactory to fetch available models for each provider
  • Environment variable support: Load API keys from .env files
  • Multiple prompt formats: System prompts and multi-turn chat
  • Intuitive command-line interface: Easy to use and navigate
  • Advanced session management: Titles and session IDs for easy reference
  • Display options: Custom time format display options
  • Auto-update capability: Stay up-to-date with the latest features

Installation

pip install trmx

Quick Start

# Start a new chat using your default provider and model
trmx

# List your saved chat sessions
trmx --list

# Update TRMX to the latest version
trmx --update

Detailed Usage Guide

Managing Chat Sessions

# Start a new chat session
trmx

# List all previous chat sessions
# Shows title, ID, creation date, message count, provider, and model
trmx --list

# Continue a previous session (multiple ways)
trmx 92f31c          # Using a partial session ID directly
trmx 92              # Even just a few characters will work
trmx --continue 92   # Using the --continue or -c flag
trmx -c 92           # Short form

# Delete a chat session (by its number in the list)
trmx --delete 3      # Deletes the 3rd session in the list

# Show information about chat storage location
trmx --info

Configuring Models and Providers

TRMX supports multiple AI providers including OpenAI, Anthropic, Together, Groq, Fireworks, Cerebras, and Google.

# List all available providers and their status
trmx --list-providers

# List available models for the current provider
trmx --list-models

# List models for a specific provider
trmx --list-models --provider openai   # GPT models
trmx --list-models --provider anthropic # Claude models
trmx --list-models --provider groq     # Llama and other models

TRMX dynamically fetches the latest available models from each provider using AirTrain's ListModelsSkillFactory, ensuring you always have access to the most up-to-date model options without requiring credentials for some providers like OpenAI.

# Use a specific provider and model for a single chat session
trmx --provider openai --model gpt-4
trmx --provider anthropic --model claude-3-opus-20240229
trmx --provider groq --model llama-3-70b-8192

# Set a new default provider/model configuration
trmx --add --provider openai --model gpt-4-turbo
trmx --add --provider anthropic --model claude-3-haiku-20240307

Display Settings

# Set the time display style for chat sessions
trmx --set-timestyle iso      # Display times in ISO format (2025-03-17T22:55:28)
trmx --set-timestyle human    # Display times in human-readable format (2025-03-17 22:55:28)
trmx --set-timestyle relative # Display times in relative format (2 hours ago)

# Show model's thinking process (for supported models like DeepSeek)
trmx --provider fireworks --model fireworks/deepseek-r1 --show-thinking

Maintenance

# Check the current version
trmx --version

# Update to the latest version
trmx --update

# Show help information
trmx --help

Chat Interface Features

During a chat session:

  • The provider and model information are displayed prominently
  • Chat history is shown when continuing a session
  • Type exit, quit, or q to end the session
  • Multi-line input is supported:
    • Use /m, /multiline, /multi, /p, or /paste (end with /end)
    • Use triple quotes """ or ''' (end with corresponding triple quotes)

Configuration

TRMX can be configured using environment variables:

  • TRMX_DIR: Path to store chat history, credentials, and configuration (default: ~/.trmx)
  • API key variables for each provider (e.g., OPENAI_API_KEY, ANTHROPIC_API_KEY, etc.)

You can set these in your shell or create a .env file in your working directory.

API Keys

TRMX will search for API keys in this order:

  1. Environment variables
  2. Credential files in ~/.trmx/credentials/
  3. Interactive prompt (if not found, TRMX will ask if you want to enter and save the key)

Example Configuration

For OpenAI:

export OPENAI_API_KEY=your-key-here

For Anthropic:

export ANTHROPIC_API_KEY=your-key-here

Session Information

When you list your sessions with trmx --list, you'll see:

  • Session title (auto-generated from the conversation)
  • Session ID (unique identifier)
  • Creation time
  • Message count
  • Provider (which AI service was used)
  • Model (which specific model was used)
  • Preview of the conversation

Requirements

  • Python 3.8 or higher
  • Internet connection for AI model access

Metadata

Release files for trmx 0.3.16

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

Source distribution (sdist)

Source distribution for trmx 0.3.16
File Size Uploaded
trmx-0.3.16.tar.gz 20.6 kB Details

Built distribution (wheel)

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

Total release size: 42.5 kB

Release files / trmx-0.3.16.tar.gz

Download URL trmx-0.3.16.tar.gz
Size 20.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3e67a6ed5084d4bab056e5bbebc33803546b1c11ef9520723ef37a94a52ba726
BLAKE2b-256 checksum
How to use checksums
46bda8053aee89092bf61b35158fa36a0485fc8224cf44bafea0ded2acc2432c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release files / trmx-0.3.16-py3-none-any.whl

Download URL trmx-0.3.16-py3-none-any.whl
Size 22.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
90d455385980e34a9b2c987c1ba7d8c696aa0f2a2f046bc2945ee02a7b58d62a
BLAKE2b-256 checksum
How to use checksums
8cf59dbdc03e784e29be964709c2fafc1b9c241a59b0066058ea2b34115d1acf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release history Release notifications | RSS feed

This release

0.3.16 This release

2 release files

0.3.14

2 release files

0.3.13

2 release files

0.3.12

2 release files

0.3.11

2 release files

0.3.10

2 release files

0.3.9

2 release files

0.3.8

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.10

2 release files

0.1.9

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