If you're looking for the latest stable version of the sprocket command line
tool, you can download it through a package manager,
download it from the release page, use Docker, or build
it from source.
Sprocket is available through the Homebrew package manager on both MacOS and Linux. After installing Homebrew, you can install Sprocket with the following command.
brew install sprocketA pre-built binary for sprocket can be downloaded from the latest release
entry on GitHub. Each
platform has different requirements regarding shared libraries that are expected
to be installed.
Every released version of sprocket is available through the GitHub Container
Registry.
docker run ghcr.io/stjude-rust-labs/sprocket:v0.21.1 -hThere are also a number of options to build sprocket from source, including
pulling in the released source from crates.io or downloading the
source directly from GitHub.
All methods for building sprocket from source require Rust and cargo to be
installed. We recommend using rustup to accomplish this.
You can use cargo to install the latest version of sprocket from
crates.io.
cargo install sprocketIf desired, you can also check out a specific version of sprocket.
cargo install sprocket@0.21.1Both the source code and the instructions to build the sprocket command line
tool are available on GitHub at stjude-rust-labs/sprocket.
- The releases page contains all of the official releases for the project.
- If desired, you can install either the latest unpublished version (the code
available on
main) or any experimental features by checking out the associated feature branch (git checkout <branch-name>).
The simplest way is just to clone the repository and build the main branch,
which is expected to always contained a compilable and correct (though, perhaps
unreleased) version of Sprocket.
git clone git@github.com:stjude-rust-labs/sprocket.git
cd sprocket
cargo run --releasesprocket can generate command-line completion scripts for various shells,
allowing you to use tab completion for commands and arguments.
::: warning Warning
The sprocket command line tool is currently under active development and is not yet
considered stable. This means commands, flags, or arguments might change between
versions. You will need to regenerate the shell completion script using the
steps below each time you update sprocket.
:::
To generate a completion script, use the completions subcommand, specifying your shell:
::: code-group
sprocket completions <SHELL>:::
Supported shells are: bash, elvish, fish, powershell and zsh.
The exact steps to correctly enable shell completions depend on your specific shell and how it's configured. Generally it involves two main steps:
- Run the
sprocket completions <your shell>command and redirect its standard output into a file, often somewhere in your home directory. For example, a Bash user might run:
::: code-group
sprocket completions bash > ~/.bash_completions/sprocket.bash:::
- Modify you shell's startup configuration file (e.g.
~/.bashrc,~/.zshrc,~/.config/fish/config.fish, PowerShell's$PROFILE, Elvish's~/.config/elvish/rc.elv) to source the file you just created. Continuing the Bash example, add this line to your~/.bashrc
::: code-group
source ~/.bash_completions/sprocket.bash:::