Dependency manager for the Crystal language.
Crystal applications and libraries are expected to have a
at their root looking like this:
name: shards version: 0.1.0 dependencies: openssl: github: datanoise/openssl.cr branch: master development_dependencies: minitest: git: https://github.com/ysbaddaden/minitest.cr.git version: ~> 0.3.1 license: MIT
When libraries are installed from Git repositories, the repository is expected
to have version tags following a semver-like format,
prefixed with a
Please see the SPEC
for more details about the
Shards is usually distributed with Crystal itself (e.g. Homebrew and Debian
packages). Alternatively, a
shards package may be available for your system.
You can download a source tarball from the same page (or clone the repository)
make CRFLAGS=--releaseand copy
bin/shards into your
You are now ready to create a
shard.yml for your projects (see details in
SPEC). You can type
shards init to have an example
shard.yml file created for your project.
shards install to install your dependencies, which will lock your
dependencies into a
shard.lock file. You should check both
shard.lock into version control, so further
shards install will always
install locked versions, achieving reproducible installations across computers.
shards --help to list other commands with their options.
These requirements are only for compiling Shards.
Please refer to http://crystal-lang.org/docs/installation for instructions for your operating system.
On Debian/Ubuntu Linux you may install the
On Mac OS X you may install it using homebrew with
brew install libyaml
then make sure to have
/usr/local/lib in your
Please adjust the path per your Homebrew installation.
Licensed under the Apache License, Version 2.0. See LICENSE for details.
tag: v1.0.0is converted to
--localargument to use the cache as-is, allowing to skip git fetches when you know the cache is up-to-date;
shard.ymlspec is now required in libraries.
~> 0.1.0wrongly matched
220.127.116.11are now correctly ordered and compared as
18.104.22.168 > 1.0.0.
install -tisn't supported on macOS.
~/.cache/shards). Customizable with
shard.ymlhas no dependencies, see #145
targetsentry in SPEC
crystalentry in SPEC
librariesentry in SPEC
postinstallscripts are now executed from the root of the dependency, not the
tarcommand usage on OpenBSD
shard.ymlwhen installing legacy dependencies, see #60
.shardsfolders when required, see #61
--no-colorto match crystal
--productionparameter to skip development dependencies
development_dependencies), see #27
shard.ymlfrom Git tags and
Projectfiledependencies, see #6
srcfolder as the
libs/<name>folder for both Git and path resolvers.