{
  "markdown": "# coprctl\n\nA reimagined command-line and agent interface for the [Fedora Copr](https://copr.fedorainfracloud.org)\nbuild service.\n\n`coprctl` keeps Copr's own vocabulary but fixes the ergonomics that make\n`copr-cli` painful as a daily driver and as an automation surface: one\nnoun-verb grammar, machine-readable output everywhere, declarative project\nstate, live build logs, and a generated agent interface that cannot drift from\nthe CLI.\n\nThe project and binary are both named `coprctl`. It is instance-agnostic:\nFedora production, staging, openEuler, and self-hosted Copr are all first-class\nprofiles.\n\n## Features\n\n- **One grammar.** `coprctl <resource> <verb> [ref]`, with one shared\n  `owner/project[:dir][/segment]` reference parser. A new source type is a\n  `--source` value, never a new command.\n- **Machine-readable everywhere.** Every data command supports\n  `--output json|jsonl|yaml|table|plain`, defaulting to JSON when stdout is\n  not a TTY. Stable exit codes and structured error objects.\n- **Declarative state.** A `copr.yaml` manifest with `validate`, `diff`\n  (exit 12 on drift), `apply`, and `export`. `detect`, `init`, and `sync`\n  close the loop from a source repo to a running project.\n- **Live logs and debugging.** `log tail` streams multi-chroot build logs;\n  `log failures` extracts the failing region from each failed chroot;\n  `log detective` asks log-detective.com for a plain-language explanation;\n  `build reproduce` prints the local reproduction recipe.\n- **Local preflight.** `try` builds in a container with rpmbuilder, mapping\n  Copr chroots to images, with strict exact-match by default and a fidelity\n  report. Works on any OS with Docker or podman, so macOS and Windows users\n  can build and test RPMs locally.\n- **Webhooks, end to end.** `integration github enable` wires the Copr and\n  GitHub sides in one command, tag-triggered by default.\n- **Agent ready.** `schema` emits the command tree as JSON; `mcp serve`\n  exposes it as tiered MCP tools; `skill print`/`install` ship generated\n  skills. CLI, completions, JSON schema, MCP tools, docs, and skills are all\n  generated from one command registry, so they cannot drift.\n\n## Install\n\n```bash\ngo install github.com/abn/coprctl/cmd/coprctl@latest\n```\n\nOnce the project's own Copr repo is live:\n\n```bash\nsudo dnf copr enable abn/coprctl\nsudo dnf install coprctl\n```\n\n## Getting started\n\nYour existing `~/.config/copr` credentials are picked up automatically. The\nquickest paths to a fresh token:\n\n```bash\ncoprctl auth login            # open the API page, paste the block\ncoprctl config import <<'EOF'\n[copr-cli]\nlogin = \"...\"                 # from the website\nusername = \"you\"\ntoken = \"...\"                 # from the website\ncopr_url = \"https://copr.fedorainfracloud.org\"\nEOF\n```\n\nThen check your environment and the instance:\n\n```bash\ncoprctl auth status           # who you are, and how long until the token expires\ncoprctl doctor                # config, auth, and connectivity checks\ncoprctl chroot list --distro fedora-rawhide\n```\n\n## Usage\n\nThe documentation wiki under `docs/` is the public reference. Key entry\npoints:\n\n- [Overview](docs/overview.md)\n- [Command reference](docs/reference/commands.md)\n- [Debugging a failing build](docs/usage/debugging-builds.md)\n- [Webhook integrations](docs/usage/webhook-integrations.md)\n\nCommon workflows:\n\n```bash\n# from a source repo to a running project\ncoprctl detect ./rpm --output json\ncoprctl init --owner you --name mypkg \\\n  --chroot fedora-44-x86_64 --chroot fedora-rawhide-x86_64 --yes\n\n# reconcile the manifest\ncoprctl validate -f copr.yaml\ncoprctl diff -f copr.yaml\ncoprctl apply -f copr.yaml\n\n# rebuild and debug\ncoprctl build rebuild you/mypkg/mypkg\ncoprctl log failures 12345678\ncoprctl build reproduce 12345678/fedora-rawhide-x86_64\ncoprctl try ./rpm --chroot fedora-rawhide-x86_64\n\n# health as a probe\ncoprctl status you/mypkg --quiet || notify-send \"Copr: something failed\"\n```\n\n## Development\n\n```bash\nmake build     # build bin/coprctl\nmake check     # format, lint, vet, test, and drift gate\nmake gen       # regenerate generated artefacts from the command registry\n```\n\nSee [docs/contribution/](docs/contribution/) for the contributor guide and\nthe [release process](docs/contribution/release-process.md), and `AGENTS.md`\nfor the operational contract.\n\n## License\n\nMIT. See [LICENSE](LICENSE).\n",
  "bytes": 4353,
  "sha": "77b14cdd55eac0ccad55f0681a911f9bf42aff030f5ff16b6cc4fe2da9dd039f",
  "repo_slug": "abn/coprctl",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/okf_abn_coprctl_docs_index_md_3dd7cda5/readme"
}