sem-ai
Agent-first CLI for Semaphore CI/CD. Structured JSON output, self-discovery, composable commands, and an embedded MCP server — built for AI agents to drive the full CI/CD loop without a browser.
Why sem-ai
- JSON by default — every command returns structured JSON. Agents parse it directly, humans use
--format table
- Self-discovery —
sem-ai discover returns a full capability map. Every command supports --examples
- MCP server —
sem-ai mcp exposes all commands as native tools for Claude Code, Cursor, VS Code, and any MCP client
- Compound commands —
diagnose composes workflow → pipeline → failed jobs → logs → parsed test results into a single call
- Compatible — shares
~/.sem.yaml with the legacy Semaphore CLI. Same tokens, same contexts
Full reference: docs.semaphore.io/reference/sem-ai-cli
Install
curl -fsSL https://raw.githubusercontent.com/semaphoreio/sem-ai/main/install.sh | sh
Installs the latest release automatically. Supports macOS and Linux on amd64 and arm64. The binary is placed at $HOME/.local/bin/sem-ai when that directory is on $PATH, or at $HOME/.semaphore-ai/bin/sem-ai otherwise (a $PATH hint is printed to stderr in that case).
Re-run the same command to update to the newest release (or to confirm you're already on the latest).
Want to inspect what runs first? curl -fsSL https://raw.githubusercontent.com/semaphoreio/sem-ai/main/install.sh | less before piping to sh.
Advanced / manual install
For users who want to inspect-then-build, pin a specific commit, or work offline:
git clone https://github.com/semaphoreio/sem-ai.git
cd sem-ai
make install
Requires Go 1.25+.
Plugin install (Claude Code / Codex)
sem-ai ships its skill bundle as a Claude Code / Codex plugin.
Claude Code — install from the shell:
claude plugin marketplace add semaphoreio/sem-ai
claude plugin install sem-ai@semaphoreio
Codex CLI — install from the shell:
codex plugin marketplace add semaphoreio/sem-ai
codex plugin add sem-ai@semaphoreio
The plugin drops every sem-ai skill (debug-pipeline, deploy, fix-flaky, gha-to-semaphore, init, manage-infra, probe-agent-environment, project-health, sem-ai-bootstrap, semaphore-blocks, semaphore-ci, semaphore-preflight, semaphore-promotions, semaphore-test-results, semaphore-toolbox, test-intelligence, testbox, watch-after-push) into your host.
Claude Code refreshes registered marketplaces at session start, picks up the new plugin version, and applies it automatically — there is no manifest flag to set for this. To force an immediate refresh:
claude plugin marketplace update semaphoreio
claude plugin update sem-ai@semaphoreio # restart running sessions to apply
Codex equivalent: codex plugin marketplace upgrade semaphoreio.
Skills follow the Agent Skills standard and give agents context on when and how to use each sem-ai command without reading documentation.
Slash-command entry points
User-invocable skills can be triggered directly with a namespaced slash command — useful when the activation keyword in a skill's description doesn't match your intent verbatim:
| Slash command | What it does |
|---|
/sem-ai:init | Initialize Semaphore CI/CD for the current repo — detects state (GHA present → translate; greenfield → from scratch; .semaphore/ already → refine), applies defaults from the linked skills, validates, wires secrets, opens a PR |
/sem-ai:gha-to-semaphore | Translate only — same procedure as init's translate path, scoped to converting .github/workflows/* |
Other skills are loaded automatically when their description keywords match the user's prompt; the slash commands above are explicit triggers for the most common entry points.
Skills-only install (npx skills, any agent)
Prefer the full plugin above on Claude Code / Codex — it also wires the MCP server and the SessionStart hooks. For other agents (Cursor, OpenCode, …) or when you want just the skill instructions, use the cross-agent skills installer. It reads sem-ai's .claude-plugin/marketplace.json manifest, so it finds the bundle even though the skills live under assets/plugin/skills/:
npx skills add semaphoreio/sem-ai --list # list available skills
npx skills add semaphoreio/sem-ai --all # install all of them
npx skills add semaphoreio/sem-ai --skill semaphore-ci --skill watch-after-push
npx skills add semaphoreio/sem-ai --all -g # user-level (every repo)
npx skills add semaphoreio/sem-ai --all --agent cursor opencode
Two caveats: