Drive logo

Drive

Community
disler
drive

Terminal automation CLI for AI agents. Use drive to create tmux sessions, execute commands, send keystrokes, read output, poll for patterns, run commands in parallel across sessions, and manage processes. Always use --json for structured output.

Overview

Publisherdisler
Repositorymac-mini-agent
Skill namedrive
Stars
274
Forks
74
Bundled files
Instructions only
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.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

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

Installation

Install the Drive 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/disler/mac-mini-agent/tree/main/.claude/skills/drive
  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/disler/mac-mini-agent.git /tmp/mac-mini-agent
mkdir -p .claude/skills
cp -r /tmp/mac-mini-agent/.claude/skills/drive .claude/skills/drive
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Drive 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 Drive 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 Drive 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.

Drive — Terminal Automation via tmux

Run from: cd apps/drive && uv run python main.py <command>

Drive gives you full programmatic control over tmux sessions — creating terminals, running commands, reading output, and orchestrating parallel workloads.

Commands

session — Manage tmux sessions

bash
drive session create agent-1 --json                     # Opens a Terminal window (headed — default)
drive session create agent-1 --window build --json      # Named window, headed
drive session create agent-1 --detach --json            # Headless (no Terminal window)
drive session list --json                                # List all sessions
drive session kill agent-1 --json                        # Kill a session

Default is headed — a new Terminal.app window opens attached to the session so you can watch live. Only use --detach when you explicitly need a headless session.

run — Execute command and wait for completion

Uses sentinel protocol (__DONE_<token>:<exit_code>) for reliable completion detection.

bash
drive run agent-1 "npm test" --json                     # Run and wait
drive run agent-1 "make build" --timeout 120 --json     # Custom timeout
drive run agent-1 "ls" --pane 1 --json                  # Target specific pane

Returns: exit code, captured output between sentinels.

send — Raw keystrokes (no completion waiting)

For interactive tools (vim, ipython, etc.) where sentinel detection would interfere.

bash
drive send agent-1 "vim file.txt" --json                # Send command
drive send agent-1 ":wq" --json                         # Send vim command
drive send agent-1 "y" --no-enter --json                # Send without Enter

logs — Capture pane output

bash
drive logs agent-1 --json                               # Current pane content
drive logs agent-1 --lines 500 --json                   # Last 500 lines of scrollback
drive logs agent-1 --pane 1 --json                      # Specific pane

poll — Wait for pattern in output

bash
drive poll agent-1 --until "BUILD SUCCESS" --json                   # Wait for pattern
drive poll agent-1 --until "ready" --timeout 60 --json              # With timeout
drive poll agent-1 --until "error|success" --interval 2.0 --json   # Custom interval

Pattern is a regex. Returns matched text and full pane content.

fanout — Parallel execution

bash
drive fanout "npm test" --targets agent-1,agent-2,agent-3 --json         # Same command, multiple sessions
drive fanout "git pull" --targets a1,a2,a3 --timeout 30 --json           # With timeout

Runs command in all target sessions concurrently using ThreadPoolExecutor. Returns ordered results.

Key Patterns

  • Create sessions first — drive session create before running commands (headed by default — opens a Terminal window)
  • Use run for commands that complete — It waits and gives you exit code + output
  • Use send for interactive tools — vim, ipython, anything that doesn't "finish"
  • Use poll to wait for async events — Watch for build completion, server startup, etc.
  • Use logs to inspect — Check what happened in a pane
  • Use fanout for parallel work — Run same command across multiple sessions
  • Use proc for process management — List, kill, and inspect processes instead of raw ps/kill
  • Use --json always — Structured output for reliable parsing
  • Write all files to /tmp — Any JSON, logs, or other files you generate must go to /tmp/. Never write output files into the project directory.

proc — Process management

List, kill, inspect, and monitor processes. The agent's replacement for Activity Monitor.

bash
drive proc list --json                                    # All user processes
drive proc list --name claude --json                      # Filter by name
drive proc list --session job-abc123 --json               # Processes in a tmux session
drive proc list --parent 12345 --json                     # Children of a PID
drive proc list --cwd /path/to/project --json             # Processes running from a directory
drive proc kill 12345 --json                              # Kill by PID (SIGTERM → wait → SIGKILL)
drive proc kill --name "claude" --json                    # Kill all matching name
drive proc kill 12345 --tree --json                       # Kill PID and all children
drive proc kill 12345 --force --json                       # Force kill (SIGKILL, no grace period)
drive proc kill 12345 --signal 9 --json                   # Same as --force
drive proc tree 12345 --json                              # Show process tree from PID
drive proc top --session job-abc123 --json                # Resource snapshot for session
drive proc top --pid 12345,12346 --json                   # Resource snapshot for specific PIDs

Each process includes cwd (working directory) in its JSON output — use this to identify processes spawned from a specific project or directory.

Kill uses a two-step pattern: sends the signal (default SIGTERM), waits up to 5 seconds for graceful exit, then SIGKILL if still alive. Use --tree to kill a process and all its children (critical for Claude Code which spawns node subprocesses).

Process cleanup pattern

During cleanup, cd back to your original working directory and use proc list to find processes you started that you don't need running anymore. If the task specified they should keep running, leave them alone.

1. drive proc list --session job-abc123 --json   → see what's running
2. drive proc kill <pid> --tree --json           → kill it and children
3. drive proc list --name <name> --json          → verify nothing survived

Sentinel Protocol

Drive wraps commands with markers: echo "__START_<token>" ; <cmd> ; echo "__DONE_<token>:$?"

This gives:

  • Reliable completion detection (no guessing)
  • Accurate exit code capture
  • Clean output extraction (only content between markers)

Frequently asked questions

What does the Drive AI skill do?

Terminal automation CLI for AI agents. Use drive to create tmux sessions, execute commands, send keystrokes, read output, poll for patterns, run commands in parallel across sessions, and manage processes. Always use --json for structured output.

Why use Drive on TypingMind?

Because you install it once and use it with any model. Drive 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 Drive in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/disler/mac-mini-agent/tree/main/.claude/skills/drive. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Drive?

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 Drive?

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

Is the Drive AI skill free?

It is published on GitHub by disler. Check the repository for licensing terms. 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 👇