LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

copr-cli

COPR build system client

TLDR

Show the authenticated user
$ copr-cli whoami
copy
Create a new COPR project
$ copr-cli create [project_name] --chroot [fedora-rawhide-x86_64] --chroot [epel-9-x86_64]
copy
Build a package from a local SRPM
$ copr-cli build [project_name] [package.src.rpm]
copy
Build from an SRPM URL
$ copr-cli build [project_name] [https://example.com/package.src.rpm]
copy
Build from a PyPI package
$ copr-cli buildpypi [project_name] --packagename [requests]
copy
Watch an in-progress build
$ copr-cli watch-build [build_id]
copy
List your COPR projects
$ copr-cli list
copy
Check build status
$ copr-cli status [build_id]
copy
Cancel a running build
$ copr-cli cancel [build_id]
copy
Download built packages
$ copr-cli download-build [build_id]
copy
Delete a project
$ copr-cli delete [project_name]
copy

SYNOPSIS

copr-cli command [options] [arguments]

DESCRIPTION

copr-cli is the command-line client for Fedora's COPR build system. It allows developers to create projects, submit builds, manage repositories, and automate package distribution without using the web interface.The tool handles the complete package lifecycle: creating projects with specified build targets (chroots), submitting source RPMs for building, monitoring build progress, and downloading the resulting packages. It supports building from local files, URLs, or SCM repositories.copr-cli is essential for CI/CD pipelines that automatically build and publish packages to COPR. Authentication is handled via API tokens stored in a configuration file, enabling scripted operations.

PARAMETERS

whoami

Print the user authenticated by the configured API token.
list [OWNER]
List projects belonging to the current user or the specified owner.
list-chroots
List chroots available on the COPR server.
create NAME
Create a new COPR project (requires at least one --chroot).
modify PROJECT
Modify settings of an existing project.
delete PROJECT
Delete a project.
build PROJECT SRPM|URL
Submit a build from a local SRPM or an SRPM URL.
buildpypi PROJECT
Build from a PyPI source package.
buildgem PROJECT
Build from a RubyGems gem.
buildscm PROJECT
Build from a remote SCM repository (git/svn).
build-distgit PROJECT
Build a package from a DistGit repository.
status BUILDID_
Print the current status of a build.
watch-build BUILDID_
Follow a build until it completes.
cancel BUILDID_
Cancel a running build.
download-build BUILDID [DEST_]
Download the built RPMs for the given build.
regenerate-repos PROJECT
Regenerate the repository metadata for a project.
-r, --chroot CHROOT
Specify the build target (e.g., fedora-rawhide-x8664, epel-9-x8664). May be repeated.
--nowait
Submit the build without waiting for it to finish.
--background
Run the build in the background (lower priority than normal builds).
--after-build-id ID
Make this build run after the specified build completes (batch dependency).
--timeout SECONDS
Override the default build timeout.
--config FILE
Use an alternate configuration file (default: ~/.config/copr).

CONFIGURATION

~/.config/copr

API token configuration for authenticating with the COPR build system.

CAVEATS

Requires a Fedora Account System (FAS) account and API token configured in ~/.config/copr. Build chroots must be enabled for the project before building. Large builds may take significant time; use --nowait for async operation.

HISTORY

copr-cli was developed alongside the COPR build service by the Fedora Project. It provides programmatic access to the same functionality available through the COPR web interface at copr.fedorainfracloud.org, enabling automation and integration with development workflows.

SEE ALSO

copr(1), rpmbuild(1), mock(1), dnf(1)

Copied to clipboard
Kai