Nextstrain-cli

Latest version: v9.0.0

Safety actively analyzes 723217 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 15

9.0.0

This release contains a **potentially-breaking change** for any usages of the
`--sacra` option, though we expect no one is using it. The change is described
below.

Improvements

* `nextstrain version` now reports itself as "Nextstrain CLI" (instead of
"nextstrain.cli") and indicates if it is a "standalone" installation
(self-contained, bundles Python) or not.
([419][])

* Colorized and bolded output is disabled when stdout is not attached to a
terminal (e.g. is redirected to a file, piped to another program, etc.) or
when the [`NO_COLOR` environment variable](https://no-color.org) is set to a
non-empty value.
([419][])

* The readability of `--help` output is improved by the addition of blank lines
between argument/option descriptions.
([419][])

* AWS Batch builds now support development overlays such as [`--augur`][] and
[`--auspice`][]. To use this functionality, you'll need at least
`nextstrain/base:build-20250321T184358Z` or newer of the Nextstrain Docker
runtime image. Compatibility of the runtime image is checked automatically
when overlays are used with AWS Batch.
([419][], [423](https://github.com/nextstrain/cli/pull/423))

[`--augur`]: https://docs.nextstrain.org/projects/cli/en/9.0.0/commands/build/#cmdoption-nextstrain-build-augur
[`--auspice`]: https://docs.nextstrain.org/projects/cli/en/9.0.0/commands/build/#cmdoption-nextstrain-build-auspice

* The `--sacra` option, intended for use during development, is no longer
supported by `nextstrain build`, `nextstrain view`, or `nextstrain shell`.
[Sacra](https://github.com/nextstrain/sacra), long-defunct and never used,
was removed from the Nextstrain runtime image itself over 4 years ago (first
absent in `nextstrain/base:build-20201213T084302Z`, last present in
`nextstrain/base:build-20201212T165623Z`). This is technically a
**potentially-breaking change**, although almost certainly affects no one.
([419][])

Bug fixes

* Fixed a rare but possible error case in `nextstrain view` and `nextstrain
login` when running under a copy of Python with IPv6 disabled on a system
with IPv6 enabled. In such situations, IPv6 addresses will now be ignored.
([415](https://github.com/nextstrain/cli/pull/415))

* An authentication callback URL containing an unresolvable hostname is no
longer considered to have a loopback (local-only) address, i.e. is not
considered safe/suitable for use.
([416](https://github.com/nextstrain/cli/pull/416))

* `nextstrain view` now correctly handles IPv6 host addresses in the URL opened
in a browser (if any).
([417](https://github.com/nextstrain/cli/pull/417))

* `nextstrain login` now correctly handles OAuth 2.0 authorization endpoint
URLs (which are obtained automatically from OpenID Connect 1.0 metadata
discovery) with existing query parameters in them. This bug likely affected
approximately no one; logging into nextstrain.org was unaffected and all
known users of non-nextstrain.org remotes were also unaffected.
([419][])

* File timestamps for results files downloaded from an AWS Batch build are now
correctly restored even if the expected extraction path differs from the
actual extraction path due to ZIP security precautions. This bug likely
affected approximately no one.
([419][])

Development

* Goodbye, Mypy! We now use only Pyright for type checking. Both type
checkers used to contribute to our development in their own way, but over
time Pyright's become more sophisticated and Mypy's required more workarounds
to appease it than issues it caught. So long, and thanks for all the ~fish~
type checks!
([419][])

* [Cram](https://bitheap.org/cram/) test files are now supported, with one
example file for now.
([419][])

* `NEXTSTRAIN_HOME` is now set for tests so as to avoid interference with the
local user's personal config and data.
([419][])

* Running tests no longer opens a browser. \o/
([419][])

[419]: https://github.com/nextstrain/cli/pull/419

8.5.4

Bug fixes

* It is no longer a fatal error if the logs for a completed AWS Batch job
cannot be fetched for some reason. `nextstrain build` will warn about the
error but continue on with printing the job status (e.g. success or reason
for failure) and, if applicable, downloading job results.
([406](https://github.com/nextstrain/cli/pull/406))

8.5.3

Bug fixes

* Authentication established via `nextstrain login` and used by the `nextstrain
remote` family of commands no longer verifies the "issued at" (`iat`) time of
the received tokens in order to avoid the following error:

ImmatureSignatureError: The token is not yet valid (iat).

This error was seen by users who's system time was slightly lagged, and it
prevented them from logging in or renewing their authentication.
([394](https://github.com/nextstrain/cli/pull/394))

8.5.2

Bug fixes

* The suggested commands to run (i.e. potential solutions) in expected errors
from `nextstrain remote` now explicitly include the remote origin to avoid
being incorrect or misleading for origins other than nextstrain.org. For
example, if the error message suggested running `nextstrain login`, it now
suggests `nextstrain login https://nextstrain.org`.
([391](https://github.com/nextstrain/cli/pull/391))

8.5.1

Bug fixes

* `nextstrain remote download` now produces the expected local file names when
there are periods (dots) in the remote dataset name (e.g. `nextstrain remote
download /a/b.c/d` now produces `a_b.c_d.json` instead of `a_b.json`) and
when there are periods in the given local file name (e.g. `nextstrain remote
download /x/y/z x.y.z` now produces `x.y.z.json` instead of `x.y.json`).
([381](https://github.com/nextstrain/cli/pull/381))

8.5.0

Improvements

* Snakemake's per-input/output file metadata (stored in `.snakemake/metadata/`)
is now downloaded from AWS Batch builds by default. Like file modification
times (mtimes), which are already preserved from the remote build, this
additional metadata is used by Snakemake to track when inputs have changed
and when it should regenerate outputs. The metadata is also used in
[Snakemake report generation](https://snakemake.readthedocs.io/en/v8.14.0/snakefiles/reporting.html#rendering-reports)
and can be useful for gathering ad-hoc workflow statistics.

The runtime image used must be at least `nextstrain/base:build-20240617T235011Z`
for these Snakemake metadata files to be available for download from the AWS
Batch job.
([374](https://github.com/nextstrain/cli/pull/374))

Page 1 of 15

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.