Getting Started with Terminal Agent
Terminal Agent is an LLM-powered CLI tool designed to help you interact with your terminal more efficiently.
Installation
Download Pre-built Binary (Recommended)
The easiest way to get started is to download the pre-built binary from GitHub Releases:
- Download the appropriate binary for your system
- Make it executable:
chmod u+x agent
- Move it to your PATH or use it directly:
./agent --help
Compile from Source
If you prefer to build from source:
- Ensure you have Go installed
- Clone the repository:
git clone https://github.com/laszukdawid/terminal-agent.git
- Navigate to the directory:
cd terminal-agent
- Build using Taskfile (recommended):
- Install to your path:
This will place the agent
binary in ~/.local/bin/agent
.
Configuration
Before using Terminal Agent, you'll need to configure it with your preferred LLM provider:
# Set your provider (e.g., "openai", "anthropic", "bedrock", "perplexity")
agent config set provider openai
# Set your preferred model
agent config set model gpt-4o-mini
You'll also need to set the appropriate API key as an environment variable, depending on your provider:
# For OpenAI
export OPENAI_API_KEY=your_api_key_here
# For Anthropic
export ANTHROPIC_API_KEY=your_api_key_here
# For Perplexity
export PERPLEXITY_KEY=your_api_key_here
# For Amazon Bedrock, configure your AWS credentials as usual
Quick Start
Once installed and configured, you can start using Terminal Agent:
# Ask a question
agent ask "What is a file descriptor?"
# Execute a task
agent task "List all files in the current directory sorted by size"
# List available tools
agent tool list
# Execute a specific tool
agent tool exec unix "ls -la"
Recommended Aliases
For even quicker access, set up an alias:
# Add this to your .bashrc or .zshrc
alias aa="agent ask"
# Or run the automatic setup
task install:alias
Now you can simply use: