Skip to main content

Global Options

These options can be used with any command:
--help
flag
Show help message and exit
--version
flag
Show program version number and exit
--config
path
Path to alternative configuration file (default: ~/.config/copr)
copr-cli --config ~/.config/copr-custom list
--debug
flag
Enable debug output for troubleshooting
copr-cli --debug build myproject package.rpm
--no-color
flag
Disable colored output
copr-cli --no-color status 12345

Authentication Commands

whoami

Print the username that the client authenticates with.
copr-cli whoami

new-api-token

Generate a new API token and update the configuration file.
copr-cli new-api-token
This destroys your old token! Any other applications using the old token will stop working.

new-webhook-secret

Regenerate webhook secret for a project.
copr-cli new-webhook-secret username/project

Project Management

list

List all projects of a user or group.
copr-cli list [username|@groupname]
username|@groupname
string
Username or @groupname to list projects for. If omitted, lists your own projects.
Example:
# List your own projects
copr-cli list

# List another user's projects
copr-cli list john

# List group projects
copr-cli list @somegroup

create

Create a new project.
copr-cli create PROJECT_NAME [OPTIONS]

Required Parameters

name
string
required
The name of the project to create. Can be just the name (creates in your namespace) or username/project or @groupname/project.
--chroot
string
required
Chroot to enable for this project. Can be specified multiple times. At least one is required.
copr-cli create myproject \
  --chroot fedora-39-x86_64 \
  --chroot fedora-40-x86_64

Optional Parameters

--description
string
Description of the project
--instructions
string
Installation instructions for users
--repo
url
Additional repository to enable during builds. Can be specified multiple times.
--repo https://example.com/repo1 \
--repo https://example.com/repo2
--runtime-repo-dependency
url
Repository that will be automatically enabled when users enable this project. Can be specified multiple times.
--disable_createrepo
boolean
Disable automatic repository metadata generation (values: true/false)
--enable-net
enum
Enable networking for builds in this projectOptions: on, off (default: off)
--unlisted-on-hp
enum
Hide project from Copr home pageOptions: on, off
--persistent
flag
Make project and builds undeletable (admin only)
--auto-prune
enum
Enable automatic deletion of obsolete buildsOptions: on (default), off (admin only)
--isolation
enum
Build isolation methodOptions: simple, nspawn, default (default: default)
--bootstrap
enum
Configure Mock’s bootstrap featureOptions:
  • default - Use pre-configured setup from mock-core-configs
  • on - Enable bootstrap
  • off - Disable bootstrap
  • image - Use container image for bootstrap
