Agent Cli logo

Agent Cli

Community
daveebbelaar
agent-cli

Optional command line and MCP server for a macOS app, so Claude Code, Codex, and scripts can drive it (list, add, change, search, act) through the running app. Use when the user wants agents to work with their app or its data, asks for a CLI, an MCP server, or automation for the app, or says "Claude should be able to use my app".

Overview

Publisherdaveebbelaar
Repositorybama
Skill nameagent-cli
Stars
952
Forks
136
Bundled files
11
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 11 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by daveebbelaar on GitHub. Read the source before you install it.

Installation

Install the Agent Cli AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/daveebbelaar/bama/tree/main/skills/code/agent-cli
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/daveebbelaar/bama.git /tmp/bama
mkdir -p .claude/skills
cp -r /tmp/bama/skills/code/agent-cli .claude/skills/agent-cli
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Agent Cli in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Agent Cli on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Agent Cli is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Agent CLI

Give the app a command line, so an agent can do everything a person can do in the window: tasks items add --title "Call the dentist". The app binary is the CLI. Each command goes to the running app over a private socket, runs there like a button press, and the window updates live.

text
Claude Code --bash--> tasks items add ...  --socket--> Tasks.app (runs the command, saves, redraws)
Claude Desktop --MCP--> tasks mcp           --socket--> same commands, same app

CLI, MCP, or App Intents

Way inWho uses itShip it
CLIClaude Code, Codex, scripts, people in TerminalAlways. Agents learn it from --help, and it costs no context until used
MCP (tasks mcp)Claude Desktop and other clients with no shellOptional. The same commands, one tool each. One line to register
App IntentsSiri, Spotlight, ShortcutsSeparate work. Agents cannot call them

The CLI talks to the running app, never to the database file. Then there is one writer, the app's checks and side effects run, and the window shows the change at once. If the app is closed, the CLI opens it in the background. Rules and reasons: rules.md.

1. List the commands

Read the user stories (docs/stories/). Write each thing a person does as a command, <noun> <verb>, and mark it:

  • read: items list, items show, status. Safe to run any time.
  • write: items add, items update, open. Changes data, can be undone.
  • destructive: items delete, mail send. Only reports what it would do until --yes is given.

Add status (is it running, what is open, counts) and open <page> (show a page in the window), so an agent can see and steer the app.

Check: every M1 story has its commands, and each command is marked.

2. Add the files

bash
"${CLAUDE_SKILL_DIR}/scripts/add-agent-cli.sh" <app-folder> <cli-name>

It copies Sources/<App>/Agent/ (core, socket, CLI, MCP, example commands) and Main.swift, moves @main to Main.swift, starts the socket in the main view's .task, and makes build.sh link ~/.local/bin/<cli-name>. Apps not made from the template: do the same by hand, following the script.

Check: the script printed "added the agent CLI", and swift build passes.

3. Write the commands

Replace the examples in Agent/AgentCommands.swift. Each command has a name, a one-line summary, its params, a full example, its mark (readOnly or destructive), and a run that uses the same model code as the window's buttons. Never copy logic: call the function the button calls.

  • Every model an agent touches gets var uuid: UUID = UUID(). Commands show the first 8 characters as id, and accept any unique start of it.
  • Results are small JSON objects: the fields an agent needs, not the whole model. Lists take --limit and --offset, and return total and nextOffset.
  • Errors throw AgentError with a message that says how to fix it: "no item with id 3f2a. Run tasks items list".

All the rules: rules.md.

Check: <cli-name> help lists every command from step 1, and <cli-name> help <command> shows its params and example.

4. Build and install

bash
./build.sh
<cli-name> help

build.sh installs the app and links ~/.local/bin/<cli-name> to the binary inside it, so the CLI always matches the app. If the shell cannot find it, add ~/.local/bin to PATH in ~/.zshrc.

Check: <cli-name> --version prints the app's version.

5. Test

bash
"${CLAUDE_SKILL_DIR}/scripts/check-agent-cli.sh" <cli-name>

It starts a test copy of the app on a temporary database, checks help, JSON output, error codes, every read command, and the MCP tool list, then quits the test copy. Then run each write command once by hand, with APP_STORE=/tmp/<App>-test.store, and look at the window: the change shows without a reload.

Check: the script prints PASS agent CLI.

6. Teach agents

Write .claude/skills/<cli-name>/SKILL.md in the app's repo from teach-agents.md: what the app is, the safety rules, the main commands, and "run <cli-name> help for the rest". To use the app from any folder, also copy it to ~/.claude/skills/<cli-name>/. Add one line to the app's CLAUDE.md: "Drive the app with <cli-name>. See .claude/skills/<cli-name>/SKILL.md."

Check: a fresh claude -p "List my starred items with <cli-name>" finds the CLI and answers from real data.

7. MCP, when the user wants it

For Claude Desktop, or to get one approval prompt per tool:

bash
claude mcp add --scope user <cli-name> -- ~/Applications/<App>.app/Contents/MacOS/<App> mcp
codex mcp add <cli-name> -- ~/Applications/<App>.app/Contents/MacOS/<App> mcp

Claude Desktop: add it to ~/Library/Application Support/Claude/claude_desktop_config.json under mcpServers, with the full path and "args": ["mcp"]. More in teach-agents.md.

Check: claude mcp list shows the server as connected.

Done when every command from step 1 runs through the CLI against the running app, check-agent-cli.sh prints PASS agent CLI, the app's repo has the agent skill from step 6, and a fresh Claude Code session can do a real task with it.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Agent Cli AI skill do?

Optional command line and MCP server for a macOS app, so Claude Code, Codex, and scripts can drive it (list, add, change, search, act) through the running app. Use when the user wants agents to work with their app or its data, asks for a CLI, an MCP server, or automation for the app, or says "Claude should be able to use my app".

Why use Agent Cli on TypingMind?

Because you install it once and use it with any model. Agent Cli is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Agent Cli in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/daveebbelaar/bama/tree/main/skills/code/agent-cli. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Agent Cli?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Agent Cli?

As many as you like. As long as a model supports skills, you can use Agent Cli with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Agent Cli AI skill free?

Yes. It is published on GitHub by daveebbelaar under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