Inspiration

We built CL.AI because terminal skills are very useful to know in this day and age, but learning them is usually boring or intimidating.

Our first version focused only on Linux fundamentals. Once the core gameplay clicked, we expanded into Git workflows so users could train on real day-to-day engineering tasks.

The goal was simple: make command-line practice feel like a fast-paced, high-stakes game!

What it does

CL.AI is a competitive, browser-based terminal training platform.

  • Players get timed Linux and Git missions
  • Each mission runs in an isolated Docker sandbox
  • Progress is scored and pushed to a live leaderboard
  • Users select the difficulty of the challenge

How we built it

We designed CL.AI as a real-time full-stack system:

  • Frontend: React + TypeScript + xterm.js for an authentic terminal UI
  • Backend: FastAPI with WebSocket streaming for low-latency shell I/O
  • Runtime isolation: per-session Docker containers with ephemeral filesystems
  • Scoring + progression: challenge validator + leaderboard service

Session orchestration follows: $$ \text{Request} \rightarrow \text{Container Spawn} \rightarrow \text{Filesystem Hydration} \rightarrow \text{WebSocket TTY Bridge} \rightarrow \text{Validation} \rightarrow \text{Score Update} $$

We intentionally used Docker to deliver an elite web experience: real terminal behavior, safe execution, zero local setup friction.

Challenges we ran into

  • Keeping WebSocket terminal streaming smooth under rapid command bursts
  • Validating multiple correct solutions for open-ended Linux and Git tasks
  • Balancing strict sandboxing with fast container startup times
  • Synchronising frontend terminal state with backend session lifecycle
  • Designing difficulty scaling that helps beginners without boring advanced users

Accomplishments that we're proud of

  • Shipped real command execution, not mocked terminal responses
  • Expanded scope from Linux drills to Git mission gameplay during hackathon build time
  • Delivered isolated, disposable environments per player session
  • Built a leaderboard loop that makes practice competitive and sticky

What we learned

  • Gamification works best when the underlying task is genuinely real
  • Docker isolation is a strong foundation for safe browser-based systems
  • Challenge wording matters as much as challenge logic
  • Competitive feedback loops dramatically increase repeated usage

What's next for CL.AI

  • Ranked head-to-head terminal duels
  • Team mode for pair and squad challenges
  • Challenges for Powershell, bash, etc
  • Analytics layer for measuring mastery growth over time

Built With

Share this project:

Updates