Command-line interface¶
Generate conda repository metadata (repodata.json) from a directory tree.
usage: python -m conda_index [-h] [--output OUTPUT] [--subdir SUBDIR]
[-n CHANNEL_NAME]
[--patch-generator PATCH_GENERATOR]
[--channeldata | --no-channeldata]
[--rss | --no-rss] [--bz2 | --no-bz2]
[--zst | --no-zst]
[--run-exports | --no-run-exports]
[--compact | --no-compact]
[--current-index-versions-file CURRENT_INDEX_VERSIONS_FILE]
[--base-url BASE_URL]
[--update-cache | --no-update-cache]
[--update-only | --no-update-only]
[--upstream-stage UPSTREAM_STAGE]
[--current-repodata | --no-current-repodata]
[--threads THREADS] [--verbose]
[--write-monolithic | --no-write-monolithic]
[--write-shards | --no-write-shards]
[--db {sqlite3,postgresql}] [--db-url DB_URL]
[--html-dependencies | --no-html-dependencies]
[--repodata-next | --no-repodata-next]
dir
Positional Arguments¶
- dir
Directory to index
Named Arguments¶
- --output
Output repodata to given directory.
- --subdir
Subdir to index. Accepts multiple.
- -n, --channel-name
Customize the channel name listed in each channel’s index.html.
- --patch-generator
Path to Python file that outputs metadata patch instructions from its _patch_repodata function or a .tar.bz2/.conda file which contains a patch_instructions.json file for each subdir
- --channeldata, --no-channeldata
Generate channeldata.json. Conflicts with –no-write-monolithic.
Default:
False- --rss, --no-rss
Write rss.xml (Only if –channeldata is enabled).
Default:
True- --bz2, --no-bz2
Write repodata.json.bz2.
Default:
False- --zst, --no-zst
Write repodata.json.zst.
Default:
False- --run-exports, --no-run-exports
Write run_exports.json. Conflicts with –no-write-monolithic.
Default:
False- --compact, --no-compact
Output JSON as one line, or pretty-printed.
Default:
True- --current-index-versions-file, -m
YAML file containing name of package as key, and list of versions as values. The current_index.json will contain the newest from this series of versions. For example: python: [3.8, 3.9] will keep python 3.8.X and 3.9.Y in the current_index.json, instead of only the very latest python version.
- --base-url
If packages should be served separately from repodata.json, URL of the directory tree holding packages. Generates repodata.json with repodata_version=2 which is supported in conda 24.5.0 or later.
- --update-cache, --no-update-cache
Control whether listdir() is called to refresh the set of available packages. Used to generate complete repodata.json from cache only when packages are not on disk. (Experimental)
Default:
True- --update-only, --no-update-only
Control whether missing files are deleted from repodata.json. Used to add local files to repodata.json without having the complete set of packages on disk. (Experimental)
Default:
False- --upstream-stage
Set to ‘clone’ to generate example repodata from conda-forge test database. (Experimental)
Default:
'fs'- --current-repodata, --no-current-repodata
Skip generating current_repodata.json, a file containing only the newest versions of all packages and their dependencies, only used by the classic solver. Conflicts with –no-write-monolithic.
Default:
False- --threads
Number of threads to use
Default:
4- --verbose
Enable debug logging.
Default:
False- --write-monolithic, --no-write-monolithic
Write repodata.json with all package metadata in a single file.
Default:
True- --write-shards, --no-write-shards
Write a repodata.msgpack.zst index and many smaller files per CEP-16. (Experimental)
Default:
False- --db
Possible choices: sqlite3, postgresql
Choose database backend. “sqlite3” (default) or “postgresql” (Experimental)
Default:
'sqlite3'- --db-url
SQLAlchemy database URL when using –db=postgresql. Alternatively, use the CONDA_INDEX_DBURL environment variable. (Experimental)
Default:
'postgresql:///conda_index'- --html-dependencies, --no-html-dependencies
Include dependency popups in generated HTML index files. May significantly increase file size for large repositories like main or conda-forge.
Default:
False- --repodata-next, --no-repodata-next
EXPERIMENTAL. Write CEP-XXXX v3 repodata layout with all package records under a top-level v3 key.
Default:
False