eliza-terminal-chat

Eliza Terminal Chat

A command-line interface for chatting with Eliza agents using Deno.

Requirements

Installation

No installation needed! The script runs directly with Deno.

Bash Alias Function

To simplify running the script, you can define a bash alias function:

function etc(){
  env SERVER_URL="${SERVER_URL:-http://localhost:3000}" \
  rlwrap \
  npx -y deno run \
  --allow-env=DEBUG,SERVER_URL \
  --allow-net \
  https://btwiuse.github.io/eliza-terminal-chat/terminal-chat.ts "$@"
}

You can override the SERVER_URL value by setting the environment variable:

export SERVER_URL=https://example.com:443

Usage

You can run the script in two ways:

  1. Specify an agent name:
    etc trump
    
  2. Let it automatically select the first available agent:
    etc
    

Environment Variables

Features

How it Works

  1. The script first connects to the Eliza server’s /agents endpoint to:
    • List available agents
    • Find the specified agent (if name provided)
    • Select the first available agent (if no name provided)
  2. Once connected, you can:
    • Type messages and press Enter to send
    • See agent responses in the terminal
    • Type ‘exit’ or press Ctrl+C to quit

Error Messages