Coding & Developmentโจgemini๐คclaude๐universal
APM2
Process supervision for AI agent CLIs (Claude Code, Gemini CLI, Codex CLI, and custom tools).
Quick Start
Install this Skill
npx skills add Anveio/apm2# APM2 Process supervision for AI agent CLIs (Claude Code, Gemini CLI, Codex CLI, and custom tools). [](https://github.com/Anveio/apm2/actions/workflows/ci.yml) [](https://www.rust-lang.org) [](LICENSE-MIT) APM2 runs as a local daemon (`apm2-daemon`) controlled by a CLI (`apm2`). The daemon reads an `ecosystem.toml`, registers a set of processes, and exposes a Unix-socket API for starting/stopping them and querying status. **Status:** pre-1.0 (expect breaking changes). ## Features - Linux daemon + CLI architecture (Unix socket IPC) - Config-driven process registry (`ecosystem.toml`) - Start/stop/restart processes (all configured instances) - Query process state (`list`, `status`) - Spec-driven โfactoryโ runner (`apm2 factory run`) for executing a Markdown spec with an agent CLI **Planned / in progress:** - `logs`, `reload`, and daemon-backed `creds` commands (CLI exists; daemon handlers are not implemented yet) - Automatic restarts/backoff, health checks, and richer runtime metrics - Event-sourced ledger + evidence/CAS integration end-to-end ## Install APM2 is **Linux-only**. macOS and Windows are not currently supported. ## Supported platforms | Platform | Support | Notes | |----------|---------|-------| | Linux (x86_64) | Supported | CI-tested (Ubuntu 24.04) | | Linux (aarch64) | Best-effort | Not in CI; please report build issues | | macOS | Not supported | Linux-only project | | Windows | Not supported | Requires Unix domain sockets | ### Prerequisites - Rust 1.85+ - `protoc` (Protocol Buffers compiler) Ubuntu/Debian: ```bash sudo apt-get update sudo apt-get install -y protobuf-compiler ``` Other distros: install `protoc` via your package manager. ### From source ```bash git clone https://github.com/Anveio/apm2.git cd apm2 cargo install --path crates/apm2-daemon --locked cargo install --path crates/apm2-cli --locked ``` ### From git (no clone) ```bash cargo install --git https://github.com/Anveio/apm2 --tag <TAG> apm2-daemon cargo install --git https://github.com/Anveio/apm2 --tag <TAG> apm2-cli ``` `<TAG>` is a crate tag like `apm2-daemon-v0.3.0` / `apm2-cli-v0.3.0`. ## Quickstart 1. Create `ecosystem.toml` (or copy `ecosystem.example.toml`). 2. Start the daemon. 3. Start a configured process. Minimal `ecosystem.toml` for local development (no root required): ```toml [daemon] socket = "/tmp/apm2/apm2.sock" pid_file = "/tmp/apm2/apm2.pid" [[processes]] name = "claude" command = "claude" cwd = "/path/to/your/project" ``` Start the daemon in the foreground: ```bash apm2 daemon --no-daemon ``` In another terminal: ```bash apm2 list apm2 start claude apm2 status claude ``` ## Configuration APM2 reads `ecosystem.toml` by default (override with `--config <path>`). - `[daemon]`: the daemonโs socket + pid file paths (defaults to `/var/run/apm2/...`) - `[[processes]]`: supervised processes (name, command, args, `cwd`, `env`, and `instances`) Other configuration sections exist and are parsed, but are not enforced end-to-end yet (for example: `[[credentials]]`, restart/backoff, shutdown policy, log routing, health checks). See `ecosystem.example.toml` for a full annotated example. ## CLI commands (what they actually do) APM2 is split into two binaries: - `apm2`: the user-facing CLI (reads config to find the socket path; makes IPC requests) - `apm2-daemon`: the daemon (loads config; manages processes; serves the Unix socket) Most `apm2` subcommands require the daemon to already be running. ### Command reference (current) | Command | Requires daemon | Current behavior | |---------|------------------|------------------| | `apm2 daemon [--no-daemon]` | No | Spawns `apm2-daemon` | | `apm2 kill` | Yes | Requests daemon shutdown | | `apm2 list` / `apm2 ls` | Yes | Lists configured processes | | `apm2 status <name>` | Yes | Shows per-instance state/PIDs | | `apm2 start <name>` | Yes | Starts all instances of `<name>` | | `apm2 stop <name>` | Yes | Stops all instances of `<name>` | | `apm2 restart <name>` | Yes | Stop then start `<name>` | | `apm2 reload <name>` | Yes | Not implemented yet (errors) | | `apm2 logs <name> ...` | Yes | Not implemented yet (errors) | | `apm2 creds login <provider>` | No | Prints provider login guidance | | `apm2 creds list/add/remove/refresh/switch` | Yes | Not implemented yet (errors) | | `apm2 factory run <spec.md>` | No | Runs a spec via agent adapter | ### Global options These apply to **every** `apm2` command: - `--config <path>`: ecosystem config file path (default: `ecosystem.toml`) - `--socket <path>`: override socket path (otherwise: config file socket, or `/var/run/apm2/apm2.sock`) - `--log-level <trace|debug|info|warn|error>`: CLI logging verbosity (default: `warn`) ### Daemon lifecycle #### `apm2 daemon ... (truncated)
Repository
3stars
0forks
Details
Related Skills
More coding & development skills you might like
Reticle
Coding & DevelopmentAI agents can generate code, but still struggle to understand what they build. Reticle brings Jev-style machine-native runtime perception to web & desktop applications.
๐คclaude๐universal
1.2k
190
View
agentscope-java
Coding & DevelopmentExpert Java developer skill for AgentScope Java framework - a reactive, message-driven multi-agent system built on Project Reactor. Use when working with reactive programming, LLM integration, agent orchestration, multi-agent systems, or when the user mentions AgentScope, ReActAgent, Mono/Flux, Project Reactor, or Java agent development. Specializes in non-blocking code, tool integration, hooks, pipelines, and production-ready agent applications.
๐universal
6.0k
1.5k
View
ospec
Coding & DevelopmentDocument-driven OSpec workflow for initialization, change/goal routing, validation, archiving, and durable project knowledge.
โจgemini๐คclaude๐ฌgpt๐universal
524
34
View
misakanet-failure-memory
Coding & Development๐ A zero-dependency, git-backed micro-lesson library for AI Agents to asynchronously share and search verified debugging experience. Python stdlib only. | https://misakanet.org
๐คclaudeโจ๏ธcursor๐universal
424
158
View