pipSpec top-level property
Completion spec for pip CLI
Implementation
final FigSpec pipSpec =
FigSpec(name: 'pip', description: 'Python package manager', args: [
Arg()
], subcommands: [
Subcommand(name: 'install', description: 'Install packages', args: [
Arg(
name: 'package',
description: 'Package to install',
suggestions: packageList,
isVariadic: true)
], options: [
Option(
name: ['-r', '--requirement'],
description:
'Install from the given requirements file. This option can be used multiple times',
isRepeatable: true,
args: [Arg(name: 'requirements file', template: 'filepaths')])
]),
Subcommand(name: 'download', description: 'Download packages', args: [
Arg(name: 'path', template: 'filepaths')
], options: [
Option(
name: ['-c', '--constraint'],
description:
'Constrain versions using the given constraints file. This option can be used multiple times',
isRepeatable: true),
Option(
name: ['-r', '--requirement'],
description:
'Install from the given requirements file. This option can be used multiple times',
isRepeatable: true),
Option(
name: '--no-deps', description: 'Don’t install package dependencies'),
Option(
name: '--global-option',
description:
'Extra global options to be supplied to the setup.py call before the install command'),
Option(
name: '--no-binary',
description:
'Constrain versions using the given constraints file. This option can be used multiple times',
isRepeatable: true),
Option(
name: '--only-binary',
description: 'Do not use source packages',
args: [
Arg(suggestions: [
FigSuggestion(
name: ':all:', description: 'Disable all source packages'),
FigSuggestion(name: ':none:', description: 'Empty the set')
])
]),
Option(
name: '--prefer-binary',
description: 'Prefer older binary packages over newer source packages'),
Option(
name: '--src',
description: 'Directory to check out editable projects into',
args: [Arg(name: 'source folder', template: 'folders')]),
Option(
name: '--pre',
description:
'Include pre-release and development versions. By default, pip only finds stable versions'),
Option(
name: '--require-hashes',
description:
'Require a hash to check each requirement against, for repeatable installs'),
Option(
name: '--progress-bar',
description: 'Specify type of progress to be displayed',
args: [
Arg(suggestions: [
FigSuggestion(name: 'off'),
FigSuggestion(name: 'on'),
FigSuggestion(name: 'ascii'),
FigSuggestion(name: 'pretty'),
FigSuggestion(name: 'emoji')
])
]),
Option(
name: '--no-build-isolation',
description:
'Disable isolation when building a modern source distribution'),
Option(
name: '--use-pep517',
description: 'Use PEP 517 for building source distributions'),
Option(
name: '--ignore-requires-python',
description: 'Ignore the Requires-Python information'),
Option(
name: ['-d', '--dest'],
description:
'Require a hash to check each requirement against, for repeatable installs',
args: [Arg(name: 'dir', template: 'folders')]),
Option(
name: '--platform',
description: 'Only use wheels compatible with platform',
args: [Arg(name: 'platfor')]),
Option(
name: '--python-version',
description:
'The Python interpreter version to use for wheel and “Requires-Python” compatibility checks'),
Option(
name: '--implementation',
description: 'Only use wheels compatible with Python implementation',
args: [Arg(name: 'implementation')]),
Option(
name: '--abi',
description:
'Only use wheels compatible with Python abi <abi>, e.g. ‘pypy_41’',
args: [Arg(name: 'abi')]),
Option(name: '--no-clean', description: 'Don’t clean up build directories'),
Option(
name: ['-i', '--index-url'],
description: 'Base URL of the Python Package Index',
args: [Arg(name: 'url')]),
Option(
name: '--no-index',
description:
'Ignore package index (only looking at --find-links URLs instead)'),
Option(
name: '--extra-index-url',
description:
'Extra URLs of package indexes to use in addition to --index-url. Should follow the same rules as --index-url'),
Option(
name: ['-f', '--find-links'],
description: 'Look for archives in the directory listing',
args: [Arg(name: 'url', template: 'filepaths')])
]),
Subcommand(
name: 'uninstall', description: 'Uninstall packages', args: [Arg()]),
Subcommand(
name: 'freeze',
description: 'Output installed packages in requirements format',
options: [
Option(
name: ['-r', '--requirement'],
description:
'Use the order in the given requirements file and its comments when generating output'),
Option(
name: ['-l', '--local'],
description:
'If in a virtualenv that has global access, do not output globally-installed packages'),
Option(
name: '--user',
description: 'Only output packages installed in user-site'),
Option(
name: '--path',
description:
'Restrict to the specified installation path for listing packages (can be used multiple times)',
isRepeatable: true),
Option(
name: '--all',
description:
'Do not skip these packages in the output: setuptools, distribute, pip, wheel'),
Option(
name: '--exclude-editable',
description: 'Exclude editable package from output'),
Option(
name: '--exclude',
description: 'Exclude specified package from the output',
args: [
Arg(
name: 'package',
// TS_UNCONVERTED_START (generators)
// listPackages
// TS_UNCONVERTED_END
generators: null)
])
]),
Subcommand(name: 'list', description: 'List installed packages', options: [
Option(name: ['-o', '--outdated'], description: 'List outdated packages'),
Option(name: ['-u', '--uptodate'], description: 'List uptodate packages'),
Option(name: ['-e', '--editable'], description: 'List editable projects'),
Option(
name: ['-l', '--local'],
description:
'If in a virtualenv that has global access, do not list globally-installed packages'),
Option(
name: '--user',
description: 'Only output packages installed in user-site'),
Option(
name: '--path',
description:
'Restrict to the specified installation path for listing packages (can be used multiple times)',
isRepeatable: true,
args: [Arg(name: 'path', template: 'filepaths')]),
Option(
name: '--pre',
description:
'Include pre-release and development versions. By default, pip only finds stable versions'),
Option(
name: '--format',
description:
'Select the output format among: columns (default), freeze, or json'),
Option(
name: '--not-required',
description:
'List packages that are not dependencies of installed packages'),
Option(
name: '--exclude-editable',
description: 'Exclude editable package from output'),
Option(
name: '--include-editable',
description: 'Include editable package from output'),
Option(
name: '--exclude',
description: 'Exclude specified package from the output',
args: [
Arg(
name: 'package',
// TS_UNCONVERTED_START (generators)
// listPackages
// TS_UNCONVERTED_END
generators: null)
]),
Option(
name: ['-i', '--index-url'],
description:
'Base URL of the Python Package Index (default https://pypi.org/simple)',
args: [Arg()]),
Option(
name: '--extra-index-url',
description:
'Include pre-release and development versions. By default, pip only finds stable versions'),
Option(
name: '--no-index',
description:
'Ignore package index (only looking at --find-links URLs instead)'),
Option(
name: ['-f', '--find-links'],
description:
'If a URL or path to an html file, then parse for links to archives such as sdist (.tar.gz) or wheel (.whl) files',
args: [Arg(name: 'url')])
]),
Subcommand(
name: 'show',
description: 'Show information about installed packages',
options: [
Option(name: ['-f', '--files'])
]),
Subcommand(
name: 'check',
description: 'Verify installed packages have compatible dependencies'),
Subcommand(
name: 'config',
description: 'Manage local and global configuration',
options: [
Option(
name: '--editor',
description:
'Editor to use to edit the file. Uses VISUAL or EDITOR environment variables if not provided'),
Option(
name: '--global',
description: 'Use the system-wide configuration file only'),
Option(
name: '--user',
description: 'Use the user configuration file only'),
Option(
name: '--site',
description: 'Use the current environment configuration file only')
]),
Subcommand(name: 'search', description: 'Search PyPI for packages', options: [
Option(name: ['-i', '--index'])
]),
Subcommand(
name: 'cache', description: 'Inspect and manage pip\'s wheel cache'),
Subcommand(name: 'wheel', description: 'Build wheels from your requirements'),
Subcommand(
name: 'hash',
description: 'Compute hashes of package archives',
options: [
Option(
name: ['-a', '--algorithm'],
description: 'The hash algorithm to use',
args: [
Arg(suggestions: [
FigSuggestion(name: 'sha256'),
FigSuggestion(name: 'sha384'),
FigSuggestion(name: 'sha512')
])
])
]),
Subcommand(
name: 'completion',
description: 'A helper command used for command completion'),
Subcommand(
name: 'debug',
description: 'Show information useful for debugging',
options: [
Option(
name: '--platform',
description: 'Only use wheels compatible with platform',
args: [Arg(name: 'platform')]),
Option(
name: '--python-version',
description:
'The Python interpreter version to use for wheel and “Requires-Python” compatibility checks',
args: [Arg(name: 'python version')]),
Option(
name: '--implementation',
description:
'Only use wheels compatible with Python implementation',
args: [Arg(name: 'implementation')])
]),
Subcommand(name: 'help', description: 'Show help for commands')
]);