Command Reference¶
This is a reference for all commands in the Spack command line interface. The same information is available through spack help.
Commands that also have sections in the main documentation have a link to “More documentation”.
Category |
Commands |
|---|---|
Administration |
|
Build, install, and test packages |
|
Configuration |
|
Spack development |
|
Environments |
|
Help |
|
Create packages |
|
Query packages |
|
User environment |
spack¶
A flexible package manager that supports multiple versions, configurations, platforms, and compilers.
spack [--color {always,never,auto}] [-v] [-k] [-b] [-V] [-h] [-H] [-c CONFIG_VARS] [-C DIR|ENV] [-e ENV | -D DIR | -E]
[--use-env-repo] [-d] [-t] [--timestamp] [-m] [--print-shell-vars PRINT_SHELL_VARS] [--stacktrace] [-l | -L]
COMMAND ...
Optional arguments
--color {always,never,auto}when to colorize output (default: auto)
-v, --verboseprint additional output during builds
-k, --insecuredo not check ssl certificates when downloading
-b, --bootstrapuse bootstrap config, store, and externals
-V, --versionshow version number and exit
-h, --helpshow this help message and exit
-H, --all-helpshow help for all commands (same as spack help –all)
-c, --config CONFIG_VARSadd one or more custom, one-off config settings
-C, --config-scope DIR|ENVadd directory or environment as read-only config scope
-e, --env ENVrun with an environment
-D, --env-dir DIRrun with environment in directory (ignore managed envs)
-E, --no-envrun without any environments activated (see spack env)
--use-env-repowhen in an environment, use its package repository
-d, --debugwrite out debug messages
-t, --backtracealways show backtraces for exceptions
--pdb
--timestampadd a timestamp to tty output
-m, --mockuse mock packages instead of real ones
--print-shell-vars PRINT_SHELL_VARSprint info needed by setup-env.*sh
--stacktraceadd stacktraces to all printed statements
-l, --enable-locksuse filesystem locking (default)
-L, --disable-locksdo not use filesystem locking (unsafe)
-p, --profile
--profile-file PROFILE_FILE
--sorted-profile STAT
--lines LINES
Subcommands
spack add¶
add a spec to an environment
spack add [-h] [-l LIST_NAME] ...
Positional arguments
specsone or more package specs
Optional arguments
-h, --helpshow this help message and exit
-l, --list-name LIST_NAMEname of the list to add specs to
spack arch¶
print architecture information about this machine
spack arch [-hg] [--known-targets] [--family | --generic] [-p | -o | -t] [-f | -b]
Optional arguments
-h, --helpshow this help message and exit
-g, --generic-targetshow the best generic target (deprecated)
--known-targetsshow a list of all known targets and exit
--familyprint generic ISA (x86_64, aarch64, ppc64le, …)
--genericprint feature level (x86_64_v3, armv8.4a, …)
-p, --platformprint only the platform
-o, --operating-systemprint only the operating system
-t, --targetprint only the target
-f, --frontendprint frontend (DEPRECATED)
-b, --backendprint backend (DEPRECATED)
spack audit¶
audit configuration files, packages, etc.
spack audit [-h] SUBCOMMAND ...
Optional arguments
-h, --helpshow this help message and exit
Subcommands
spack audit configs¶
spack audit configs [-h]
Optional arguments
-h, --helpshow this help message and exit
spack audit externals¶
spack audit externals [-h] [--list] [PKG ...]
Positional arguments
PKGpackage to be analyzed (if none all packages will be processed)
Optional arguments
-h, --helpshow this help message and exit
--listif passed, list which packages have detection tests
spack audit packages-https¶
spack audit packages-https [-h] [--all] [PKG ...]
Positional arguments
PKGpackage to be analyzed (if none all packages will be processed)
Optional arguments
-h, --helpshow this help message and exit
--allaudit all packages
spack audit packages¶
spack audit packages [-h] [PKG ...]
Positional arguments
PKGpackage to be analyzed (if none all packages will be processed)
Optional arguments
-h, --helpshow this help message and exit
spack audit list¶
spack audit list [-h]
Optional arguments
-h, --helpshow this help message and exit
spack blame¶
show contributors to packages
spack blame [-h] [-t | -p | -g] [--json] package_or_file
Positional arguments
package_or_filename of package to show contributions for, or path to a file in the spack repo
Optional arguments
-h, --helpshow this help message and exit
-t, --timesort by last modification date (default)
-p, --percentsort by percent of code
-g, --gitshow git blame output instead of summary
--jsonoutput blame as machine-readable json records
spack bootstrap¶
manage bootstrap configuration
spack bootstrap [-h] SUBCOMMAND ...
Optional arguments
-h, --helpshow this help message and exit
Subcommands
spack bootstrap now¶
spack bootstrap now [-h] [--dev]
Optional arguments
-h, --helpshow this help message and exit
--devbootstrap dev dependencies too
spack bootstrap status¶
spack bootstrap status [-h] [--optional] [--dev]
Optional arguments
-h, --helpshow this help message and exit
--optionalshow the status of rarely used optional dependencies
--devshow the status of dependencies needed to develop Spack
spack bootstrap enable¶
spack bootstrap enable [-h] [--scope {defaults,system,site,user,command_line} or env:ENVIRONMENT] [name]
Positional arguments
namename of the source to be enabled
Optional arguments
-h, --helpshow this help message and exit
--scope {defaults,system,site,user,command_line} or env:ENVIRONMENTconfiguration scope to read/modify
spack bootstrap disable¶
spack bootstrap disable [-h] [--scope {defaults,system,site,user,command_line} or env:ENVIRONMENT] [name]
Positional arguments
namename of the source to be disabled
Optional arguments
-h, --helpshow this help message and exit
--scope {defaults,system,site,user,command_line} or env:ENVIRONMENTconfiguration scope to read/modify
spack bootstrap reset¶
spack bootstrap reset [-hy]
Optional arguments
-h, --helpshow this help message and exit
-y, --yes-to-allassume “yes” is the answer to every confirmation request
spack bootstrap root¶
spack bootstrap root [-h] [--scope {defaults,system,site,user,command_line} or env:ENVIRONMENT] [path]
Positional arguments
pathset the bootstrap directory to this value
Optional arguments
-h, --helpshow this help message and exit
--scope {defaults,system,site,user,command_line} or env:ENVIRONMENTconfiguration scope to read/modify
spack bootstrap list¶
spack bootstrap list [-h] [--scope {defaults,system,site,user,command_line} or env:ENVIRONMENT]
Optional arguments
-h, --helpshow this help message and exit
--scope {defaults,system,site,user,command_line} or env:ENVIRONMENTconfiguration scope to read/modify
spack bootstrap add¶
spack bootstrap add [-h] [--scope {defaults,system,site,user,command_line} or env:ENVIRONMENT] [--trust]
name metadata_dir
Positional arguments
namename of the new source of software
metadata_dirdirectory where to find metadata files
Optional arguments
-h, --helpshow this help message and exit
--scope {defaults,system,site,user,command_line} or env:ENVIRONMENTconfiguration scope to read/modify
--trustenable the source immediately upon addition
spack bootstrap remove¶
spack bootstrap remove [-h] name
Positional arguments
namename of the source to be removed
Optional arguments
-h, --helpshow this help message and exit
spack bootstrap mirror¶
spack bootstrap mirror [-h] [--binary-packages] [--dev] DIRECTORY
Positional arguments
DIRECTORYroot directory in which to create the mirror and metadata
Optional arguments
-h, --helpshow this help message and exit
--binary-packagesdownload public binaries in the mirror
--devdownload dev dependencies too
spack build-env¶
dump the install environment for a spec, or run a command in that environment
spack build-env [-hfU] [--clean] [--dirty] [--reuse] [--fresh-roots] [--deprecated] [--dump FILE] [--pickle FILE] ...
Positional arguments
spec [--] [cmd]...specs of package environment to emulate
Optional arguments
-h, --helpshow this help message and exit
--cleanunset harmful variables in the build environment (default)
--dirtypreserve user environment in spack’s build environment (danger!)
-f, --forceallow changes to concretized specs in spack.lock (in an env)
-U, --freshdo not reuse installed deps; build newest configuration
--reusereuse installed packages/buildcaches when possible
--fresh-roots, --reuse-depsconcretize with fresh roots and reused dependencies
--deprecatedallow concretizer to select deprecated versions
--dump FILEdump a source-able environment to FILE
--pickle FILEdump a pickled source-able environment to FILE
spack buildcache¶
create, download and install binary packages
spack buildcache [-h] SUBCOMMAND ...
Optional arguments
-h, --helpshow this help message and exit
Subcommands
spack buildcache push¶
spack buildcache push [-h] [-f] [--unsigned | --signed | --key key] [--update-index] [--only {package,dependencies}]
[--with-build-dependencies | --without-build-dependencies] [--fail-fast] [--allow-missing]
[--base-image BASE_IMAGE] [--tag TAG] [--private] [--group GROUP] [-j JOBS]
mirror ...
Positional arguments
mirrormirror name, path, or URL
specsone or more package specs
Optional arguments
-h, --helpshow this help message and exit
-f, --forceoverwrite tarball if it exists
--unsigned, -upush unsigned buildcache tarballs
--signedpush signed buildcache tarballs
--key, -k keykey for signing
--update-index, --rebuild-indexregenerate buildcache index after building package(s)
--only {package,dependencies}select the buildcache mode. The default is to build a cache for the package along with all its dependencies. Alternatively, one can decide to build a cache for only the package or only the dependencies
--with-build-dependenciesinclude build dependencies in the buildcache
--without-build-dependenciesexclude build dependencies from the buildcache
--fail-faststop pushing on first failure (default is best effort)
--allow-missingallow not installed specs to continue without failure (default fails on missing specs)
--base-image BASE_IMAGEspecify the base image for the buildcache
--tag, -t TAGwhen pushing to an OCI registry, tag an image containing all root specs and their runtime dependencies
--privatefor a private mirror, include non-redistributable packages
--group GROUPpush only specs from the given environment group (can be specified multiple times, requires an active environment)
-j, --jobs JOBSexplicitly set number of parallel jobs
spack buildcache install¶
spack buildcache install [-hfmuo] ...
Positional arguments
specsone or more package specs
Optional arguments
-h, --helpshow this help message and exit
-f, --forceoverwrite install directory if it exists
-m, --multipleallow all matching packages
-u, --unsignedinstall unsigned buildcache tarballs for testing
-o, --otherarchinstall specs from other architectures instead of default platform and OS
spack buildcache list¶
spack buildcache list [-hlLNva] ...
Positional arguments
specsone or more package specs
Optional arguments
-h, --helpshow this help message and exit
-l, --longshow dependency hashes as well as versions
-L, --very-longshow full dependency hashes as well as versions
-N, --namespacesshow fully qualified package names
-v, --variantsshow variants in output (can be long)
-a, --allarchlist specs for all available architectures instead of default platform and OS
spack buildcache keys¶
spack buildcache keys [-hitf]
Optional arguments
-h, --helpshow this help message and exit
-i, --installinstall Keys pulled from mirror
-t, --trusttrust all downloaded keys
-f, --forceforce new download of keys
spack buildcache check¶
spack buildcache check [-h] [-m MIRROR_URL] [-o OUTPUT_FILE]
[--scope {defaults,system,site,user,command_line} or env:ENVIRONMENT]
...
Positional arguments
specsone or more package specs
Optional arguments
-h, --helpshow this help message and exit
-m, --mirror-url MIRROR_URLoverride any configured mirrors with this mirror URL
-o, --output-file OUTPUT_FILEfile where rebuild info should be written
--scope {defaults,system,site,user,command_line} or env:ENVIRONMENTconfiguration scope containing mirrors to check
spack buildcache download¶
spack buildcache download [-h] [-s SPEC] -p PATH
Optional arguments
-h, --helpshow this help message and exit
-s, --spec SPECdownload built tarball for spec from mirror
-p, --path PATHpath to directory where tarball should be downloaded
spack buildcache prune¶
spack buildcache prune [-h] [-k KEEPLIST] [--dry-run] mirror
Positional arguments
mirrormirror name, path, or URL
Optional arguments
-h, --helpshow this help message and exit
-k, --keeplist KEEPLISTfile containing newline-delimited list of package hashes to keep (optional)
--dry-rundo not actually delete anything from the buildcache, but log what would be deleted
spack buildcache save-specfile¶
spack buildcache save-specfile [-h] --root-spec ROOT_SPEC -s SPECS --specfile-dir SPECFILE_DIR
Optional arguments
-h, --helpshow this help message and exit
--root-spec ROOT_SPECroot spec of dependent spec
-s, --specs SPECSlist of dependent specs for which saved yaml is desired
--specfile-dir SPECFILE_DIRpath to directory where spec yamls should be saved
spack buildcache sync¶
spack buildcache sync [-h] [--manifest-glob MANIFEST_GLOB] [source mirror] [destination mirror]
Positional arguments
source mirrorsource mirror name, path, or URL
destination mirrordestination mirror name, path, or URL
Optional arguments
-h, --helpshow this help message and exit
--manifest-glob MANIFEST_GLOBa quoted glob pattern identifying CI rebuild manifest files
spack buildcache check-index¶
spack buildcache check-index [-h] [--verify {exists,manifests,blobs,all} [{exists,manifests,blobs,all} ...]]
[--name NAME] [--output OUTPUT]
mirror
Positional arguments
mirrormirror name, path, or URL
Optional arguments
-h, --helpshow this help message and exit
--verify {exists,manifests,blobs,all} [{exists,manifests,blobs,all} ...]List of items to verify along along with the index.
--name, -n NAMEName of the view index to check
--output, -o OUTPUTFile to write check details to
spack buildcache update-index¶
spack buildcache update-index [-hky] [--name NAME] [--append | --force] mirror [sources ...]
Positional arguments
mirrordestination mirror name, path, or URL
sourcesList of environments names or paths
Optional arguments
-h, --helpshow this help message and exit
--name, -n NAMEName of the view index to update
--append, -aAppend the listed specs to the current view index if it already exists. This operation does not guarantee atomic write and should be run with care.
--force, -fIf a view index already exists, overwrite it and suppress warnings (this is the default for non-view indices)
-k, --keysif provided, key index will be updated as well as package index
-y, --yes-to-allassume “yes” is the answer to every confirmation request
spack buildcache migrate¶
spack buildcache migrate [-hudy] mirror
Positional arguments
mirrorname of a configured mirror
Optional arguments
-h, --helpshow this help message and exit
-u, --unsignedIgnore signatures and do not resign, default is False
-d, --delete-existingDelete the previous layout, the default is to keep it.
-y, --yes-to-allassume “yes” is the answer to every confirmation request
spack cd¶
cd to spack directories in the shell
spack cd [-h] [-m | -r | -i | -p | --repo [repo] | -s | -S | -c | -b | -e [name] | -v [name]] [--first] ...
Positional arguments
specpackage spec
Optional arguments
-h, --helpshow this help message and exit
-m, --module-dirspack python module directory
-r, --spack-rootspack installation root
-i, --install-dirinstall prefix for spec (spec need not be installed)
-p, --package-dirdirectory enclosing a spec’s package.py file
--repo, --packages, -P [repo]package repository root (defaults to first configured repository)
-s, --stage-dirstage directory for a spec
-S, --stagestop level stage directory
-c, --source-dirsource directory for a spec (requires it to be staged first)
-b, --build-dirbuild directory for a spec (requires it to be staged first)
-e, --env [name]location of the named or current environment
-v, --view [name]location of the named or active environment view
--firstuse the first match if multiple packages match the spec
spack change¶
change an existing spec in an environment
spack change [-hacC] [-l LIST_NAME] [--match-spec MATCH_SPEC] ...
Positional arguments
specsone or more package specs
Optional arguments
-h, --helpshow this help message and exit
-l, --list-name LIST_NAMEname of the list to remove abstract specs from
--match-spec MATCH_SPECchange all specs matching match-spec (default is match by spec name)
-a, --allchange all matching abstract specs (allow changing more than one abstract spec)
-c, --concretechange concrete specs in the environment
-C, --concrete-onlychange only concrete specs in the environment
spack checksum¶
checksum available versions of a package
spack checksum [-h] [--keep-stage] [--batch] [--latest] [--preferred] [--add-to-package | --verify] [-j JOBS]
package [versions ...]
Positional arguments
packagename or spec (e.g.
cmakeorcmake@3.18)versionschecksum these specific versions (if omitted, Spack searches for remote versions)
Optional arguments
-h, --helpshow this help message and exit
--keep-stagedon’t clean up staging area when command completes
--batch, -bdon’t ask which versions to checksum
--latest, -lchecksum the latest available version
--preferred, -pchecksum the known Spack preferred version
--add-to-package, -aadd new versions to package
--verifyverify known package checksums
-j, --jobs JOBSexplicitly set number of parallel jobs
spack ci¶
manage continuous integration pipelines
spack ci [-h] SUBCOMMAND ...
Optional arguments
-h, --helpshow this help message and exit
Subcommands
spack ci generate¶
generate jobs file from a CI-aware spack file
if you want to report the results on CDash, you will need to set the SPACK_CDASH_AUTH_TOKEN before invoking this command. the value must be the CDash authorization token needed to create a build group and register all generated jobs under it
spack ci generate [-h] [--output-file OUTPUT_FILE] [--prune-dag | --no-prune-dag] [--prune-unaffected |
--no-prune-unaffected] [--prune-externals | --no-prune-externals] [--check-index-only]
[--artifacts-root ARTIFACTS_ROOT] [--forward-variable FORWARD_VARIABLE] [-f] [-U] [--reuse]
[--fresh-roots] [--deprecated] [-j JOBS]
Optional arguments
-h, --helpshow this help message and exit
--output-file OUTPUT_FILEpathname for the generated gitlab ci yaml file
--prune-dagskip up-to-date specs
--no-prune-dagprocess up-to-date specs
--prune-unaffectedskip up-to-date specs
--no-prune-unaffectedprocess up-to-date specs
--prune-externalsskip external specs
--no-prune-externalsprocess external specs
--check-index-onlyonly check spec state from buildcache indices
--artifacts-root ARTIFACTS_ROOTpath to the root of the artifacts directory
--forward-variable FORWARD_VARIABLEEnvironment variables to forward from the generate environment to the generated jobs.
-f, --forceallow changes to concretized specs in spack.lock (in an env)
-U, --freshdo not reuse installed deps; build newest configuration
--reusereuse installed packages/buildcaches when possible
--fresh-roots, --reuse-depsconcretize with fresh roots and reused dependencies
--deprecatedallow concretizer to select deprecated versions
-j, --jobs JOBSexplicitly set number of parallel jobs
spack ci rebuild-index¶
rebuild the buildcache index for the remote mirror
use the active, gitlab-enabled environment to rebuild the buildcache index for the associated mirror
spack ci rebuild-index [-h]
Optional arguments
-h, --helpshow this help message and exit
spack ci rebuild¶
rebuild a spec if it is not on the remote mirror
check a single spec against the remote mirror, and rebuild it from source if the mirror does not contain the hash
spack ci rebuild [-ht] [--no-fail-fast | --fail-fast] [--timeout TIMEOUT] [-j JOBS]
Optional arguments
-h, --helpshow this help message and exit
-t, --testsrun stand-alone tests after the build
--no-fail-fastcontinue build/stand-alone tests after the first failure
--fail-faststop build/stand-alone tests after the first failure
--timeout TIMEOUTmaximum time (in seconds) that tests are allowed to run
-j, --jobs JOBSexplicitly set number of parallel jobs
spack ci reproduce-build¶
generate instructions for reproducing the spec rebuild job
artifacts of the provided gitlab pipeline rebuild job’s URL will be used to derive instructions for reproducing the build locally
spack ci reproduce-build [-h] [--runtime {docker,podman}] [--working-dir WORKING_DIR] [-s] [--use-local-head]
[--gpg-file GPG_FILE | --gpg-url GPG_URL]
job_url
Positional arguments
job_urlURL of GitLab job web page or artifact
Optional arguments
-h, --helpshow this help message and exit
--runtime {docker,podman}Container runtime to use.
--working-dir WORKING_DIRwhere to unpack artifacts
-s, --autostartRun docker reproducer automatically
--use-local-headUse the HEAD of the local Spack instead of reproducing a commit
--gpg-file GPG_FILEPath to public GPG key for validating binary cache installs
--gpg-url GPG_URLURL to public GPG key for validating binary cache installs
spack ci verify-versions¶
validate version checksum & commits between git refs This command takes a from_ref and to_ref arguments and then parses the git diff between the two to determine which packages have been modified verifies the new checksums inside of them.
spack ci verify-versions [-h] from_ref to_ref
Positional arguments
from_refgit ref from which start looking at changes
to_refgit ref to end looking at changes
Optional arguments
-h, --helpshow this help message and exit
spack clean¶
remove temporary build files and/or downloaded archives
spack clean [-hsdfmpba] ...
Positional arguments
specsone or more package specs
Optional arguments
-h, --helpshow this help message and exit
-s, --stageremove all temporary build stages (default)
-d, --downloadsremove cached downloads
-f, --failuresforce removal of all install failure tracking markers
-m, --misc-cacheremove long-lived caches, like the virtual package index
-p, --python-cacheremove .pyc, .pyo files and __pycache__ folders
-b, --bootstrapremove software and configuration needed to bootstrap Spack
-a, --allequivalent to
-sdfmpb
spack commands¶
list available spack commands
spack commands [-h] [--update-completion] [-a] [--format {subcommands,rst,names,bash,fish}] [--header FILE]
[--update FILE]
...
Positional arguments
rst_fileslist of rst files to search for _cmd-spack-<cmd> cross-refs
Optional arguments
-h, --helpshow this help message and exit
--update-completionregenerate spack’s tab completion scripts
-a, --aliasesinclude command aliases
--format {subcommands,rst,names,bash,fish}format to be used to print the output (default: names)
--header FILEprepend contents of FILE to the output (useful for rst format)
--update FILEwrite output to the specified file, if any command is newer
spack compiler¶
manage compilers
spack compiler [-h] SUBCOMMAND ...
Optional arguments
-h, --helpshow this help message and exit
Subcommands
spack compiler find¶
spack compiler find [-h] [--scope {defaults,system,site,user,command_line} or env:ENVIRONMENT] [-j JOBS] ...
Positional arguments
add_paths
Optional arguments
-h, --helpshow this help message and exit
--scope {defaults,system,site,user,command_line} or env:ENVIRONMENTconfiguration scope to modify
-j, --jobs JOBSexplicitly set number of parallel jobs
spack compiler remove¶
spack compiler remove [-ha] [--scope {defaults,system,site,user,command_line} or env:ENVIRONMENT] compiler_spec
Positional arguments
compiler_spec
Optional arguments
-h, --helpshow this help message and exit
-a, --allremove ALL compilers that match spec
--scope {defaults,system,site,user,command_line} or env:ENVIRONMENTconfiguration scope to modify
spack compiler list¶
spack compiler list [-h] [--scope {defaults,system,site,user,command_line} or env:ENVIRONMENT] [--remote]
Optional arguments
-h, --helpshow this help message and exit
--scope {defaults,system,site,user,command_line} or env:ENVIRONMENTconfiguration scope to read from
--remotelist also compilers from registered buildcaches
spack compiler info¶
spack compiler info [-h] [--scope {defaults,system,site,user,command_line} or env:ENVIRONMENT] [--remote]
compiler_spec
Positional arguments
compiler_spec
Optional arguments
-h, --helpshow this help message and exit
--scope {defaults,system,site,user,command_line} or env:ENVIRONMENTconfiguration scope to read from
--remotelist also compilers from registered buildcaches
spack compilers¶
list available compilers
spack compilers [-h] [--scope {defaults,system,site,user,command_line} or env:ENVIRONMENT] [--remote]
Optional arguments
-h, --helpshow this help message and exit
--scope {defaults,system,site,user,command_line} or env:ENVIRONMENTconfiguration scope to read/modify
--remotelist also compilers from registered buildcaches
spack concretize¶
concretize an environment and write a lockfile
spack concretize [-hqfU] [--test {root,all}] [--reuse] [--fresh-roots] [--deprecated] [-j JOBS] [--non-defaults]
Optional arguments
-h, --helpshow this help message and exit
--test {root,all}concretize with test dependencies of only root packages or all packages
-q, --quietdon’t print concretized specs
-f, --forceallow changes to concretized specs in spack.lock (in an env)
-U, --freshdo not reuse installed deps; build newest configuration
--reusereuse installed packages/buildcaches when possible
--fresh-roots, --reuse-depsconcretize with fresh roots and reused dependencies
--deprecatedallow concretizer to select deprecated versions
-j, --jobs JOBSexplicitly set number of parallel jobs
--non-defaultshighlight non-default versions or variants
spack config¶
get and set configuration options
spack config [-h] [--scope {defaults,system,site,user,command_line} or env:ENVIRONMENT] SUBCOMMAND ...
Optional arguments
-h, --helpshow this help message and exit
--scope {defaults,system,site,user,command_line} or env:ENVIRONMENTconfiguration scope to read/modify
Subcommands
spack config get¶
spack config get [-h] [--json] [--group group] [section]
Positional arguments
sectionconfiguration section to print
Optional arguments
-h, --helpshow this help message and exit
--jsonoutput configuration as JSON
--group groupshow configuration as seen by this environment spec group (requires active env)
spack config blame¶
spack config blame [-h] [--group group] [section]
Positional arguments
sectionconfiguration section to print
Optional arguments
-h, --helpshow this help message and exit
--group groupshow configuration as seen by this environment spec group (requires active env)
spack config edit¶
spack config edit [-h] [--print-file] [section]
Positional arguments
sectionconfiguration section to edit
Optional arguments
-h, --helpshow this help message and exit
--print-fileprint the file name that would be edited
spack config list¶
spack config list [-h]
Optional arguments
-h, --helpshow this help message and exit
spack config scopes¶
spack config scopes [-hpv] [-t scope-type [scope-type ...]] [section]
Positional arguments
sectiontailor scope path information to the specified section (implies
--paths)
Optional arguments
-h, --helpshow this help message and exit
-p, --pathsshow associated paths for appropriate scopes
-t, --type scope-type [scope-type ...]list only scopes of the specified type(s)
-v, --verboseshow scope types and whether scopes are overridden
spack config add¶
spack config add [-h] [-f FILE] [path]
Positional arguments
pathcolon-separated path to config that should be added, e.g. ‘config:default:true’
Optional arguments
-h, --helpshow this help message and exit
-f, --file FILEfile from which to set all config values
spack config change¶
spack config change [-h] [--match-spec MATCH_SPEC] path
Positional arguments
pathcolon-separated path to config section with specs
Optional arguments
-h, --helpshow this help message and exit
--match-spec MATCH_SPEConly change constraints that match this
spack config prefer-upstream¶
spack config prefer-upstream [-h] [--local]
Optional arguments
-h, --helpshow this help message and exit
--localset packages preferences based on local installs, rather than upstream
spack config remove¶
spack config remove [-h] path
Positional arguments
pathcolon-separated path to config that should be removed, e.g. ‘config:default:true’
Optional arguments
-h, --helpshow this help message and exit
spack config update¶
spack config update [-hy] section
Positional arguments
sectionsection to update
Optional arguments
-h, --helpshow this help message and exit
-y, --yes-to-allassume “yes” is the answer to every confirmation request
spack config revert¶
spack config revert [-hy] section
Positional arguments
sectionsection to update
Optional arguments
-h, --helpshow this help message and exit
-y, --yes-to-allassume “yes” is the answer to every confirmation request
spack containerize¶
create a container build recipe from an environment
spack containerize [-h] [--list-os] [--last-stage {bootstrap,build,final}]
Optional arguments
-h, --helpshow this help message and exit
--list-oslist all the OS that can be used in the bootstrap phase and exit
--last-stage {bootstrap,build,final}last stage in the container recipe
spack create¶
create a new package file
spack create [-hfb] [--keep-stage] [-n NAME] [-t TEMPLATE] [-r REPO] [-N NAMESPACE] [--skip-editor] [url]
Positional arguments
urlurl of package archive
Optional arguments
-h, --helpshow this help message and exit
--keep-stagedon’t clean up staging area when command completes
-n, --name NAMEname of the package to create
-t, --template TEMPLATEbuild system template to use
-r, --repo REPOpath to a repository where the package should be created
-N, --namespace NAMESPACEspecify a namespace for the package
-f, --forceoverwrite any existing package file with the same name
--skip-editorskip the edit session for the package (e.g., automation)
-b, --batchdon’t ask which versions to checksum
spack debug¶
debugging commands for troubleshooting Spack
spack debug [-h] SUBCOMMAND ...
Optional arguments
-h, --helpshow this help message and exit
Subcommands
spack debug report¶
spack debug report [-h]
Optional arguments
-h, --helpshow this help message and exit
spack deconcretize¶
remove specs from the lockfile of an environment
spack deconcretize [-hya] [--root] ...
Positional arguments
specsone or more package specs
Optional arguments
-h, --helpshow this help message and exit
--rootdeconcretize only specific environment roots
-y, --yes-to-allassume “yes” is the answer to every confirmation request
-a, --alldeconcretize ALL specs that match each supplied spec
spack dependencies¶
show dependencies of a package
spack dependencies [-hitV] [--deptype DEPTYPE] ...
Positional arguments
specpackage spec
Optional arguments
-h, --helpshow this help message and exit
-i, --installedlist installed dependencies of an installed spec instead of possible dependencies of a package
-t, --transitiveshow all transitive dependencies
--deptype DEPTYPEcomma-separated list of deptypes to traverse (default=build,link,run,test)
-V, --no-expand-virtualsdo not expand virtual dependencies
spack dependents¶
show packages that depend on another
spack dependents [-hit] ...
Positional arguments
specpackage spec
Optional arguments
-h, --helpshow this help message and exit
-i, --installedlist installed dependents of an installed spec instead of possible dependents of a package
-t, --transitiveshow all transitive dependents
spack deprecate¶
replace one package with another via symlinks
spack deprecate [-hy] [-d | -D] [-i | -I] [-l {soft,hard}] ...
Positional arguments
specsspec to deprecate and spec to use as deprecator
Optional arguments
-h, --helpshow this help message and exit
-y, --yes-to-allassume “yes” is the answer to every confirmation request
-d, --dependenciesdeprecate dependencies (default)
-D, --no-dependenciesdo not deprecate dependencies
-i, --install-deprecatorconcretize and install deprecator spec
-I, --no-install-deprecatordeprecator spec must already be installed (default)
-l, --link-type {soft,hard}(deprecated)
spack dev-build¶
build package from code in current working directory
spack dev-build [-h] [-j JOBS] [-n] [-d SOURCE_PATH] [-i] [--keep-prefix] [--skip-patch] [-q] [--drop-in SHELL]
[--test {root,all}] [-b BEFORE | -u UNTIL] [--clean | --dirty] [-f] [-U] [--reuse] [--fresh-roots]
[--deprecated]
...
Positional arguments
specpackage spec
Optional arguments
-h, --helpshow this help message and exit
-j, --jobs JOBSexplicitly set number of parallel jobs
-n, --no-checksumdo not use checksums to verify downloaded files (unsafe)
-d, --source-path SOURCE_PATHpath to source directory (defaults to the current directory)
-i, --ignore-dependenciesdo not try to install dependencies of requested packages
--keep-prefixdo not remove the install prefix if installation fails
--skip-patchskip patching for the developer build
-q, --quietdo not display verbose build output while installing
--drop-in SHELLdrop into a build environment in a new shell, e.g., bash
--test {root,all}run tests on only root packages or all packages
-b, --before BEFOREphase to stop before when installing (default None)
-u, --until UNTILphase to stop after when installing (default None)
--cleanunset harmful variables in the build environment (default)
--dirtypreserve user environment in spack’s build environment (danger!)
-f, --forceallow changes to concretized specs in spack.lock (in an env)
-U, --freshdo not reuse installed deps; build newest configuration
--reusereuse installed packages/buildcaches when possible
--fresh-roots, --reuse-depsconcretize with fresh roots and reused dependencies
--deprecatedallow concretizer to select deprecated versions
spack develop¶
add a spec to an environment’s dev-build information
spack develop [-hfr] [-p PATH] [-b BUILD_DIRECTORY] [--no-clone | --clone] [--no-modify-concrete-specs] ...
Positional arguments
specpackage spec
Optional arguments
-h, --helpshow this help message and exit
-p, --path PATHsource location of package
-b, --build-directory BUILD_DIRECTORYbuild directory for the package
--no-clonedo not clone, the package already exists at the source path
--clone(default) clone the package unless the path already exists, use
--forceto overwrite--no-modify-concrete-specsdo not mutate concrete specs to have dev_path provenance. This requires a later spack concretize –force command to use develop specs
-f, --forceremove any files or directories that block cloning source code
-r, --recursivetraverse nodes of the graph to mark everything up to the root as a develop spec
spack diff¶
compare two specs
spack diff [-h] [--json] [--first] [-a ATTRIBUTE] [--ignore IGNORE] ...
Positional arguments
specsone or more package specs
Optional arguments
-h, --helpshow this help message and exit
--jsondump json output instead of pretty printing
--firstload the first match if multiple packages match the spec
-a, --attribute ATTRIBUTEselect the attributes to show (defaults to all)
--ignore IGNOREomit diffs related to these dependencies
spack docs¶
open spack documentation in a web browser
spack docs [-h]
Optional arguments
-h, --helpshow this help message and exit
spack edit¶
open package files in $EDITOR
spack edit [-h] [-b | -c | -d | -t | -m] [-r REPO] [-N NAMESPACE] [package ...]
Positional arguments
packagepackage name
Optional arguments
-h, --helpshow this help message and exit
-b, --build-systemedit the build system with the supplied name or fullname
-c, --commandedit the command with the supplied name
-d, --docsedit the docs with the supplied name
-t, --testedit the test with the supplied name
-m, --moduleedit the main spack module with the supplied name
-r, --repo REPOpath to repo to edit package or build system in
-N, --namespace NAMESPACEnamespace of package or build system to edit
spack env¶
manage environments
spack env [-h] SUBCOMMAND ...
Optional arguments
-h, --helpshow this help message and exit
Subcommands
spack env activate¶
set the active environment
spack env activate [-h] [--sh | --csh | --fish | --bat | --pwsh] [-v name | -V] [-p] [--temp] [--create]
[--envfile [ENVFILE]] [--keep-relative] [-d]
[env]
Positional arguments
envname or directory of the environment being activated
Optional arguments
-h, --helpshow this help message and exit
--shprint sh commands to activate the environment
--cshprint csh commands to activate the environment
--fishprint fish commands to activate the environment
--batprint bat commands to activate the environment
--pwshprint powershell commands to activate environment
-v, --with-view nameset runtime environment variables for the named view
-V, --without-viewdo not set runtime environment variables for any view
-p, --promptadd the active environment to the command line prompt
--tempcreate and activate in a temporary directory
--createcreate and activate the environment if it doesn’t exist
--envfile [ENVFILE]manifest or lock file (ends with ‘.json’ or ‘.lock’)
--keep-relativecopy envfile’s relative develop paths verbatim when create
-d, --diractivate environment based on the directory supplied
spack env deactivate¶
deactivate the active environment
spack env deactivate [-h] [--sh | --csh | --fish | --bat | --pwsh]
Optional arguments
-h, --helpshow this help message and exit
--shprint sh commands to deactivate the environment
--cshprint csh commands to deactivate the environment
--fishprint fish commands to activate the environment
--batprint bat commands to activate the environment
--pwshprint pwsh commands to activate the environment
spack env create¶
create a new environment
create a new environment or, optionally, copy an existing environment
a manifest file results in a new abstract environment while a lock file creates a new concrete environment
spack env create [-h] [-d] [--keep-relative] [--without-view | --with-view WITH_VIEW]
[--include-concrete INCLUDE_CONCRETE]
env [envfile]
Positional arguments
envname or directory of the new environment
envfilemanifest or lock file (ends with ‘.json’ or ‘.lock’) or an environment name or path
Optional arguments
-h, --helpshow this help message and exit
-d, --dircreate an environment in a specific directory
--keep-relativecopy envfile’s relative develop paths verbatim
--without-viewdo not maintain a view for this environment
--with-view WITH_VIEWmaintain view at WITH_VIEW (vs. environment’s directory)
--include-concrete INCLUDE_CONCRETEcopy concrete specs from INCLUDE_CONCRETE’s environment
spack env remove¶
remove managed environment(s)
remove existing environment(s) managed by Spack
directory environments and manifests embedded in repositories must be removed manually
spack env remove [-hyf] env [env ...]
Positional arguments
envname(s) of the environment(s) being removed
Optional arguments
-h, --helpshow this help message and exit
-y, --yes-to-allassume “yes” is the answer to every confirmation request
-f, --forceforce removal even when included in other environment(s)
spack env rename¶
rename an existing environment
rename a managed environment or move an independent/directory environment
operation cannot be performed to or from an active environment
spack env rename [-hdf] from to
Positional arguments
fromcurrent name or directory of the environment
tonew name or directory for the environment
Optional arguments
-h, --helpshow this help message and exit
-d, --dirpositional arguments are environment directory paths
-f, --forceforce renaming even if overwriting an existing environment
spack env list¶
list all managed environments
spack env list [-h]
Optional arguments
-h, --helpshow this help message and exit
spack env status¶
print active environment status
spack env status [-h]
Optional arguments
-h, --helpshow this help message and exit
spack env loads¶
list modules for an installed environment ‘(see spack module loads)’
spack env loads [-hr] [-n MODULE_SET_NAME] [-m {tcl,lmod}] [--input-only] [-p PREFIX] [-x EXCLUDE]
Optional arguments
-h, --helpshow this help message and exit
-n, --module-set-name MODULE_SET_NAMEmodule set for which to generate load operations
-m, --module-type {tcl,lmod}type of module system to generate loads for
--input-onlygenerate input for module command (instead of a shell script)
-p, --prefix PREFIXprepend to module names when issuing module load commands
-x, --exclude EXCLUDEexclude package from output; may be specified multiple times
-r, --dependenciesrecursively traverse spec dependencies
spack env view¶
manage the environment’s view
provide the path when enabling a view with a non-default path
spack env view [-h] {regenerate,enable,disable} [view_path]
Positional arguments
{regenerate,enable,disable}action to take for the environment’s view
view_pathview’s non-default path when enabling it
Optional arguments
-h, --helpshow this help message and exit
spack env update¶
update the environment manifest to the latest schema format
update the environment to the latest schema format, which may not be readable by older versions of spack
a backup copy of the manifest is retained in case there is a need to revert this operation
spack env update [-hy] env
Positional arguments
envname or directory of the environment
Optional arguments
-h, --helpshow this help message and exit
-y, --yes-to-allassume “yes” is the answer to every confirmation request
spack env revert¶
restore the environment manifest to its previous format
revert the environment’s manifest to the schema format from its last ‘spack env update’
the current manifest will be overwritten by the backup copy and the backup copy will be removed
spack env revert [-hy] env
Positional arguments
envname or directory of the environment
Optional arguments
-h, --helpshow this help message and exit
-y, --yes-to-allassume “yes” is the answer to every confirmation request
spack env depfile¶
generate a depfile to exploit parallel builds across specs
requires the active environment to be concrete
spack env depfile [-h] [--make-prefix TARGET] [--make-disable-jobserver]
[--use-buildcache [{auto,only,never},][package:{auto,only,never},][dependencies:{auto,only,never}]]
[-o FILE] [-G {make}]
...
Positional arguments
specslimit the generated file to matching specs
Optional arguments
-h, --helpshow this help message and exit
--make-prefix, --make-target-prefix TARGETprefix Makefile targets/variables with <TARGET>/<name>,
--make-disable-jobserverdisable POSIX jobserver support
--use-buildcache [{auto,only,never},][package:{auto,only,never},][dependencies:{auto,only,never}]use only to prune redundant build dependencies
-o, --output FILEwrite the depfile to FILE rather than to stdout
-G, --generator {make}specify the depfile type (only supports make)
spack env track¶
track an environment from a directory in Spack
spack env track [-hy] [-n NAME] dir
Positional arguments
dirpath to environment
Optional arguments
-h, --helpshow this help message and exit
-n, --name NAMEcustom environment name
-y, --yes-to-allassume “yes” is the answer to every confirmation request
spack env untrack¶
untrack an environment from a directory in Spack
spack env untrack [-hfy] env [env ...]
Positional arguments
envtracked environment name
Optional arguments
-h, --helpshow this help message and exit
-f, --forceforce unlink even when environment is active
-y, --yes-to-allassume “yes” is the answer to every confirmation request
spack extensions¶
list extensions for package
spack extensions [-hlLdp] [-s {packages,installed,all}] ...
Positional arguments
extendablespec of package to list extensions for
Optional arguments
-h, --helpshow this help message and exit
-l, --longshow dependency hashes as well as versions
-L, --very-longshow full dependency hashes as well as versions
-d, --depsoutput dependencies along with found specs
-p, --pathsshow paths to package install directories
-s, --show {packages,installed,all}show only part of output
spack external¶
manage external packages in Spack configuration
spack external [-h] SUBCOMMAND ...
Optional arguments
-h, --helpshow this help message and exit
Subcommands
spack external find¶
spack external find [-h] [--not-buildable] [--exclude EXCLUDE] [-p PATH]
[--scope {defaults,system,site,user,command_line} or env:ENVIRONMENT] [--all] [-t TAG] [-j JOBS]
...
Positional arguments
packages
Optional arguments
-h, --helpshow this help message and exit
--not-buildablepackages with detected externals won’t be built with Spack
--exclude EXCLUDEpackages to exclude from search
-p, --path PATHone or more alternative search paths for finding externals
--scope {defaults,system,site,user,command_line} or env:ENVIRONMENTconfiguration scope to modify
--allsearch for all packages that Spack knows about
-t, --tag TAGfilter a package query by tag (multiple use allowed)
-j, --jobs JOBSexplicitly set number of parallel jobs
spack external list¶
spack external list [-h]
Optional arguments
-h, --helpshow this help message and exit
spack external read-cray-manifest¶
spack external read-cray-manifest [-h] [--file FILE] [--directory DIRECTORY] [--ignore-default-dir] [--dry-run]
[--fail-on-error]
Optional arguments
-h, --helpshow this help message and exit
--file FILEspecify a location other than the default
--directory DIRECTORYspecify a directory storing a group of manifest files
--ignore-default-dirignore the default directory of manifest files
--dry-rundon’t modify DB with files that are read
--fail-on-errorif a manifest file cannot be parsed, fail and report the full stack trace
spack fetch¶
fetch archives for packages
spack fetch [-hnmDfU] [--reuse] [--fresh-roots] [--deprecated] ...
Positional arguments
specsone or more package specs
Optional arguments
-h, --helpshow this help message and exit
-n, --no-checksumdo not use checksums to verify downloaded files (unsafe)
-m, --missingfetch only missing (not yet installed) dependencies
-D, --dependenciesalso fetch all dependencies
-f, --forceallow changes to concretized specs in spack.lock (in an env)
-U, --freshdo not reuse installed deps; build newest configuration
--reusereuse installed packages/buildcaches when possible
--fresh-roots, --reuse-depsconcretize with fresh roots and reused dependencies
--deprecatedallow concretizer to select deprecated versions
spack find¶
list and search installed packages
spack find [-h] [--format FORMAT | -H | --json] [-I] [--specfile-format] [-d] [-p] [--groups] [--no-groups] [-l] [-L]
[-t TAG] [-N] [-r] [-c | --show-configured-externals] [-f] [--show-full-compiler] [-x | -X] [-e] [-u] [-m]
[-v] [--loaded] [-M | --only-deprecated] [--deprecated] [--install-tree INSTALL_TREE]
[--start-date START_DATE] [--end-date END_DATE]
...
Positional arguments
installed_specsconstraint to select a subset of installed packages
Optional arguments
-h, --helpshow this help message and exit
--format FORMAToutput specs with the specified format string
-H, --hashessame as
--format {/hash}; use withxargsor$()--jsonoutput specs as machine-readable json records
-I, --install-statusshow install status of packages
--specfile-formatshow the specfile format for installed deps
-d, --depsoutput dependencies along with found specs
-p, --pathsshow paths to package install directories
--groupsdisplay specs in arch/compiler groups (default on)
--no-groupsdo not group specs by arch/compiler
-l, --longshow dependency hashes as well as versions
-L, --very-longshow full dependency hashes as well as versions
-t, --tag TAGfilter a package query by tag (multiple use allowed)
-N, --namespacesshow fully qualified package names
-r, --only-rootsdon’t show full list of installed specs in an environment
-c, --show-concretizedshow concretized specs in an environment
--show-configured-externalsshow externals defined in the ‘packages’ section of the configuration
-f, --show-flagsshow spec compiler flags
--show-full-compiler(DEPRECATED) show full compiler specs. Currently it’s a no-op
-x, --explicitshow only specs that were installed explicitly
-X, --implicitshow only specs that were installed as dependencies
-e, --externalshow only specs that are marked as externals
-u, --unknownshow only specs Spack does not have a package for
-m, --missingshow missing dependencies as well as installed specs
-v, --variantsshow variants in output (can be long)
--loadedshow only packages loaded in the user environment
-M, --only-missingshow only missing dependencies
--only-deprecatedshow only deprecated packages
--deprecatedshow deprecated packages as well as installed specs
--install-tree INSTALL_TREEInstall trees to query: ‘all’ (default), ‘local’, ‘upstream’, upstream name or path
--start-date START_DATEearliest date of installation [YYYY-MM-DD]
--end-date END_DATElatest date of installation [YYYY-MM-DD]
spack gc¶
remove specs that are now no longer needed
spack gc [-hEby] [-e ENV] ...
Positional arguments
installed_specsconstraint to select a subset of installed packages
Optional arguments
-h, --helpshow this help message and exit
-E, --except-any-environmentremove everything unless needed by an environment
-e, --except-environment ENVremove everything unless needed by specified environment
-b, --keep-build-dependenciesdo not remove installed build-only dependencies of roots
-y, --yes-to-allassume “yes” is the answer to every confirmation request
spack gpg¶
handle GPG actions for spack
spack gpg [-h] SUBCOMMAND ...
Optional arguments
-h, --helpshow this help message and exit
Subcommands
spack gpg verify¶
spack gpg verify [-h] ... [signature]
Positional arguments
installed_specinstalled package spec
signaturethe signature file
Optional arguments
-h, --helpshow this help message and exit
spack gpg trust¶
spack gpg trust [-h] keyfile
Positional arguments
keyfileadd a key to the trust store
Optional arguments
-h, --helpshow this help message and exit
spack gpg untrust¶
spack gpg untrust [-h] [--signing] keys [keys ...]
Positional arguments
keysremove keys from the trust store
Optional arguments
-h, --helpshow this help message and exit
--signingallow untrusting signing keys
spack gpg sign¶
spack gpg sign [-h] [--output DEST] [--key KEY] [--clearsign] ...
Positional arguments
installed_specinstalled package spec
Optional arguments
-h, --helpshow this help message and exit
--output DESTthe directory to place signatures
--key KEYthe key to use for signing
--clearsignif specified, create a clearsign signature
spack gpg create¶
spack gpg create [-h] [--comment COMMENT] [--expires EXPIRATION] [--export DEST] [--export-secret DEST] name email
Positional arguments
namethe name to use for the new key
emailthe email address to use for the new key
Optional arguments
-h, --helpshow this help message and exit
--comment COMMENTa description for the intended use of the key
--expires EXPIRATIONwhen the key should expire
--export DESTexport the public key to a file
--export-secret DESTexport the private key to a file
spack gpg list¶
spack gpg list [-h] [--trusted] [--signing]
Optional arguments
-h, --helpshow this help message and exit
--trustedlist trusted keys
--signinglist keys which may be used for signing
spack gpg init¶
spack gpg init [-h]
Optional arguments
-h, --helpshow this help message and exit
--from DIR
spack gpg export¶
spack gpg export [-h] [--secret] location [keys ...]
Positional arguments
locationwhere to export keys
keysthe keys to export (all public keys if unspecified)
Optional arguments
-h, --helpshow this help message and exit
--secretexport secret keys
spack gpg publish¶
spack gpg publish [-h] (-d directory | -m mirror-name | --mirror-url mirror-url) [--update-index] [keys ...]
Positional arguments
keyskeys to publish (all public keys if unspecified)
Optional arguments
-h, --helpshow this help message and exit
-d, --directory directorylocal directory where keys will be published
-m, --mirror-name mirror-namename of the mirror where keys will be published
--mirror-url mirror-urlURL of the mirror where keys will be published
--update-index, --rebuild-indexregenerate buildcache key index after publishing key(s)
spack graph¶
generate graphs of package dependency relationships
spack graph [-hsci] [-a | -d] [--deptype DEPTYPE] ...
Positional arguments
specsone or more package specs
Optional arguments
-h, --helpshow this help message and exit
-a, --asciidraw graph as ascii to stdout (default)
-d, --dotgenerate graph in dot format and print to stdout
-s, --staticgraph static (possible) deps, don’t concretize (implies
--dot)-c, --coloruse different colors for different dependency types
-i, --installedgraph specs from the DB
--deptype DEPTYPEcomma-separated list of deptypes to traverse (default=build,link,run,test)
spack help¶
get help on spack and its commands
spack help [-ha] [--spec] [help_command]
Positional arguments
help_commandcommand to get help on
Optional arguments
-h, --helpshow this help message and exit
-a, --alllist all available commands and options
--spechelp on the package specification syntax
spack info¶
get detailed information on a particular package
spack info [-h] [-a] [--by-name | --by-when] [--detectable] [--maintainers] [--namespace] [--no-dependencies]
[--no-variants] [--no-versions] [--phases] [--tags] [--tests] [--virtuals]
...
Positional arguments
specpackage spec
Optional arguments
-h, --helpshow this help message and exit
-a, --alloutput all package information
--by-namelist variants, dependency, etc. in name order, then by when condition
--by-whengroup variants, dependencies, etc. first by when condition, then by name
--detectableoutput information on external detection
--maintainersoutput package maintainers
--namespaceoutput package namespace
--no-dependenciesdo not output build, link, and run package dependencies
--no-variantsdo not output variants
--no-versionsdo not output versions
--phasesoutput installation phases
--tagsoutput package tags
--testsoutput relevant build-time and stand-alone tests
--virtualsoutput virtual packages
--variants-by-name
spack install¶
build and install packages
spack install [-h] [--only {package,dependencies}] [-u UNTIL] [-p CONCURRENT_PACKAGES] [-j JOBS] [--overwrite]
[--fail-fast] [--keep-prefix] [--keep-stage] [--dont-restage] [--use-cache | --no-cache | --cache-only |
--use-buildcache [{auto,only,never},][package:{auto,only,never},][dependencies:{auto,only,never}]]
[--include-build-deps] [--no-check-signature] [--show-log-on-error] [--source] [-n] [-v] [--fake]
[--only-concrete] [--add | --no-add] [--clean | --dirty] [--test {root,all}]
[--log-format {junit,cdash}] [--log-file LOG_FILE] [--help-cdash] [-y] [-f] [-U] [--reuse]
[--fresh-roots] [--deprecated]
...
Positional arguments
specpackage spec
Optional arguments
-h, --helpshow this help message and exit
--only {package,dependencies}select the mode of installation
-u, --until UNTILphase to stop after when installing (default None)
-p, --concurrent-packages CONCURRENT_PACKAGESmaximum number of packages to build concurrently
-j, --jobs JOBSexplicitly set number of parallel jobs
--overwritereinstall an existing spec, even if it has dependents
--fail-faststop all builds if any build fails (default is best effort)
--keep-prefixdon’t remove the install prefix if installation fails
--keep-stagedon’t remove the build stage if installation succeeds
--dont-restageif a partial install is detected, don’t delete prior state
--use-cachecheck for pre-built Spack packages in mirrors (default)
--no-cachedo not check for pre-built Spack packages in mirrors
--cache-onlyonly install package from binary mirrors
--use-buildcache [{auto,only,never},][package:{auto,only,never},][dependencies:{auto,only,never}]select the mode of buildcache for the ‘package’ and ‘dependencies’
--include-build-depsinclude build deps when installing from cache, useful for CI pipeline troubleshooting
--no-check-signaturedo not check signatures of binary packages (override mirror config)
--show-log-on-errorprint full build log to stderr if build fails
--sourceinstall source files in prefix
-n, --no-checksumdo not use checksums to verify downloaded files (unsafe)
-v, --verbosedisplay verbose build output while installing
--fakefake install for debug purposes
--only-concrete(with environment) only install already concretized specs
--add(with environment) add spec to the environment as a root
--no-add(with environment) do not add spec to the environment as a root
--cleanunset harmful variables in the build environment (default)
--dirtypreserve user environment in spack’s build environment (danger!)
--test {root,all}run tests on only root packages or all packages
--log-format {junit,cdash}format to be used for log files
--log-file LOG_FILEfilename for the log file
--help-cdashshow usage instructions for CDash reporting
--cdash-upload-url CDASH_UPLOAD_URL
--cdash-build CDASH_BUILD
--cdash-site CDASH_SITE
--cdash-track CDASH_TRACK
--cdash-buildstamp CDASH_BUILDSTAMP
-y, --yes-to-allassume “yes” is the answer to every confirmation request
-f, --forceallow changes to concretized specs in spack.lock (in an env)
-U, --freshdo not reuse installed deps; build newest configuration
--reusereuse installed packages/buildcaches when possible
--fresh-roots, --reuse-depsconcretize with fresh roots and reused dependencies
--deprecatedallow concretizer to select deprecated versions
spack license¶
list and check license headers on files in spack
spack license [-h] [--root ROOT] SUBCOMMAND ...
Optional arguments
-h, --helpshow this help message and exit
--root ROOTscan a different prefix for license issues
Subcommands
spack license list-files¶
spack license list-files [-h]
Optional arguments
-h, --helpshow this help message and exit
spack license verify¶
spack license verify [-h]
Optional arguments
-h, --helpshow this help message and exit
spack list¶
list and search available packages
spack list [-hdv] [-r REPOS] [--format {name_only,version_json,html}] [-t TAG] [--count | --update FILE] ...
Positional arguments
filteroptional case-insensitive glob patterns to filter results
Optional arguments
-h, --helpshow this help message and exit
-r, --repo, -N, --namespace REPOSonly list packages from the specified repo/namespace
-d, --search-descriptionfiltering will also search the description for a match
--format {name_only,version_json,html}format to be used to print the output [default: name_only]
-v, --virtualsinclude virtual packages in list
-t, --tag TAGfilter a package query by tag (multiple use allowed)
--countdisplay the number of packages that would be listed
--update FILEwrite output to the specified file, if any package is newer
spack load¶
add package to the user environment
spack load [-h] [--sh | --csh | --fish | --bat | --pwsh] [--first] [--list] ...
Positional arguments
installed_specsconstraint to select a subset of installed packages
Optional arguments
-h, --helpshow this help message and exit
--shprint sh commands to load the package
--cshprint csh commands to load the package
--fishprint fish commands to load the package
--batprint bat commands to load the package
--pwshprint pwsh commands to load the package
--firstload the first match if multiple packages match the spec
--listshow loaded packages: same as
spack find --loaded
spack location¶
print out locations of packages and spack directories
spack location [-h] [-m | -r | -i | -p | --repo [repo] | -s | -S | -c | -b | -e [name] | -v [name]] [--first] ...
Positional arguments
specpackage spec
Optional arguments
-h, --helpshow this help message and exit
-m, --module-dirspack python module directory
-r, --spack-rootspack installation root
-i, --install-dirinstall prefix for spec (spec need not be installed)
-p, --package-dirdirectory enclosing a spec’s package.py file
--repo, --packages, -P [repo]package repository root (defaults to first configured repository)
-s, --stage-dirstage directory for a spec
-S, --stagestop level stage directory
-c, --source-dirsource directory for a spec (requires it to be staged first)
-b, --build-dirbuild directory for a spec (requires it to be staged first)
-e, --env [name]location of the named or current environment
-v, --view [name]location of the named or active environment view
--firstuse the first match if multiple packages match the spec
spack log-parse¶
filter errors and warnings from build logs
spack log-parse [-hp] [--show SHOW] [-c CONTEXT] [-t LINES] file
Positional arguments
filea log file containing build output, or - for stdin
Optional arguments
-h, --helpshow this help message and exit
--show SHOWcomma-separated list of what to show; options: errors, warnings
-c, --context CONTEXTlines of context to show around lines of interest
-p, --profileprint out a profile of time spent in regexes during parse
-w, --width WIDTH
-j, --jobs JOBS
-t, --tail LINESnumber of trailing log lines to show (0 to disable)
spack logs¶
print out logs for packages
spack logs [-h] ...
Positional arguments
specpackage spec
Optional arguments
-h, --helpshow this help message and exit
spack maintainers¶
get information about package maintainers
spack maintainers [-ha] [--maintained | --unmaintained] [--by-user] ...
Positional arguments
package_or_usernames of packages or users to get info for
Optional arguments
-h, --helpshow this help message and exit
--maintainedshow names of maintained packages
--unmaintainedshow names of unmaintained packages
-a, --allshow maintainers for all packages
--by-usershow packages for users instead of users for packages
spack make-installer¶
generate Windows installer
spack make-installer [-h] (-v SPACK_VERSION | -s SPACK_SOURCE) [-g {SILENT,VERYSILENT}] output_dir
Positional arguments
output_diroutput directory
Optional arguments
-h, --helpshow this help message and exit
-v, --spack-version SPACK_VERSIONdownload given spack version
-s, --spack-source SPACK_SOURCEfull path to spack source
-g, --git-installer-verbosity {SILENT,VERYSILENT}level of verbosity provided by bundled git installer (default is fully verbose)
spack mark¶
mark packages as explicitly or implicitly installed
spack mark [-ha] (-e | -i) ...
Positional arguments
installed_specsone or more installed package specs
Optional arguments
-h, --helpshow this help message and exit
-a, --allmark ALL installed packages that match each supplied spec
-e, --explicitmark packages as explicitly installed
-i, --implicitmark packages as implicitly installed
spack mirror¶
manage mirrors (source and binary)
spack mirror [-hn] SUBCOMMAND ...
Optional arguments
-h, --helpshow this help message and exit
-n, --no-checksumdo not use checksums to verify downloaded files (unsafe)
Subcommands
spack mirror create¶
spack mirror create [-h] [-d DIRECTORY] [-a] [-j JOBS] [--file FILE] [--exclude-file EXCLUDE_FILE]
[--exclude-specs EXCLUDE_SPECS] [--skip-unstable-versions] [-D] [-n VERSIONS_PER_SPEC] [--private]
[-f] [-U] [--reuse] [--fresh-roots] [--deprecated]
...
Positional arguments
specsone or more package specs
Optional arguments
-h, --helpshow this help message and exit
-d, --directory DIRECTORYdirectory in which to create mirror
-a, --allmirror all versions of all packages in Spack, or all packages in the current environment if there is an active environment (this requires significant time and space)
-j, --jobs JOBSUse a given number of workers to make the mirror (used in combination with -a)
--file FILEfile with specs of packages to put in mirror
--exclude-file EXCLUDE_FILEspecs which Spack should not try to add to a mirror (listed in a file, one per line)
--exclude-specs EXCLUDE_SPECSspecs which Spack should not try to add to a mirror (specified on command line)
--skip-unstable-versionsdon’t cache versions unless they identify a stable (unchanging) source code
-D, --dependenciesalso fetch all dependencies
-n, --versions-per-spec VERSIONS_PER_SPECthe number of versions to fetch for each spec, choose ‘all’ to retrieve all versions of each package
--privatefor a private mirror, include non-redistributable packages
-f, --forceallow changes to concretized specs in spack.lock (in an env)
-U, --freshdo not reuse installed deps; build newest configuration
--reusereuse installed packages/buildcaches when possible
--fresh-roots, --reuse-depsconcretize with fresh roots and reused dependencies
--deprecatedallow concretizer to select deprecated versions
spack mirror destroy¶
spack mirror destroy [-h] (-m mirror_name | --mirror-url mirror_url)
Optional arguments
-h, --helpshow this help message and exit
-m, --mirror-name mirror_namefind mirror to destroy by name
--mirror-url mirror_urlfind mirror to destroy by url
spack mirror add¶
spack mirror add [-h] [--scope {defaults,system,site,user,command_line} or env:ENVIRONMENT] [--type {binary,source}]
[--autopush] [--unsigned | --signed] [--name VIEW_NAME] [--s3-access-key-id S3_ACCESS_KEY_ID |
--s3-access-key-id-variable S3_ACCESS_KEY_ID_VARIABLE]
[--s3-access-key-secret-variable S3_ACCESS_KEY_SECRET_VARIABLE]
[--s3-access-token-variable S3_ACCESS_TOKEN_VARIABLE] [--s3-profile S3_PROFILE]
[--s3-endpoint-url S3_ENDPOINT_URL] [--oci-username OCI_USERNAME |
--oci-username-variable OCI_USERNAME_VARIABLE] [--oci-password-variable OCI_PASSWORD_VARIABLE]
mirror url
Positional arguments
mirrormnemonic name for mirror
urlurl of mirror directory from ‘spack mirror create’
Optional arguments
-h, --helpshow this help message and exit
--scope {defaults,system,site,user,command_line} or env:ENVIRONMENTconfiguration scope to modify
--type {binary,source}specify the mirror type: for both binary and source use
--type binary --type source(default)--autopushset mirror to push automatically after installation
--unsigneddo not require signing and signature verification when pushing and installing from this build cache
--signedrequire signing and signature verification when pushing and installing from this build cache
--name, -n VIEW_NAMEName of the index view for a binary mirror
--s3-access-key-id S3_ACCESS_KEY_IDID string to use to connect to this S3 mirror
--s3-access-key-id-variable S3_ACCESS_KEY_ID_VARIABLEenvironment variable containing ID string to use to connect to this S3 mirror
--s3-access-key-secret-variable S3_ACCESS_KEY_SECRET_VARIABLEenvironment variable containing secret string to use to connect to this S3 mirror
--s3-access-token-variable S3_ACCESS_TOKEN_VARIABLEenvironment variable containing access token to use to connect to this S3 mirror
--s3-profile S3_PROFILES3 profile name to use to connect to this S3 mirror
--s3-endpoint-url S3_ENDPOINT_URLendpoint URL to use to connect to this S3 mirror
--oci-username OCI_USERNAMEusername to use to connect to this OCI mirror
--oci-username-variable OCI_USERNAME_VARIABLEenvironment variable containing username to use to connect to this OCI mirror
--oci-password-variable OCI_PASSWORD_VARIABLEenvironment variable containing password to use to connect to this OCI mirror
spack mirror remove¶
spack mirror remove [-h] [--scope {defaults,system,site,user,command_line} or env:ENVIRONMENT] [--all-scopes] mirror
Positional arguments
mirrormnemonic name for mirror
Optional arguments
-h, --helpshow this help message and exit
--scope {defaults,system,site,user,command_line} or env:ENVIRONMENTconfiguration scope to modify
--all-scopesremove from all config scopes (default: highest scope with matching mirror)
spack mirror set-url¶
spack mirror set-url [-h] [--push | --fetch] [--scope {defaults,system,site,user,command_line} or env:ENVIRONMENT]
[--s3-access-key-id S3_ACCESS_KEY_ID | --s3-access-key-id-variable S3_ACCESS_KEY_ID_VARIABLE]
[--s3-access-key-secret-variable S3_ACCESS_KEY_SECRET_VARIABLE]
[--s3-access-token-variable S3_ACCESS_TOKEN_VARIABLE] [--s3-profile S3_PROFILE]
[--s3-endpoint-url S3_ENDPOINT_URL] [--oci-username OCI_USERNAME |
--oci-username-variable OCI_USERNAME_VARIABLE] [--oci-password-variable OCI_PASSWORD_VARIABLE]
mirror url
Positional arguments
mirrormnemonic name for mirror
urlurl of mirror directory from ‘spack mirror create’
Optional arguments
-h, --helpshow this help message and exit
--pushset only the URL used for uploading
--fetchset only the URL used for downloading
--scope {defaults,system,site,user,command_line} or env:ENVIRONMENTconfiguration scope to modify
--s3-access-key-id S3_ACCESS_KEY_IDID string to use to connect to this S3 mirror
--s3-access-key-id-variable S3_ACCESS_KEY_ID_VARIABLEenvironment variable containing ID string to use to connect to this S3 mirror
--s3-access-key-secret-variable S3_ACCESS_KEY_SECRET_VARIABLEenvironment variable containing secret string to use to connect to this S3 mirror
--s3-access-token-variable S3_ACCESS_TOKEN_VARIABLEenvironment variable containing access token to use to connect to this S3 mirror
--s3-profile S3_PROFILES3 profile name to use to connect to this S3 mirror
--s3-endpoint-url S3_ENDPOINT_URLendpoint URL to use to connect to this S3 mirror
--oci-username OCI_USERNAMEusername to use to connect to this OCI mirror
--oci-username-variable OCI_USERNAME_VARIABLEenvironment variable containing username to use to connect to this OCI mirror
--oci-password-variable OCI_PASSWORD_VARIABLEenvironment variable containing password to use to connect to this OCI mirror
spack mirror set¶
spack mirror set [-h] [--push | --fetch] [--type {binary,source}] [--url URL] [--autopush | --no-autopush]
[--unsigned | --signed] [--scope {defaults,system,site,user,command_line} or env:ENVIRONMENT]
[--s3-access-key-id S3_ACCESS_KEY_ID | --s3-access-key-id-variable S3_ACCESS_KEY_ID_VARIABLE]
[--s3-access-key-secret-variable S3_ACCESS_KEY_SECRET_VARIABLE]
[--s3-access-token-variable S3_ACCESS_TOKEN_VARIABLE] [--s3-profile S3_PROFILE]
[--s3-endpoint-url S3_ENDPOINT_URL] [--oci-username OCI_USERNAME |
--oci-username-variable OCI_USERNAME_VARIABLE] [--oci-password-variable OCI_PASSWORD_VARIABLE]
mirror
Positional arguments
mirrormnemonic name for mirror
Optional arguments
-h, --helpshow this help message and exit
--pushmodify just the push connection details
--fetchmodify just the fetch connection details
--type {binary,source}specify the mirror type: for both binary and source use
--type binary --type source--url URLurl of mirror directory from ‘spack mirror create’
--autopushset mirror to push automatically after installation
--no-autopushset mirror to not push automatically after installation
--unsigneddo not require signing and signature verification when pushing and installing from this build cache
--signedrequire signing and signature verification when pushing and installing from this build cache
--scope {defaults,system,site,user,command_line} or env:ENVIRONMENTconfiguration scope to modify
--s3-access-key-id S3_ACCESS_KEY_IDID string to use to connect to this S3 mirror
--s3-access-key-id-variable S3_ACCESS_KEY_ID_VARIABLEenvironment variable containing ID string to use to connect to this S3 mirror
--s3-access-key-secret-variable S3_ACCESS_KEY_SECRET_VARIABLEenvironment variable containing secret string to use to connect to this S3 mirror
--s3-access-token-variable S3_ACCESS_TOKEN_VARIABLEenvironment variable containing access token to use to connect to this S3 mirror
--s3-profile S3_PROFILES3 profile name to use to connect to this S3 mirror
--s3-endpoint-url S3_ENDPOINT_URLendpoint URL to use to connect to this S3 mirror
--oci-username OCI_USERNAMEusername to use to connect to this OCI mirror
--oci-username-variable OCI_USERNAME_VARIABLEenvironment variable containing username to use to connect to this OCI mirror
--oci-password-variable OCI_PASSWORD_VARIABLEenvironment variable containing password to use to connect to this OCI mirror
spack mirror list¶
spack mirror list [-h] [--scope {defaults,system,site,user,command_line} or env:ENVIRONMENT]
Optional arguments
-h, --helpshow this help message and exit
--scope {defaults,system,site,user,command_line} or env:ENVIRONMENTconfiguration scope to read from
spack module¶
generate/manage module files
spack module [-h] SUBCOMMAND ...
Optional arguments
-h, --helpshow this help message and exit
Subcommands
spack module lmod¶
spack module lmod [-h] [-n MODULE_SET_NAME] SUBCOMMAND ...
Optional arguments
-h, --helpshow this help message and exit
-n, --name MODULE_SET_NAMEnamed module set to use from modules configuration
Subcommands
spack module lmod refresh¶
spack module lmod refresh [-hy] [--delete-tree] [--upstream-modules] ...
Positional arguments
installed_specsconstraint to select a subset of installed packages
Optional arguments
-h, --helpshow this help message and exit
--delete-treedelete the module file tree before refresh
--upstream-modulesgenerate modules for packages installed upstream
-y, --yes-to-allassume “yes” is the answer to every confirmation request
spack module lmod find¶
spack module lmod find [-hr] [--full-path] ...
Positional arguments
installed_specsconstraint to select a subset of installed packages
Optional arguments
-h, --helpshow this help message and exit
--full-pathdisplay full path to module file
-r, --dependenciesrecursively traverse spec dependencies
spack module lmod rm¶
spack module lmod rm [-hy] ...
Positional arguments
installed_specsconstraint to select a subset of installed packages
Optional arguments
-h, --helpshow this help message and exit
-y, --yes-to-allassume “yes” is the answer to every confirmation request
spack module lmod loads¶
spack module lmod loads [-hr] [--input-only] [-p PREFIX] [-x EXCLUDE] ...
Positional arguments
installed_specsconstraint to select a subset of installed packages
Optional arguments
-h, --helpshow this help message and exit
--input-onlygenerate input for module command (instead of a shell script)
-p, --prefix PREFIXprepend to module names when issuing module load commands
-x, --exclude EXCLUDEexclude package from output; may be specified multiple times
-r, --dependenciesrecursively traverse spec dependencies
spack module lmod setdefault¶
spack module lmod setdefault [-h] ...
Positional arguments
installed_specsconstraint to select a subset of installed packages
Optional arguments
-h, --helpshow this help message and exit
spack module tcl¶
spack module tcl [-h] [-n MODULE_SET_NAME] SUBCOMMAND ...
Optional arguments
-h, --helpshow this help message and exit
-n, --name MODULE_SET_NAMEnamed module set to use from modules configuration
Subcommands
spack module tcl refresh¶
spack module tcl refresh [-hy] [--delete-tree] [--upstream-modules] ...
Positional arguments
installed_specsconstraint to select a subset of installed packages
Optional arguments
-h, --helpshow this help message and exit
--delete-treedelete the module file tree before refresh
--upstream-modulesgenerate modules for packages installed upstream
-y, --yes-to-allassume “yes” is the answer to every confirmation request
spack module tcl find¶
spack module tcl find [-hr] [--full-path] ...
Positional arguments
installed_specsconstraint to select a subset of installed packages
Optional arguments
-h, --helpshow this help message and exit
--full-pathdisplay full path to module file
-r, --dependenciesrecursively traverse spec dependencies
spack module tcl rm¶
spack module tcl rm [-hy] ...
Positional arguments
installed_specsconstraint to select a subset of installed packages
Optional arguments
-h, --helpshow this help message and exit
-y, --yes-to-allassume “yes” is the answer to every confirmation request
spack module tcl loads¶
spack module tcl loads [-hr] [--input-only] [-p PREFIX] [-x EXCLUDE] ...
Positional arguments
installed_specsconstraint to select a subset of installed packages
Optional arguments
-h, --helpshow this help message and exit
--input-onlygenerate input for module command (instead of a shell script)
-p, --prefix PREFIXprepend to module names when issuing module load commands
-x, --exclude EXCLUDEexclude package from output; may be specified multiple times
-r, --dependenciesrecursively traverse spec dependencies
spack module tcl setdefault¶
spack module tcl setdefault [-h] ...
Positional arguments
installed_specsconstraint to select a subset of installed packages
Optional arguments
-h, --helpshow this help message and exit
spack patch¶
patch expanded sources in preparation for install
spack patch [-hnfU] [--reuse] [--fresh-roots] [--deprecated] ...
Positional arguments
specsone or more package specs
Optional arguments
-h, --helpshow this help message and exit
-n, --no-checksumdo not use checksums to verify downloaded files (unsafe)
-f, --forceallow changes to concretized specs in spack.lock (in an env)
-U, --freshdo not reuse installed deps; build newest configuration
--reusereuse installed packages/buildcaches when possible
--fresh-roots, --reuse-depsconcretize with fresh roots and reused dependencies
--deprecatedallow concretizer to select deprecated versions
spack pkg¶
query packages associated with particular git revisions
spack pkg [-h] SUBCOMMAND ...
Optional arguments
-h, --helpshow this help message and exit
Subcommands
spack pkg add¶
spack pkg add [-h] package [package ...]
Positional arguments
packageone or more package names
Optional arguments
-h, --helpshow this help message and exit
spack pkg list¶
spack pkg list [-h] [rev]
Positional arguments
revrevision to list packages for
Optional arguments
-h, --helpshow this help message and exit
spack pkg diff¶
spack pkg diff [-h] [rev1] [rev2]
Positional arguments
rev1revision to compare against
rev2revision to compare to rev1 (default is HEAD)
Optional arguments
-h, --helpshow this help message and exit
spack pkg added¶
spack pkg added [-h] [rev1] [rev2]
Positional arguments
rev1revision to compare against
rev2revision to compare to rev1 (default is HEAD)
Optional arguments
-h, --helpshow this help message and exit
spack pkg changed¶
spack pkg changed [-h] [-t TYPE] [rev1] [rev2]
Positional arguments
rev1revision to compare against
rev2revision to compare to rev1 (default is HEAD)
Optional arguments
-h, --helpshow this help message and exit
-t, --type TYPEtypes of changes to show (A: added, R: removed, C: changed); default is ‘C’
spack pkg removed¶
spack pkg removed [-h] [rev1] [rev2]
Positional arguments
rev1revision to compare against
rev2revision to compare to rev1 (default is HEAD)
Optional arguments
-h, --helpshow this help message and exit
spack pkg grep¶
spack pkg grep [--help] ...
Positional arguments
grep_argsarguments for grep
Optional arguments
--helpshow this help message and exit
spack pkg source¶
spack pkg source [-hc] ...
Positional arguments
specpackage spec
Optional arguments
-h, --helpshow this help message and exit
-c, --canonicaldump canonical source as used by package hash
spack pkg hash¶
spack pkg hash [-h] ...
Positional arguments
specpackage spec
Optional arguments
-h, --helpshow this help message and exit
spack providers¶
list packages that provide a particular virtual package
spack providers [-h] [virtual_package ...]
Positional arguments
virtual_packagefind packages that provide this virtual package
Optional arguments
-h, --helpshow this help message and exit
spack pydoc¶
run pydoc from within spack
spack pydoc [-h] entity
Positional arguments
entityrun pydoc help on entity
Optional arguments
-h, --helpshow this help message and exit
spack python¶
launch an interpreter as spack would launch a command
spack python [-hVu] [-c PYTHON_COMMAND] [-i {python,ipython}] [-m MODULE] [--path] ...
Positional arguments
python_argsfile to run plus arguments
Optional arguments
-h, --helpshow this help message and exit
-V, --versionprint the Python version number and exit
-c PYTHON_COMMANDcommand to execute
-ufor compatibility with xdist, do not use without adding -u to the interpreter
-i {python,ipython}python interpreter
-m MODULErun library module as a script
--pathshow path to python interpreter that spack uses
spack reindex¶
rebuild Spack’s package database
spack reindex [-h]
Optional arguments
-h, --helpshow this help message and exit
spack remove¶
remove specs from an environment
spack remove [-haf] [-l LIST_NAME] ...
Positional arguments
specsone or more package specs
Optional arguments
-h, --helpshow this help message and exit
-a, --allremove all specs from (clear) the environment
-l, --list-name LIST_NAMEname of the list to remove specs from
-f, --forceremove concretized spec (if any) immediately
spack repo¶
manage package source repositories
spack repo [-h] SUBCOMMAND ...
Optional arguments
-h, --helpshow this help message and exit
Subcommands
spack repo create¶
create a new package repository
spack repo create [-h] [-d SUBDIR] directory namespace
Positional arguments
directorydirectory to create the repo in
namespacename or namespace to identify packages in the repository
Optional arguments
-h, --helpshow this help message and exit
-d, --subdirectory SUBDIRsubdirectory to store packages in the repository
spack repo list¶
show registered repositories and their namespaces
List all package repositories known to Spack. Repositories can be local directories or remote git repositories.
spack repo list [-h] [--scope {defaults,system,site,user,command_line} or env:ENVIRONMENT] [--names | --namespaces |
--json]
Optional arguments
-h, --helpshow this help message and exit
--scope {defaults,system,site,user,command_line} or env:ENVIRONMENTconfiguration scope to read from
--namesshow configuration names only
--namespacesshow repository namespaces only
--jsonoutput repositories as machine-readable json records
spack repo add¶
add package repositories to Spack’s configuration
spack repo add [-h] [--name NAME] [--path PATH] [--scope {defaults,system,site,user,command_line} or env:ENVIRONMENT]
path_or_repo [destination]
Positional arguments
path_or_repopath or git repository of a Spack package repository
destinationdestination to clone git repository into (defaults to cache directory)
Optional arguments
-h, --helpshow this help message and exit
--name NAMEconfig name for the package repository, defaults to the namespace of the repository
--path PATHrelative path to the Spack package repository inside a git repository. Can be repeated to add multiple package repositories in case of a monorepo
--scope {defaults,system,site,user,command_line} or env:ENVIRONMENTconfiguration scope to modify
spack repo set¶
modify an existing repository configuration
spack repo set [-h] [--destination DESTINATION] [--path PATH]
[--scope {defaults,system,site,user,command_line} or env:ENVIRONMENT]
namespace
Positional arguments
namespacenamespace of a Spack package repository
Optional arguments
-h, --helpshow this help message and exit
--destination DESTINATIONdestination to clone git repository into
--path PATHrelative path to the Spack package repository inside a git repository. Can be repeated to add multiple package repositories in case of a monorepo
--scope {defaults,system,site,user,command_line} or env:ENVIRONMENTconfiguration scope to modify
spack repo remove¶
remove a repository from Spack’s configuration
spack repo remove [-h] [--scope {defaults,system,site,user,command_line} or env:ENVIRONMENT] [--all-scopes]
namespace_or_path
Positional arguments
namespace_or_pathnamespace or path of a Spack package repository
Optional arguments
-h, --helpshow this help message and exit
--scope {defaults,system,site,user,command_line} or env:ENVIRONMENTconfiguration scope to modify
--all-scopesremove from all config scopes (default: highest scope with matching repo)
spack repo migrate¶
migrate a package repository to the latest Package API
spack repo migrate [-h] (--dry-run | --fix) namespace_or_path
Positional arguments
namespace_or_pathpath to a Spack package repository directory
Optional arguments
-h, --helpshow this help message and exit
--dry-rundo not modify the repository, but dump a patch file
--fixautomatically migrate the repository to the latest Package API
spack repo update¶
update one or more package repositories
spack repo update [-h] [--remote [REMOTE]] [--scope {defaults,system,site,user,command_line} or env:ENVIRONMENT]
[--branch [BRANCH]] [--tag [TAG] | --commit [COMMIT]]
[names ...]
Positional arguments
namesrepositories to update
Optional arguments
-h, --helpshow this help message and exit
--remote, -r [REMOTE]name of remote to check for branches, tags, or commits
--scope {defaults,system,site,user,command_line} or env:ENVIRONMENTconfiguration scope to modify
--branch, -b [BRANCH]name of a branch to change to
--tag, -t [TAG]name of a tag to change to
--commit, -c [COMMIT]name of a commit to change to
spack repo show-version-updates¶
spack repo show-version-updates [-h] [--no-manual-packages] [--no-git-versions] [--only-redistributable]
repository from_ref to_ref
Positional arguments
repositoryname or path of the repository to analyze
from_refgit ref from which to start looking at changes
to_refgit ref to end looking at changes
Optional arguments
-h, --helpshow this help message and exit
--no-manual-packagesexclude manual packages
--no-git-versionsexclude versions from git
--only-redistributableexclude non-redistributable packages
spack resource¶
list downloadable resources (tarballs, repos, patches)
spack resource [-h] SUBCOMMAND ...
Optional arguments
-h, --helpshow this help message and exit
Subcommands
spack resource list¶
spack resource list [-h] [--only-hashes]
Optional arguments
-h, --helpshow this help message and exit
--only-hashesonly print sha256 hashes of resources
spack resource show¶
spack resource show [-h] hash
Positional arguments
hash
Optional arguments
-h, --helpshow this help message and exit
spack restage¶
revert checked out package source code
spack restage [-h] ...
Positional arguments
specsone or more package specs
Optional arguments
-h, --helpshow this help message and exit
spack solve¶
concretize a specs using an ASP solver
spack solve [-h] [--show SHOW] [--timers] [--stats] [-l] [-L] [-N] [-I | --no-install-status] [-y | -j |
--format FORMAT | --non-defaults] [-c {nodes,edges,paths}] [-t] [-f] [-U] [--reuse] [--fresh-roots]
[--deprecated]
...
Positional arguments
specsone or more package specs
Optional arguments
-h, --helpshow this help message and exit
--show SHOWselect outputs
--timersprint out timers for different solve phases
--statsprint out statistics from clingo
-l, --longshow dependency hashes as well as versions
-L, --very-longshow full dependency hashes as well as versions
-N, --namespacesshow fully qualified package names
-I, --install-statusshow install status of packages
--no-install-statusdo not show install status annotations
-y, --yamlprint concrete spec as YAML
-j, --jsonprint concrete spec as JSON
--format FORMATprint concrete spec with the specified format string
--non-defaultshighlight non-default versions or variants
-c, --cover {nodes,edges,paths}how extensively to traverse the DAG (default: nodes)
-t, --typesshow dependency types
-f, --forceallow changes to concretized specs in spack.lock (in an env)
-U, --freshdo not reuse installed deps; build newest configuration
--reusereuse installed packages/buildcaches when possible
--fresh-roots, --reuse-depsconcretize with fresh roots and reused dependencies
--deprecatedallow concretizer to select deprecated versions
spack spec¶
show what would be installed, given a spec
spack spec [-h] [-l] [-L] [-N] [-I | --no-install-status] [-y | -j | --format FORMAT | --non-defaults]
[-c {nodes,edges,paths}] [-t] [-f] [-U] [--reuse] [--fresh-roots] [--deprecated]
...
Positional arguments
specsone or more package specs
Optional arguments
-h, --helpshow this help message and exit
-l, --longshow dependency hashes as well as versions
-L, --very-longshow full dependency hashes as well as versions
-N, --namespacesshow fully qualified package names
-I, --install-statusshow install status of packages
--no-install-statusdo not show install status annotations
-y, --yamlprint concrete spec as YAML
-j, --jsonprint concrete spec as JSON
--format FORMATprint concrete spec with the specified format string
--non-defaultshighlight non-default versions or variants
-c, --cover {nodes,edges,paths}how extensively to traverse the DAG (default: nodes)
-t, --typesshow dependency types
-f, --forceallow changes to concretized specs in spack.lock (in an env)
-U, --freshdo not reuse installed deps; build newest configuration
--reusereuse installed packages/buildcaches when possible
--fresh-roots, --reuse-depsconcretize with fresh roots and reused dependencies
--deprecatedallow concretizer to select deprecated versions
spack stage¶
expand downloaded archive in preparation for install
spack stage [-hnsfU] [-p PATH] [-e EXCLUDE] [--reuse] [--fresh-roots] [--deprecated] ...
Positional arguments
specsone or more package specs
Optional arguments
-h, --helpshow this help message and exit
-n, --no-checksumdo not use checksums to verify downloaded files (unsafe)
-p, --path PATHpath to stage package, does not add to spack tree
-e, --exclude EXCLUDEexclude packages that satisfy the specified specs
-s, --skip-installeddont restage already installed specs
-f, --forceallow changes to concretized specs in spack.lock (in an env)
-U, --freshdo not reuse installed deps; build newest configuration
--reusereuse installed packages/buildcaches when possible
--fresh-roots, --reuse-depsconcretize with fresh roots and reused dependencies
--deprecatedallow concretizer to select deprecated versions
spack style¶
runs source code style checks on spack
spack style [-harUf] [-b BASE] [--root ROOT] [-t TOOL | -s TOOL] [--spec-strings] ...
Positional arguments
filesspecific files to check
Optional arguments
-h, --helpshow this help message and exit
-b, --base BASEbranch to compare against to determine changed files (default: develop)
-a, --allcheck all files, not just changed files (applies only to Import Check)
-r, --root-relativeprint root-relative paths (default: cwd-relative)
-U, --no-untrackedexclude untracked files from checks
-f, --fixformat automatically if possible (e.g., with isort, black)
--root ROOTstyle check a different spack instance
-t, --tool TOOLspecify which tools to run (default: import, ruff-format, ruff-check, mypy)
-s, --skip TOOLspecify tools to skip (choose from import, ruff-format, ruff-check, mypy)
--spec-stringsupgrade spec strings in Python, JSON and YAML files for compatibility with Spack v1.0 and v0.x. Example: spack style
--spec-strings $(git ls-files). Note: must be used only on specs from spack v0.X.
spack test¶
run spack’s tests for an install
spack test [-h] SUBCOMMAND ...
Optional arguments
-h, --helpshow this help message and exit
Subcommands
spack test run¶
run tests for the specified installed packages
if no specs are listed, run tests for all packages in the current environment or all installed packages if there is no active environment
spack test run [-h] [--alias ALIAS] [--fail-fast] [--fail-first] [--externals] [-x] [--keep-stage]
[--log-format {junit,cdash}] [--log-file LOG_FILE] [--help-cdash] [--timeout TIMEOUT] [--clean |
--dirty]
...
Positional arguments
installed_specsone or more installed package specs
Optional arguments
-h, --helpshow this help message and exit
--alias ALIASprovide an alias for this test-suite for subsequent access
--fail-faststop tests for each package after the first failure
--fail-firststop after the first failed package
--externalstest packages that are externally installed
-x, --explicitonly test packages that are explicitly installed
--keep-stagekeep testing directory for debugging
--log-format {junit,cdash}format to be used for log files
--log-file LOG_FILEfilename for the log file
--cdash-upload-url CDASH_UPLOAD_URL
--cdash-build CDASH_BUILD
--cdash-site CDASH_SITE
--cdash-track CDASH_TRACK
--cdash-buildstamp CDASH_BUILDSTAMP
--help-cdashshow usage instructions for CDash reporting
--timeout TIMEOUTmaximum time (in seconds) that tests are allowed to run
--cleanunset harmful variables in the build environment (default)
--dirtypreserve user environment in spack’s build environment (danger!)
spack test list¶
list installed packages with available tests
spack test list [-ha] [tag ...]
Positional arguments
taglimit packages to those with all listed tags
Optional arguments
-h, --helpshow this help message and exit
-a, --alllist all packages with tests (not just installed)
spack test find¶
find tests that are running or have available results
displays aliases for tests that have them, otherwise test suite content hashes
spack test find [-h] ...
Positional arguments
filteroptional case-insensitive glob patterns to filter results
Optional arguments
-h, --helpshow this help message and exit
spack test status¶
get the current status for the specified Spack test suite(s)
spack test status [-h] ...
Positional arguments
namestest suites for which to print status
Optional arguments
-h, --helpshow this help message and exit
spack test results¶
get the results from Spack test suite(s) (default all)
spack test results [-hlf] ...
Positional arguments
[name(s)] [-- installed_specs]...suite names and installed package constraints
Optional arguments
-h, --helpshow this help message and exit
-l, --logsprint the test log for each matching package
-f, --failedonly show results for failed tests of matching packages
spack test remove¶
remove results from Spack test suite(s) (default all)
if no test suite is listed, remove results for all suites.
removed tests can no longer be accessed for results or status, and will not
appear in spack test list results
spack test remove [-hy] ...
Positional arguments
namestest suites to remove from test stage
Optional arguments
-h, --helpshow this help message and exit
-y, --yes-to-allassume “yes” is the answer to every confirmation request
spack test-env¶
run a command in a spec’s test environment, or dump its environment to screen or file
spack test-env [-hfU] [--clean] [--dirty] [--reuse] [--fresh-roots] [--deprecated] [--dump FILE] [--pickle FILE] ...
Positional arguments
spec [--] [cmd]...specs of package environment to emulate
Optional arguments
-h, --helpshow this help message and exit
--cleanunset harmful variables in the build environment (default)
--dirtypreserve user environment in spack’s build environment (danger!)
-f, --forceallow changes to concretized specs in spack.lock (in an env)
-U, --freshdo not reuse installed deps; build newest configuration
--reusereuse installed packages/buildcaches when possible
--fresh-roots, --reuse-depsconcretize with fresh roots and reused dependencies
--deprecatedallow concretizer to select deprecated versions
--dump FILEdump a source-able environment to FILE
--pickle FILEdump a pickled source-able environment to FILE
spack tutorial¶
set up spack for our tutorial (WARNING: modifies config!)
spack tutorial [-hy]
Optional arguments
-h, --helpshow this help message and exit
-y, --yes-to-allassume “yes” is the answer to every confirmation request
spack undevelop¶
remove specs from an environment
spack undevelop [-ha] [--no-modify-concrete-specs] ...
Positional arguments
specsone or more package specs
Optional arguments
-h, --helpshow this help message and exit
--no-modify-concrete-specsdo not mutate concrete specs to remove dev_path provenance. This requires running spack concretize -f later to apply changes to concrete specs
-a, --allremove all specs from (clear) the environment
spack uninstall¶
remove installed packages
spack uninstall [-hfRya] [--remove] [--origin ORIGIN] ...
Positional arguments
installed_specsone or more installed package specs
Optional arguments
-h, --helpshow this help message and exit
-f, --forceremove regardless of whether other packages or environments depend on this one
--removeif in an environment, then the spec should also be removed from the environment description
-R, --dependentsalso uninstall any packages that depend on the ones given via command line
-y, --yes-to-allassume “yes” is the answer to every confirmation request
-a, --allremove ALL installed packages that match each supplied spec
--origin ORIGINonly remove DB records with the specified origin
spack unit-test¶
run spack’s unit tests (wrapper around pytest)
spack unit-test [-hHs] [-n NUMPROCESSES] [-l | -L | -N] [--extension EXTENSION] [-k EXPRESSION] [--showlocals] ...
Positional arguments
pytest_argsarguments for pytest
Optional arguments
-h, --helpshow this help message and exit
-H, --pytest-helpshow full pytest help, with advanced options
-n, --numprocesses NUMPROCESSESrun tests in parallel up to this wide, default 1 for sequential
-l, --listlist test filenames
-L, --list-longlist all test functions
-N, --list-nameslist full names of all tests
--extension EXTENSIONrun test for a given spack extension
-sprint output while tests run (disable capture)
-k EXPRESSIONfilter tests by keyword (can also use w/list options)
--showlocalsshow local variable values in tracebacks
spack unload¶
remove package from the user environment
spack unload [-ha] [--sh | --csh | --fish | --bat | --pwsh] ...
Positional arguments
installed_specsone or more installed package specs
Optional arguments
-h, --helpshow this help message and exit
--shprint sh commands to activate the environment
--cshprint csh commands to activate the environment
--fishprint fish commands to load the package
--batprint bat commands to load the package
--pwshprint pwsh commands to load the package
-a, --allunload all loaded Spack packages
spack url¶
debugging tool for url parsing
spack url [-h] SUBCOMMAND ...
Optional arguments
-h, --helpshow this help message and exit
Subcommands
spack url parse¶
spack url parse [-hs] url
Positional arguments
urlurl to parse
Optional arguments
-h, --helpshow this help message and exit
-s, --spiderspider the source page for versions
spack url list¶
spack url list [-hce] [-n | -N | -v | -V]
Optional arguments
-h, --helpshow this help message and exit
-c, --colorcolor the parsed version and name in the urls shown (versions will be cyan, name red)
-e, --extrapolationcolor the versions used for extrapolation as well (additional versions will be green, names magenta)
-n, --incorrect-nameonly list urls for which the name was incorrectly parsed
-N, --correct-nameonly list urls for which the name was correctly parsed
-v, --incorrect-versiononly list urls for which the version was incorrectly parsed
-V, --correct-versiononly list urls for which the version was correctly parsed
spack url summary¶
spack url summary [-h]
Optional arguments
-h, --helpshow this help message and exit
spack url stats¶
spack url stats [-h] [--show-issues]
Optional arguments
-h, --helpshow this help message and exit
--show-issuesshow packages with issues (md5 hashes, http urls)
spack verify¶
verify spack installations on disk
spack verify [-h] SUBCOMMAND ...
Optional arguments
-h, --helpshow this help message and exit
Subcommands
spack verify manifest¶
verify that install directories have not been modified since installation
spack verify manifest [-hlja] [-s | -f] ...
Positional arguments
specs_or_filesspecs or files to verify
Optional arguments
-h, --helpshow this help message and exit
-l, --localverify only locally installed packages
-j, --jsonoutput json-formatted errors
-a, --allverify all packages
-s, --specstreat entries as specs (default)
-f, --filestreat entries as absolute filenames
spack verify libraries¶
verify that shared libraries of install packages can be located in rpaths (Linux only)
spack verify libraries [-h] ...
Positional arguments
installed_specsconstraint to select a subset of installed packages
Optional arguments
-h, --helpshow this help message and exit
spack verify versions¶
Check that all versions of installed packages are known to Spack and non-deprecated.
Reports errors for any of the following:
Installed package not loadable from the repo
Installed package version not known by the package recipe
Installed package version deprecated in the package recipe
spack verify versions [-h] ...
Positional arguments
installed_specsconstraint to select a subset of installed packages
Optional arguments
-h, --helpshow this help message and exit
spack versions¶
list available versions of a package
spack versions [-h] [-s | -r | -n] [-j JOBS] package
Positional arguments
packagepackage name
Optional arguments
-h, --helpshow this help message and exit
-s, --safeonly list safe versions of the package
-r, --remoteonly list remote versions of the package
-n, --newonly list remote versions newer than the latest checksummed version
-j, --jobs JOBSexplicitly set number of parallel jobs
spack view¶
manipulate view directories in the filesystem
spack view [-hv] [-e EXCLUDE] [-d {true,false,yes,no}] ACTION ...
Optional arguments
-h, --helpshow this help message and exit
-v, --verboseif not verbose only warnings/errors will be printed
-e, --exclude EXCLUDEexclude packages with names matching the given regex pattern
-d, --dependencies {true,false,yes,no}link/remove/list dependencies
Subcommands
spack view symlink¶
spack view symlink [-hi] [--projection-file PROJECTION_FILE] path spec [spec ...]
Positional arguments
pathpath to file system view directory
specseed specs of the packages to view
Optional arguments
-h, --helpshow this help message and exit
--projection-file PROJECTION_FILEinitialize view using projections from file
-i, --ignore-conflicts
spack view hardlink¶
spack view hardlink [-hi] [--projection-file PROJECTION_FILE] path spec [spec ...]
Positional arguments
pathpath to file system view directory
specseed specs of the packages to view
Optional arguments
-h, --helpshow this help message and exit
--projection-file PROJECTION_FILEinitialize view using projections from file
-i, --ignore-conflicts
spack view copy¶
spack view copy [-hi] [--projection-file PROJECTION_FILE] path spec [spec ...]
Positional arguments
pathpath to file system view directory
specseed specs of the packages to view
Optional arguments
-h, --helpshow this help message and exit
--projection-file PROJECTION_FILEinitialize view using projections from file
-i, --ignore-conflicts
spack view remove¶
spack view remove [-ha] [--no-remove-dependents] path [spec ...]
Positional arguments
pathpath to file system view directory
specseed specs of the packages to view
Optional arguments
-h, --helpshow this help message and exit
--no-remove-dependentsdo not remove dependents of specified specs
-a, --allact on all specs in view
spack view statlink¶
spack view statlink [-h] path [spec ...]
Positional arguments
pathpath to file system view directory
specseed specs of the packages to view
Optional arguments
-h, --helpshow this help message and exit