Repository navigation
Home
Shelly is a Unix shell with a typed scripting language. Run familiar programs, then use functions, collections, and application types to work with their data. A pipeline can carry a String, an Integer, or a whole record between Shelly stages; external programs still communicate through ordinary byte streams.
Suppose a game awards three points for each completed challenge:
let $completed = [2, 5, 8]
let $points: [Integer]
$completed | ($ * 3) | $points
echo $points...
6 15 24
The source supplies one item at a time. $ is that item's value, ($ * 3) is a
stage expression, and the final variable collects the answers. The source and
answers are typed values throughout. Pipelines explains how this
extends to processes, conversions, and streams.
Pipeline splits let the same upstream stream feed several paths. Aligned connectors show which stage supplies each branch, so you can transform or collect each path independently without running the source again.
| I want to… | Start here |
|---|---|
| Try Shelly in a few minutes | Quick start |
| Run scripts or use it as my shell | Running Shelly |
| Understand the language as a whole | Language map |
| Process structured data | Arrays, Hash maps, Pipelines |
| Send one stream down several paths | Pipeline splits |
| Build reusable application code | Functions, Structs, Modules |
| Work with files and services | Bytes and I/O, JSON, HTTP |
| Customize my terminal | REPL, Prompts and widgets |
| Find a complete small example | Recipes |
| Look up punctuation or a declaration | Syntax reference |
Variables begin with $. Commands take space-separated arguments. Braces contain
statements, and # starts a comment. Use echo to show a value: entering an
expression alone does not automatically print it.
Type names are case-sensitive: Integer, Float, String, and any. Numeric
annotations widen Integers to Float when required. Distinct named types give
application concepts their own identities.
let $answer = calculate calls calculate. Quote text to keep it as text.
A backtick creates a checked callable reference without calling it.
Shelly runs on Linux, WSL, and macOS. Its core language is implemented; the project is in stabilization while the prototype's internals are reviewed for future cleanup. These pages describe the current language and public library interfaces.
Source and releases · Installation and execution modes · VS Code support
Related: Language map · Quick start
Begin here
Values and expressions
- Language basics
- Variables and scope
- Numbers and logic
- Strings and paths
- Arrays
- Hash maps
- Ranges and iteration
- Control flow
- Match and type guards
Functions and types
- Functions and calls
- Closures and function types
- Methods and properties
- Structs
- Enums
- Named types and unions
- Conversions
- Types and properties
Shell and modules
- Pipelines
- Pipeline splits
- Pipeline formats
- Commands and exit status
- Redirection
- Environment and exported variables
- Modules and visibility
- Nested modules and directory packages
- Conditional imports and declarations
- Errors and cleanup
- Supervised processes and terminals
Library guides
- Standard library
- The implicit prelude
- Bytes, files, readers, and writers
- Explicit item streams
- JSON documents and typed mapping
- Sockets, DNS, and TLS
- HTTP clients
- HTTP servers
- Framing, server-sent events, and JSON-RPC
- Terminal colors, styles, and geometry
- Build an application console
Interactive use