icr
Version, currently 0.9.025 versions
- 0.9.0latestSep 26, 2021
- 0.8.0not indexedSep 26, 2021
- 0.7.0not indexedSep 26, 2021
- 0.6.0not indexedSep 26, 2021
- 0.5.0not indexedSep 26, 2021
- 0.4.0not indexedSep 26, 2021
- 0.3.0not indexedSep 26, 2021
- 0.2.14not indexedSep 26, 2021
- 0.2.13not indexedSep 26, 2021
- 0.2.12not indexedSep 26, 2021
- 0.2.11not indexedSep 26, 2021
- 0.2.10not indexedSep 26, 2021
- 0.2.9not indexedSep 26, 2021
- 0.2.8not indexedSep 26, 2021
- 0.2.7not indexedSep 26, 2021
- 0.2.6not indexedSep 26, 2021
- 0.2.5not indexedSep 26, 2021
- 0.2.4not indexedSep 26, 2021
- 0.2.3not indexedSep 26, 2021
- 0.2.2not indexedSep 26, 2021
- 0.2.1not indexedSep 26, 2021
- 0.2.0not indexedSep 26, 2021
- 0.1.2not indexedSep 26, 2021
- 0.1.1not indexedSep 26, 2021
- 0.1.0not indexedSep 26, 2021
github.com/crystal-community/icr
Interactive console for Crystal programming language
Installation
# Add this to your shard.yml
dependencies:
icr:
github: crystal-community/icr
version: ~> 0.9.0Then run:
shards installshard.yml
- Crystal
>= 0.33.0- License
- MIT
- Author
- Potapov Sergey
- Target
icrfrom src/icr/cli.cr
Dependencies
Runtime Dependencies
- readline*github: crystal-lang/crystal-readline, branch: master
README
ICR - Interactive Crystal 
Interactive console for Crystal Programming Language.
- Usage
- Installation
- How does it work?
- Commands and special locals
- Update check
- Development
- Editor Integration
- Contributors
Usage
It's like irb, but for Crystal:

Require local files
You can require local files by relative path (starts with ./):
require "./src/my_cool_lib"
Libs can also be required from the cli:
$ icr -r colorize -r ./src/my_cool_lib
Installation
Prerequisites:
- The latest version of crystal.
- Readline (for Debian/Ubuntu install
libreadline6-devpackage). - LLVM development files.
Clone the repo:
git clone https://github.com/crystal-community/icr.git
Switch to repo-directory:
cd icr
Build:
make
Install:
sudo make install
As a shard dependency
If you would like to include icr as a dependency, you can add it to your shard.yml
dependencies:
icr:
github: crystal-community/icr
branch: master
Then just run shards install from your project!
Enjoy!
Arch Linux
Arch Linux users can install ICR from AUR.
How does it work?
- Every time you press
Enterit adds a new instruction, generates a new crystal program, and executes it. - The output is split into 2 parts: regular program output (e.g. output from
puts 10) and the value returned by the last command. - The regular output is saved, and when you type a new instruction, a new program is generated. The saved output is subtracted from the new output, and the difference is printed out. It creates an illusion that only new instructions are executed :)
Commands and special locals
paste- enables paste modedebug- toggles debug mode off and on. In debug mode icr will print the code before executing itquitorexit- exits current interactive consolereset- clears out all of the accumulated commands__- holds the result of the last expression. Example:
icr > "5" + "2"
=> "52"
icr > __.to_i - 10
=> 42
Update check
ICR periodically checks for the new releases on Github. If your current version is out of date, it will simply show you a notice at start.
You can disable this behavior using --disable-update-check CLI flag.
Development
To run tests:
make test
Editor integration
- inf-crystal.el - Connects REPL buffer to the ICR subprocess in Emacs
Contributors
- greyblake Potapov Sergey - creator, maintainer
- BlaXpirit Oleh Prypin - fixes for Crystal 0.16
- puppetpies Brian Hood - support of records
- jwoertink Jeremy Woertink - support of -r option and number of other contributions
- veelenga V. Elenhaupt - maintenance
- MakeNowJust TSUYUSATO Kitsune - syntax highlight support
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.9.0- Tagged
- Sep 26, 2021
- Commit
f62bfcdfbe65- Crystal
>= 0.33.0- Indexed
- yes
Dependents
- cnti_testsuite
- life
- guest_control
- vesta
- cnf_conformance
- snykout
- snykctl
- Fenneco
- icrystal
- ccl-pow
- proxy_fetcher
- gitlab-webhooks
and 3 more
Repository
github.com/crystal-community/icr
Metadata
- Created
- Aug 12, 2026
- Updated
- Sep 23, 2026
- Synced
- Sep 23, 2026
- Versions
- 25