LinuxCommandLibrary

shards

Crystal language dependency manager

TLDR

Install dependencies

$ shards install
copy
Update dependencies
$ shards update
copy
Add dependency
$ shards add [package-name]
copy
List installed shards
$ shards list
copy
Build project
$ shards build
copy
Check outdated shards
$ shards outdated
copy
Initialize new project
$ shards init
copy
Lock dependencies
$ shards lock
copy

SYNOPSIS

shards command [options] [args]

DESCRIPTION

shards is the official dependency manager for the Crystal programming language, similar to Bundler for Ruby or npm for JavaScript. It reads project dependencies from a shard.yml file that defines package metadata, version constraints, and development dependencies.
Dependencies are resolved from Git repositories, with GitHub being the most common source. The shard.lock file pins exact versions to ensure reproducible builds across environments. The build command compiles Crystal projects and places executables in the bin/ directory, while install and update manage the dependency lifecycle.

PARAMETERS

install

Install dependencies.
update
Update dependencies.
add NAME
Add dependency.
list
Show installed.
build
Build project.
outdated
Check for updates.
init
Create shard.yml.
lock
Generate lock file.
--without-development
Skip dev dependencies.

CONFIGURATION

shard.yml

Project-level configuration file defining name, version, dependencies, and development dependencies.
shard.lock
Lock file pinning exact dependency versions for reproducible builds.

CAVEATS

Crystal ecosystem smaller than Ruby. Some dependencies may be unmaintained. Binary compatibility can break.

HISTORY

shards is the official dependency manager for Crystal, the Ruby-like compiled language. It follows conventions familiar to Ruby developers.

SEE ALSO

crystal(1), bundler(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community