Sleet commands

March 7, 2026 ยท View on GitHub

Help

The help parameter may be applied to any command to see a description of all parameters.

sleet.exe --help

CreateConfig

All commands require a sleet.json config file to provide source settings. Before creating a new source the createconfig command may be used to output a sleet.json template file that may be filled in with your own settings.

Usage: sleet createconfig [options]

Options

ParameterDescription
azureAdd a template entry for an azure storage feed.
s3Add a template entry for an Amazon S3 storage feed.
localAdd a template entry for a local folder feed.
outputOutput path. If not specified the file will be created in the working directory.

At least one feed type must be specified.

Init

Init is used to initialize a new feed. This is only needed once. Calling this method on an already created feed will fail.

After running this command you will have a complete feed with zero packages.

Usage: sleet init [options]

Options

ParameterDescription
configOptional path to sleet.json where the source information is contained.
sourceSource name from sleet.json.
with-catalogEnable the feed catalog and all change history tracking.
with-symbolsEnable symbols server.

Push

Push adds packages to your feed. It can be used to add individual packages or complete directories of packages.

Usage: sleet push [nupkg or folder paths] [options]

Options

ParameterDescription
configOptional path to sleet.json where the source information is contained.
sourceSource name from sleet.json.
forceOverwrite existing packages. Defaults to false
skip-existingSkip packages that already exist on the feed.

Examples

Pushing a single nupkg

sleet push path/to/mynupkg.nupkg --source myFeed --force

Pushing multiple directories of nupkgs

sleet push /my/nupkgs1/ /my/nupkgs2/ --source myFeed

Delete

Delete removes packages from your feed. It can be used to remove a single version of a package, or all versions of a package using a given id.

Usage: sleet delete [options]

Options

ParameterDescription
idPackage id to delete from the feed. Required
versionPackage version to delete. If not specified all versions will be deleted.
reasonReason for deleting the package(s). This will be stored in the catalog.
configOptional path to sleet.json where the source information is contained.
sourceSource name from sleet.json.
forceIgnore missing packages. Defaults to false

Examples

Delete a single package

sleet delete --id myNupkg --version 1.0.1-beta

Delete all version of a package

sleet delete --id myNupkg

Stats

Stats provides a count of the number of packages on the feed.

Usage: sleet stats [options]

Options

ParameterDescription
configOptional path to sleet.json where the source information is contained.
sourceSource name from sleet.json.

Validate

Validate is a built-in helper to verify that all packages contained in the index exist for all resources. If you are running into any issues such as an extra package showing up, or a missing package this is a good way to start troubleshooting.

Usage: sleet validate [options]

Options

ParameterDescription
configOptional path to sleet.json where the source information is contained.
sourceSource name from sleet.json.

Download

Downloads all packages and symbols packages from the feed to a local folder.

Usage: sleet download [options]

Options

ParameterDescription
configOptional path to sleet.json where the source information is contained.
sourceSource name from sleet.json.
output-pathOutput directory to store downloaded nupkgs. Required
skip-existingSkip packages that already exist in the output folder.
no-lockSkip locking the feed and verifying the client version.
ignore-errorsIgnore download errors.

Destroy

Destroy deletes all files from a feed. This is a destructive operation and cannot be undone.

Usage: sleet destroy [options]

Options

ParameterDescription
configOptional path to sleet.json where the source information is contained.
sourceSource name from sleet.json.

Recreate

Recreate downloads all packages, deletes the feed, and then creates a new feed from the existing packages. This may be used to fix feed problems or to upgrade between Sleet versions.

Usage: sleet recreate [options]

Options

ParameterDescription
configOptional path to sleet.json where the source information is contained.
sourceSource name from sleet.json.
nupkg-pathOptional temporary directory to store downloaded nupkgs in. This folder will be cleaned up if the command completes successfully. If the command fails these files will be left as a backup.
forceIgnore errors when recreating the feed.

Feed Settings

Read or modify feed settings stored in sleet.settings.json for the feed.

Usage: sleet feed-settings [options]

Options

ParameterDescription
configOptional path to sleet.json where the source information is contained.
sourceSource name from sleet.json.
getDisplay a feed setting. May be specified multiple times.
get-allDisplay all feed settings.
setAdd or update a feed setting. Value must be in the form key:value. May be specified multiple times.
unsetRemove a feed setting. May be specified multiple times.
unset-allClear all feed settings.

Examples

Display all feed settings

sleet feed-settings --get-all

Enable the symbols server

sleet feed-settings --set symbolsfeedenabled:true

Disable badges

sleet feed-settings --set badgesenabled:false

Retention

Package retention commands for pruning and limiting package versions.

Retention settings

Usage: sleet retention settings [options]

Options

ParameterDescription
configOptional path to sleet.json where the source information is contained.
sourceSource name from sleet.json.
stableNumber of stable versions per package id to retain. Required unless --disable is used.
prereleaseNumber of prerelease versions per package id to retain. Required unless --disable is used.
release-labelsGroup prerelease packages by the first X release labels. Each group will be pruned to the prerelease max if applied.
disableDisable package retention.

Retention prune

Usage: sleet retention prune [options]

Options

ParameterDescription
configOptional path to sleet.json where the source information is contained.
sourceSource name from sleet.json.
stableNumber of stable versions per package id. If not specified the feed settings will be used.
prereleaseNumber of prerelease versions per package id. If not specified the feed settings will be used.
release-labelsGroup prerelease packages by the first X release labels. Each group will be pruned to the prerelease max if applied.
packagePrune only the given package ids. May be specified multiple times.
dry-runPrint out all versions that would be deleted without actually removing them.

Examples

Limit the feed to contain only the latest 5 stable versions of a package, and only the latest 2 pre-release versions.

sleet retention settings --stable 5 --prerelease 2

Run the prune command to apply the new feed settings.

sleet retention prune

Alternatively the prune command can be used directly without feed settings.

sleet retention prune --stable 5 --prerelease 2

Or with package ids to prune only select packages

sleet retention prune --package a --package b --stable 2 --prerelease 1

Disable automatic package pruning with --disable

sleet retention settings --disable

Retain packages by release labels

Sleet supports advanced pruning on prerelease packages using semantic version release labels.

Example feed packages:

1.0.0-beta.branch.a.build.100
1.0.0-beta.branch.a.build.101
1.0.0-beta.branch.a.build.102
1.0.0-beta.branch.a.build.103
1.0.0-beta.branch.z.build.205
1.0.0-beta.branch.z.build.206
1.0.0-beta.branch.z.build.207
1.0.0-rc.branch.a.build.308

To prune packages based on the first 3 release labels run:

sleet retention prune --stable 3 --prerelease 1 --release-labels 3

Or apply the setting to the feed for future pushes with:

sleet retention settings --stable 3 --prerelease 1 --release-labels 3

Packages will be put into unique groups by VERSION-FIRST.SECOND.THIRD.* with only the highest 1 prerelease packages remaining.

After the prune the packages left are:

1.0.0-beta.branch.a.build.103
1.0.0-beta.branch.z.build.207
1.0.0-rc.branch.a.build.308

The major, minor, and patch part of the version are used for ordering versions but are not used for determining unique groups. All prerelease packages with beta.branch.a will be grouped together and only the highest version will be left.

Properties and settings

All feed related commands allow passing --property to specify properties on the command line. These properties can be used to override env vars or populate tokens in sleet.json.

For more information see client settings