The JFrog CLI extends the capabilities of the Poetry Python package manager, enabling seamless integration with Artifactory for dependency resolution and package publication.
When you use jf poetry commands, such as jf poetry install or jf poetry publish, the CLI acts as an intermediary layer that provides Artifactory-aware capabilities.
Centralized and consistent authentication
Repository-aware dependency resolution
Automatic build-info collection
Modes of Operation
Wrapped Mode (Default)
In Wrapped Mode, the JFrog CLI actively participates in the Poetry workflow. It reads configuration from .jfrog/projects/poetry.yaml and configures Poetry to resolve dependencies from Artifactory.
Requirements:
Run
jf poetry-configbefore first useConfiguration file at
.jfrog/projects/poetry.yaml
Native Mode (Opt-in)
In Native Mode, the JFrog CLI executes Poetry without injecting configuration. All repository settings must be defined in pyproject.toml.
export JFROG_RUN_NATIVE=true
Mode Comparison
Feature | Wrapped Mode | Native Mode |
|---|---|---|
Enablement | Enabled by default | export JFROG_RUN_NATIVE=true |
Core behavior | CLI intercepts and enhances execution | CLI runs Poetry unmodified |
jf poetry-config | Required | Ignored |
CLI YAML (.jfrog/projects/poetry.yaml) | Applied | Ignored |
Repository injection | Automatic | Never |
Build-info collection | Supported | Supported with build flags |
Build-info source | CLI configuration | pyproject.toml |
Command Reference
Syntax:
jf poetry <poetry subcommand> [poetry arguments] [command options]
Subcommand | Description |
|---|---|
install | Install project dependencies |
update | Update dependencies |
add | Add a dependency |
remove | Remove a dependency |
build | Build the package |
publish | Publish the package |
lock | Lock dependencies |
Configuration Command: jf poetry-config
jf poetry-config [command options]
--global– Store configuration globally--server-id-resolve– Server ID for resolution--repo-resolve– Repository for dependency resolution
Frequently Asked Questions
1. | Why do I still use jf poetry commands in Native Mode? |
Native Mode ensures Poetry runs unmodified, but the |