Skip to content
Managing shards made easier.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Sharn (0.2.0) Donate using Liberapay

A CLI app built on Crystal that makes managing shards easier.

No more writing to shards.yml by hand. In just a command, Sharn will handle everything for you.

This is also my own version of the solution for crystal-lang/shards#144 that is currently been discussed at the crystal-lang/shards repo.

Note: This is not a replacement for Shards. It will still be used in installing your dependencies.


  1. Clone this repo.
  2. Build it by running
  3. Run it.


  1. Add dependency/dependencies.
sharn add git/reponame

1.1 (new) Add development dependencies with dev-add

sharn dev-add git/reponame
  1. Remove dependency/dependencies
sharn rm depname1 depname2
  1. Specify version.
sharn add git/repo@0.1.0
  1. Specify git platform
sharn add [gitlab/github/bitbucket]:git/repo

Tip: By default, when none is specified, Sharn will automatically identifies it as a GitHub repo.

  1. Specify branch.
sharn add git/repo#master

Development Roadmap

  • Primary commands (add, remove, inspect, install)
    • add command
    • remove command
    • inspect command
    • install command
    • update command
  • dev-add command (new!)
  • execute shards install in post-installation
  • YAML manipulation
  • Installing dev dependencies with --dev flag(*) (Replaced with dev-add command)
  • Specify git plaform
  • Specify branch (with --branch option)
  • Specify version
  • Just version number
    • ~>, =>, <=, >, <


  1. You may have noticed that your shard.yml file has been changed with newlines/whitespaces removed. This is because the way YAML module in Crystal builds the markup but don't worry this is still valid YAML and it has no difference when installing dependencies compared with newlines/whitespaces.

2. Dependencies added using the --dev flag are now working but not added in the correct order as per shard.yml specification. (Solved in


  1. Fork it ( )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request


  • nedpals Ned Palacios - creator, maintainer
You can’t perform that action at this time.