id = "pdm"
name = "PDM"
homepage = "https://pdm-project.org/"
description = "A modern Python package and dependency manager supporting the latest PEP standards."
executables = ["pdm"]
[dotfiles]
paths = ["[appData]/pdm/config.toml"]
exclude = []
secret = []
side_effect = false
[[dotfiles.secret_paths]]
file = "[appData]/pdm/config.toml"
match = { key_path = ["repository.*.password", "source.*.password"] }
[commands]
format = 1
label = "PDM"
description = "Add dependencies and build distributions with PDM. Install, lock, run, publish and the other subcommands are left out."
quality = "ai-draft"
parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false }
[[commands.subcommand]]
path = ["add"]
label = "Add dependencies"
description = "Write requirements to pyproject.toml, update the lockfile and sync the environment."
[[commands.subcommand.source]]
id = "ref"
kind = "help"
url = "https://pdm-project.org/latest/reference/cli/"
revision = "2026-10-27"
evidence = """
-e, --editable: Specify editable packages
packages: Specify packages
-g, --global: Use the global project, supply the project root with -p option
-p, --project: Specify another path as the project root, which changes the base of pyproject.toml and __pypackages__ [env var: PDM_PROJECT]
--pre, --prerelease: Allow prereleases to be pinned
--dry-run: Show the difference only and don't perform any action
-d, --dev: Add packages into dev dependencies
-G, --group: Specify the target dependency group to add into
--no-sync: Only write pyproject.toml and do not sync the working set (default: False)
--save-exact: Save exact version specifiers
--save-minimum: Save minimum version specifiers
"""
[[commands.subcommand.field]]
id = "packages"
label = "Packages"
description = "Requirement specifiers such as requests or 'flask>=3'."
type = "string"
position = 0
multiple = true
sources = ["ref"]
[[commands.subcommand.field]]
id = "dev"
label = "Dev dependencies"
type = "boolean"
option = ["--dev", "-d"]
sources = ["ref"]
[[commands.subcommand.field]]
id = "group"
label = "Dependency group"
type = "string"
option = ["--group", "-G"]
sources = ["ref"]
[[commands.subcommand.field]]
id = "editable"
label = "Editable install"
type = "boolean"
option = ["--editable", "-e"]
sources = ["ref"]
[[commands.subcommand.field]]
id = "no_sync"
label = "Do not sync environment"
type = "boolean"
option = ["--no-sync"]
sources = ["ref"]
[[commands.subcommand.field]]
id = "dry_run"
label = "Dry run"
type = "boolean"
option = ["--dry-run"]
sources = ["ref"]
[[commands.subcommand.field]]
id = "prerelease"
label = "Allow prereleases"
type = "boolean"
option = ["--pre"]
sources = ["ref"]
[[commands.subcommand.field]]
id = "save_exact"
label = "Pin exact versions"
type = "boolean"
option = ["--save-exact"]
sources = ["ref"]
[[commands.subcommand.field]]
id = "save_minimum"
label = "Save minimum versions"
type = "boolean"
option = ["--save-minimum"]
sources = ["ref"]
[[commands.subcommand.field]]
id = "global"
label = "Global project"
type = "boolean"
option = ["--global", "-g"]
sources = ["ref"]
[[commands.subcommand.field]]
id = "project"
label = "Project root"
type = "path"
path = { kind = "directory", role = "input" }
option = ["--project", "-p"]
sources = ["ref"]
[[commands.subcommand.task]]
id = "add"
label = "Add packages"
fields = ["packages", "group"]
required = ["packages"]
[[commands.subcommand.task]]
id = "add_dev"
label = "Add dev packages"
fields = ["packages"]
required = ["packages"]
set = { dev = [true] }
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["packages", "dev", "group", "editable", "dry_run"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["no_sync", "prerelease", "save_exact", "save_minimum", "global", "project"]
[[commands.subcommand]]
path = ["build"]
label = "Build distributions"
description = "Build sdist and wheel artifacts for the project."
[[commands.subcommand.source]]
id = "ref"
kind = "help"
url = "https://pdm-project.org/latest/reference/cli/"
revision = "2026-10-27"
evidence = """
-p, --project: Specify another path as the project root, which changes the base of pyproject.toml and __pypackages__ [env var: PDM_PROJECT]
--no-sdist: Don't build source tarballs (default: False)
--no-wheel: Don't build wheels (default: False)
-d, --dest: Target directory to put artifacts (default: dist)
--no-clean: Do not clean the target directory (default: False)
--no-isolation: Disable isolation when building a source distribution that follows PEP 517, as in: build dependencies specified by PEP 518 must be already installed if this option is used.
"""
[[commands.subcommand.field]]
id = "dest"
label = "Output directory"
type = "path"
path = { kind = "directory", role = "output" }
option = ["--dest", "-d"]
sources = ["ref"]
[[commands.subcommand.field]]
id = "no_sdist"
label = "Skip sdist"
type = "boolean"
option = ["--no-sdist"]
sources = ["ref"]
[[commands.subcommand.field]]
id = "no_wheel"
label = "Skip wheel"
type = "boolean"
option = ["--no-wheel"]
sources = ["ref"]
[[commands.subcommand.field]]
id = "no_clean"
label = "Keep existing artifacts"
type = "boolean"
option = ["--no-clean"]
sources = ["ref"]
[[commands.subcommand.field]]
id = "no_isolation"
label = "Disable build isolation"
type = "boolean"
option = ["--no-isolation"]
sources = ["ref"]
[[commands.subcommand.field]]
id = "project"
label = "Project root"
type = "path"
path = { kind = "directory", role = "input" }
option = ["--project", "-p"]
sources = ["ref"]
[[commands.subcommand.task]]
id = "build"
label = "Build all artifacts"
fields = ["dest"]
required = []
[[commands.subcommand.task]]
id = "wheel"
label = "Wheel only"
fields = ["dest"]
required = []
set = { no_sdist = [true] }
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["dest", "no_sdist", "no_wheel"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["no_clean", "no_isolation", "project"]