latch
in a new virtual environment.
The Latch CLI currently requires Python >=3.9
and <=3.11
.
latch login
~/.latch/token
in the machine the command is run on.
Options:
--connection <str>
: Specific Auth0 connection name if Single-Sign-On is enabled for the workspace.latch login
command.
Latch supports Okta and Microsoft Azure as IdP providers. Visit documentation below to see how to configure SSO for your organization.
Example:
latch workspace
latch init <pkg_name>
-t, --template <choice>
: Template to use for the workflow (choices: empty
, docker
, subprocess
, r
, conda
, nfcore
)-d, --dockerfile
: Create a user editable Dockerfile for this workflow-b, --base-image <choice>
: Which base image to use for the Dockerfile (choices: default
, cuda
, opencl
, default: default
)empty
: Minimal workflow structure with basic filesdocker
: Workflow example for running a Docker containersubprocess
: Workflow example with Python subprocess
calling commandsr
: Workflow example with R environment setupconda
: Workflow example with conda
environment setupnfcore
: Workflow example using subprocess
to call a Nextflow nf-core workflow (Not recommended. If you have Nextflow workflows, use the Nextflow SDK instead.)default
: Standard base image for most workflowscuda
: CUDA-enabled base image for GPU workflowsopencl
: OpenCL-enabled base image for GPU workflowslatch dockerfile <pkg_root>
-s, --snakemake
: Generate a Dockerfile with arguments needed for Snakemake workflows.-n, --nextflow
: Generate a Dockerfile with arguments needed for Nextflow workflows.-f, --force
: Overwrite existing Dockerfile without confirming-a, --apt-requirements <path>
: Path to a text file containing apt packages to install-r, --r-env <path>
: Path to an environment.R file containing R packages to install-c, --conda-env <path>
: Path to an environment.yml file to install via conda-i, --pyproject <path>
: Path to a setup.py / buildable pyproject.toml file to install-p, --pip-requirements <path>
: Path to a requirements.txt file to install via pip-d, --direnv <path>
: Path to a direnv file (.env) containing environment variableslatch generate-metadata [config_file]
__init__.py
and parameters.py
file from a config file.
Options:
--metadata-root <path>
: Path to directory containing Latch metadata--yes, -y
: Overwrite an existing parameters.py
file without confirming--snakemake, -s
[DEPRECATED]: Generate Latch metadata for Snakemake. This command is deprecated and no longer works for latch >= 2.55.0.a6
--nextflow, -n
: Generate Latch metadata for Nextflow--no-infer-files, -I
[DEPRECATED]: Don’t parse strings with common file extensions as file parameters (Snakemake only). This command is deprecated and no longer works for latch >= 2.55.0.a6
--no-defaults, -D
: Don’t generate defaults for parameterslatch develop <pkg_root>
--yes, -y
: Skip the confirmation dialog--wf-version, -v <str>
: Use the container environment of a specific workflow version--disable-sync, -d
: Disable the automatic syncing of local files to develop session--instance-size, --size, -s <size>
: Size of machine to provision (choices: small_task, medium_task, large_task, small_gpu_task, large_gpu_task, v100_x1_task, g6e_xlarge_task)latch exec
[DEPRECATED]--execution-id, -e <str>
: Optional execution ID to inspect--egn-id, -g <str>
: Optional task execution ID to inspect--container-index, -c <int>
: Optional container index to inspect (only used for Map Tasks)latch register <pkg_root>
-d, --disable-auto-version
: Whether to automatically bump the version of the workflow each time register is called--remote/--no-remote
: Use a remote server to build workflow (default: True)--docker-progress <choice>
: Docker build progress display (choices: plain, tty, auto, default: auto)-y, --yes
: Skip the confirmation dialog--open, -o
: Automatically open the registered workflow in the browser--mark-as-release, -m
: Mark the registered workflow as a release--workflow-module, -w <str>
: Module containing Latch workflow to register (default: wf
)--metadata-root <path>
: Directory containing Latch metadata (Nextflow and Snakemake only)--snakefile <path>
[DEPRECATED]: Path to a Snakefile to register.--cache-tasks/--no-cache-tasks, -c/-C
[DEPRECATED]: Whether or not to cache snakemake tasks.--nf-script <path>
: Path to a nextflow script to register--nf-execution-profile <str>
: Set execution profile for Nextflow workflow--staging
: Register the workflow in “staging” mode. Build the workflow container image but do not publish a new workflow version on Latch Console. Recommended for testing and development before registering the workflow to your team workspace.latch preview <pkg_root>
latch get-wf [--name <name>]
--name <str>
: Filter by workflow name and display all versions. To find a workflow name, run latch get-wf without options and check the “Name” column in the output.latch get-executions
latch cp <src> <dest>
--progress <choice>
: Type of progress information to show while copying (choices: tasks, none, default: tasks)--verbose, -v
: Print file names as they are copied--no-glob, -G
: Don’t expand globs in remote paths--cores <int>
: Manually specify number of cores to parallelize over--chunk-size-mib <int>
: Manually specify the upload chunk size in MiB (must be >= 5)cp -R
in Unix. Directories are copied recursively. Supports copying between local and remote locations, and between remote locations.
Example:
latch mv <src> <dest>
--no-glob, -G
: Don’t expand globs in remote pathslatch ls [paths]
--group-directories-first, --gdf
: List directories before fileslatch rmr <remote_path>
-y, --yes
: Skip the confirmation dialog--no-glob, -G
: Don’t expand globs in remote paths--verbose, -v
: Print all files when deletinglatch mkdirp <remote_directory>
latch sync <srcs>... <dst>
--delete
: Delete extraneous files from destination--ignore-unsyncable
: Synchronize even if some source paths do not exist or refer to special files--cores <int>
: Number of cores to use for parallel syncingrsync
. Currently only supports local to remote synchronization.
Example:
latch nextflow version <pkg_root>
latch nextflow generate-entrypoint <pkg_root>
wf/entrypoint.py
file from a Nextflow workflow.
Options:
--metadata-root <path>
: Directory containing Latch metadata--nf-script <path>
: Path to the nextflow entrypoint to register (required)--execution-profile <str>
: Set execution profile for Nextflow workflowlatch nextflow attach
--execution-id, -e <str>
: Optional execution ID to inspect. Find the execution ID by navigating to the desired execution in the Executions tab and copying the execution ID from the sidebar.latch nextflow register <pkg_root>
--yes, -y
: Skip confirmation dialogs--no-ignore, --all, -a
: Add all files (including those excluded by .gitignore/.dockerignore) to workflow archive--disable-auto-version, -d
: Only use the contents of the version file for workflow versioning--disable-git-version, -G
: When the package root is a git repository, do not append the current commit hash to the version--script-path <str>
: Path to the entrypoint nextflow file (default: “main.nf”)latch pods stop [pod_id]
pod_id
is provided, the command attempts to stop the pod from which the command is executed. Useful for autoshutting down the pod after a long-running script finishes to save costs.
Example:
latch test-data upload <src_path>
--dont-confirm-overwrite, -d
: Automatically overwrite any files without asking for confirmationlatch test-data ls
latch test-data remove <object_url>
latch get-params <wf_name>
latch launch <params_file>
--version
: Show the version and exit--help
: Show help message and exitlatch login
latch://
prefix