Releases: nats-io/natscli
Release 0.2.0
Major New Features
Decentralized Authentication Management
We have introduced some of the functionality from nsc
and nk
into the new nats auth
command. The aim is not to support every feature nsc
has but to identify the key features most users use and bring those into the nats
command.
This is an initial release and we're seeking feedback around missing features users feel are key and around the general interaction model.
Please see AUTH.md for a testing guide.
Configuration Scaffolding
To complement nats auth
and to help new users we introduced a new configuration generation feature set in nats server generate
. This tool will guide users through interactive questions to solve goal orientated outcomes such as generating local Docker Compose development Super Clusters or connecting to Synadia Cloud using a Leafnode.
The tool supports sharing bundles without performing new releases of the nats
command and again we'd love feature requests on scaffolding you'd like to see here.
Major nats bench
rewrite
The nats bench
command has seen a major rewrite splitting it into seperate commands with options grouped around specific goals rather than all in one huge set of flags.
Real time graphs
We've added numerous graph features to the tooling that allow you to see traffic rates on specific subjects, in and out of streams and consumers and more.
See:
nats sub --graph
nats stream graph
nats consumer graph
nats server graph
nats top
We've incorporated the nats-top
command as a new sub command and made it work over NATS network rather than HTTP for consistency with all the other nats
administration commands.
Enhancements
General
- Support switching to the previous context using
nats ctx previous
- Temporary files that might be edited now use the correct extension to assist editors with syntax highlighting
- Supports TLS First in Contexts and general connection options via
--tlsfirst
- A context may now be unsellected using
nats context unselect
- Support loading TLS files from the Windows Certificate Store
- Adds a new
nats server watch
command that can passively observe a NATS Cluster - Support compressing KV buckets
- Support compressing Object Store buckets
- Supports building for the s390x Architecture
- Supports subscribing to multiple subjects in
nats sub
- Support options like
--js-domain
innats sub
- Support encrypting and decrypting data using xkeys via
nats auth nk seal
andnats auth nk unseal
- Support interactive, guided, Server configuration generation using
nats server generate
- Various utility flags for
nats sub
:--subjects-only
,--timestamp
and--delta-time
- Name MQTT connections by MQTTClient ID instead of Name
- Major rewrite of the
nats bench
command for better UX - Adds new
nats sub --graph
options to interactively draw subject traffic rates - Various commands that parse the
EDITOR
environment variable now supports arguments in the supplied command - Improved color aware progress bars
- Subjects now support template parsing in
nats pub
andnats req
- The
--translate
flag onnats sub
now supports the--dump
flag
Operations
- Adds
nats server check credential
that can monitor credential expiry and more - Support filtering connections using an expression language on
nats server report connections --filter
- Support filtering connections by username using
nats server report connections --username
- Support filtering connections by state using
nats server report connections --state
- Support filtering closed connections by reason using
nats server report connections --state closed --closed-reason
- New bar graph based views for CPU and Memory in
nats server report cpu
andnats server report mem
- Adds a new
nats server check consumer
to validate various aspects of Consumers as a health check - Allow Replicas to be changed when performing Stream restores
- Adds a new
nats auth
command that can manage nkeys and has a subset ofnsc
features - Adds a new
nats top
command incorporating features previously found innats-top
- Adds an initial cluster connections balancer in
nats server cluster balance
- Support tracing message flow through complex cluster toplogies using
nats trace
(Requires NATS Server 2.11) - The chunks size used by
nats stream backup
can now be adjusted to assist connections over slow transports or VPNs - New Stream and Consumer metadata based thresholds monitoring features
- Support requesting
cpu
profiles - Additional details shown about Slow Consumers in
nats server list
- Renders JetStream API Pending counts in various reports
- Adds a new
nats server graph
command that can graph various aspects of running NATS Servers nats server check consumer
supports Pinned Consumers- Adds a new Cluster report in
nats server report cluster
- Adds a new Super-Cluster report in
nats server report gateways
- Adds a new Health report in
nats server report health
- Adds a new Leafnode report in
nats server report leafs
- Support placing Stream and Consumer leaders on a specific host in
nats stream cluster down
andnats consumer cluster down
(Requires NATS Server 2.11) - Supports rendering a hash (digest) of the running configuration in
nats server info
(Requires NATS Server 2.11) - The
nats event
command can now read a Stream full of events with the new--stream
and--since
flags - Adds a new
nats server check request
that can health check services - Adds an option to influence expected server counts in all
nats server report
commands
JetStream
- Support interactive editing of Consumer configuration using the
-i
flag nats pub
is now JetStream aware with the new--jetstream
flag- Support setting Consumer limits on Streams
- Support parsing subject filters as a comma seperated list in
nats consumer add
- Raft group details are now shown in Stream and Consumer info
- Report on tiered storage reservations in
nats account info
- Support
--nak
innats consumer next
- Renders Consumer Limits in
nats stream info
- Support
nats stream view
for WorkQueue streams with Direct Get enabled - Support editing Inactive Threshold in
nats consumer edit
- Support unprompted cluster step-downs using
--force
- New
nats stream graph
andnats consumer graph
commands to view real time traffic statistics for Streamd and Consumers - Adds a new
nats consumer find
command used for searching using various filters and limiters for Consumers - Improve
nats consumer list
to behave more likenats stream list
- Report JetStream limits in
nats server info
(Requires NATS Server 2.11) - Support Pausing and Resuming consumers (Requires NATS Server 2.11)
- Support the concept of JetStream API levels based on ADR-44 and use that to ensure safer operations for those requiring NATS Server 2.11 and newer
- Support Pinned Consumers as per ADR-42 (Requires NATS Server 2.11)
- Support balancing leaderships for Streams and Consumers using
nats stream balance
andnats consumer balance
(Requires NATS Server 2.11) - Supports configuring Per Message TTL features for Streams (Requires NATS Server 2.11)
- KV Buckets can now be edited using
nats kv edit
- Additional options were added to
nats kv watch
Bug Fixes
- Numerous UX and rendering improvements
- When reporting on super clusters warn about route asymmetry per cluster rather than per super cluster
- Correctly calculate server RTTs in
nats rtt
command and support--trace
- Use the correct name spaces for Prometheus monitoring output
- Correctly handle single subject filter consumers
- Memory usage improvements for
nats server report connections
- Do not prompt for Backoff on AckNone policy
- Fix listing Object Store names using
--names
- Fix incorrect JetStream store dir when using $XDG_DATA_HOME in
nats server run
- Fix handling of
--top
innats server report accounts
- Do not handle Flow Control headers when not communicating with JetStream
- Do not alert about no meta leader in standalone servers
- Improved sorting for
nats sub --report-subjects
- Improve paging of Connz requests in various reports
- Various progress bar related bug fixes
- Be less interactive when using
--defaults
innats stream add
- Consumer
max_waiting
should not be editable - Fix overriding JetStream Domain when Contexts are used
- The
nats kv
andnats obj
commands now support Domains and API Prefixes
New Contributors
- @piotrpio made their first contribution in #866
- @LautaroJayat made their first contribution in #951
- @erhhung made their first contribution in #963
- @johnweldon made their first contribution in #974
- @samuelattwood made their first contribution in #986
- @MauriceVanVeen made their first contribution in #1000
- @zakk616 made their first contribution in #1025
- @jordan-rash made their first contribution in #1031
- @yeqown made their first contribution in #1039
- @mprimi made their first contribution in #1028
- @Zambito1 made their first contribution in https://github.com/nats-io...
Release 0.1.6
CVEs
- Vulnerability check warnings for CVE-2024-45337 are addressed by the dependency update to
x/crypto
, although thenats
does not use the affected functionality and is therefore not vulnerable
Full Changelog: v0.1.5...v0.1.6
Release 0.1.5
Bug Fixes
- Various UX and rendering improvements
- Improve handling of cluster size counts in
nats server req
commands - Improve stdin handling for
kv
andobject
commands - Report correct timezone in
nats stream
commands - Make the consumer inactive threshold editable
- Prevent empty subject transform configurations
- Improve handling of KV value sizes
- Documentation fixes
Enhancements
- New
nats server check consumer
command to verify consumer health - Show Consumer limits in
nats stream info
- Support filtering closed connections by reason in
nats server report connections
Release 0.1.4
Bug Fixes
- Improve handling invalid nats context configurations
- Handle Subject Transforms correctly in
nats stream edit
- Avoid some nil pointer exceptions when selecting consumers
Full Changelog: v0.1.3...v0.1.4
Release 0.1.3
Enhancements
- Support
--limit-consumer-inactive
and--limit-consumer-max-pending
for Streams - New command
nats server check credentials
that can monitor a NATS Credentials file - Adds new
--filter
option tonats server report connections
allowing filtering like this examplenats server report connz --filter 'lower(conns.name) matches "surveyor" || conns.ip == "46.101.44.80"'
this uses Expr language syntax to perform arbitrary filters - Support limiting connection reports by username using the new
--username
- Support comma separate list of filter subjects in
nats consumer add
- Support connecting to NATS Servers configured for TLS First using
--tlsfirst
, also supported by contexts - Builds for the s390x architecture
- Support KV compression
Maintenance
- Remove some dependencies
Bug Fixes
- Warn about route asymmetry per cluster rather than per Super Cluster
- Minor UX improvements
- Correctly handle custom Prometheus namespaces in the
nats server check
commands - Major memory use improvement for connections reports
- When editing a single filtered consumer the edit command would incorrectly change it to a multi filter consumer with just 1 match
- Do not prompt for Backoff information when Ack None was chosen for a Consumer
- Fix the
--names
flag when listing Object Bucket contents
Full Changelog: v0.1.1...v0.1.3
Release 0.1.1
Bug Fixes
This fixes the ability to install the command using go install only, otherwise it is identical to Release v0.1.0
Release 0.1.0
Major New Features
- Adds a new
nats micro
command to interact with the new NATS Microservices Framework - Support data translations in
nats sub
,nats req
andnats stream view
by passing messages to external helper commands for rendering. Allowing unpacking protobuf messages and more. See README example. - Adds a per-context color option that shows up in various tables, columner displays, prompts and more to assist with orientating users between multiple environments. Pass
--color
when adding contexts. - Multiple Subject filters are allowed in Consumers (NATS Server 2.10 required)
- Major new transformation features in Mirrors and Sources (NATS Server 2.10 required)
- Metadata in Streams, Consuemrs, KV Buckets and Object Buckets (NATS Server 2.10 required)
Compatability Notes
Many features requires NATS Server 2.10, some of these will fail silently on older servers. Please review these notes carefully for features flagged as needing 2.10.
Creating consumers will fail on NATS Server older than 2.9.x
We used to default to nats server check connection
when invoked as nats server check
but this made discovering our, significant, improvements to monitoring features hard to discover. This release introduce a breaking change that will require monitoring built using just nats server check
to change to nats server check connection
instead.
JetStream User Enhancements
- KV Bucket maximum age is now shown in
kv info
- Renders the
missing
data from stream reports - known clustered streams that did not respond with their information - Adding a stream using
--config stream.json
now supports overriding placement, description, cluster and replicas - Consumer replicas can be edited to facilitate scale-up and down of consumer raft clusters sizes
- Adds
--defaults
options to stream and consumer add commands which will skip all optional prompts nats consumer next
can now Terminate messages using--term
nats account info
now shows the connected domain and server versionnats account tls
can show certificates, validated chains, checks expiration and supports OCSP verification- Support removing placement constraints using
nats stream edit
nats stream find
can now match on Replicas, Mirrors and Sources- Support editing stream republish configurations using
nats stream edit
- Output from
nats consumer info --json
can now be used as input fornats consumer add
- Improve editing UX for Streams and Consumers using commented YAML rather than JSON
- Trace output from
nats kv get --trace
now includes the revision nats stream view
now support viewing Work Queue streams that have the Direct feature enabled- Enable Direct get by default for new streams
- Support creating Named Ephemeral Consumers
- Consumers are added using the new style API subject that allow ACLs against subject filters
- An
expr
based expression language was added tonats stream find
for complex matches. See--help
and the Language Definition - Can detect gaps aka interior deletes in Streams using
nats stream gaps
- Streams with
no_ack
set tofalse
attempting to ingest>
and*
will now fail - Support setting a custom first sequence for new Streams using
--first-sequence
(NATS Server 2.10 required) - Support more ack modes for Pull consumers (NATS Server 2.10 required)
- Support multiple consumer filter subjects (NATS Server 2.10 required)
- Support Stream Compression (NATS Server 2.10 required)
- Support adding metadata to Streams and Consumers (NATS Server 2.10 required)
- Support new Stream Subject Transform features (NATS Server 2.10 required)
Operations Related Enhancements
nats server check jetstream
now also checks all streams for replica health and report if any streams are unhealthy, lagged, have invalid peer counts or have not been seen recently.- Checks under
nats server check
now show descriptions of their metrics in--format text
nats server check stream
can assert based on the number of subjects in the stream- Adds
nats server check msg
that can load specific messages from a stream and assert properties like age, content and more - Client ports are shown in connection reports
nats server request subscriptions
now has an optional subject filternats server report jetstream
will now warn about situations where a leader could never be elected- Support tags, cluster, and server name filters in various
nats server report
commands - Suport filtering empty responses from
nats server req connections
- Rename
nats server raft
tonats server cluster
with backward compatible aliases - Adds
nats server account purge
that can remove all assets related to an account in a cluster - Differences in the
nats server list
that could indicate problems are highlighted - Various tables in
nats server report
andnats server list
are now sorted in a more consistent manner between invocations - The table produced by
nats server list
can now be sorted by cluster name - Report the percentage of errors vs api requests in
nats server report jetstream
- Support reloading server configuring using
nats server config reload
(NATS Server 2.10 required) - Support loading performance profiles from remote servers using
nats server request profile
(NATS Server 2.10 required) nats server req kick
can be used to disconnect a client (NATS Server 2.10 required)- Additional
healthz
options allowing checks to be restricted to a specific Stream or Consumer (NATS Server 2.10 required) - Can view Raft group information using
nats server request jetstream --raft
(NATS Server 2.10 required)
Configuration Context Enhancements
- Supports skipping context loading using
--no-context
- Support editing corrupt contexts
- Improve the UX of editing contexts by using a commented YAML format
- Adds a per-context color option that shows up in various tables, columner displays, prompts and more to assist with orientating users between multiple environments. Pass
--color
when adding contexts. - The
nats context list
command has a number of new rendering formats for integration with scripts
Miscellaneous Enhancements
- Support accessing NATS via Socks5 proxies, like those created using
ssh -D
, in NATS contexts - Support reading data from STDIN for
nats schema validate
- Adds
nats schema req
that can perform schema validation over any request-reply service response nats sub
can now exit after a idle period by passing--wait
nats sub
can now bind to an existing durable by passing--durable
nats sub
can now report on what subjects traffic was seen on using--report-subjects
- Support data translations in
nats sub
andnats req
by passing messages to external helper commands for rendering. Allowing unpacking protobuf messages and more. See README example. - Support opening the monitor port in
nats server run
- Improve using the
nats
command in cron and scripts by disabling the select prompts using--no-select
- Many general UX improvements
nats bench
will now default to file storagenats account info
supports additional user information like permissions, connection expiry and more (Requires NATS Server 2.10)
Bug Fixes
- Fix opting out of including consumers in backups
- Fix the prometheus metric indicating a check status under
nats server check
that was always 0 - When a context edit results in an invalid context, roll back the changes
- Correctly quote paths in
nats server run
on windows - Correctly pass the supplied
--timeout
to the JetStream API client - Prevent ack wait being edited when backoffs are present
- Improve error handling in the
nats latency
command - Ensure adding a pull consumer with a heartbeat fails
- Improve the performance of
nats stream list --names
on large sites - Improve handling
--timeout
on multi response requests innats server request
- Fail, rather than hang,
nats stream view
without a terminal - Correctly handle zero time in
stream info
andstream state
- Improve handling of authentication tokens in NATS Contexts
New Contributors
- @remyleone made their first contribution in #647
- @Jarema made their first contribution in #657
- @neilalexander made their first contribution in #673
- @sethjback made their first contribution in #682
- @lionello made their first contribution in #717
- @davedotdev made their first contribution in #709
- @kmpm made their first contribution in #736
- @mcp5 made their first contribution in #740
- @jperez-igz made their first contribution in #744
- @oderwat made their first contribution in #739
- @maxarndt made their first contribution in #767
- @sebbbastien made their first contribution in #795
- @fabiant7t made their first contribution in #803
- @mdawar made their first contribution in #828
- @caleblloyd made their first contribution in #853
Release 0.0.35
Enhancements
- Support removing server from a cluster using their unique ID using
nats server raft peer-remove
, also show server IDs in several reports - Support requesting
healthz
from servers usingnats server req healthz
- Support the new Discard New Per Subject policy for streams
- Show the server core count in
nats server list
- Makes the request payload available as
.Request
in templates used innats server reply
- Show the bucket size in
nats kv info
- Support filtering streams in
stream report
andstream ls
based on subject filters - Adds a new account level
nats account report statistics
command showing connection information at an account level nats sub
can now take a filter subject even when a stream is selected using--stream
- Default to the
all
start policy when adding consumers - Support performing account data purges using
nats server purge
- Adds a new
nats stream state
command that shows only the state, also--state
flag tonats stream info
- Support enabling Mirror Direct mode when adding a stream
- Support creating mirrors of Key-Value buckets to facilitate read replicas using
nats kv add --mirror
. The intended use case is to facilitate read replicas in a different domain such as when using a branch level Leaf Node - When using the
prometheus
output format innats server check
the namespace for created metrics is now configurable using--namespace
- The
nats bench
command can act against an existing bucket using the new--bucketname
flag - Various UX improvements
Removals
As announced in the previous release a few features are deprecated and removed
- Stream template support were removed
- Remove
nats governor
command - Remove
nats backup|restore
, usenats stream backup|restore
ornats account backup|restore
Bug Fixes
- Improve error handling in connections report
- Do not offer stream retention as an editable property
- Fix some progress bars
- Improve help for duration flags
- Avoid array out of bounds panics in the
nats traffic
command - Improve help output for the reply command
- Improve paged connection reports that would fail when using
nats account report connections
on an account with more than 1000 connections - When waiting for a stream to elect a new leader with the
nats stream cluster down
command we waited 10 Milliseconds instead of 5 seconds
New Contributors
- @rickardgranberg made their first contribution in #594
- @kozlovic made their first contribution in #602
Full Changelog: v0.0.34...v0.0.35
Release 0.0.34
Enhancements
- Support Stream republish configuration
- Support Stream direct access configuration
- Support Stream subject filters in mirror configuration
- Support showing the subjects contained in a Stream using
nats stream subjects
- Show number of subjects held in a Stream when using
nats stream info
- Support delivery group hints in
nats consumer sub
- Support editing various properties on Consumers
- Support
none
ack mode for pull consumers - Support deleting leaderless and otherwise unmanageable Streams and Consumers using
—force
- Support republish features in
nats kv add
- Support listing keys in a bucket using
nats kv ls BUCKET
- Support fetching a specific historic revision of a KV key using the new
—revision
flag onnats kv get
- Adds a new
nats kv revert
command that can retrieve a past revision for a key and publish it as a new put - Support
—last-per-subject
in thenats sub
command - Allow
nats sub
to reference an existing Durable consumer using—durable
- Support excluding certain subjects from being rendered in
nats sub
using the new—ignore-subject
flag - Support showing matching Replies on
nats sub
using the new—match-replies
flag - Support binding to a specific stream in
nats sub
using—stream
- Support testing server subject mappings using
nats server mapping
- Support deleting the selected context when it’s the only context
- Support extended durations on CLI flags like
1y1M1d1s
- Render TLS connection information in
nats account info
- Improve reusability of configurations in
nats server run
- Allow the inbox prefix to be configured from a NATS context
- Improve help output and general CLI flow
Bug Fixes
- Fix handling windows slashes in
nats server run
- Fix benchmarking using multiple subjects and other
nats bench
improvements - Fix
nats sub
when giving a count and—raw
- Warn instead of fail when memory stream backups are requested in
nats account backup
- Fix handling of deny-delete and allow-purge when adding streams
- Fix waiting for a new leader when forcing a leader election
- Various UX improvements
Deprecations
- Deprecate
nats backup|restore
, usenats stream backup|restore
ornats account backup|restore
- Deprecate
nats governor
, to be removed in next release - Deprecate
nats stream template
, to be removed in next release - Now requires at least Go 1.18
New Contributors
- @ramonberrutti made their first contribution in #477
- @AlbericC made their first contribution in #487
- @superfrink made their first contribution in #491
- @philpennock made their first contribution in #495
- @sylr made their first contribution in #519
- @codegangsta made their first contribution in #523
- @lambdaR made their first contribution in #528
- @rodrigc made their first contribution in #535
- @tbeets made their first contribution in #524
- @Haramaty made their first contribution in #542
- @dselans made their first contribution in #531
Full Changelog: v0.0.33...v0.0.34
Release 0.0.33
Enhancements
- Adds
maxbytes
tonats bench
for NGS support - Adds
nats account restore
to restore a backup made usingnats account backup
- When a stream is added using a configuration file and no name is given we now take the name from the configuration file
- Shows the
domain
innats server list
- Support a dry-run mode in Stream and Consumer edit that only shows the differences without applying them,
-1
exit code indicates a difference was found - The
nats kv
andnats obj
commands will now offer a list of buckets when the bucket name is not given - The
nats consumer edit
command can now load a new configuration from file - The
nats server check
commands have a new output formattext
for human friendly output - The NATS connection name used by the CLI can now be set using
--connection-name
nats stream find
can now find streams by subject matches, the--subject
flag was removed fromnats stream list
as it was not functional- Supports the new
MaxRequestMaxBytes
consumer setting - Allow Replicas and Memory storage to be selected for individual consumers
- Supports new expirmental stream republish feature
nats bench
can now publish to multiple subjects
Bug fixes
- UX improvements in kv commands
- Fix
nats stream ls --names
that would list all names twice - Fix the
rtt
andlatency
commands that were printing unrealistically small numbers - Max delivery was not setable when a backoff was not provided
- Various UX improvements to flags and help output
- Terminal detection is done wherever input is asked, thus improving failure modes when run from scripts, cron etc