A terminal-based AI agent that executes system tasks using natural language. Talk to your terminal using ?? prefix.
π Full Tutorial β Installation, usage, multi-turn conversations, contextual references, and how to add custom modules.
$ pwd
/home/user
$ ?? listame esta carpeta
=== /home/user ===
Documents/
Downloads/
Projects/
$ ?? crear carpeta test
Folder 'test' created
$ ?? copiar go.mod a test
Copied 1 items to '/home/user/test'
$ ?? crear carpeta alpha en C:\temp, copiar go.mod a alpha, listar C:\temp
[1] create (OK):
Folder 'alpha' created in 'C:/temp'
[2] copy (OK):
Copied 1 items to 'C:/temp/alpha'
[3] list (OK):
=== C:/temp ===
alpha/
go.mod
- Go 1.26+
- Bash (Git Bash on Windows, or native Bash on Linux/macOS)
- A running LLM server (LM Studio recommended)
# Clone the repository
git clone https://github.com/yourusername/termagent_v2.git
cd termagent_v2
# Build
go build -o termagent .
# Add to your PATH
export PATH="$PATH:$(pwd)"
# Add ?? function to your .bashrc
echo '
??() {
termagent "$@"
}' >> ~/.bashrc
# Reload
source ~/.bashrc# Build
go build -o termagent.exe .
# Add to PATH (edit ~/.bashrc)
export PATH="$PATH:/c/disco d/agentes_discusion/termagent_v2"
# Add ?? function
echo '
??() {
termagent.exe "$@"
}' >> ~/.bashrc
source ~/.bashrcSet environment variables before running:
# Required
export AGENT_API_KEY="your-api-key"
export AGENT_BASEURL="http://localhost:1234/v1"
export AGENT_PROVIDER="lmstudio"
# Optional
export AGENT_MODEL="your-model-name"| Provider | Base URL | Notes |
|---|---|---|
| lmstudio | http://localhost:1234/v1 | Default, local |
| openai | https://api.openai.com/v1 | Cloud |
| ollama | http://localhost:11434/v1 | Local |
| anthropic | https://api.anthropic.com | Cloud |
$ ?? listame esta carpeta
$ ?? crear carpeta test
$ ?? copiar go.mod a test
$ ?? listar C:\temp
termagent "listame esta carpeta"
termagent "crear carpeta test"termagent
> listame esta carpeta
> crear carpeta test
> exitecho "listar esta carpeta" | termagent- You type
?? <message>in bash - Bash calls
termagent "<message>" - LLM generates JSON tool call(s)
- Agent resolves paths using
resolver.sh - Agent executes bash scripts
- Results print directly in your terminal
- Relative paths:
go.modβ searches current directory - Subdirectories:
modulos/fileβ resolves to full path - Absolute Windows paths:
C:\tempβ works as-is - Spaces in paths:
mi carpeta con espaciosβ handled correctly
Create a new directory in modulos/ with two files:
#!/bin/bash
while [[ $# -gt 0 ]]; do
case $1 in
--param1=*) PARAM1="${1#*=}" ;;
*) echo "Unknown parameter: $1" ;;
esac
shift
done
echo "Result: $PARAM1"## mi_tool
**Description:** Description of what it does
**INPUTS:**
- `param1` (string, required) - Parameter description
**OUTPUTS:**
- `result` (string) - Output description
**Examples:**
- "user input" β {"name":"mi_tool","arguments":{"param1":"value"}}
**Instructions:**
- Special instruction for the LLMmodulos/
βββ file/
β βββ modulo.md
β βββ create.sh
β βββ copy.sh
β βββ ...
βββ system/
β βββ modulo.md
β βββ sysinfo.sh
βββ core/
β βββ resolver.sh # Path resolution
βββ INDEX.md
MIT