@aiiware/aii
v0.5.4
Published
AI-powered CLI assistant for terminal productivity
Maintainers
Readme
@aiiware/aii
AI-powered CLI assistant with autonomous tool execution. An intelligent agent that can read, write, search, and execute commands in your terminal.
Installation
npm install -g @aiiware/aiiRequirements
- Node.js 18+
- Aii Server running (default:
localhost:26169)
Quick Start
# Start interactive agent mode
aii
# Or run a single query
aii "explain what this project does"
# Pipe content for processing
cat error.log | aii "summarize the errors"
# Auto-approve tool execution
aii --autoAgent Mode (Default)
Aii runs as an intelligent agent that can autonomously execute tools to complete tasks:
aii # Start interactive session
aii "your task" # Run single task and exitAvailable Tools
| Tool | Description | |---------------|--------------------------------| | Read | Read file contents | | Write | Create or overwrite files | | Edit | Make targeted edits to files | | Glob | Find files by pattern | | Grep | Search code with regex | | Bash | Execute shell commands | | WebSearch | Search the web | | WebFetch | Fetch and parse web pages |
Interactive Commands
In agent mode, use these commands:
/help Show available commands
/clear Clear conversation history
/history Show conversation history
/stats Show session statistics (tokens, cost)
/model <model> Switch LLM model
/provider <name> Switch LLM provider
/context View context window usage
/init Generate AGENTS.md for your project
/init --with-hooks Generate AGENTS.md + hooks.json template
/memory View loaded project instructions
/memory reload Hot-reload instructions without restart
/hooks View configured hooks
/hooks reload Hot-reload hooks without restart
/exit Exit the sessionKeyboard Shortcuts
| Key | Action |
|------------|----------------------------|
| Enter | Submit input |
| Esc | Cancel current request |
| Ctrl+C | Exit immediately |
| Up/Down | Navigate input history |
| Tab | Autocomplete commands |
Output Modes
aii "query" --clean # Just the result
aii "query" --standard # Result + metrics (default)
aii "query" --thinking # Full reasoning chainPrompt Templates
Use pre-built templates for common tasks:
aii prompt list # List available prompts
aii prompt show <name> # Show prompt details
aii prompt use <name> --var value # Use a prompt templateConfiguration
aii config show # Show current configuration
aii config validate # Validate configuration
aii config set <key> <value> # Set a configuration value
aii config model <model> # Change LLM model
aii config provider <provider> # Change LLM providerConfig Files
Configuration is stored in ~/.aii/:
config.yaml - Main configuration:
llm:
provider: anthropic
model: claude-sonnet-4
temperature: 0.7
api:
url: http://localhost:26169secrets.yaml - API keys:
anthropic_api_key: sk-ant-...
openai_api_key: sk-...
deepseek_api_key: sk-...Or use environment variables: ANTHROPIC_API_KEY, OPENAI_API_KEY, DEEPSEEK_API_KEY
CLI Options
| Option | Description |
|----------------------|----------------------------------|
| --auto | Auto-approve all tool executions |
| --clean | Clean output mode |
| --standard | Standard output mode (default) |
| --thinking | Show full reasoning |
| --model <model> | Override LLM model |
| --host <host:port> | API server host |
| --no-streaming | Disable streaming output |
| --quiet | Minimal output |
| --verbose | Show detailed stats |
| --no-context | Disable context management |
Context Window Management (v0.3.0)
Prevents "token limit exceeded" errors in long conversations with intelligent auto-summarization.
Status Bar Indicator: Shows real-time usage with color-coded alerts (🟢 🟡 🔴)
Dynamic Thresholds: Automatically adjusts based on each model's output capacity
- Claude Sonnet (32% output) → 63% critical threshold
- Gemini Flash (3% output) → 92% critical threshold
Auto-Summarization: Older messages summarized when reaching critical threshold (~70%), preserving recent ~30K tokens in full
Commands:
/context- View detailed usage breakdown/context clear- Manually trigger summarization
Project Instructions (v0.5.0)
Teach the agent your project's conventions. Create an AGENTS.md file in your project root, and the agent will automatically learn your coding standards, commands, and rules.
Quick Setup
# Auto-generate AGENTS.md by analyzing your project
/init
# View what instructions are loaded
/memoryThe /init command detects your language, framework, build commands, and generates a customized AGENTS.md. Edit it to add your team's conventions.
Supported Files
The agent discovers instruction files in this priority order:
AII.mdorAGENTS.mdin project root~/.aii/AGENTS.mdfor global preferences
Example AGENTS.md
# My Project
## Commands
- Build: `npm run build`
- Test: `npm test`
- Lint: `npm run lint`
## Coding Standards
- Use TypeScript strict mode
- Prefer async/await over callbacks
- Maximum line length: 100
## Safety Rules
Never modify without asking:
- .env files
- Database migrationsHooks (v0.5.0)
Extend agent behavior with custom scripts. Create .aii/hooks.json to run scripts before/after tool execution:
# Generate a hooks template
/init --with-hooks
# View configured hooks
/hooksHooks let you add validation, logging, or approval gates. See the hooks documentation for details.
System Commands
aii doctor # System health check
aii --help # Show help
aii --version # Show versionFeatures
- Autonomous Agent: Executes multi-step tasks with tool use
- Real-time Streaming: Token-by-token response display
- Interactive Mode: Multi-turn conversations with full context
- Tool Execution: Read, write, search, and run commands
- Multiple Providers: Claude, GPT, Gemini, DeepSeek
- Prompt Templates: Pre-built templates for common tasks
- Project Instructions: Teach the agent your conventions with AGENTS.md
- Input History: Navigate previous inputs with arrow keys
- Cancellation: Press Esc to cancel any request
Links
- Website: aiiware.com
- Issues & Feedback: GitHub
License
Proprietary - Copyright 2025-present AiiWare.com. All Rights Reserved.
