Giter Club home page Giter Club logo

crenv's Introduction

crenv Build Status

Crystal version manager. crenv is inspired by rbenv.

English | 日本語

Getting started

Install crenv by anyenv (recommended)

It's very easy for you to install crenv, if you use anyenv.

First, you should install anyenv.

Next, you try to execute following commands:

$ anyenv install crenv
$ exec $SHELL -l
$ crenv -v
crenv 1.0.0

Install crenv by install script

You try to execute following commands:

$ curl -L https://raw.github.com/pine/crenv/master/install.sh | bash

or

$ wget -qO- https://raw.github.com/pine/crenv/master/install.sh | bash

And, please add your shell profile:

$ echo 'export PATH="$HOME/.crenv/bin:$PATH"' >> ~/.your_profile
$ echo 'eval "$(crenv init -)"' >> ~/.your_profile
$ exec $SHELL -l
$ crenv -v
crenv 1.0.0

Install Crystal by crenv

If you installed crenv, you may installed Crystal as following.

$ crenv install 0.19.0 # install Crystal
$ crenv global 0.19.0 # set global Crystal version
$ crenv rehash

$ crystal --version
Crystal 0.19.0 (2016-09-02)

$ shards --version
Shards 0.6.3 (2016-09-02)

Usage

Please see help.

$ crenv help
Usage: crenv <command> [<args>]

Some useful crenv commands are:
   commands    List all available crenv commands
   local       Set or show the local application-specific Crystal version
   global      Set or show the global Crystal version
   shell       Set or show the shell-specific Crystal version
   rehash      Rehash crenv shims (run this after installing executables)
   version     Show the current Crystal version and its origin
   versions    List all Crystal versions available to crenv
   which       Display the full path to an executable
   whence      List all Crystal versions that contain the given executable

See `crenv help <command>' for information on a specific command.
For full documentation, see: https://github.com/pine613/crenv#readme

You might want to see rbenv#command-reference if you been looking for command reference.

Installing Crystal Versions

The crenv install command doesn't ship with crenv out of the box, but is provided by the crystal-build project.

# list all available versions:
$ crenv install -l

# install a Crystal version:
$ crenv install 0.19.0

# set global Crystal version:
$ crenv global 0.19.0

Updateing crenv

Please execute following commands to update crenv.

$ cd ~/.crenv # or ~/.anyenv/envs/crenv
$ git pull origin master
$ cd plugins/crystal-build
$ git pull origin master

Development

The crenv source code is hosted on GitHub. It's clean, modular, and easy to understand, even if you're not a shell hacker.

Tests are executed using Bats:

$ bats test
$ bats test/<file>.bats

Contributing

  1. Fork it ( https://github.com/pine/crenv/fork )
  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

Acknowledgement

See also

License

(The MIT license)

Copyright (c) 2015-2016 Pine Mizune

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Author

Pine Mizune <[email protected]>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.