--delete-after-days
integer
Automatically delete project after specified days
--multilib
enum
Allow 32-bit packages on 64-bit architecturesOptions: on, off (default: off)
--module-hotfixes
enum
Allow packages to override module streamsOptions: on, off (default: off)
--fedora-review
flag
Run fedora-review tool on builds (doesn’t fail build if review fails)
--appstream
enum
Generate AppStream metadataOptions: on, off (default: off)
--follow-fedora-branching
enum
Auto-create chroots for new Fedora branchesOptions: on (default), off
--repo-priority
integer
Set DNF priority for this repository (see man dnf.conf)
--storage
enum
Storage backend for this project (admin only)Options: backend, pulp
--packit-forge-project-allowed
string
Forge project allowed to build via Packit (format: github.com/org/repo). Supports wildcards. Can be specified multiple times.
--packit-forge-project-allowed github.com/myorg/*
Example:
copr-cli create myproject \
  --chroot fedora-39-x86_64 \
  --chroot fedora-40-x86_64 \
  --description "My test project" \
  --instructions "dnf copr enable user/myproject" \
  --enable-net off

modify

Modify an existing project. Accepts the same options as create (except --persistent and --storage).
copr-cli modify PROJECT_NAME [OPTIONS]
Example:
copr-cli modify myproject \
  --description "Updated description" \
  --enable-net on

get

Get detailed information about a project.
copr-cli get PROJECT
Example:
copr-cli get myproject
copr-cli get username/project

delete

Delete an entire project and all its builds.
copr-cli delete PROJECT
This action cannot be undone! All builds and packages will be permanently deleted.
Example:
copr-cli delete myproject

fork

Fork a project and all its packages.
copr-cli fork SOURCE_PROJECT DESTINATION_PROJECT [--confirm]
src
string
required
Source project to fork (format: owner/project)
dst
string
required
Destination project name (format: owner/project)
--confirm
flag
Confirm forking into an existing project
Example:
# Fork another user's project
copr-cli fork username/project myproject

# Update existing fork
copr-cli fork username/project myproject --confirm

regenerate-repos

Manually regenerate repository metadata.
copr-cli regenerate-repos PROJECT
Example:
copr-cli regenerate-repos myproject

Build Commands

build

Build packages from SRPM files or URLs.
copr-cli build PROJECT PKG [PKG ...] [OPTIONS]
copr_repo
string
required
Project to build in. Format: project, owner/project, or @group/project. Can also use project:tag for side repositories.
pkgs
string
required
One or more SRPM files (local paths or URLs)

Build Options

-r, --chroot
string
Build only for specific chroot(s). Can be specified multiple times.
--exclude-chroot
string
Exclude specific chroot(s). Can be specified multiple times.
--timeout
integer
Build timeout in seconds (default: 18000 = 5 hours)
--nowait
flag
Don’t wait for build completion
--background
flag
Run build at lower priority
--isolation
enum
Isolation method: simple, nspawn, default, unchanged (default: unchanged)
--enable-net
enum
Enable networking: on, off
--bootstrap
enum
Bootstrap mode: unchanged, default, on, off, image (default: unchanged)
--after-build-id
integer
Build after the specified build ID completes
--with-build-id
integer
Build in the same batch as the specified build ID
Example:
# Build from local SRPM
copr-cli build myproject package.src.rpm

# Build from URL
copr-cli build myproject https://example.com/package.src.rpm

# Build for specific chroots
copr-cli build myproject package.src.rpm \
  -r fedora-39-x86_64 \
  -r fedora-40-x86_64

# Build in side repository
copr-cli build myproject:testing package.src.rpm

buildscm

Build from a Git/SVN repository.
copr-cli buildscm PROJECT --clone-url URL [OPTIONS]
--clone-url
url
required
Git or SVN repository URL
--commit
string
Branch name, tag name, or git hash
--subdir
string
Subdirectory containing the package
--spec
string
Path to .spec file relative to subdirectory
--type
enum
Version control system: git (default), svn
--method
enum
SRPM build method: rpkg (default), tito, tito_test, make_srpm
Example:
copr-cli buildscm myproject \
  --clone-url https://github.com/user/repo \
  --commit main \
  --subdir rpm \
  --spec mypackage.spec \
  --method tito

buildpypi

Build a Python package from PyPI.
copr-cli buildpypi PROJECT --packagename NAME [OPTIONS]
--packagename
string
required
Name of the PyPI package
--packageversion
string
Specific version to build (default: latest)
--pythonversions
integer[]
Python versions to build for (default: 3 2)
--pythonversions 3 2
--spec-generator
enum
Tool for generating spec file: pyp2rpm, pyp2spec (default: pyp2spec)
--template
path
Custom spec template file
Example:
copr-cli buildpypi myproject --packagename requests
copr-cli buildpypi myproject --packagename flask --packageversion 2.0.1

buildgem

Build a Ruby gem from rubygems.org.
copr-cli buildgem PROJECT --gem NAME
Example:
copr-cli buildgem myproject --gem rails

build-distgit

Build from a DistGit repository.
copr-cli build-distgit PROJECT --name PACKAGE [OPTIONS]
--name
string
required
Package name in DistGit
--distgit
string
DistGit instance (e.g., fedora)
--commit
string
Branch, tag, or commit hash
--namespace
string
DistGit namespace (e.g., @copr/copr)
Example:
copr-cli build-distgit myproject \
  --name copr-cli \
  --distgit fedora \
  --commit f39

buildcustom

Build using a custom script.
copr-cli buildcustom PROJECT --script FILE [OPTIONS]
--script
path
required
Script file to generate sources
--script-chroot
string
Mock chroot to run script in
--script-builddeps
string
Space-separated list of build dependencies
--script-resultdir
string
Directory where script outputs results (default: .)
--script-repos
string
Space-separated list of additional repository URLs

status

Get build status by build ID.
copr-cli status BUILD_ID
Example:
copr-cli status 12345
Output:
succeeded

cancel

Cancel a running build.
copr-cli cancel BUILD_ID
Example:
copr-cli cancel 12345

watch-build

Watch build progress in real-time.
copr-cli watch-build BUILD_ID [BUILD_ID ...]
Example:
copr-cli watch-build 12345
copr-cli watch-build 12345 12346 12347

delete-build

Delete one or more builds.
copr-cli delete-build BUILD_ID [BUILD_ID ...]
Example:
copr-cli delete-build 12345
copr-cli delete-build 12345 12346 12347

download-build

Download build artifacts.
copr-cli download-build BUILD_ID [OPTIONS]
-d, --dest
path
Destination directory (default: .)
-r, --chroot
string
Download only specific chroot(s). Can be specified multiple times.
--rpms
flag
Download only RPM files
--spec
flag
Download only .spec file
--logs
flag
Download only .log files
--review
flag
Download only fedora-review files
Example:
# Download everything
copr-cli download-build 12345

# Download only RPMs
copr-cli download-build 12345 --rpms

# Download specific chroot
copr-cli download-build 12345 -r fedora-39-x86_64

# Download to specific directory
copr-cli download-build 12345 -d /tmp/builds

list-builds

List all builds in a project.
copr-cli list-builds PROJECT [--output-format FORMAT]
--output-format
enum
Output format: json, text, text-row (default: text-row)
Example:
copr-cli list-builds myproject
copr-cli list-builds myproject --output-format json

Chroot Commands

list-chroots

List all available chroots.
copr-cli list-chroots

edit-chroot

Edit chroot configuration.
copr-cli edit-chroot OWNER/PROJECT/CHROOT [OPTIONS]
--upload-comps
path
Upload comps.xml file
--delete-comps
flag
Delete existing comps.xml
--packages
string
Space-separated packages to add to buildroot
--repos
string
Space-separated additional repository URLs
--modules
string
Comma-separated modules to enable/disable (e.g., module1:stream,!module2:stream)
--rpmbuild-with
string
rpmbuild —with option. Can be specified multiple times.
--rpmbuild-without
string
rpmbuild —without option. Can be specified multiple times.
--isolation
enum
Isolation method: simple, nspawn, default
--bootstrap
enum
Bootstrap mode: unchanged, default, on, off, image
--bootstrap-image
string
Custom container image for bootstrap (implies --bootstrap=image)
--reset
string
Reset specific fields to defaults. Can be specified multiple times.
Example:
copr-cli edit-chroot myproject/fedora-39-x86_64 \
  --packages "gcc make" \
  --repos "https://example.com/repo"

get-chroot

Get chroot configuration.
copr-cli get-chroot OWNER/PROJECT/CHROOT [--output-format FORMAT]
Example:
copr-cli get-chroot myproject/fedora-39-x86_64
copr-cli get-chroot myproject/fedora-39-x86_64 --output-format json

Package Management

add-package-scm

Add a package with SCM source.
copr-cli add-package-scm PROJECT --name PKGNAME --clone-url URL [OPTIONS]
--name
string
required
Package name
--clone-url
url
required
Git/SVN repository URL
--commit
string
Branch, tag, or commit
--subdir
string
Subdirectory path
--spec
string
Path to .spec file
--type
enum
VCS type: git, svn
--method
enum
Build method: rpkg, tito, tito_test, make_srpm
--webhook-rebuild
enum
Enable auto-rebuild: on, off
--max-builds
integer
Keep only N newest builds (0 = unlimited)
--timeout
integer
Build timeout in seconds (default: 18000)
Example:
copr-cli add-package-scm myproject \
  --name mypackage \
  --clone-url https://github.com/user/repo \
  --webhook-rebuild on

edit-package-scm

Edit an existing SCM package. Uses same options as add-package-scm.
copr-cli edit-package-scm PROJECT --name PKGNAME [OPTIONS]

add-package-pypi / edit-package-pypi

Add or edit a PyPI package.
copr-cli add-package-pypi PROJECT --name PKGNAME --packagename PYPINAME [OPTIONS]

add-package-rubygems / edit-package-rubygems

Add or edit a RubyGems package.
copr-cli add-package-rubygems PROJECT --name PKGNAME --gem GEM [OPTIONS]

add-package-distgit / edit-package-distgit

Add or edit a DistGit package.
copr-cli add-package-distgit PROJECT --name PKGNAME [OPTIONS]

add-package-custom / edit-package-custom

Add or edit a custom package.
copr-cli add-package-custom PROJECT --name PKGNAME --script FILE [OPTIONS]

list-packages

List all packages in a project.
copr-cli list-packages PROJECT [OPTIONS]
--with-latest-build
flag
Include latest build info
--with-latest-succeeded-build
flag
Include latest successful build info
--with-all-builds
flag
Include all builds info
--output-format
enum
Output format: json, text, text-row

list-package-names

List only package names (one per line).
copr-cli list-package-names PROJECT

get-package

Get detailed package information.
copr-cli get-package PROJECT --name PKGNAME [OPTIONS]

delete-package

Delete a package and all its builds.
copr-cli delete-package PROJECT --name PKGNAME

reset-package

Clear package source configuration.
copr-cli reset-package PROJECT --name PKGNAME

build-package

Build a package from its configured source.
copr-cli build-package PROJECT --name PKGNAME [BUILD_OPTIONS]
Accepts the same build options as the build command. Example:
copr-cli build-package myproject --name mypackage
copr-cli build-package myproject --name mypackage -r fedora-39-x86_64

Monitoring

monitor

Monitor package build states.
copr-cli monitor PROJECT [OPTIONS]
--dirname
string
Project subdirectory name (e.g., foo:pr:125)
--fields
string
Comma-separated list of fields to display. Default: name,chroot,build_id,state,pkg_versionAvailable fields: name, chroot, build_id, state, pkg_version, url_build_log, url_backend_log, url_build
--output-format
enum
Output format: json, text, text-row
Example:
copr-cli monitor myproject
copr-cli monitor myproject --fields name,chroot,state
copr-cli monitor myproject --output-format json

Permissions

edit-permissions

Edit user permissions for a project.
copr-cli edit-permissions PROJECT --admin USER --builder USER
--admin
string
Set admin role for user. Format: USERNAME[=VALUE] where VALUE is approved, request, or nothing
--builder
string
Set builder role for user. Format: USERNAME[=VALUE] where VALUE is approved, request, or nothing
Example:
copr-cli edit-permissions myproject --builder john=approved
copr-cli edit-permissions myproject --admin jane=approved

list-permissions

List all permissions for a project.
copr-cli list-permissions PROJECT

request-permissions

Request permissions for yourself.
copr-cli request-permissions PROJECT --admin --builder
--admin
enum
Request admin permissions: request (default), nothing
--builder
enum
Request builder permissions: request (default), nothing
Example:
copr-cli request-permissions username/project --builder
copr-cli request-permissions username/project --admin --builder

Utility Commands

mock-config

Get Mock configuration for a chroot.
copr-cli mock-config PROJECT CHROOT
Example:
copr-cli mock-config myproject fedora-39-x86_64 > mock.cfg
mock -r mock.cfg --shell

Project Name Formats

Most commands accept projects in these formats:
  • project - Your own project (requires authentication)
  • username/project - Another user’s project
  • @groupname/project - Group project
  • project:tag - Side repository (for build commands)
Examples:
copr-cli get myproject
copr-cli get john/myproject
copr-cli get @somegroup/project
copr-cli build myproject:testing package.rpm

Build docs developers (and LLMs) love