DEV Community

AI-Hub-Admin
AI-Hub-Admin

Posted on

I Keep Forgetting CLIs So Does My AI Agent - Simplifying CLI Usage for Human and AI Agents with Hints and Completion

As an LLM/AI Agent application developer, I frequently use tools like Claude Code, Codex, or OpenClaw to manage agent tasks via MCP, Skills, and especially command-line interfaces (CLIs).

One problem I face: I can never remember all the exact CLI commands, positional arguments, or options for tools like playwright-cli, claude, or codex. Searching through documentation or README.md files every time is tedious
and I am just too lazy to do it.

To solve this, I spend some time to built a CLI helper tool with hints and auto-completion capabilities.
This tool helps both humans and agents quickly discover and run CLI commands without memorizing them. And I would like to share with the community
agtm which means agent manager or agent marketplace.

How It Works

For example, if you want to test playwright-cli for web page reading but forget the exact commands:

  1. Type a keyword, e.g., play, after agtm run:
npx agtm run play
Enter fullscreen mode Exit fullscreen mode

Then you can follow the guidance and cli hints to finalize your cli.

Step 1. Choose the suggested Skill ID

Skill ID suggestions:
  1. microsoft/playwright-cli
  2. paul-gauthier/aider
  3. anthropic/claude-code
  4. openai/codex-cli
  5. googleworkspace/cli
Enter fullscreen mode Exit fullscreen mode

Step 2. Choose the suggested CLI:

Command hints:
  1. playwright-cli goto <url> # navigate to a url
  2. playwright-cli open [url] # open browser, optionally navigate to url
Enter fullscreen mode Exit fullscreen mode

Step 3.
Complete the final command by filling in parameters:

playwright-cli goto https://www.google.com
agtm run microsoft/playwright-cli playwright-cli goto https://www.google.com
Enter fullscreen mode Exit fullscreen mode

Then it gives you exact cli running results

### Ran Playwright code
Enter fullscreen mode Exit fullscreen mode


js
await page.goto('https://www.google.com');

### Page
- Page URL: https://www.google.com/
- Page Title: Google
### Snapshot
- [Snapshot](../aiagenta2z/agtm/.playwright-cli/page-2026-03-20T08-03-59-159Z.yml)

Enter fullscreen mode Exit fullscreen mode


shell

Installation

npm install -g @aiagenta2z/agtm
npx agtm setup --hint  # Builds a local RAG of CLI hints
npx agtm run <provider_unique_id> <agent_cli>
Enter fullscreen mode Exit fullscreen mode
provider_unique_id: identifies the project owner/repo (GitHub style)
agent_cli: the CLI commands in that repository
Enter fullscreen mode Exit fullscreen mode

Agent Mode

Agents like Claude or Codex can also use the hint system to run commands automatically if there are documents mismatch and skills update. In agent mode, the tool searches relevant Skill IDs and CLI suggestions for non-interactive execution:

npx agtm run play --mode agent
Enter fullscreen mode Exit fullscreen mode
Skill ID suggestions:
  1. microsoft/playwright-cli
     - playwright-cli open [url]  # open browser, optionally navigate to url
     - playwright-cli goto <url>   # navigate to a url
Enter fullscreen mode Exit fullscreen mode
prompt: Help me visit producthunt.com and extract front-page items to a local text file.
Enter fullscreen mode Exit fullscreen mode

Architecture

CLI RAG Local:
agtm setup builds a local RAG (trie) of CLI hints. It matches Skill IDs first, then provides CLI suggestions and hints for the selected Skill.

Agent Mode:
Enables agents to use CLI hints automatically. Instead of interactive selection, the tool provides relevant CLI suggestions from the local RAG.

What do you think of the cli hint tool that work for both human and agent?

Please welcome to contribute to github aiagenta2z/agtm of the clis repos.

Top comments (1)

Collapse
 
aihubadmin profile image
AI-Hub-Admin

To test the latest agtm supported clis list and onekey-gateway agent apis,
you can visit GitHub agtm and GitHub Onekey-Gateway. And try with google-maps, gemini-nano-banana, lego 3D render examples.