CLI Commands

Complete reference for all Chantal commands.

Global Options

All commands support these global options:

chantal [OPTIONS] COMMAND [ARGS]...

Options:
  --config PATH      Path to configuration file
  --version          Show version and exit
  -h, --help         Show help message and exit

Configuration File Priority

Chantal looks for configuration files in this order:

  1. --config CLI flag (highest priority)

  2. CHANTAL_CONFIG environment variable

  3. Default locations:

    • /etc/chantal/config.yaml (production)

    • ~/.config/chantal/config.yaml (user)

    • ./config.yaml (current directory)

Tip: If not using default location, set CHANTAL_CONFIG:

# For custom config location
export CHANTAL_CONFIG=/path/to/config.yaml
chantal repo sync --repo-id epel9-vim-latest

# Development with local config
export CHANTAL_CONFIG=./config-dev.yaml

Database Management

chantal db init

Initialize the database schema using Alembic migrations.

chantal db init

Creates all database tables and applies all migrations to reach the latest schema version.

chantal db status

Show database schema status and pending migrations.

chantal db status

chantal db current

Show current database schema version.

chantal db current

chantal db upgrade

Upgrade database schema to a specific revision or latest.

# Upgrade to latest
chantal db upgrade

# Upgrade to specific revision
chantal db upgrade abc123

chantal db history

Show migration history.

chantal db history

Note: Storage directories (/var/lib/chantal/pool, /var/www/repos) are created automatically when needed.

Repository Management

chantal repo list

List all configured repositories.

chantal repo list [--format table|json] [--type rpm|apt|helm]

Options:

  • --format: Output format (default: table)

  • --type: Filter by repository type (rpm, apt, or helm)

Example:

$ chantal repo list
Configured Repositories:

ID                          Type Enabled Packages Last Sync
----------------------------------------------------------------------
rhel9-baseos-vim-latest     rpm  Yes     4        2026-01-10 14:34
epel9-vim-latest            rpm  Yes     3        2026-01-10 14:27
ingress-nginx               helm Yes     1        2026-01-10 23:20

Filter by type:

$ chantal repo list --type helm
Configured Repositories:

ID                          Type Enabled Packages Last Sync
----------------------------------------------------------------------
ingress-nginx               helm Yes     1        2026-01-10 23:20

chantal repo show

Show detailed information about a repository.

chantal repo show --repo-id REPO_ID [--format table|json]

Options:

  • --repo-id: Repository ID (required)

  • --format: Output format (default: table)

Example:

$ chantal repo show --repo-id epel9-vim-latest
Repository: epel9-vim-latest

Basic Information:
  ID: epel9-vim-latest
  Name: EPEL 9 - vim (latest)
  Type: rpm
  Enabled: Yes
  Feed URL: https://dl.fedoraproject.org/pub/epel/9/Everything/x86_64/

Sync Statistics:
  Total Packages: 3
  Last Sync: 2026-01-10 14:27:35
  Sync Status: Success

Storage Statistics:
  Total Size: 9.31 MB (9,758,240 bytes)
  Average Package Size: 3.10 MB

chantal repo sync

Sync repository from upstream.

# Sync single repository
chantal repo sync --repo-id REPO_ID

# Sync all enabled repositories
chantal repo sync --all [--type rpm]

# Sync repositories matching pattern
chantal repo sync --pattern "epel9-*"

Options:

  • --repo-id: Repository ID

  • --all: Sync all enabled repositories

  • --pattern: Repository ID pattern (glob)

  • --type: Filter by repository type

Examples:

# Sync single repository
chantal repo sync --repo-id epel9-vim-latest

# Sync all EPEL repositories
chantal repo sync --pattern "epel9-*"

# Sync all enabled repositories
chantal repo sync --all

# Sync only RPM repositories
chantal repo sync --all --type rpm

chantal repo check-updates

Check for available updates without downloading.

# Check single repository
chantal repo check-updates --repo-id REPO_ID

# Check all enabled repositories
chantal repo check-updates --all

# Check repositories matching pattern
chantal repo check-updates --pattern "rhel9-*"

Options:

  • --repo-id: Repository ID

  • --all: Check all enabled repositories

  • --pattern: Repository ID pattern (glob)

