ali-agent
v1.0.1
Published
Custom AI CLI Agent with multi-provider LLM support and safe tool execution.
Downloads
41
Readme
🛸 Ali: The Alien Agent
▀▄ ▄▀
▄█▀███▀█▄
███▀█▀█▀███ 🛸 ALI: THE ALIEN AGENT
███████████ Mothership transmission link active.
█▀█████▀█
▄▀ ▀▄Ali is a powerful, secure, and extensible custom AI CLI Agent and financial analyzer TUI. Built with React and Ink, it features a premium terminal user interface with advanced AI capabilities.
🌟 Key Features
- 🛸 Multi-Provider LLM Integration: Natively supports Google Gemini, OpenAI, Anthropic Claude, DeepSeek, and local offline models via Ollama.
- 🔒 Sandboxed Command Execution: Automatically isolates command execution in closed streams to prevent process locks and unauthorized OS system calls.
- 🔌 Model Context Protocol (MCP): Standardized stdio client that dynamically registers external tools from any MCP compliant servers.
- ⚡ Dynamic Custom Skills: Hotload new custom instructions and sandboxed JS/TS executable scripts directly from URLs or raw file strings.
- 📈 Multi-Agent Financial Analyzer: Orchestrates specialized sub-agents (Technical, Fundamental, and News Analyzers) to inspect price trends and evaluate financial reports.
- 📝 Interactive Planning Interview Wizard: When starting Planning Mode, Ali launches an interactive TUI selection prompt to interview you step-by-step, clarifying the project tech stack, platforms, and custom details.
🛠️ Getting Started
Prerequisites
- Node.js 18 or higher
- npm
Installation
You can install Ali globally via npm or run it locally from the source repository.
Option 1: Global Installation (Recommended)
Install the package globally on your system:
npm install -g ali-agentOnce installed, you can start Ali from anywhere:
aliOption 2: Local Development Setup
- Clone the repository:
git clone https://github.com/Thawatchai-Yodyeam/ali-agent.git cd ali-agent - Install dependencies:
npm install
Running the Agent (Local Setup Only)
Build the project and run the CLI interface:
# Run in development mode (launches setup wizard if API keys are missing)
npm run dev
# Compile the TypeScript project
npm run build
# Run unit and integration tests
npm run test🎮 Interactive TUI Commands
Ali features a console-like chat prompt where you can run interactive commands (slash commands) to configure, manage, and inspect the session:
- 🪐
/help- List all terminal console commands. - ⚙️
/provider- Opens the Provider Manager interface. Add, edit, delete, and set active LLM provider profiles (Gemini, Claude, OpenAI, Ollama, LM Studio, DeepSeek, OpenRouter). When a profile is set active, it automatically sets the correct environment keys, host paths, and models. - 🎯
/model <provider> <model_name>- Switch LLM provider and model dynamically for the active session. - 🚀
/plan- Enter Planning Mode manually to create/refine the execution plan via structured markdown. - 🛑
/unplan- Exit/abort Planning Mode manually and lift planning rules. - 👥
/sub <role> <task>- Delegate a task manually to a specialized sub-agent (e.g.coder,tester,reviewer). - 🛠️
/tools- Print active agent developer capability tools. - 🔌
/mcp- List all connected Model Context Protocol (MCP) servers. - ⚡
/skills- List all dynamically installed custom skills. - 🧠
/effort- Cycle reasoning limit levels (low · medium · high). - 🧹
/clear- Clear chat display messages. - 🔄
/reset- Zap assistant memory and start a new clean session. - 🚪
/exit- Teleport back to mothership and exit the terminal.
📂 Project Structure
src/agent.ts- Core Orchestrator Agent logic and prompt controller.src/tui/- React TUI frontend views, input bindings, and custom question rendering.src/tools/- Built-in workspace capability tools (files, memory, search, planning).src/utils/- Sandbox utilities, MCP manager, API key manager, and path safety filters.src/agent/- Sub-agent orchestrator roles and prompts.
📜 License
Distributed under the MIT License. See LICENSE for more details.
