cry
Version, currently 1.2.17 versions
github.com/elorest/cry
Ability to execute crystal code in a fashion similar to pry edit.
34 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
cry:
github: elorest/cry
version: ~> 1.2.1Then run:
shards installshard.yml
- Crystal
>= 1.0, < 2.0- License
- MIT
- Author
- Isaac Sloan
- Target
cryfrom src/cry.cr
Dependencies
Runtime Dependencies
- cli~> 0.11.4github: amberframework/cli
README
CRY
Evaluate crystal code from files and command lines similar to edit in ruby pry.
Installation
Source
curl -L https://github.com/elorest/cry/archive/master.tar.gz | tar xz
cd cry-master/
make install
OSX Homebrew
brew install elorest/crystal/cry
Usage
- inline mode: inline code specified in the command line as a string argument
cry Time.now
- editor mode: a terminal-based code editor is opened and the resulting code is executed once you save and exit
cry... edit code in Vim... code runs.
- file mode: code within an existing .cr file is copied to a tmp file for editing and run once editor is closed.
cry scripts/stuff.cr
- back: open and previous run in editor mode.
cry -b 1... copies previous run to tmp file for editing and runs when editor is closed.
- loop: continuously edit and execute code.
cry -r -b 1... copies previous run to tmp file for editing and runs when editor is closed in a loop.
- log: show a log of all previous runs.
cry --log
Here is a list of the commands available:
command [OPTIONS] [CODE]
Arguments:
CODE Crystal code or .cr file to execute within the application scope
(default: )
Options:
-b, --back Runs prevous command files: 'amber exec -b [times_ago]'
(default: 0)
-e, --editor Prefered editor: [vim, nano, pico, etc], only used when no code or .cr file is specified
(default: vim)
-l, --log Prints results of previous run
-r, --repeat Runs editor in a loop (can be combined with -b 1)
Contributing
- Fork it ( https://github.com/elorest/cry/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- elorest Isaac Sloan - creator, maintainer
- lady-elorest Shauna Sloan - documentation
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
1.2.1- Tagged
- Oct 30, 2021
- Commit
0cefb75d9605- Crystal
>= 1.0, < 2.0- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/elorest/cry
Metadata
- Created
- Aug 12, 2026
- Updated
- Oct 9, 2026
- Synced
- Oct 9, 2026
- Versions
- 7