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
Query packages
Build packages
Configuration
Developer
Environment
Extensions
More help
Create packages
System

spack

A flexible package manager that supports multiple versions, configurations, platforms, and compilers.

spack [-hdDkmpvsV] [--color {always,never,auto}] [-P STAT] [--lines LINES] COMMAND ...

Optional arguments

-h, --help
show this help message and exit
--color {always,never,auto}
when to colorize output (default: auto)
-d, --debug
write out debug logs during compile
-D, --pdb
run spack under the pdb debugger
-k, --insecure
do not check ssl certificates when downloading
-m, --mock
use mock packages instead of real ones
-p, --profile
profile execution using cProfile
-P STAT, --sorted-profile STAT
profile and sort by one or more of: [nfl, ncalls, file, name, calls, tottime, cumtime, time, filename, module, pcalls, cumulative, line, stdname]
--lines LINES
lines of profile output or ‘all’ (default: 20)
-v, --verbose
print additional output during builds
-s, --stacktrace
add stacktraces to all printed statements
-V, --version
show version number and exit

Subcommands


spack activate

activate a package extension

spack activate [-hf] [-v VIEW] ...

More documentation

Positional arguments

spec
spec of package extension to activate

Optional arguments

-h, --help
show this help message and exit
-f, --force
activate without first activating dependencies
-v VIEW, --view VIEW
the view to operate on

spack arch

print architecture information about this machine

spack arch [-hp]

Optional arguments

-h, --help
show this help message and exit
-p, --platform
print only the platform

spack blame

show contributors to packages

spack blame [-h] [-t | -p | -g] package_name

Positional arguments

package_name
name of package to show contributions for, or path to a file in the spack repo

Optional arguments

-h, --help
show this help message and exit
-t, --time
sort by last modification date (default)
-p, --percent
sort by percent of code
-g, --git
show git blame output instead of summary

spack bootstrap

Bootstrap packages needed for spack to run smoothly

spack bootstrap [-hnv] [-j JOBS] [--keep-prefix] [--keep-stage] [--clean | --dirty] [--run-tests]

Optional arguments

