Skip to main content

Overview

copr-cli is the command-line interface for the Copr build system. It allows you to manage projects, submit builds, and interact with the Copr service from your terminal.

Installation Methods

# Install from official repositories
sudo dnf install copr-cli

# Verify installation
copr-cli --version

Installation from Source

To install copr-cli directly from source:
# Clone the repository
git clone https://github.com/fedora-copr/copr.git
cd copr/cli

# Install dependencies
sudo dnf install python3-devel python3-setuptools

# Install
python3 setup.py install --user

Dependencies

copr-cli requires the following Python packages:
  • python-copr - Python API client for Copr
  • requests - HTTP library
  • argcomplete (optional) - Shell tab completion
  • beautifulsoup4 (optional) - HTML parsing for error messages
  • rich - Terminal formatting and colors

Optional Features

Tab Completion

To enable shell tab completion, install argcomplete:
# Install argcomplete
sudo dnf install python3-argcomplete

# Enable globally
sudo activate-global-python-argcomplete

# Or for current user only
eval "$(register-python-argcomplete copr-cli)"
echo 'eval "$(register-python-argcomplete copr-cli)"' >> ~/.bashrc

GSSAPI Authentication

For GSSAPI/Kerberos authentication support:
sudo dnf install python3-gssapi krb5-workstation

Verifying Installation

After installation, verify that copr-cli is working:
# Check version
copr-cli --version

# List available commands
copr-cli --help

# Test connection (requires configuration)
copr-cli whoami

Upgrading

sudo dnf upgrade copr-cli

Troubleshooting

Command Not Found

If copr-cli is not found after installation:
# Check if installed in user directory
ls ~/.local/bin/copr-cli

# Add to PATH
export PATH="$HOME/.local/bin:$PATH"
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc

Import Errors

If you see Python import errors:
# Reinstall with all dependencies
pip3 install --user --force-reinstall copr-cli

# Or install missing dependencies
pip3 install --user requests python-copr rich

Permission Denied

If you get permission errors:
# Install for current user instead of system-wide
pip3 install --user copr-cli

Next Steps

After installing copr-cli, you need to configure authentication:

Build docs developers (and LLMs) love