Put your AI agent to work across the fleet
Clicking through a console does not scale — diagnostics, alert triage, and group-wide actions live in one binary. Install the skill for Claude Code, Codex, or Gemini and your agent drives the same commands you do.
From install to fleet in three commands
mg profile create prod https://center.sirketiniz.localPoint at your Center
Create a named profile for each Center — on-prem, staging, or a customer tenant.
mg auth loginApprove once in the browser
The token is issued through the Center approval flow and stored locally per profile.
mg device listSee your fleet
Devices, alerts, scripts, and runs are now one command away — for you and your agent.
Give it the hard jobs
Your agent gets the same CLI controls you use across the fleet.
From one prompt to the root cause
Inspect device context and alerts, run diagnostics, and turn the output into a proposed fix.
Fix the whole group at once
Target a group, wait for every result, and isolate failures before you rerun anything.
The agent teaches itself
mg skill install writes a SKILL.md that teaches Claude Code, Codex, and Gemini how to drive every command — no plugin or config needed.
Talk to the fleet from the terminal
Your agent gets the same commands, context, and control.
Auth & Profiles
mg auth loginBrowser approval flow; issues a token
mg auth statusShows active session + organization
mg auth logoutRevokes token, clears local credentials
mg profile listLists configured profiles
mg profile create <name> <url>Adds a new profile
mg profile use <name>Sets the default profile
mg profile delete <name>Deletes a profile (suggests logout)
Devices
mg device listLists devices (filters: --group, --tag, --status, --os)
mg device inspect <id|hostname>Single device detail
mg device exportCSV export
Alerts
mg alert listLists alerts (--device, --severity, --status)
mg alert inspect <id>Single alert detail
mg alert resolve <id>Resolves an alert (write scope)
Scripts
mg script listLists saved scripts
mg script run --command "…" --device <id>Runs an ad-hoc command
mg script run --script <name> --group <g> --waitRuns a saved script on a group
Runs
mg run listLists running/completed runs
mg run inspect <id>Run detail (per-action status)
mg run cancel <id>Cancels a run
mg run retry <id>Retries failed actions
Skill Generator (BYOA)
mg skill showPrints SKILL.md to stdout
mg skill installWrites to ~/.agents/skills/moftgate/SKILL.md
mg skill install --projectWrites to ./.agents/skills/moftgate/SKILL.md
mg skill describe <command>Shows single-command detail
Output Formats
tableDefault — human-readable, colored-o jsonMachine-readable JSON output--jq <filter>jq filter, e.g. --jq '.list[] | {id, name}'csvCSV export (mg device export)
Global Flags
--profile <name>Select a profile-o, --output <fmt>json | table--jq <filter>jq filter (implies JSON)--limit <n|all>Pagination (default 100)--page <n>Page number--yesNon-interactive confirmation for risky operations--ca-bundle <path>Custom CA (on-prem self-signed)--insecureDisables TLS verify (dev only)
Humans and agents use the same CLI
Run mg directly, or through your AI agent. The token issued by mg auth login works identically in both cases; every write action lands in the Center audit log.
mg CLI — Frequently Asked Questions
Bring your fleet to the terminal
mg ships with the platform — your first 200 endpoints are free.