Skip to content
Skill

Agent CLI

Gives a macOS app a CLI and optional MCP server so agents can drive it

Agent CLI is an open-source agent skill for developer tools. It is available on Claude Code and Codex.

Scripts
shell, Swift
Platforms
Claude Code, Codex
GitHub stars
2K
Last commit
License
MIT
Listing updated

Similar skills

About Agent CLI

This skill walks an agent through adding a command line interface to a macOS app, so tools like Claude Code or Codex can list, add, change, search and act on the app's data through the running app rather than its database file. Commands are mapped from the app's user stories and marked as read, write or destructive, with destructive commands only previewing until a confirmation flag is given. Each command reuses the same model code as the window's buttons so the window updates live.

The workflow runs a bundled bash script that copies the agent CLI source files into the app and wires the socket and build step, then a second script that starts a temporary copy of the app and checks help output, JSON results, error codes, read commands and the MCP tool list. It also covers writing a project-level agent skill and optionally registering the MCP server with Claude Code, Codex or Claude Desktop.

It expects a Swift macOS app, with Xcode and swift build available, and a shell for running the scripts. The examples are written for a task app, but the approach applies to any app with user stories in a docs folder.

When your agent uses it

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".

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 12 files (52 KB) on GitHub on 1 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the bama plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add daveebbelaar/bama
/plugin install bama@bama

Or copy only this skill to ~/.claude/skills/agent-cli:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/daveebbelaar/bama.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/agent-cli &&
cp -R "$tmp/skills/code/agent-cli" ~/.claude/skills/agent-cli &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/agent-cli inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/agent-cli to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/daveebbelaar/bama.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/agent-cli &&
cp -R "$tmp/skills/code/agent-cli" ~/.agents/skills/agent-cli &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/agent-cli inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/agent-cli to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/daveebbelaar/bama.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/agent-cli &&
cp -R "$tmp/skills/code/agent-cli" ~/.cursor/skills/agent-cli &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/agent-cli inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/daveebbelaar/bama.git --path skills/code/agent-cli

Or copy the folder to ~/.gemini/skills/agent-cli yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/agent-cli:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/daveebbelaar/bama.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/agent-cli &&
cp -R "$tmp/skills/code/agent-cli" ~/.copilot/skills/agent-cli &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/agent-cli inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/daveebbelaar/bama.git

Then copy bama/skills/code/agent-cli into your agent's skills folder as agent-cli. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Command mapping from stories
Turns the app's user stories into noun-verb commands, each marked as read, write or destructive.
Socket-based app control
Sends commands to the running app over a private socket so changes go through the app's own logic.
Optional MCP server
Exposes the same commands as MCP tools for clients that have no shell access.
Automated scaffolding script
Copies the agent CLI source files into a Swift app and links the built binary into the PATH.
Test script
Runs a temporary app copy through help, JSON, error and MCP checks.
Agent skill setup
Provides a template for a project-level skill that teaches agents how to use the CLI safely.

Good for

  • Let Claude Code list and add items in my macOS task app from the terminal
  • Expose my Swift app's data to Codex through a command line tool
  • Set up an MCP server so Claude Desktop can search and update my app
  • Write safety rules so agents preview destructive actions before deleting anything

Agent CLI FAQ

What does Agent CLI need to be installed?

It is aimed at a macOS app written in Swift. The setup uses swift build, a bash script and a build.sh file, and the MCP steps need Claude Code, Codex or Claude Desktop.

Does the CLI write to the app's database directly?

No. The CLI talks to the running app over a socket, so the app remains the single writer and its checks run. If the app is closed, the CLI opens it in the background.

Which destructive commands run without confirmation?

Destructive commands only report what they would do until the --yes flag is given.

Is the MCP server required?

No. The skill describes the CLI as always shipped and the MCP server as optional, for clients that have no shell.

How do I install Agent CLI in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/agent-cli to use it in all your projects, or to .claude/skills/agent-cli in one project. Or install the bama plugin, which includes it: /plugin marketplace add daveebbelaar/bama, then /plugin install bama@bama.

Does Agent CLI run scripts?

Yes. It runs shell and Swift scripts. Its scripts contain network calls. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Agent CLI?

Claude Code and Codex. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Agent CLI?

The closest alternatives to Agent CLI are Agentic os, MCP CLI, CLI creator, Adcp and New mac app.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from daveebbelaar/bama

  1. Runs a架构 check-in on a growing Swift app and refactors it in proven steps

    • Open source
    • 2K GitHub stars
    • Developer tools
  2. Guides a native macOS app through system entry points and their required permissions

    • Open source
    • 2K GitHub stars
    • Developer tools
  3. Measure and speed up a macOS app's hangs, stutter, memory and energy use

    • Open source
    • 2K GitHub stars
    • Developer tools
  4. Swift 6 and SwiftUI rules for macOS apps: concurrency, state, SwiftData and fixes

    • Open source
    • 2K GitHub stars
    • Developer tools
  5. Guides an agent to build a Liquid Glass macOS app icon as an Icon Composer file

    • Open source
    • 2K GitHub stars
    • Design and media
  6. Rebuilds a reference app's look as a native SwiftUI design kit, measured from screenshots

    • Open source
    • 2K GitHub stars
    • Design and media