Shrimpl quickstart
Shrimpl is a small, beginner-friendly language that aims to bridge the gap between block-based tools and general-purpose programming. It is readable, approachable, and practical enough for APIs, data analysis, and simple machine-learning workflows.
Install the Shrimpl interpreter
Shrimpl is distributed as a Rust crate. You will need a recent Rust toolchain to get started.
cargo install shrimplIf you prefer to build from source, clone the repository and run a release build:
git clone https://github.com/adl5423/shrimpl-language
cd shrimpl-language
cargo build --release
# resulting binary:
# target/release/shrimplYour first Shrimpl program
Create a file named app.shr:
server 3000
endpoint GET "/":
"Hello, Shrimpl!"Then run it with the Shrimpl CLI:
shrimpl --file app.shr runThis will parse your program, run basic checks, and start a server on port 3000. Open http://localhost:3000/ in a browser to see the response.
Check diagnostics without running
To only check syntax and static diagnostics (e.g., unused path parameters, duplicate endpoints) without starting the server, use:
shrimpl --file app.shr checkHTTP basics: servers and endpoints
A Shrimpl program that exposes HTTP endpoints defines one server and one or more endpoint blocks.
server 8080
# Path parameter
endpoint GET "/hello/:name":
"Hello " + name
# Query parameter
endpoint GET "/greet":
"Hello " + name # /greet?name=AisenJSON responses
Use json { ... } to return JSON from an endpoint:
endpoint GET "/info":
json { "name": "Shrimpl", "version": 0.5 }Where to go next
- Read the full README in the Shrimpl core repository for language details.
- Install the VS Code extension and point it at your
shrimpl-lspbinary to get inline diagnostics.