-h, --help
show this help message and exit
-j JOBS, --jobs JOBS
explicitly set number of make jobs (default: #cpus)
--keep-prefix
don’t remove the install prefix if installation fails
--keep-stage
don’t remove the build stage if installation succeeds
-n, --no-checksum
do not check packages against checksum
-v, --verbose
display verbose build output while installing
--clean
sanitize the environment from variables that can affect how packages find libraries or headers
--dirty
maintain the current environment without trying to sanitize it
--run-tests
run package level tests during installation

spack build

stops at build stage when installing a package, if possible

spack build [-hv] ...

Positional arguments

package
spec of the package to install

Optional arguments

-h, --help
show this help message and exit
-v, --verbose
print additional output during builds

spack buildcache

create, download and install binary packages

spack buildcache [-h] SUBCOMMAND ...

More documentation

Optional arguments

-h, --help
show this help message and exit

Subcommands


spack buildcache create

spack buildcache create [-hrfy] [-k key] [-d directory] ...

Positional arguments

packages
specs of packages to create buildcache for

Optional arguments

-h, --help
show this help message and exit
-r, --rel
make all rpaths relative before creating tarballs.
-f, --force
overwrite tarball if it exists.
-y, --yes-to-all
answer yes to all create unsigned buildcache questions
-k key, --key key
Key for signing.
-d directory, --directory directory
directory in which to save the tarballs.

spack buildcache install

spack buildcache install [-hfy] ...

Positional arguments

packages
specs of packages to install biuldache for

Optional arguments

-h, --help
show this help message and exit
-f, --force
overwrite install directory if it exists.
-y, --yes-to-all
answer yes to all install unsigned buildcache questions

spack buildcache list

spack buildcache list [-hf] ...

Positional arguments

packages
specs of packages to search for

Optional arguments

-h, --help
show this help message and exit
-f, --force
force new download of specs

spack buildcache keys

spack buildcache keys [-hiyf]

Optional arguments

-h, --help
show this help message and exit
-i, --install
install Keys pulled from mirror
-y, --yes-to-all
answer yes to all trust questions
-f, --force
force new download of keys

spack cd

cd to spack directories in the shell

spack cd [-h] [-m | -r | -i | -p | -P | -s | -S | -b] ...

More documentation

Positional arguments

spec
spec of package to fetch directory for

Optional arguments

-h, --help
show this help message and exit
-m, --module-dir
spack python module directory
-r, --spack-root
spack installation root
-i, --install-dir
install prefix for spec (spec need not be installed)
-p, --package-dir
directory enclosing a spec’s package.py file
-P, --packages
top-level packages directory for Spack
-s, --stage-dir
stage directory for a spec
-S, --stages
top level stage directory
-b, --build-dir
checked out or expanded source directory for a spec (requires it to be staged first)

spack checksum

checksum available versions of a package

spack checksum [-h] [--keep-stage] package ...

More documentation

Positional arguments

package
package to checksum versions for
versions
versions to generate checksums for

Optional arguments

-h, --help
show this help message and exit
--keep-stage
don’t clean up staging area when command completes

spack clean

remove temporary build files and/or downloaded archives

spack clean [-hsdma] ...

More documentation

Positional arguments

specs
removes the build stages and tarballs for specs

Optional arguments

-h, --help
show this help message and exit
-s, --stage
remove all temporary build stages (default)
-d, --downloads
remove cached downloads
-m, --misc-cache
remove long-lived caches, like the virtual package index
-a, --all
equivalent to -sdm

spack clone

create a new installation of spack in another prefix

spack clone [-h] [-r REMOTE] prefix

Positional arguments

prefix
names of prefix where we should install spack

Optional arguments

-h, --help
show this help message and exit
-r REMOTE, --remote REMOTE
name of the remote to clone from

spack commands

list available spack commands

spack commands [-h] [--format {names,rst,subcommands}] ...

Positional arguments

documented_commands
list of documented commands to cross-references

Optional arguments

-h, --help
show this help message and exit
--format {names,rst,subcommands}
format to be used to print the output (default: names)

spack compiler

manage compilers

spack compiler [-h] SUBCOMMAND ...

Optional arguments

-h, --help
show this help message and exit

Subcommands


spack compiler find

spack compiler find [-h] [--scope {defaults,system,site,user}[/PLATFORM]] ...

More documentation

Positional arguments

add_paths

Optional arguments

-h, --help
show this help message and exit
--scope {defaults,system,site,user}[/PLATFORM]
configuration scope to modify

spack compiler remove

spack compiler remove [-ha] [--scope {defaults,system,site,user}[/PLATFORM]] compiler_spec

Positional arguments

compiler_spec

Optional arguments

-h, --help
show this help message and exit
-a, --all
remove ALL compilers that match spec
--scope {defaults,system,site,user}[/PLATFORM]
configuration scope to modify

spack compiler list

spack compiler list [-h] [--scope {defaults,system,site,user}[/PLATFORM]]

Optional arguments

-h, --help
show this help message and exit
--scope {defaults,system,site,user}[/PLATFORM]
configuration scope to read from

spack compiler info

spack compiler info [-h] [--scope {defaults,system,site,user}[/PLATFORM]] compiler_spec

More documentation

Positional arguments

compiler_spec

Optional arguments

-h, --help
show this help message and exit
--scope {defaults,system,site,user}[/PLATFORM]
configuration scope to read from

spack compilers

list available compilers

spack compilers [-h] [--scope {defaults,system,site,user}[/PLATFORM]]

More documentation

Optional arguments

-h, --help
show this help message and exit
--scope {defaults,system,site,user}[/PLATFORM]
configuration scope to read/modify

spack config

get and set configuration options

spack config [-h] [--scope {defaults,system,site,user}[/PLATFORM]] SUBCOMMAND ...

Optional arguments

-h, --help
show this help message and exit
--scope {defaults,system,site,user}[/PLATFORM]
configuration scope to read/modify

Subcommands


spack config get

spack config get [-h] SECTION

Positional arguments

SECTION
configuration section to print. options: %(choices)s

Optional arguments

-h, --help
show this help message and exit

spack config edit

spack config edit [-h] SECTION

Positional arguments

SECTION
configuration section to edit. options: %(choices)s

Optional arguments

-h, --help
show this help message and exit

spack configure

stage and configure a package but do not install

spack configure [-hv] ...

Positional arguments

package
spec of the package to install

Optional arguments

-h, --help
show this help message and exit
-v, --verbose
print additional output during builds

spack create

create a new package file

spack create [-hf] [--keep-stage] [-n NAME] [-t TEMPLATE] [-r REPO] [-N NAMESPACE] [url]

More documentation

Positional arguments

url
url of package archive

Optional arguments

-h, --help
show this help message and exit
--keep-stage
don’t clean up staging area when command completes
-n NAME, --name NAME
name of the package to create
-t TEMPLATE, --template TEMPLATE
build system template to use. options: %(choices)s
-r REPO, --repo REPO
path to a repository where the package should be created
-N NAMESPACE, --namespace NAMESPACE
specify a namespace for the package. must be the namespace of a repository registered with Spack
-f, --force
overwrite any existing package file with the same name

spack deactivate

deactivate a package extension

spack deactivate [-hfa] [-v VIEW] ...

More documentation

Positional arguments

spec
spec of package extension to deactivate

Optional arguments

-h, --help
show this help message and exit
-f, --force
run deactivation even if spec is NOT currently activated
-v VIEW, --view VIEW
the view to operate on
-a, --all
deactivate all extensions of an extendable package, or deactivate an extension AND its dependencies

spack debug

debugging commands for troubleshooting Spack

spack debug [-h] SUBCOMMAND ...

Optional arguments

-h, --help
show this help message and exit

Subcommands


spack debug create-db-tarball

spack debug create-db-tarball [-h]

Optional arguments

-h, --help
show this help message and exit

spack dependencies

show dependencies of a package

spack dependencies [-hit] ...

Positional arguments

spec
spec or package name

Optional arguments

-h, --help
show this help message and exit
-i, --installed
List installed dependencies of an installed spec, instead of possible dependencies of a package.
-t, --transitive
Show all transitive dependencies.

spack dependents

show packages that depend on another

spack dependents [-hit] ...

Positional arguments

spec
spec or package name

Optional arguments

-h, --help
show this help message and exit
-i, --installed
List installed dependents of an installed spec, instead of possible dependents of a package.
-t, --transitive
Show all transitive dependents.

spack diy

do-it-yourself: build from an existing source directory

spack diy [-hiq] [--keep-prefix] [--skip-patch] [--clean | --dirty] ...

Positional arguments

spec
specs to use for install. must contain package AND version

Optional arguments

-h, --help
show this help message and exit
-i, --ignore-dependencies
don’t try to install dependencies of requested packages
--keep-prefix
do not remove the install prefix if installation fails
--skip-patch
skip patching for the DIY build
-q, --quiet
do not display verbose build output while installing
--clean
sanitize the environment from variables that can affect how packages find libraries or headers
--dirty
maintain the current environment without trying to sanitize it

spack docs

open spack documentation in a web browser

spack docs [-h]

Optional arguments

-h, --help
show this help message and exit

spack edit

open package files in $EDITOR

spack edit [-h] [-b | -c | -d | -t | -m | -r REPO | -N NAMESPACE] [name]

More documentation

Positional arguments

name
name of package to edit

Optional arguments

-h, --help
show this help message and exit
-b, --build-system
Edit the build system with the supplied name.
-c, --command
edit the command with the supplied name
-d, --docs
edit the docs with the supplied name
-t, --test
edit the test with the supplied name
-m, --module
edit the main spack module with the supplied name
-r REPO, --repo REPO
path to repo to edit package in
-N NAMESPACE, --namespace NAMESPACE
namespace of package to edit

spack env

show install environment for a spec, and run commands

spack env [-h] [--clean] [--dirty] ...

More documentation

Positional arguments

spec
specs of package environment to emulate

Optional arguments

-h, --help
show this help message and exit
--clean
sanitize the environment from variables that can affect how packages find libraries or headers
--dirty
maintain the current environment without trying to sanitize it

spack extensions

list extensions for package

spack extensions [-h] [-l | -p | -d] [-s TYPE] [-v VIEW] ...

More documentation

Positional arguments

spec
spec of package to list extensions for

Optional arguments

-h, --help
show this help message and exit
-l, --long
show dependency hashes as well as versions
-p, --paths
show paths to extension install directories
-d, --deps
show full dependency DAG of extensions
-s TYPE, --show TYPE
one of packages, installed, activated, all
-v VIEW, --view VIEW
the view to operate on

spack fetch

fetch archives for packages

spack fetch [-hnmD] ...

More documentation

Positional arguments

packages
specs of packages to fetch

Optional arguments

-h, --help
show this help message and exit
-n, --no-checksum
do not check packages against checksum
-m, --missing
fetch only missing (not yet installed) dependencies
-D, --dependencies
also fetch all dependencies

spack find

list and search installed packages

spack find [-hlLfumvMN] [-s | -p | -d] [-t TAGS] [--show-full-compiler] [-e | -E] ...

More documentation

Positional arguments

constraint
constraint to select a subset of installed packages

Optional arguments

-h, --help
show this help message and exit
-s, --short
show only specs (default)
-p, --paths
show paths to package install directories
-d, --deps
show full dependency DAG of installed packages
-l, --long
show dependency hashes as well as versions
-L, --very-long
show full dependency hashes as well as versions
-t TAGS, --tags TAGS
filter a package query by tags
-f, --show-flags
show spec compiler flags
--show-full-compiler
show full compiler specs
-e, --explicit
show only specs that were installed explicitly
-E, --implicit
show only specs that were installed as dependencies
-u, --unknown
show only specs Spack does not have a package for
-m, --missing
show missing dependencies as well as installed specs
-v, --variants
show variants in output (can be long)
-M, --only-missing
show only missing dependencies
-N, --namespace
show fully qualified package names

spack flake8

runs source code style checks on Spack. requires flake8

spack flake8 [-hkaorU] [-b BASE] ...

Positional arguments

files
specific files to check

Optional arguments

-h, --help
show this help message and exit
-b BASE, --base BASE
select base branch for collecting list of modified files
-k, --keep-temp
do not delete temporary directory where flake8 runs. use for debugging, to see filtered files
-a, --all
check all files, not just changed files
-o, --output
send filtered files to stdout as well as temp files
-r, --root-relative
print root-relative paths (default: cwd-relative)
-U, --no-untracked
exclude untracked files from checks

spack gpg

handle GPG actions for spack

spack gpg [-h] SUBCOMMAND ...

More documentation

Optional arguments

-h, --help
show this help message and exit

spack graph

generate graphs of package dependency relationships

spack graph [-hnsi] [-a | -d] [-t DEPTYPE] ...

More documentation

Positional arguments

specs
specs of packages to graph

Optional arguments

-h, --help
show this help message and exit
-a, --ascii
draw graph as ascii to stdout (default)
-d, --dot
generate graph in dot format and print to stdout
-n, --normalize
skip concretization; only print normalized spec
-s, --static
use static information from packages, not dynamic spec info
-i, --installed
graph all installed specs in dot format (implies –dot)
-t DEPTYPE, --deptype DEPTYPE
comma-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]

