{"id":34234201,"url":"https://github.com/atgreen/icl","last_synced_at":"2026-02-21T15:19:35.085Z","repository":{"id":329495524,"uuid":"1115688980","full_name":"atgreen/icl","owner":"atgreen","description":"Interactive Common Lisp: an enhanced REPL","archived":false,"fork":false,"pushed_at":"2026-02-07T00:41:48.000Z","size":17156,"stargazers_count":139,"open_issues_count":4,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2026-02-07T12:10:17.423Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Common Lisp","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/atgreen.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-12-13T10:56:48.000Z","updated_at":"2026-02-07T00:41:50.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/atgreen/icl","commit_stats":null,"previous_names":["atgreen/icl"],"tags_count":59,"template":false,"template_full_name":null,"purl":"pkg:github/atgreen/icl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atgreen%2Ficl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atgreen%2Ficl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atgreen%2Ficl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atgreen%2Ficl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atgreen","download_url":"https://codeload.github.com/atgreen/icl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atgreen%2Ficl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29604232,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T04:38:07.383Z","status":"ssl_error","status_checked_at":"2026-02-19T04:35:50.016Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2025-12-16T02:00:36.644Z","updated_at":"2026-02-19T05:05:53.635Z","avatar_url":"https://github.com/atgreen.png","language":"Common Lisp","readme":"# ICL - Interactive Common Lisp\n\n[![CI](https://github.com/atgreen/icl/actions/workflows/ci.yaml/badge.svg)](https://github.com/atgreen/icl/actions/workflows/ci.yaml)\n[![Release](https://img.shields.io/github/v/release/atgreen/icl)](https://github.com/atgreen/icl/releases/latest)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![Platform](https://img.shields.io/badge/platform-Linux%20%7C%20macOS%20%7C%20Windows-lightgrey)](https://github.com/atgreen/icl/releases)\n\nICL is an enhanced REPL for Common Lisp. It provides a modern interactive experience with readline-style editing, persistent history, tab completion, and an extensible command system. ICL works in your terminal, in a web browser with package browsing and data visualization, or integrated with Emacs via SLY/SLIME.\n\n## Terminal REPL\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/terminal-demo.gif\" alt=\"ICL Terminal Demo\"\u003e\n\u003c/p\u003e\n\n*Syntax highlighting, paren matching, tab completion, paredit mode, and interactive inspector*\n\n## Browser REPL\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/browser-demo.gif\" alt=\"ICL Browser Demo\"\u003e\n\u003c/p\u003e\n\n*Package browser, symbol inspector, data visualization, and class hierarchy graphs*\n\n## Flame Graph Profiling\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/flamegraph-demo.png\" alt=\"ICL Flame Graph Demo\"\u003e\n\u003c/p\u003e\n\n*Interactive Speedscope flame graphs for performance profiling (SBCL only)*\n\nProfile any expression with `,flame` and explore the results in an interactive [Speedscope](https://www.speedscope.app/) visualization. Switch between Time Order, Left Heavy, and Sandwich views to identify performance bottlenecks.\n\n## Emacs Integration\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/emacs-demo.gif\" alt=\"ICL Emacs Demo\"\u003e\n\u003c/p\u003e\n\n*Synchronized browser visualization with SLY/SLIME - updates on C-x C-e, C-c C-c, and REPL input*\n\n## Features\n\n- **Syntax highlighting** - Colorized input with distinct colors for keywords, strings, comments, numbers, and symbols\n- **Parenthesis matching** - Real-time highlighting of matching parentheses as you type\n- **Paredit mode** - Structural editing with auto-close parens, safe deletion, and sexp navigation\n- **Multi-line input** - Automatically detects incomplete expressions with smart indentation\n- **Persistent history** - Command history saved across sessions\n- **Tab completion** - Complete symbols, package-qualified names, and keywords\n- **Command system** - Built-in commands prefixed with comma (e.g., `,help`)\n- **Multiple Lisp support** - Works with SBCL, CCL, ECL, CLISP, ABCL, Clasp, and Roswell\n- **Error backtraces** - Automatic backtrace capture with `,bt` command to view stack traces\n- **Thread inspection** - List and inspect threads in the inferior Lisp\n- **Documentation lookup** - Quick access to function docs and apropos search\n- **Interactive object inspector** - TUI for exploring objects with keyboard navigation\n- **Tracing** - Enable/disable function tracing\n- **Source location** - Find where functions are defined\n- **Terminal-aware colors** - Automatically detects light/dark terminal background\n- **AI integration** - Use `,explain` to get AI-powered explanations of code, errors, and results\n- **Browser interface** - Web UI with package browser, symbol list, inspector, and xterm.js terminal\n- **Data visualization** - Visualize hash tables, classes, sets, SVG, HTML, JSON, Vega-Lite charts, Mermaid diagrams, regex railroad diagrams, and function disassembly\n- **Custom visualizations** - Define `icl-runtime:visualize` methods for your own classes\n- **Flame graph profiling** - Interactive Speedscope visualizations for performance analysis (SBCL)\n- **Code coverage** - HTML coverage reports via sb-cover (SBCL)\n- **Emacs integration** - Works with SLY/SLIME for synchronized browser visualization\n\n## Installation\n\n### Pre-built Binaries\n\nDownload from [GitHub Releases](https://github.com/atgreen/icl/releases):\n\n| Platform | Formats |\n|----------|---------|\n| Linux | RPM, DEB |\n| Windows | ZIP, EXE installer, MSI installer |\n\n[Roswell](https://roswell.github.io/) users can also install with `ros install atgreen/icl`.\n\n### Building from Source\n\n```sh\ngit clone https://github.com/atgreen/icl.git\ncd icl\nocicl install\nmake\n```\n\nRequires SBCL, [ocicl](https://github.com/ocicl/ocicl), and libfixposix-devel.\n\n## Usage\n\nStart ICL (auto-detects available Lisp):\n```sh\nicl\n```\n\nSpecify a Lisp implementation:\n```sh\nicl --lisp ccl\nicl --lisp ecl\nicl --lisp roswell  # Use Roswell's managed environment\n```\n\nEvaluate an expression and exit:\n```sh\nicl -e '(+ 1 2 3)'\n```\n\nLoad a file before starting the REPL:\n```sh\nicl -l init.lisp\n```\n\nConnect to an existing Slynk server:\n```sh\nicl --connect localhost:4005\n```\n\nSkip loading config file:\n```sh\nicl --no-config\n```\n\nStart with browser interface (opens IDE alongside terminal REPL):\n```sh\nicl -b\n```\n\n## Emacs Integration\n\nICL ships an Emacs helper for SLY or SLIME that launches the browser REPL and\nsyncs visualizations with evals.\n\nMinimal setup (adjust the path for your install):\n```elisp\n(add-to-list 'load-path \"/path/to/icl/emacs\")\n(require 'icl)\n```\n\nCommands:\n- `M-x icl` — start ICL browser connected to the current SLY/SLIME session\n- `M-x icl-stop` — stop the ICL process\n- `M-x icl-restart` — restart ICL\n\nIf you have both SLY and SLIME installed, ICL prefers SLY by default.\nYou can override this:\n```elisp\n(setq icl-backend 'slime)  ;; or 'sly or 'auto\n```\n\nIf you install the package via RPM/DEB/Windows installer, the Emacs\nfiles are placed in a standard site-lisp directory and you can just\n`(require 'icl)`.\n\n### Packaging Notes (RPM/DEB/Windows)\n\nSuggested install locations for Emacs files:\n- RPM: `%{_datadir}/emacs/site-lisp/icl/icl.el` and `icl-autoloads.el`\n- DEB: `/usr/share/emacs/site-lisp/icl/icl.el` and `icl-autoloads.el`\n- Windows: `\u003cINSTALL\u003e/share/emacs/site-lisp/icl/icl.el` and `icl-autoloads.el`\n\nFor packaging, include `icl-autoloads.el` and add the site-lisp path to\nEmacs’ `load-path` (via site-start.d or the installer), then users can:\n```elisp\n(require 'icl)\n```\n\n## Commands\n\nCommands are prefixed with a comma. Type `,help` for a full list.\n\n### Navigation\n\n| Command | Description |\n|---------|-------------|\n| `,cd \u003cpackage\u003e` | Change current package |\n| `,pwd` | Show current package |\n| `,ls [filter]` | List symbols (filters: functions, macros, variables, classes) |\n\n### Documentation\n\n| Command | Description |\n|---------|-------------|\n| `,doc \u003csymbol\u003e` | Show documentation |\n| `,describe \u003csymbol\u003e` | Full description of symbol |\n| `,apropos \u003cpattern\u003e` | Search for matching symbols |\n| `,arglist \u003cfunction\u003e` | Show function arguments |\n| `,source \u003csymbol\u003e` | View source in Monaco editor panel |\n| `,edit \u003csymbol\u003e` | Open source in `$EDITOR` (alias: `,ed`) |\n\n### Cross-Reference (Xref)\n\n| Command | Description |\n|---------|-------------|\n| `,callers \u003csymbol\u003e` | Show functions that call symbol (alias: `,xc`) |\n| `,callees \u003csymbol\u003e` | Show functions called by symbol (alias: `,xe`) |\n| `,references \u003csymbol\u003e` | Show code that references variable (alias: `,xr`) |\n\n### Inspection\n\n| Command | Description |\n|---------|-------------|\n| `,inspect \u003cexpr\u003e` | Interactive object inspector (alias: `,i`) |\n| `,i` | Inspect last result (`*`) |\n| `,inspect-static \u003cexpr\u003e` | Non-interactive inspection output |\n| `,slots \u003cexpr\u003e` | Show slots of a class instance |\n\nThe interactive inspector (`,i` or `,inspect`) provides a TUI for exploring objects:\n\n| Key | Action |\n|-----|--------|\n| `↑`/`↓` or `j`/`k` | Navigate entries |\n| `Enter` | Drill into selected entry |\n| `b` or `Backspace` | Go back to parent object |\n| `q` or `Escape` | Quit inspector |\n\n### Macros\n\n| Command | Description |\n|---------|-------------|\n| `,macroexpand \u003cform\u003e` | Expand macro once |\n| `,macroexpand-all \u003cform\u003e` | Fully expand all macros |\n\n### Development\n\n| Command | Description |\n|---------|-------------|\n| `,load-system \u003cname\u003e` | Load system via ocicl/Quicklisp/ASDF (alias: `,ql`) |\n| `,libyear` | Show dependency freshness metric (requires ocicl) |\n| `,changes [system]` | Show LLM-generated changelogs (requires ocicl) |\n| `,time \u003cform\u003e` | Time expression evaluation |\n| `,load \u003cfile\u003e` | Load a Lisp file |\n| `,compile-file \u003cfile\u003e` | Compile a file |\n| `,disassemble \u003cfn\u003e` | Disassemble a function |\n\n### Debugging\n\n| Command | Description |\n|---------|-------------|\n| `,bt` | Show backtrace from last error |\n| `,step \u003cform\u003e` | Show traced function calls during evaluation |\n| `,threads` | List all threads in inferior Lisp |\n| `,trace \u003cfunction\u003e` | Enable tracing |\n| `,untrace \u003cfunction\u003e` | Disable tracing |\n| `,untrace-all` | Disable all tracing |\n\n### Profiling (SBCL only)\n\n| Command | Description |\n|---------|-------------|\n| `,profile \u003cform\u003e` | Profile a form with the statistical profiler |\n| `,profile-start` | Start ongoing profiling |\n| `,profile-stop` | Stop profiling and show results |\n| `,profile-reset` | Reset profiler data |\n| `,flame \u003cform\u003e` | Profile and show interactive flame graph in browser |\n| `,cover-ql \u003csystem\u003e` | Load system with code coverage instrumentation |\n| `,cover-load \u003cpath\u003e` | Load file with code coverage instrumentation |\n| `,cover-report` | Generate and display HTML coverage report |\n| `,cover-reset` | Clear all coverage data |\n\nThe `,flame` command (aliases: `,flamegraph`, `,fg`) profiles the expression and opens an interactive [Speedscope](https://www.speedscope.app/) flame graph in the browser. Requires browser mode (`,browser` or `icl -b`).\n\nThe `,cover-*` commands use SBCL's [sb-cover](https://www.sbcl.org/manual/#sb_002dcover) for code coverage analysis. Load code with `,cover-ql` or `,cover-load`, run your tests, then `,cover-report` to view coverage in a Monaco editor panel with expression-level highlighting:\n- **Green** - Executed code\n- **Red** - Not executed\n- **Yellow** - Partial branch coverage (only one branch taken)\n\nAliases: `,cql` for `,cover-ql`, `,cl` for `,cover-load`.\n\n### Source Viewer\n\nThe `,source` command opens a Monaco editor panel in the browser with:\n- **Common Lisp syntax highlighting** - Keywords, special variables, constants, and lambda list markers\n- **Hover documentation** - Hold mouse over any symbol to see its arglist and docstring\n- **Multiple definitions** - Dropdown selector when a symbol has multiple definitions (e.g., function and compiler-macro)\n- **Send to REPL** - Right-click → \"Send Top-Level Form to REPL\" or press Ctrl+Enter\n- **Search** - Right-click → \"Find...\" or Ctrl+F when editor has focus\n\nThe Symbol Info panel also includes a **[Source]** link next to [Inspect] for functions, providing quick access to source code.\n\n### Browser Visualization\n\n| Command | Description |\n|---------|-------------|\n| `,browser` | Start browser-based IDE interface |\n| `,viz \u003cexpr\u003e` | Visualize data in browser (class hierarchies, hash-tables, images, JSON, and more) |\n\nThe `,viz` command automatically detects the type and displays an appropriate visualization:\n- **Class names**: `'standard-object` → interactive class hierarchy graph with slots\n- **Hash-tables**: `*my-ht*` → key-value table\n- **FSet collections**: sets, maps, and bags with appropriate displays\n- **JSON strings**: `\"{\\\"key\\\": \\\"value\\\"}\"` → syntax-highlighted, pretty-printed JSON\n- **Image byte arrays**: PNG, JPEG, GIF, WebP data → displayed inline\n- **SVG strings**: `\"\u003csvg\u003e...\u003c/svg\u003e\"` → rendered SVG graphics\n- **HTML strings**: `\"\u003c!DOCTYPE html\u003e...\"` → rendered in sandboxed iframe\n- **Functions**: `#'mapcar` → disassembly output with theme-aware styling\n\n#### Venn Diagrams for FSet Sets\n\nVisualize one or more [FSet](https://github.com/slburson/fset) sets as Venn diagrams:\n\n```lisp\n,viz *fruits*                    ; Single set as circle with members\n,viz *fruits* *red-things*       ; Two-set Venn diagram showing overlap\n,viz *set-a* *set-b* *set-c*     ; Three-set Venn diagram\n```\n\n- **Single set**: Circle displaying members inside\n- **Two sets**: Classic Venn diagram with left-only, intersection, and right-only regions\n- **Three sets**: Triangle arrangement showing all 7 regions with counts\n\nVenn diagrams automatically refresh after each REPL evaluation to reflect data changes.\n\n#### Class Hierarchy Graph\n\nThe class hierarchy graph supports interactive exploration:\n- **Click a node** to see available subclasses and add them one at a time\n- **Hover over a node** to highlight all ancestor classes up to the root\n- **Drag to pan**, scroll to zoom the graph\n\n#### Images\n\nVisualize image data stored in byte arrays:\n\n```lisp\n;; Load an image file into a byte vector\n(defvar *img* (alexandria:read-file-into-byte-vector #P\"photo.png\"))\n,viz *img*\n```\n\nSupported formats (detected by magic bytes): PNG, JPEG, GIF, WebP.\n\n#### JSON and Code\n\nJSON strings are automatically pretty-printed with syntax highlighting:\n\n```lisp\n(defvar *data* \"{\\\"name\\\": \\\"Alice\\\", \\\"scores\\\": [95, 87, 92]}\")\n,viz *data*\n```\n\nAll visualization panels auto-refresh after REPL evaluations.\n\n#### Custom Visualizations\n\nDefine methods on `icl-runtime:visualize` to create custom visualizations for your own classes:\n\n```lisp\n;; Visualize a game board as HTML\n(defmethod icl-runtime:visualize ((obj my-game-state))\n  (list :html (render-board-html obj)))\n\n;; Visualize data as SVG chart\n(defmethod icl-runtime:visualize ((obj my-data-series))\n  (list :svg (generate-chart-svg obj)))\n\n;; Visualize config as JSON\n(defmethod icl-runtime:visualize ((obj my-config))\n  (list :json (serialize-to-json obj)))\n\n;; Visualize metrics as Vega-Lite bar chart\n(defmethod icl-runtime:visualize ((obj my-metrics))\n  (list :vega-lite\n        (format nil \"{\\\"$schema\\\":\\\"https://vega.github.io/schema/vega-lite/v6.json\\\",\n                      \\\"data\\\":{\\\"values\\\":~A},\n                      \\\"mark\\\":\\\"bar\\\",\n                      \\\"encoding\\\":{\\\"x\\\":{\\\"field\\\":\\\"name\\\",\\\"type\\\":\\\"nominal\\\"},\n                                    \\\"y\\\":{\\\"field\\\":\\\"value\\\",\\\"type\\\":\\\"quantitative\\\"}}}\"\n                (metrics-to-json obj))))\n```\n\nSupported visualization types:\n- `(:html string)` - Render HTML in sandboxed iframe\n- `(:svg string)` - Render SVG graphics\n- `(:json string)` - Syntax-highlighted JSON\n- `(:vega-lite spec-string)` - Render [Vega-Lite](https://vega.github.io/vega-lite/) chart\n- `(:mermaid definition-string)` - Render [Mermaid](https://mermaid.js.org/) diagram\n- `(:regexp pattern-string)` - Render regex railroad diagram via [Regulex](https://jex.im/regulex/)\n- `(:image-base64 mime-type base64-string)` - Image from base64 data\n\nReturn `NIL` from your method to fall back to ICL's built-in type detection.\n\nSee `examples/vega.lisp` for Vega-Lite, `examples/mermaid.lisp` for Mermaid diagrams, and `examples/regexp.lisp` for regex visualization.\n\n#### Library Integration\n\nLibraries can provide visualizations that work even when loaded before ICL connects (e.g., when attaching ICL to a running Lisp from Emacs). Define a `REGISTER-ICL-VIZ` function in your package:\n\n```lisp\n(in-package :my-library)\n\n(defun register-icl-viz ()\n  \"Called by ICL to register visualizations for this library.\"\n  (defmethod icl-runtime:visualize ((obj my-data-structure))\n    (list :mermaid (my-struct-to-mermaid obj)))\n  (defmethod icl-runtime:visualize ((obj my-config))\n    (list :json (config-to-json obj))))\n```\n\nICL automatically discovers and calls `REGISTER-ICL-VIZ` in all packages when `,viz` is invoked. The `icl-runtime` package is guaranteed to exist when your function is called. Each package is only processed once per session.\n\n#### Security\n\nCustom visualizations are protected with multiple layers of security:\n\n| Type | Security Measures |\n|------|-------------------|\n| **HTML** | Sanitized server-side (scripts and event handlers removed), rendered in sandboxed iframe |\n| **Mermaid** | Rendered in strict mode (click handlers and JavaScript disabled) |\n| **Vega-Lite** | Expression functions disabled, AST-based evaluation only |\n| **SVG** | Protected by CSP (inline scripts and event handlers blocked) |\n\nThe browser interface also enforces:\n- **Content Security Policy (CSP)** - Blocks inline scripts and restricts resource loading\n- **WebSocket origin validation** - Only accepts connections from localhost\n- **X-Frame-Options: DENY** - Prevents clickjacking\n\nThese protections ensure that loading untrusted Lisp libraries with custom `visualize` methods cannot execute arbitrary JavaScript in your browser.\n\nTo disable these restrictions (for trusted code that requires JavaScript in visualizations), use:\n```bash\nicl -b --unsafe-visualizations\n```\n\n### Configuration\n\n| Command | Description |\n|---------|-------------|\n| `,show-config` | Show config file location and customization options |\n| `,reload-config` | Reload config file |\n| `,paredit [on/off]` | Toggle paredit structural editing mode |\n\n### Session\n\n| Command | Description |\n|---------|-------------|\n| `,help` | Show all commands |\n| `,info` | Show session information |\n| `,history` | Show value history variables |\n| `,lisp [name]` | Show or switch Lisp backend |\n| `,clear` | Clear terminal |\n| `,quit` | Exit ICL |\n\n### AI Integration\n\n| Command | Description |\n|---------|-------------|\n| `,explain` | Explain last result or error using AI |\n| `,explain \u003ccode\u003e` | Explain specific code |\n| `,ai-cli [name]` | Show or set AI backend (gemini, claude, codex) |\n\nThe `,explain` command uses an AI CLI (auto-detected from PATH) to provide explanations of Lisp code, errors, and results. When using Gemini or Claude CLI, ICL provides an MCP server that gives the AI **read-only** access to the live Lisp environment - it can query documentation, describe symbols, and search for functions, but **cannot execute any code**.\n\nRequires one of: [Gemini CLI](https://github.com/google-gemini/gemini-cli), [Claude CLI](https://github.com/anthropics/claude-code), or [Codex CLI](https://github.com/openai/codex)\n\n## History Variables\n\nICL maintains history of recent values and inputs:\n\n| Variable | Description |\n|----------|-------------|\n| `icl:_` / `icl:icl-*` | Last result |\n| `icl:__` / `icl:icl-**` | Second-to-last result |\n| `icl:___` / `icl:icl-***` | Third-to-last result |\n| `icl:icl-+` | Last input form |\n| `icl:icl-/` | Last returned values (all values) |\n\n## Configuration\n\nICL loads a config file on startup (unless `--no-config` is specified). This file can contain any Common Lisp code.\n\n**Config file locations:**\n- **Linux/macOS:** `$XDG_CONFIG_HOME/icl/config.lisp` (default: `~/.config/icl/config.lisp`)\n- **Windows:** `%APPDATA%\\icl\\config.lisp`\n\n**History file locations:**\n- **Linux/macOS:** `$XDG_STATE_HOME/icl/history` (default: `~/.local/state/icl/history`)\n- **Windows:** `%LOCALAPPDATA%\\icl\\history`\n\nUse `,show-config` to see the actual paths on your system.\n\n### Configuration Variables\n\n| Variable | Description |\n|----------|-------------|\n| `*default-lisp*` | Lisp implementation to use (`:sbcl`, `:ccl`, `:ecl`, `:clisp`, `:abcl`, `:clasp`, `:roswell`) |\n| `*prompt-string*` | Prompt format string (default: `\"~A\u003e \"`) |\n| `*result-prefix*` | Prefix for results (default: `\"=\u003e \"`) |\n| `*colors-enabled*` | Enable syntax coloring (default: `t`) |\n| `*history-size*` | Maximum history entries (default: `1000`) |\n| `*paredit-mode*` | Enable structural editing (default: `nil`) |\n| `*ai-cli*` | AI CLI for `,explain` (`:gemini`, `:claude`, `:codex`, or `:auto`) |\n\n### Customizing Lisp Invocation\n\nUse `configure-lisp` to customize how ICL invokes a Lisp implementation:\n\n```lisp\n(icl:configure-lisp impl \u0026key program args eval-arg)\n```\n\n- **`:program`** - Path to the executable\n- **`:args`** - List of command-line arguments\n- **`:eval-arg`** - The eval flag (e.g., `\"--eval\"`)\n\n### Example Config File\n\n```lisp\n;; Use CCL instead of SBCL\n(setf icl:*default-lisp* :ccl)\n\n;; Custom SBCL with more memory\n(icl:configure-lisp :sbcl\n  :program \"/opt/sbcl/bin/sbcl\"\n  :args '(\"--dynamic-space-size\" \"8192\"))\n\n;; Enable paredit mode\n(setf icl:*paredit-mode* t)\n\n;; Custom prompt\n(setf icl:*prompt-string* \"λ ~A\u003e \")\n\n;; Load commonly used systems\n(asdf:load-system :alexandria)\n\n;; Define custom utilities\n(defun reload ()\n  (asdf:load-system :my-project :force t))\n```\n\n## Keyboard Shortcuts\n\n| Key | Description |\n|-----|-------------|\n| `Enter` | Submit form if complete, otherwise insert newline |\n| `Alt+Enter` | Always insert newline (works in most terminals) |\n| `Shift+Enter` | Always insert newline (requires kitty keyboard protocol) |\n| `Tab` | Complete symbol or show completion menu |\n| `Ctrl+A` / `Home` | Move to beginning of line |\n| `Ctrl+E` / `End` | Move to end of line |\n| `Ctrl+F` | Forward character |\n| `Ctrl+B` | Backward character |\n| `Ctrl+N` | Next line (in multi-line input) |\n| `Ctrl+P` | Previous line (in multi-line input) |\n| `Ctrl+K` | Kill to end of line |\n| `Ctrl+O` | Open line (insert newline, cursor stays) |\n| `Ctrl+T` | Transpose characters |\n| `Ctrl+U` | Clear entire line |\n| `Alt+D` | Kill word forward |\n| `Alt+Backspace` | Kill word backward |\n| `Ctrl+L` | Clear screen |\n| `Ctrl+D` | Delete character at cursor, or EOF if line empty (Emacs-style) |\n| `Ctrl+C` | Cancel current input |\n| `Ctrl+R` | Reverse history search (substring match) |\n| `Ctrl+G` | Cancel search |\n| `Up/Down` | Navigate history (on first/last line) or move cursor |\n| `Alt+P` | History search backward (prefix match) |\n| `Alt+N` | History search forward (prefix match) |\n| `Alt+Q` | Reindent current form |\n| `Alt+F` | Forward sexp (paredit mode only) |\n| `Alt+B` | Backward sexp (paredit mode only) |\n\n**Notes:**\n- In paredit mode, Enter only submits when the cursor is at the end of the buffer (allowing multi-line editing of balanced forms)\n- Use Alt+Enter in gnome-terminal and most other terminals. Shift+Enter only works in terminals with kitty keyboard protocol support (kitty, WezTerm, Alacritty, etc.).\n\n## Environment Variables\n\n| Variable | Description |\n|----------|-------------|\n| `ICL_SLYNK_PATH` | Override path to Slynk directory |\n| `ICL_ASDF_PATH` | Override path to bundled ASDF (for backends without ASDF) |\n| `ICL_BACKGROUND` | Override terminal background detection (`dark` or `light`) |\n| `NO_COLOR` | When set to any non-empty value, disables colored output (see [no-color.org](https://no-color.org/)) |\n\n## Supported Lisp Implementations\n\nICL aims to support multiple Common Lisp implementations. SBCL is the primary development and testing platform.\n\n| Implementation | Status |\n|---------------|--------|\n| SBCL | Tested |\n| CCL | Tested |\n| ECL | Tested |\n| ABCL | Tested |\n| Roswell | Tested |\n| Clasp | Untested |\n| CLISP | Experimental |\n\n## Architecture\n\nICL operates as a frontend that communicates with a backend Lisp process via the Slynk protocol (from SLY). This architecture allows ICL to work with any Common Lisp implementation, provide consistent features regardless of backend, and connect to remote Lisp processes.\n\n```mermaid\nflowchart LR\n    subgraph Clients\n        Terminal\n        Browser\n        Emacs[\"Emacs\"]\n        AI[\"AI CLIs\"]\n    end\n\n    subgraph ICL\n        direction TB\n        Web[\"Web Server\"]\n        MCP[\"MCP Server\"]\n        Client[\"Slynk Client\"]\n    end\n\n    subgraph Lisp [\"Lisp Image\"]\n        Server[\"Slynk Server\"]\n    end\n\n    Terminal ---|stdin/stdout| ICL\n    Browser ---|HTTP/WS| Web\n    AI ---|HTTP| MCP\n    Client \u0026 Emacs ---|Slynk| Server\n```\n\nAll connections use randomly-assigned ports on localhost. When ICL starts an inferior Lisp, it finds an available port and configures Slynk to listen there. The browser interface (started with `,browser` or `icl -b`) serves a Dockview-based IDE with package browser, symbol list, inspector panels, and class hierarchy visualization. The browser automatically closes when ICL terminates. The MCP server (started on-demand by `,explain`) provides read-only AI tool integration.\n\n## License\n\nMIT License. See LICENSE file for details.\n\n## Author\n\nAnthony Green \u003cgreen@moxielogic.com\u003e\n","funding_links":[],"categories":["REPLs ##"],"sub_categories":["Third-party APIs"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatgreen%2Ficl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatgreen%2Ficl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatgreen%2Ficl/lists"}