From Assistant to Agent: A Paradigm Shift
Most AI tools for the command line work as assistants: you ask, they answer. ChatCLI goes further, transforming the AI into an autonomous agent that doesn’t just respond, but acts. The Plugin System and Agentic AI bring this vision to life:- You: Define the objective and provide the tools (plugins)
- The Agent: Orchestrates execution, connecting perception, reasoning, and action to solve complex problems
Plugin System Architecture
Automatic Discovery and Loading
ChatCLI uses an intelligent plugin manager that:Monitors the directory
~/.chatcli/plugins/ using fsnotifyDetects changes
Applies debounce
Validates the contract
Reloads automatically
Remote Plugins (Server-Side)
When connected to a server viachatcli connect, the client automatically discovers plugins available on the server. These plugins appear in /plugin list with the [remote] tag and are executed on the server via gRPC — no need to install anything locally.
Builtin Plugins
Some essential plugins come embedded in the ChatCLI binary and appear with the[builtin] tag. Builtin plugins require no installation and cannot be uninstalled. If you install a custom version in ~/.chatcli/plugins/ with the same name, it takes precedence over the builtin.
Flexible Plugin Lookup
The system accepts both invocation forms:- With @ (canonical form)
- Without @ (convenient shortcut)
Agent Configuration
Environment Variables
Configure agent behavior through environment variables:The ReAct Cycle: Reasoning and Action
The AgentMode implements the ReAct (Reasoning and Acting) framework, a transparent iterative loop:Reasoning (Thought)
Action (Tool Call)
<tool ... /> spelling — models backed by other agent CLIs (Devin, Codex, Claude Code) often shorten the tag. ChatCLI always emits the canonical <tool_call>, but is liberal in what it accepts.Execution (Plugin Invocation)
Observation (Feedback)
Reiteration
Plugin Management with /plugin
Available Commands
Usage Example
- List plugins
- View details
- Inspect metadata
Installing Plugins
Creating Plugins: The Complete Guide
The Plugin Contract
Every plugin must follow these rules:Be an Executable
- Compiled binary (Go, Rust, C++) or
- Script with shebang (
#!/usr/bin/env python3,#!/bin/bash) - Located in
~/.chatcli/plugins/ - Execute permission required (
chmod +x)
Respond to the --metadata Contract (Required)
--metadata, the plugin MUST print valid JSON to stdout:name: Must start with@description: Used by the AI to decide when to use the toolusage: Invocation syntaxversion: Semantic versioning
Implement --schema (Optional, but Recommended)
Communication via Standard I/O
stdout for the final result only, stderr for everything else (logs, progress, errors).Complete Example: @hello Plugin in Go
This example demonstrates all best practices:
Compilation and Installation
Compile
Grant execute permission (CRITICAL!)
Move to the plugins directory
Verify installation
Testing the Plugin
Debugging Plugins
Check if the Plugin Was Loaded
Check if the Plugin Was Loaded
/plugin list. If the plugin does not appear:- Check permissions:
ls -l ~/.chatcli/plugins/— Must show-rwxr-xr-x(with ‘x’) - Test the
--metadatacontract:~/.chatcli/plugins/your-plugin --metadata— Must return valid JSON - Enable debug logs in
.env:
Test Plugin Manually
Test Plugin Manually
- Test metadata:
~/.chatcli/plugins/your-plugin --metadata - Test schema:
~/.chatcli/plugins/your-plugin --schema - Test execution:
~/.chatcli/plugins/your-plugin arg1 arg2
Resolve Timeout Issues
Resolve Timeout Issues
- Increase timeout globally:
export CHATCLI_AGENT_PLUGIN_TIMEOUT=30m - Or in
.env:CHATCLI_AGENT_PLUGIN_TIMEOUT=30m
Advanced Example: Docker Hub Plugin
This example demonstrates integration with an external API:Use Case
- Use
@dockerhub redisto list tags - Filter tags with “alpine”
- Select the most recent version
- Run
docker run redis:<alpine-tag> - Validate that the container is running
Supported Languages
Any language that can create an executable, interact with standard I/O (stdin/stdout/stderr), and process command-line arguments.Recommendations by Use Case
Security and Best Practices
Input Validation
os.Exit(1) to signal errors to ChatCLI.Error Handling
stderr.Internal Timeouts
context.WithTimeout to prevent external operations from blocking the plugin indefinitely.Informative Logs
stderr so the user can follow the plugin’s execution in real time.Plugins in /coder Mode
The /coder mode is specialized in software engineering and uses the @coder plugin to execute its actions.@coder is a builtin plugin — it comes embedded in ChatCLI and works without installation.
In /coder, the AI emits tool calls in a strict format:
- First, it writes a short
reasoningblock (2 to 6 lines) - Then, it emits only one
tool_callwith JSON args
Next Steps
Plugin Examples
Create Your First Plugin
@hello template on this page to get startedShare with the Community
Contribute
The plugin system is your gateway to true automation. Start building your tools and transform your terminal into a teammate.