We believe the best way to learn a programming language is by writing code β real code, with real feedback, and real tests. That's exactly why we built BoxLings.
Inspired by the beloved rustlings project, BoxLings is an interactive CLI tool that teaches you BoxLang through hands-on exercises. You read failing tests, fix broken code, and level up β one exercise at a time.
Oh, and the whole thing is written in BoxLang itself. π₯ Dogfooding at its finest.
What Is BoxLings?

BoxLings gives you 129 progressive exercises across 28 topics β from the basics of variables and functions all the way to async programming, Java interop, destructuring, and CLI app development.
But here's what makes BoxLings different: we teach TDD/BDD as a first-class skill, not an afterthought, using TestBox; our BDD/TDD testing library.
From day one, you'll read TestBox specs before touching any implementation code. You'll learn to think in tests. By the time you hit the intermediate exercises, you'll be writing your own. By Phase 3, you'll be doing the full red-green-refactor cycle like a pro.
The Full Learning Path
BoxLings is organized into three progressive phases, with 28 topics and 129 exercises total.
π’ Phase 1 β Core Fundamentals (50 Exercises)
Perfect for beginners and developers new to BoxLang:
| # | Topic | Exercises | What You Learn |
|---|---|---|---|
| 1 | Introduction | 2 | Get started with BoxLings and BoxLang basics |
| 2 | Variables | 6 | Dynamic typing, the var keyword, scoping basics |
| 3 | Functions | 6 | UDFs, closures, lambdas |
| 4 | Conditionals | 4 | if/else, ternary, switch |
| 5 | Data Types | 8 | Strings, numbers, booleans, arrays, structs |
| 6 | Arrays | 4 | Array operations and member functions |
| 7 | Scopes | 5 | variables, local, this, arguments scopes |
| 8 | Structs | 5 | Struct manipulation and operations |
| 9 | Strings | 6 | Interpolation, multi-line strings, string operations |
| 10 | Imports | 4 | Importing classes and the java: prefix |
π‘ Phase 2 β Intermediate (40 Exercises)
Dive deeper into BoxLang's power features:
| # | Topic | Exercises | What You Learn |
|---|---|---|---|
| 11 | Structs Advanced | 4 | Deep operations, merging, complex manipulation |
| 12 | Null Handling | 4 | Elvis operator, safe navigation |
| 13 | Error Handling | 6 | try/catch, throw, custom exceptions |
| 14 | Interfaces | 4 | Implementing Java interfaces from BoxLang |
| 15 | Testing | 5 | Write your own TestBox specs! |
| 16 | Functional | 8 | map, filter, reduce, lambdas |
| 17 | Async | 6 | Threads, futures, async programming |
| 18 | Components | 3 | bx:http, bx:query, and more |
π΄ Phase 3 β Advanced (48 Exercises)
Master BoxLang-specific and power-user features:
| # | Topic | Exercises | What You Learn |
|---|---|---|---|
| 19 | Casting | 5 | castAs, javaCast, type conversions |
| 20 | Quizzes | 3 | Comprehensive knowledge reviews |
| 21 | Classes | 8 | OOP, properties, metadata |
| 22 | BIFs | 6 | Built-in functions and member functions |
| 23 | Templating | 4 | .bxm files and template syntax |
| 24 | CLI Apps | 4 | Building real CLI tools with BoxLang |
| 25 | Java Interop | 6 | Calling Java, the java: prefix in depth |
| 26 | Destructuring | 4 | Struct and array destructuring, renaming, nesting |
| 27 | Spread | 4 | Spread operator for arrays, structs, and function calls |
| 28 | Range | 2 | The .. range operator and functional methods |
| 29 | Assert | 2 | The assert statement with custom messages |
The TDD/BDD Learning Journey
BoxLings teaches test-driven development alongside BoxLang in four progressive stages:
Step 1 β Reading Tests (Topics 1β10) Read TestBox specs to understand requirements. Tests are your documentation.
Step 2 β Understanding Patterns (Topics 11β14)
Multiple assertions, setup/teardown with beforeEach/afterEach, edge cases, and error scenarios.
Step 3 β Writing Tests (Topic 15)
Now you write the specs. Practice describe / it / expect from scratch.
Step 4 β Full TDD Cycle (Topics 16β29) Red β Green β Refactor. The real deal.
How It Works
git clone https://github.com/ortus-boxlang/boxlings.git
cd boxlings
boxlang BoxLings.bx
BoxLings drops you into watch mode β it monitors your exercise files and reruns them automatically every time you save. Fix the code, hit save, see the tests go green.
Keyboard shortcuts in watch mode:
| Key | Action |
|---|---|
n | Next exercise |
h | Show hint |
t | Show test file |
l | List all exercises |
r | Rerun current exercise |
q | Quit |
Three exercise types are supported: scripts (.bxs), classes (.bx), and templates (.bxm), covering the full breadth of how BoxLang is used in practice.
Built for Learners, Classrooms & Workshops
BoxLings is self-contained and runs completely offline after the initial clone. Whether you're learning solo, teaching a workshop, or onboarding a new team member, BoxLings provides a structured, guided path with immediate feedback.
Estimated completion time:
- π Beginners: ~15β20 hours
- π» Experienced developers new to BoxLang: ~6β10 hours
- π₯ Java/CFML developers: ~4β6 hours
Get Started
You'll need BoxLang 1.12+. We recommend BVM to manage your BoxLang versions:
curl -fsSL https://install-bvm.boxlang.io/ | bash
bvm install 1.12.0
bvm use 1.12.0
Then clone and go:
git clone https://github.com/ortus-boxlang/boxlings.git
cd boxlings
boxlang BoxLings.bx init
boxlang BoxLings.bx
Join the Community
We'd love to hear what you think β and contributions are very welcome. New exercises, bug fixes, documentation β all of it.
- π BoxLang Docs
- π¬ Community Forum
- π€ BoxLang Slack
- π Open an Issue
π github.com/ortus-boxlang/boxlings
Now go fix some broken code. π₯
Add Your Comment