my-ai-agent
v1.1.2
Published
A CLI-based app for non-interactive inference from popular AI CLI tools such as Claude Code, Gemini CLI, Codex, OpenCode, etc.
Maintainers
Readme
My AI Agent
A CLI-based app for non-interactive (direct) inference from popular AI CLI tools such as Claude Code, Gemini CLI, Codex, OpenCode, etc. Simply run agent "your prompt here" and the app will figure out the best AI CLI agent tool automatically to return answers to your queries.
Features
- AI Tool Management: Add, edit, delete, view, list, and search tools
- Benchmarking: Test all tools to find the fastest one with performance tracking
- Unified Interface: Run any tool with a simple command
- Smart Selection: Automatically use the best-performing tool with intelligent fallback
- Configuration Management: Export/import tool configurations
- Tool State Control: Enable/disable tools for maintenance
- Markdown Rendering: Format AI responses with proper terminal display
- Interactive & Non-Interactive: Supports both modes for automation
Commands
| Command | Description | Usage |
|---------|-------------|-------|
| add | Add a new AI tool | agent add (interactive) or agent add --name tool --command "cmd" --description "desc" |
| edit | Edit an existing tool | agent edit <tool-name> or agent edit --tool-name <name> --command "new cmd" |
| delete | Remove tools with confirmation | agent delete <tool-name> or agent delete <tool-name> --yes |
| view | Show detailed tool information | agent view <tool-name> |
| list | Display all tools with status | agent list |
| find | Search tools by name/description | agent find <query> |
| check | Benchmark all tools | agent check or agent check --debug --include-disabled |
| run | Execute a specific tool | agent run <tool-name> "prompt" or agent run <tool-name> "prompt" --debug |
| export | Export configuration to JSON | agent export or agent export /path/to/config.json |
| import | Import configuration from JSON | agent import /path/to/config.json |
| enable | Enable a disabled tool | agent enable <tool-name> |
| disable | Disable a tool | agent disable <tool-name> |
| onboard | Display comprehensive guide | agent onboard |
| [prompt] | Run prompt with best tool | agent "your prompt", agent your prompt, agent --file ./path/to/file.txt or agent "prompt" --no-autocheck |
Installation
npm install -g my-ai-agentOr use locally:
npm install
npm linkAdd CLI Tools
Add one or more of these or your own custom tools with add command:
OpenAI Codex
- Name:
codex - Command:
codex --yolo --model gpt-5.2 exec - Description:
OpenAI Codex
Claude Code
- Name:
claude - Command:
claude --dangerously-skip-permissions --no-chrome --model claude-sonnet-4-5 --output-format text -p - Description:
Claude Code
OpenCode
- Name:
opencode - Command:
opencode --model opencode/grok-code --format default run - Description:
OpenCode
Gemini CLI
- Name:
gemini - Command:
gemini -e none --model gemini-2.5-flash --yolo --output-format text - Description:
Gemini CLI
Tip: Replace gemini with qwen if you want that too.
Usage
Add a Tool
Interactive mode:
agent addNon-interactive mode:
agent add --name mytool --command "mytool run" --description "My AI tool"List All Tools
agent listView Tool Details
agent view <tool-name>Find Tools
Fuzzy search across tool names and descriptions:
agent find openaiEdit a Tool
Interactive mode:
agent edit <tool-name>Non-interactive mode:
agent edit <tool-name> --name "newname" --command "new command" --description "new desc"
agent edit --tool-name <tool-name> --description "updated description"Delete a Tool
Interactive mode (with confirmation):
agent delete <tool-name>Non-interactive mode:
agent delete <tool-name> --yes
agent delete --tool-name <tool-name> --yesEnable/Disable Tools
agent enable <tool-name>
agent disable <tool-name>Check All Tools
Benchmark all tools and determine the best one:
agent checkWith debug output to see each command being executed:
agent check --debugInclude disabled tools in benchmarking:
agent check --include-disabledRun a Specific Tool
agent run <tool-name> "your prompt here"With debug output:
agent run <tool-name> "your prompt here" --debug
# Shows: Debug: Executing command: <actual-command>
# Then streams the tool output in real-timeRun Best Tool
Use the best tool automatically with a direct prompt:
agent "tell me a joke"or without quotes:
agent tell me a jokeSkip automatic fallback if best tool fails:
agent "tell me a joke" --no-autocheckFile Input Support
You can also provide a file as input using the --file flag:
agent --file ./path/to/prompt.txtThis works with any text-based file (.txt, .md, .js, .py, etc.):
agent --file ./my-prompt.md
agent --file ./instructions.js
agent --file ./requirements.txtThe agent will read the file content and use it as the prompt for the AI tool.
You can also combine the file flag with other options:
agent --file ./prompt.txt --no-autocheckHelp
Get help with the --help option:
agent --help
# or
agent -hThis will show all available commands and options, including the default usage for running prompts.
Configuration Management
Export configuration to a file:
agent export
agent export /path/to/config.jsonImport configuration from a file:
agent import /path/to/config.jsonOnboarding Guide
Display comprehensive onboarding information, useful for AI agents:
agent onboardConfiguration
Configuration is stored in a platform-specific location:
- Windows:
%APPDATA%\my-ai-agent\config.json - macOS/Linux:
~/.config/my-ai-agent/config.json
Development
Build
npm run buildRun Tests
npm testType Check
npm run type-checkDevelopment Mode
npm run devRequirements
- Node.js >= 14.0.0
License
MIT
