{"id":15713659,"url":"https://github.com/i3oris/ic","last_synced_at":"2025-08-13T18:34:16.123Z","repository":{"id":37377141,"uuid":"351955891","full_name":"I3oris/ic","owner":"I3oris","description":"REPL Interface wrapping Crystal Interpreter (crystal-i).","archived":false,"fork":false,"pushed_at":"2025-01-07T21:35:42.000Z","size":4838,"stargazers_count":49,"open_issues_count":4,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-08T12:47:12.943Z","etag":null,"topics":["crystal","crystal-interpreter","crystal-lang","crystal-shard","interpreter","repl"],"latest_commit_sha":null,"homepage":"","language":"Crystal","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/I3oris.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-27T01:39:22.000Z","updated_at":"2025-02-16T23:56:30.000Z","dependencies_parsed_at":"2024-08-04T22:04:38.423Z","dependency_job_id":"902a76bf-e45b-4c2e-bd97-281f133e60db","html_url":"https://github.com/I3oris/ic","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/I3oris/ic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/I3oris%2Fic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/I3oris%2Fic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/I3oris%2Fic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/I3oris%2Fic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/I3oris","download_url":"https://codeload.github.com/I3oris/ic/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/I3oris%2Fic/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270288719,"owners_count":24558844,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-13T02:00:09.904Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["crystal","crystal-interpreter","crystal-lang","crystal-shard","interpreter","repl"],"created_at":"2024-10-03T21:32:45.875Z","updated_at":"2025-08-13T18:34:16.070Z","avatar_url":"https://github.com/I3oris.png","language":"Crystal","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IC\n\nIC, for **Interactive Crystal**, is an [REPL](https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop) interface for [Crystal Interpreter](https://crystal-lang.org/2021/12/29/crystal-i.html).\n\nIt allows to quickly try and test some crystal code, or debug your code thanks to crystal `pry`.\n\n![](./hello_ic.gif)\n\n## Features\n\n* [Crystal](https://crystal-lang.org) Interpretation (Indeed!)\n* Syntax highlighting\n* Multiline input\n* Auto formatting\n* Auto indentation\n* Auto completion (Experimental)\n* Code documentation\n* History\n* Pasting of large expressions\n* Debugger\n\n## Warning\n\nThe Crystal interpreter is experimental and not yet released, some issue can still occur while interpreting.\n\n## Installation\n\n### Dependencies\n\nYou need to install the same dependencies as the crystal compiler, follow the instructions [here](https://github.com/crystal-lang/crystal/wiki/All-required-libraries). If you have already installed crystal from source, you can skip this step.\n\n### Build\n\n```sh\ngit clone https://github.com/I3oris/ic.git\ncd ic\n\nmake\n# =\u003e bin/ic\n```\n\n### Optimized Build\n```sh\nmake release\n```\n\u003e This is a bit long, and require at least 4.5 GB of available RAM.\n\n### Install\n\nInstall IC at `/usr/local/`\n```\nsudo make install\n```\n\n### As a Shard\n\nAdd this to your `shard.yml` file:\n\n```yaml\ndevelopment_dependencies:\n  ic:\n    github: I3oris/ic\n```\n\nAnd run `shards install`\n\n## Usage\n\n### Interactive mode\n```sh\nic\n```\n\n### Run file with arguments\n```cr\n# say_hello.cr\n\nname = ARGV[0]?\nputs \"Hello #{name}!\"\n```\n\n```sh\nic say_hello.cr World\n```\n\n### Debugger (pry)\n\nOn a file use the macro `debugger`:\n```cr\n# say_hello.cr\n\ndebugger # \u003c= will start the debugger at this point\nname = ARGV[0]?\nputs \"Hello #{name}!\"\n```\nThen, just run IC: `ic say_hello.cr World`.\n\nYou will see the current position on your code:\n```cr\n    1: # say_hello.cr\n    2:\n    3: debugger # \u003c= will start the debugger at this point\n =\u003e 4: name = ARGV[0]?\n    5: puts \"Hello #{name}!\"\n    6:\n```\nOn the `pry` prompt you can type:\n* `next`    : To jump to the next instruction (without entering into functions).\n* `step`    : To jump to the next instruction (entering into functions if possible).\n* `finish`  : To jump out of the current function.\n* `whereami`: To re-display where the execution is.\n* Other     : To interpret code while debugging (e.g. the name of a variable).\n\n### Hotkeys\n* `alt-enter` (`ctrl-enter` on Windows): Insert a new line character instead of submit edition.\n* `ctrl-c`: Keyboard Interruption.\n* `ctrl-d`: Delete char or exit (EOF).\n* `ctrl-a`/`home`: Move cursor to begin.\n* `ctrl-e`/`end`: Move cursor to end.\n* `ctrl-k`: Delete after cursor.\n* `ctrl-u`: Delete before cursor.\n* `alt-backspace`/`ctrl-backspace`: Delete word after\n* `alt-d`/`ctrl-delete`: Delete word before.\n* `alt-f`/`ctrl-right`: Move word forward.\n* `alt-b`/`ctrl-left`: Move word backward.\n* `ctrl-up`/`down`: On long multiline input: scroll up/down the view.\n* `ctrl-n`/`ctrl-p`: Move cursor up/down.\n* `ctrl-b`/`ctrl-f`: Move cursor backward/forward.\n\nOnly on debugger (pry):\n* `ctrl-up`: `whereami`\n* `ctrl-down`: `next`\n* `ctrl-left`: `finish`\n* `ctrl-right`: `step`\n\n### History\n\nHistory is saved in `\u003chome\u003e/.ic_history` and is limited to 10_000 entries. It can be changed with environment variables `IC_HISTORY_FILE` and `IC_HISTORY_SIZE`. Use `IC_HISTORY_FILE=\"\"` to disable saving history in a file.\n\n### Commands\nYou can type the following commands:\n* `# clear_history`: Clear history.\n* `# reset`: Reset the interpreter (clean all definitions, variables, constants, ...)\n\n## Contributing:\n\n1. Fork it (\u003chttps://github.com/I3oris/ic/fork\u003e)\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n## Contributors\n\n- [I3oris](https://github.com/I3oris) - creator and maintainer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fi3oris%2Fic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fi3oris%2Fic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fi3oris%2Fic/lists"}