Example:

$ chantal repo check-updates --repo-id rhel9-appstream-nginx-latest
Checking for updates: rhel9-appstream-nginx-latest
Feed URL: https://cdn.redhat.com/content/dist/rhel9/9/x86_64/appstream/os

✓ No updates available. Repository is up to date.

chantal repo history

Show sync history for a repository.

chantal repo history --repo-id REPO_ID [--limit 10]

Options:

  • --repo-id: Repository ID (required)

  • --limit: Maximum number of entries to show

Snapshot Management

chantal snapshot list

List all snapshots.

chantal snapshot list [--repo-id REPO_ID]

Options:

  • --repo-id: Filter by repository ID

chantal snapshot create

Create a new snapshot.

chantal snapshot create \
  --repo-id REPO_ID \
  --name NAME \
  [--description "..."]

Options:

  • --repo-id: Repository ID (required)

  • --name: Snapshot name (required)

  • --description: Optional description

Example:

chantal snapshot create \
  --repo-id rhel9-baseos-vim-latest \
  --name 20250110 \
  --description "January 2025 patch baseline"

chantal snapshot content

Show snapshot content (package list) for compliance/audit.

# Repository snapshot
chantal snapshot content \
  --repo-id REPO_ID \
  --snapshot SNAPSHOT_NAME \
  [--format table|json|csv]

# View snapshot
chantal snapshot content \
  --view VIEW_NAME \
  --snapshot SNAPSHOT_NAME \
  [--format table|json|csv]

Options:

  • --repo-id: Repository ID (for repository snapshots)

  • --view: View name (for view snapshots)

  • --snapshot: Snapshot name (required)

  • --format: Output format (default: table)

Example (human-readable table):

chantal snapshot content \
  --view rhel9-webserver \
  --snapshot 2025-01-10

Example (JSON for automation):

chantal snapshot content \
  --view rhel9-webserver \
  --snapshot 2025-01-10 \
  --format json > audit/rhel9-webserver-2025-01-10.json

Example (CSV for reporting):

chantal snapshot content \
  --view rhel9-webserver \
  --snapshot 2025-01-10 \
  --format csv > audit/rhel9-webserver-2025-01-10.csv

CSV includes:

  • View name, snapshot name, repository ID

  • Package name, epoch, version, release, architecture

  • NEVRA (full package identifier)

  • SHA256 checksum (for integrity verification)

  • File size, filename

Perfect for:

  • Compliance reports (“What was deployed on 2025-01-10?”)

  • Security audits (verify exact package versions)

  • Change management (track package changes over time)

chantal snapshot diff

Compare two snapshots.

chantal snapshot diff \
  --repo-id REPO_ID \
  SNAPSHOT1 SNAPSHOT2

Shows:

  • Added packages

  • Removed packages

  • Updated packages (version changes)

Example:

chantal snapshot diff \
  --repo-id rhel9-baseos-vim-latest \
  20250110 20250109

chantal snapshot delete

Delete a snapshot.

chantal snapshot delete \
  --repo-id REPO_ID \
  SNAPSHOT_NAME

Options:

  • --repo-id: Repository ID (required)

  • SNAPSHOT_NAME: Snapshot name to delete (required)

Content Management

The content commands work with all content types (RPM, Helm, APK, etc.) in a unified way.

chantal content list

List content items from repositories, snapshots, or views.

# List all content in a repository
chantal content list --repo-id REPO_ID

# List content in a snapshot
chantal content list --snapshot-id SNAPSHOT_ID

# List content in a view
chantal content list --view VIEW_NAME

# Filter by content type
chantal content list --repo-id REPO_ID --type rpm
chantal content list --repo-id REPO_ID --type helm
chantal content list --repo-id REPO_ID --type apk

# Limit results
chantal content list --repo-id REPO_ID --limit 50

# Output formats
chantal content list --repo-id REPO_ID --format json
chantal content list --repo-id REPO_ID --format csv

Options:

  • --repo-id: Filter by repository ID

  • --snapshot-id: Filter by snapshot ID

  • --view: Filter by view name

  • --type: Filter by content type (rpm, helm, apk)

  • --limit: Maximum number of items to show (default: 100)

  • --format: Output format (table, json, csv)

