adsctl
A Go and Cobra CLI for inspecting, monitoring, creating and managing advertising. Meta is implemented first; Google is a future adapter. The CLI is designed for AI agents and shell automation: JSON by default, explicit account scope, external credentials, bounded reads and recoverable launch runs.
The repository includes three shared agent skills in skills/:
adsctl for reporting, monitoring, management, and launch recovery workflows;
adsctl-meta-analyst for structured Meta campaign performance audits, funnel diagnostics, and media-buyer recommendations;
adsctl-setup for CLI installation, developer apps, user and system-user tokens, asset permissions, secret references, and bounded authentication checks.
All three skills are included in release archives and embedded in the binary: adsctl --skills lists them, adsctl --skills NAME prints one skill's SKILL.md, and adsctl --skills NAME/references/FILE prints a reference file. This works offline without configuration or credentials.
Install
On macOS or Linux, install the latest stable release and load its PATH configuration:
curl -fsSL https://github.com/imrenagicom/adsctl/releases/latest/download/install.sh | sh
source "$HOME/.adsctl/env"
adsctl version
adsctl config path
The installer selects the OS and architecture, verifies the archive against the release's SHA-256 checksums, checks that the binary runs and supports ADSCTL_HOME, and installs without sudo. It prints the commands to add the generated env file to your shell startup file and reload it. For POSIX sh, use . "$HOME/.adsctl/env" instead of source. It does not edit shell startup files automatically.
Everything defaults to one private directory:
~/.adsctl/
├── bin/adsctl # executable; add this directory to PATH
├── config.yaml # profiles, Meta API versions, and credential references
├── secrets/ # optional raw-token files, restricted to your user
├── state/ # launch journals and monitoring state
└── env # shell setup for ADSCTL_HOME and PATH; no credentials
Set an absolute ADSCTL_HOME to use another directory. The installer and CLI use that same root. Pass --version vX.Y.Z to the installer to select a release with ADSCTL_HOME support, or set ADSCTL_VERSION. Reinstalling replaces the executable and generated shell setup while preserving configuration, secrets, and state. Windows users can extract the matching release ZIP, put adsctl.exe in %USERPROFILE%\.adsctl\bin, and add that directory to PATH.
The curl endpoint becomes available in the first release that publishes install.sh; older release archives remain available for manual installation.
Codex, Claude Code, and Google Antigravity plugin
The repository is also an adsctl plugin for Codex, Claude Code, and Google Antigravity, bundling all three skills. Register or install from a local checkout or extracted plugin distribution:
# Codex
codex plugin marketplace add /absolute/path/to/adsctl
codex plugin add adsctl@adsctl
# Claude Code
claude plugin marketplace add /absolute/path/to/adsctl
claude plugin install adsctl@adsctl
# Google Antigravity
agy plugin install /absolute/path/to/adsctl
Run the setup workflow in Codex or Antigravity (adsctl-setup, or /adsctl:adsctl-setup in Claude Code), then use the campaign performance audit skill (adsctl-meta-analyst, or /adsctl:adsctl-meta-analyst in Claude Code) or the operations skill (adsctl, or /adsctl:adsctl in Claude Code). The CLI must be available on the agent host's PATH and Meta credentials must be supplied separately. See plugin installation and verification for GitHub installation, development, updates, and platform requirements.
Build and verify
Requires Go 1.25.1 or later. Persistent launch and monitor state currently uses macOS/Linux file locking. Other commands can compile for Windows; Windows persistent execution is explicitly rejected.
make tools # install pinned golangci-lint
make check # formatting, vet, lint, race tests, coverage and build
./bin/adsctl --help
export PATH="$PWD/bin:$PATH"
# Optional: install into your Go bin directory
make install
CI repeats these checks on pull requests and pushes. Tests use local HTTP fixtures, including pagination, lossless IDs, account ownership, exact metrics, write verification, ambiguous outcomes, launch recovery and activation order. No test spends money or calls a live Meta account.
Distributions and releases