# Agent CLI

> Agent CLI is an open-source agent skill for developer tools. Gives a macOS app a CLI and optional MCP server so agents can drive it. It is available on Claude Code and Codex.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex
- **Website:** https://github.com/daveebbelaar/bama/tree/main/skills/code/agent-cli
- **Repository:** https://github.com/daveebbelaar/bama
- **GitHub stars:** 2,009
- **License:** MIT
- **Skill name:** agent-cli
- **Collection:** https://github.com/daveebbelaar/bama
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-01

## About

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

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Runs shell and Swift scripts](https://github.com/daveebbelaar/bama/tree/HEAD/skills/code/agent-cli)
- [Network calls found in its scripts](https://github.com/daveebbelaar/bama/tree/HEAD/skills/code/agent-cli)
- [License: MIT](https://github.com/daveebbelaar/bama/tree/HEAD/skills/code/agent-cli)

## Features

- **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

## Install

### Claude Code

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

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

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

```sh
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.

### Codex

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

```sh
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.

### Cursor

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

```sh
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.

### Gemini CLI

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

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

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

### VS Code

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

```sh
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.

### Other agents

Get the folder:

```sh
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.

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

## Alternatives

- [Agentic os](https://ai-powered.com/skills/agentic-os-smartworldarafath): Agentic os is an open-source agent skill for developer tools.
- [MCP CLI](https://ai-powered.com/skills/mcp-cli): MCP CLI is an open-source agent skill for developer tools.
- [CLI creator](https://ai-powered.com/skills/cli-creator): CLI creator is a free agent skill for developer tools.
- [Adcp](https://ai-powered.com/skills/adcp): Adcp is an open-source agent skill for developer tools.
- [New mac app](https://ai-powered.com/skills/new-mac-app): New mac app is an open-source agent skill for developer tools.
- [Arduino CLI skill](https://ai-powered.com/skills/arduino-cli-skill): Arduino CLI skill is an open-source agent skill for developer tools.
- [Autonomous agent harness](https://ai-powered.com/skills/autonomous-agent-harness): Autonomous agent harness is an open-source agent skill for developer tools.
- [Writing agents](https://ai-powered.com/skills/writing-agents-xiaolai): Writing agents is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/agent-cli