Note: Only one of --repo-id, --snapshot-id, or --view can be specified.

chantal content show

Show detailed content information.

# By SHA256 hash
chantal content show abc123def456...

# By name (shows all matching items)
chantal content show nginx

# By name@version (specific version)
chantal content show nginx@1.20.1
chantal content show ingress-nginx@4.0.15

# Output as JSON
chantal content show nginx@1.20.1 --format json

Options:

  • IDENTIFIER: Content identifier (required)

    • SHA256 hash (64 hex characters)

    • Name (e.g., nginx)

    • Name@version (e.g., nginx@1.20.1)

  • --format: Output format (table, json)

Example output:

$ chantal content show nginx@1.20.1
======================================================================
Content: nginx 1.20.1
======================================================================

Basic Information:
  Name:         nginx
  Version:      1.20.1
  Type:         rpm
  Filename:     nginx-1.20.1-1.el9.x86_64.rpm
  Architecture: x86_64
  Release:      1.el9

Storage:
  Size:         1.23 MB (1,234,567 bytes)
  SHA256:       abc123def...
  Pool Path:    pool/ab/c1/abc123def...

Repositories (2):
  - epel9-latest
  - epel9-webserver

Snapshots (1):
  - epel9-latest-2025-01-10

======================================================================

Publishing

chantal publish repo

Publish a repository.

# Publish single repository
chantal publish repo --repo-id REPO_ID

# Publish all repositories
chantal publish repo --all

Options:

  • --repo-id: Repository ID

  • --all: Publish all repositories

chantal publish snapshot

Publish a snapshot.

chantal publish snapshot --snapshot REPO_ID-NAME

Options:

  • --snapshot: Snapshot identifier (format: repo-id-name)

chantal publish list

List published repositories and snapshots.

chantal publish list

chantal publish unpublish

Unpublish a repository or snapshot.

# Unpublish repository
chantal publish unpublish --repo-id REPO_ID

# Unpublish snapshot
chantal publish unpublish --snapshot REPO_ID-NAME

Storage Pool Management

chantal pool stats

Show storage pool statistics.

chantal pool stats

chantal pool orphaned

List orphaned files in pool (not referenced by any repository).

chantal pool orphaned

Shows files that exist in pool but are not referenced in the database.

chantal pool cleanup

Remove orphaned files from pool.

# Dry-run (show what would be removed)
chantal pool cleanup --dry-run

# Actually remove orphaned files
chantal pool cleanup

# Clean only content files (packages)
chantal pool cleanup --content-only

# Clean only metadata files
chantal pool cleanup --metadata-only

# Delete specific pool entries by SHA256
chantal pool cleanup --sha256 abc123def456...

Options:

  • --dry-run: Show what would be removed without actually removing

  • --content-only: Only clean orphaned content files (packages)

  • --metadata-only: Only clean orphaned metadata files

  • --sha256: Delete specific pool entry by SHA256 checksum

chantal pool verify

Verify pool integrity.

# Verify all pool files
chantal pool verify

# Verify specific repository
chantal pool verify --repo-id epel9-latest

# Verify and show detailed output
chantal pool verify --verbose

Checks:

  • File existence (database entry exists but file missing)

  • Checksum verification (file SHA256 matches database)

  • Database consistency (orphaned entries, duplicate files)

Options:

  • --repo-id: Verify only files for specific repository

  • --verbose: Show detailed verification output

chantal pool missing

List files that are referenced in database but missing from pool.

chantal pool missing

# Check specific repository
chantal pool missing --repo-id rhel9-baseos

Shows content items that have database entries but missing pool files.

Statistics & Database

chantal stats

Show global statistics.

chantal stats [--repo-id REPO_ID]

Options:

  • --repo-id: Show repository-specific statistics

chantal db stats

Show database statistics.

chantal db stats

chantal db verify

Verify database integrity.

chantal db verify

chantal db cleanup

Clean up unreferenced packages.

# Dry-run
chantal db cleanup --dry-run

# Actually cleanup
chantal db cleanup

Output Formats

Most commands support multiple output formats:

# Human-readable table (default)
chantal repo list --format table

# Machine-readable JSON
chantal repo list --format json