# Mac Terminal

> Opens macOS Terminal.app and executes a shell command in a new or existing window, with optional automatic sudo password entry via System Events. Use when the user asks to open a terminal, run a shell command, execute a CLI command in Terminal, launch Terminal.app, or run something with sudo on macOS.

- **Type:** Skill
- **Install:** `agentstack add skill-leionion-clawforge-mac-terminal`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [leionion](https://agentstack.voostack.com/s/leionion)
- **Installs:** 0
- **Category:** [Finance & Payments](https://agentstack.voostack.com/c/finance-and-payments)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [leionion](https://github.com/leionion)
- **Source:** https://github.com/leionion/ClawForge/tree/main/skills/05-Interaction/mac_terminal

## Install

```sh
agentstack add skill-leionion-clawforge-mac-terminal
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# mac-terminal — macOS Terminal Automation

Opens Terminal.app and executes shell commands via AppleScript, with optional automatic password entry for sudo commands.

## Usage

```bash
# Open Terminal and run a command
python3 mac_terminal.py "命令"

# Run a sudo command with automatic password entry (requires Accessibility permission)
python3 mac_terminal.py "sudo 命令" "密码"
```

## Examples

```bash
# Check version
python3 mac_terminal.py "openclaw-cn --version"

# Restart a service
python3 mac_terminal.py "openclaw-cn gateway restart"
```

## How it works

- Activates or opens Terminal.app via `osascript`
- Executes the command in the frontmost Terminal window (or creates a new one)
- If a password argument is provided, waits for the sudo prompt and types it via System Events keystroke simulation

## Requirements

- **macOS** with Terminal.app
- **Accessibility permission** required for automatic password entry (System Preferences > Privacy & Security > Accessibility)

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [leionion](https://github.com/leionion)
- **Source:** [leionion/ClawForge](https://github.com/leionion/ClawForge)
- **License:** Apache-2.0

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-leionion-clawforge-mac-terminal
- Seller: https://agentstack.voostack.com/s/leionion
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