More documentation

Positional arguments

help_command
command to get help on

Optional arguments

-h, --help
show this help message and exit
-a, --all
print all available commands
--spec
print all available commands

spack info

get detailed information on a particular package

spack info [-h] PACKAGE

More documentation

Positional arguments

PACKAGE
name of package to get info for

Optional arguments

-h, --help
show this help message and exit

spack install

build and install packages

spack install [-hnvy] [--only {package,dependencies}] [-j JOBS] [--overwrite] [--keep-prefix] [--keep-stage]
          [--dont-restage] [--use-cache] [--show-log-on-error] [--source] [--fake] [-f SPEC_YAML_FILE]
          [--clean | --dirty] [--test {root,all} | --run-tests] [--log-format {junit}] [--log-file LOG_FILE]
          ...

More documentation

Positional arguments

package
spec of the package to install

Optional arguments

-h, --help
show this help message and exit
--only {package,dependencies}
select the mode of installation. the default is to install the package along with all its dependencies. alternatively one can decide to install only the package or only the dependencies
-j JOBS, --jobs JOBS
explicitly set number of make jobs (default: #cpus)
--overwrite
reinstall an existing spec, even if it has dependents
--keep-prefix
don’t remove the install prefix if installation fails
--keep-stage
don’t remove the build stage if installation succeeds
--dont-restage
if a partial install is detected, don’t delete prior state
--use-cache
check for pre-built Spack packages in mirrors
--show-log-on-error
print full build log to stderr if build fails
--source
install source files in prefix
-n, --no-checksum
do not check packages against checksum
-v, --verbose
display verbose build output while installing
--fake
fake install for debug purposes.
-f SPEC_YAML_FILE, --file SPEC_YAML_FILE
install from file. Read specs to install from .yaml files
--clean
sanitize the environment from variables that can affect how packages find libraries or headers
--dirty
maintain the current environment without trying to sanitize it
--test {root,all}
If ‘root’ is chosen, run package tests during installation for top-level packages (but skip tests for dependencies). if ‘all’ is chosen, run package tests during installation for all packages. If neither are chosen, don’t run tests for any packages.
--run-tests
run package tests during installation (same as –test=all)
--log-format {junit}
format to be used for log files
--log-file LOG_FILE
filename for the log file. if not passed a default will be used
-y, --yes-to-all
assume “yes” is the answer to every confirmation request

spack list

list and search available packages

spack list [-hd] [--format {html,rst,name_only}] [-t TAGS] ...

More documentation

Positional arguments

filter
optional case-insensitive glob patterns to filter results

Optional arguments

-h, --help
show this help message and exit
-d, --search-description
filtering will also search the description for a match
--format {html,rst,name_only}
format to be used to print the output [default: name_only]
-t TAGS, --tags TAGS
filter a package query by tags

spack load

add package to environment using module load

spack load [-h] ...

More documentation

Positional arguments

spec
spec of package to load with modules (if -, read specs from STDIN)

Optional arguments

-h, --help
show this help message and exit

spack location

print out locations of various directories used by Spack

spack location [-h] [-m | -r | -i | -p | -P | -s | -S | -b] ...

More documentation

Positional arguments

spec
spec of package to fetch directory for

Optional arguments

-h, --help
show this help message and exit
-m, --module-dir
spack python module directory
-r, --spack-root
spack installation root
-i, --install-dir
install prefix for spec (spec need not be installed)
-p, --package-dir
directory enclosing a spec’s package.py file
-P, --packages
top-level packages directory for Spack
-s, --stage-dir
stage directory for a spec
-S, --stages
top level stage directory
-b, --build-dir
checked out or expanded source directory for a spec (requires it to be staged first)

spack log-parse

filter errors and warnings from build logs

spack log-parse [-hp] [--show SHOW] [-c CONTEXT] [-w WIDTH] [-j JOBS] file

Positional arguments

file
a log file containing build output, or - for stdin

Optional arguments

-h, --help
show this help message and exit
--show SHOW
comma-separated list of what to show; options: errors, warnings
-c CONTEXT, --context CONTEXT
lines of context to show around lines of interest
-p, --profile
print out a profile of time spent in regexes during parse
-w WIDTH, --width WIDTH
wrap width: auto-size to terminal by default; 0 for no wrap
-j JOBS, --jobs JOBS
number of jobs to parse log file (default: 1 for short logs, ncpus for long logs)

spack mirror

manage mirrors

spack mirror [-hn] SUBCOMMAND ...

More documentation

Optional arguments

-h, --help
show this help message and exit
-n, --no-checksum
do not check fetched packages against checksum

Subcommands


spack mirror create

spack mirror create [-hDo] [-d DIRECTORY] [-f FILE] ...

More documentation

Positional arguments

specs
specs of packages to put in mirror

Optional arguments

-h, --help
show this help message and exit
-d DIRECTORY, --directory DIRECTORY
directory in which to create mirror
-f FILE, --file FILE
file with specs of packages to put in mirror
-D, --dependencies
also fetch all dependencies
-o, --one-version-per-spec
only fetch one ‘preferred’ version per spec, not all known

spack mirror add

spack mirror add [-h] [--scope {defaults,system,site,user}[/PLATFORM]] name url

More documentation

Positional arguments

name
mnemonic name for mirror
url
url of mirror directory from ‘spack mirror create’

Optional arguments

-h, --help
show this help message and exit
--scope {defaults,system,site,user}[/PLATFORM]
configuration scope to modify

spack mirror remove

spack mirror remove [-h] [--scope {defaults,system,site,user}[/PLATFORM]] name

More documentation

Positional arguments

name

Optional arguments

-h, --help
show this help message and exit
--scope {defaults,system,site,user}[/PLATFORM]
configuration scope to modify

spack mirror list

spack mirror list [-h] [--scope {defaults,system,site,user}[/PLATFORM]]

More documentation

Optional arguments

-h, --help
show this help message and exit
--scope {defaults,system,site,user}[/PLATFORM]
configuration scope to read from

spack module

manipulate module files

spack module [-h] SUBCOMMAND ...

Optional arguments

-h, --help
show this help message and exit

Subcommands


spack module refresh

spack module refresh [-hy] [--delete-tree] [-m {lmod,dotkit,tcl}] ...

More documentation

Positional arguments

constraint
constraint to select a subset of installed packages

Optional arguments

-h, --help
show this help message and exit
--delete-tree
delete the module file tree before refresh
-m {lmod,dotkit,tcl}, --module-type {lmod,dotkit,tcl}
type of module file. More than one choice is allowed [default: tcl]
-y, --yes-to-all
assume “yes” is the answer to every confirmation request

spack module find

spack module find [-h] [--full-path] [-m {lmod,dotkit,tcl}] ...

Positional arguments

constraint
constraint to select a subset of installed packages

Optional arguments

-h, --help
show this help message and exit
--full-path
display full path to module file
-m {lmod,dotkit,tcl}, --module-type {lmod,dotkit,tcl}
type of module file. More than one choice is allowed [default: tcl]

spack module rm

spack module rm [-hy] [-m {lmod,dotkit,tcl}] ...

More documentation

Positional arguments

constraint
constraint to select a subset of installed packages

Optional arguments

-h, --help
show this help message and exit
-m {lmod,dotkit,tcl}, --module-type {lmod,dotkit,tcl}
type of module file. More than one choice is allowed [default: tcl]
-y, --yes-to-all
assume “yes” is the answer to every confirmation request

spack module loads

spack module loads [-hr] [--input-only] [-p PREFIX] [-x EXCLUDE] [-m {lmod,dotkit,tcl}] ...

More documentation

Positional arguments

constraint
constraint to select a subset of installed packages

Optional arguments

-h, --help
show this help message and exit
--input-only
generate input for module command (instead of a shell script)
-p PREFIX, --prefix PREFIX
prepend to module names when issuing module load commands
-x EXCLUDE, --exclude EXCLUDE
exclude package from output; may be specified multiple times
-m {lmod,dotkit,tcl}, --module-type {lmod,dotkit,tcl}
type of module file. More than one choice is allowed [default: tcl]
-r, --dependencies
recursively traverse spec dependencies

spack patch

patch expanded archive sources in preparation for install

spack patch [-hn] ...

More documentation

Positional arguments

packages
specs of packages to stage

Optional arguments

-h, --help
show this help message and exit
-n, --no-checksum
do not check downloaded packages against checksum

spack pkg

query packages associated with particular git revisions

spack pkg [-h] SUBCOMMAND ...

Optional arguments

-h, --help
show this help message and exit

Subcommands


spack pkg add

spack pkg add [-h] ...

Positional arguments

packages
names of packages to add to git repo

Optional arguments

-h, --help
show this help message and exit

spack pkg list

spack pkg list [-h] [rev]

Positional arguments

rev
revision to list packages for

Optional arguments

-h, --help
show this help message and exit

spack pkg diff

spack pkg diff [-h] [rev1] [rev2]

Positional arguments

rev1
revision to compare against
rev2
revision to compare to rev1 (default is HEAD)

Optional arguments

-h, --help
show this help message and exit

spack pkg added

spack pkg added [-h] [rev1] [rev2]

Positional arguments

rev1
revision to compare against
rev2
revision to compare to rev1 (default is HEAD)

Optional arguments

-h, --help
show this help message and exit

spack pkg removed

spack pkg removed [-h] [rev1] [rev2]

Positional arguments

rev1
revision to compare against
rev2
revision to compare to rev1 (default is HEAD)

Optional arguments

-h, --help
show this help message and exit

spack providers

list packages that provide a particular virtual package

spack providers [-h] ...

More documentation

Positional arguments

VPACKAGE_SPEC
find packages that provide this virtual package

Optional arguments

-h, --help
show this help message and exit

spack pydoc

run pydoc from within spack

spack pydoc [-h] entity

Positional arguments

entity
run pydoc help on entity

Optional arguments

-h, --help
show this help message and exit

spack python

launch an interpreter as spack would launch a command

spack python [-h] [-c PYTHON_COMMAND] ...

More documentation

Positional arguments

python_args
file to run plus arguments

Optional arguments

-h, --help
show this help message and exit
-c PYTHON_COMMAND
command to execute

spack reindex

rebuild Spack’s package database

spack reindex [-h]

Optional arguments

-h, --help
show this help message and exit

spack repo

manage package source repositories

spack repo [-h] SUBCOMMAND ...

More documentation

Optional arguments

-h, --help
show this help message and exit

Subcommands


spack repo create

spack repo create [-h] directory [namespace]

Positional arguments

directory
directory to create the repo in
namespace
namespace to identify packages in the repository. defaults to the directory name

Optional arguments

-h, --help
show this help message and exit

spack repo list

spack repo list [-h] [--scope {defaults,system,site,user}[/PLATFORM]]

Optional arguments

-h, --help
show this help message and exit
--scope {defaults,system,site,user}[/PLATFORM]
configuration scope to read from

spack repo add

spack repo add [-h] [--scope {defaults,system,site,user}[/PLATFORM]] path

Positional arguments

path
path to a Spack package repository directory

Optional arguments

-h, --help
show this help message and exit
--scope {defaults,system,site,user}[/PLATFORM]
configuration scope to modify

spack repo remove

spack repo remove [-h] [--scope {defaults,system,site,user}[/PLATFORM]] path_or_namespace

Positional arguments

path_or_namespace
path or namespace of a Spack package repository

Optional arguments

-h, --help
show this help message and exit
--scope {defaults,system,site,user}[/PLATFORM]
configuration scope to modify

spack restage

revert checked out package source code

spack restage [-h] ...

More documentation

Positional arguments

packages
specs of packages to restage

Optional arguments

-h, --help
show this help message and exit

spack setup

create a configuration script and module, but don’t build

spack setup [-hiv] [--clean | --dirty] ...

Positional arguments

spec
specs to use for install. must contain package AND version

Optional arguments

-h, --help
show this help message and exit
-i, --ignore-dependencies
do not try to install dependencies of requested packages
-v, --verbose
display verbose build output while installing
--clean
sanitize the environment from variables that can affect how packages find libraries or headers
--dirty
maintain the current environment without trying to sanitize it

spack spec

show what would be installed, given a spec

spack spec [-hlLyNIt] [-c {nodes,edges,paths}] ...

More documentation

Positional arguments

specs
specs of packages

Optional arguments

-h, --help
show this help message and exit
-l, --long
show dependency hashes as well as versions
-L, --very-long
show full dependency hashes as well as versions
-y, --yaml
print concrete spec as YAML
-c {nodes,edges,paths}, --cover {nodes,edges,paths}
how extensively to traverse the DAG (default: nodes)
-N, --namespaces
show fully qualified package names
-I, --install-status
show install status of packages. packages can be: installed [+], missing and needed by an installed package [-], or not installed (no annotation)
-t, --types
show dependency types

spack stage

expand downloaded archive in preparation for install

spack stage [-hn] [-p PATH] ...

More documentation

Positional arguments

specs
specs of packages to stage

Optional arguments

-h, --help
show this help message and exit
-n, --no-checksum
do not check downloaded packages against checksum
-p PATH, --path PATH
path to stage package, does not add to spack tree

spack test

run spack’s unit tests

spack test [-hH] [-l | -L] ...

More documentation

Positional arguments

tests
list of tests to run (will be passed to pytest -k)

Optional arguments

-h, --help
show this help message and exit
-H, --pytest-help
print full pytest help message, showing advanced options
-l, --list
list basic test names
-L, --long-list
list the entire hierarchy of tests

spack uninstall

remove installed packages

spack uninstall [-hfaRy] ...

More documentation

Positional arguments

packages
specs of packages to uninstall

Optional arguments

-h, --help
show this help message and exit
-f, --force
remove regardless of whether other packages depend on this one
-a, --all
USE CAREFULLY. remove ALL installed packages that match each supplied spec. i.e., if you say uninstall libelf, ALL versions of libelf are uninstalled. if no spec is supplied all installed software will be uninstalled. this is both useful and dangerous, like rm -r
-R, --dependents
also uninstall any packages that depend on the ones given via command line
-y, --yes-to-all
assume “yes” is the answer to every confirmation requested

spack unload

remove package from environment using module unload

spack unload [-h] ...

Positional arguments

spec
spec of package to unload with modules

Optional arguments

-h, --help
show this help message and exit

spack unuse

remove package from environment using dotkit

spack unuse [-h] ...

Positional arguments

spec
spec of package to unuse with dotkit

Optional arguments

-h, --help
show this help message and exit

spack url

debugging tool for url parsing

spack url [-h] SUBCOMMAND ...

More documentation

Optional arguments

-h, --help
show this help message and exit

Subcommands


spack url parse

spack url parse [-hs] url

Positional arguments

url
url to parse

Optional arguments

-h, --help
show this help message and exit
-s, --spider
spider the source page for versions

spack url list

spack url list [-hce] [-n | -N | -v | -V]

Optional arguments

-h, --help
show this help message and exit
-c, --color
color the parsed version and name in the urls shown (versions will be cyan, name red)
-e, --extrapolation
color the versions used for extrapolation as well (additional versions will be green, names magenta)
-n, --incorrect-name
only list urls for which the name was incorrectly parsed
-N, --correct-name
only list urls for which the name was correctly parsed
-v, --incorrect-version
only list urls for which the version was incorrectly parsed
-V, --correct-version
only list urls for which the version was correctly parsed

spack url summary

spack url summary [-h]

Optional arguments

-h, --help
show this help message and exit

spack use

add package to environment using dotkit

spack use [-h] ...

Positional arguments

spec
spec of package to use with dotkit

Optional arguments

-h, --help
show this help message and exit

spack versions

list available versions of a package

spack versions [-h] PACKAGE

More documentation

Positional arguments

PACKAGE
package to list versions for

Optional arguments

-h, --help
show this help message and exit

spack view

produce a single-rooted directory view of packages

spack view [-hv] [-e EXCLUDE] [-d {true,false,yes,no}] ACTION ...

More documentation

Optional arguments

-h, --help
show this help message and exit
-v, --verbose
If not verbose only warnings/errors will be printed.
-e EXCLUDE, --exclude EXCLUDE
exclude packages with names matching the given regex pattern
-d {true,false,yes,no}, --dependencies {true,false,yes,no}
Link/remove/list dependencies.

Subcommands


spack view remove

spack view remove [-ha] [--no-remove-dependents] path [spec [spec ...]]

Positional arguments

path
path to file system view directory
spec
seed specs of the packages to view

Optional arguments

-h, --help
show this help message and exit
--no-remove-dependents
Do not remove dependents of specified specs.
-a, --all
act on all specs in view