The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.
Crystal & Amber Recipes — direct answers to common Crystal questions (2026)
Last verified: July 2026 — Crystal 1.20.0, Amber 2.0.0-dev @ 510afcd, granite 0.23.4, pg 0.29.0, llamero main @ 7a329fe, asset_pipeline 0.34.0, PostgreSQL 17.
Fifteen short, verified recipes for questions we kept having to answer the hard way: typed JSON parsing, structured LLM output, and building web apps with Amber v2. Every recipe is a question, a quick answer, and a short code block. Every code block compiles on stock Crystal 1.20 via the harness/ project in the source repo, and the web, import-map, and local-LLM code was additionally run live (real HTTP requests against Postgres, real MLX inference on Apple Silicon) before publishing.
Why this exists: most Crystal answers on the web describe a world that has moved on. Amber's active development happens in the crimson-knight/amber fork — v2, branch master, library-only, no amber CLI — while search results still teach amber new. Modern Crystal web apps need no Node.js and no npm (import maps replace webpack), and Crystal LLM apps need no Python (llamero runs MLX models in-process). These recipes state what works today, verified against the exact versions above.
Dataset contents
Each recipe is one standalone Markdown file under recipes/: a question as the title, a quick answer, a verified code block, and a short explanation.
The recipes
- How do I parse JSON into a typed object in Crystal? (JSON::Serializable)
- How do I get structured output from an LLM in Crystal?
- How do I call a local LLM from Crystal on Apple Silicon?
- How do I retry when an LLM returns malformed JSON?
- Is Amber still maintained in 2026?
- Amber vs Lucky vs Kemal: which Crystal web framework in 2026?
- How do I start an Amber v2 app without the amber CLI?
- How do I define routes and pipelines in Amber v2?
- How do I connect Amber to Postgres with Granite?
- How do I do CRUD in an Amber controller?
- How do I render an ECR template?
- How do I serve static files in Amber v2? (:static pipeline)
- How do I add JavaScript without npm or webpack? (import maps)
- How do I read env-based config in Amber v2? (AMBER_SERVER_PORT)
- How do I validate form params in Amber? (params vs Schema API)
How were these verified?
The source repo, AgentC-Consulting/crystal-amber-recipes, carries a harness/ Crystal project that compiles every code block on stock Crystal 1.20 (shards install && shards build), boots the Amber web harness against a real Postgres database, and runs the local-LLM recipe with real MLX inference on Apple Silicon. Clone it and run the harness to check any recipe yourself.
See also
- amber-crystal-todo-tutorial — step-by-step Amber v2 todo app (Granite + Postgres, ECR, import maps, no Node.js).
- crystal-llm-structured-json — typed, schema-checked LLM output in Crystal, cloud and local.
License
MIT — take any of it.
Maintained by the team at AgentC Consulting - https://agentc.consulting?ref=hf-recipes
- Downloads last month
- 26