CLI tool
iximiuz/shellgym avatar
iximiuz/shellgym

ShellGym: a Linux command-line trainer that watches a real shell from the outside

ShellGym - an Interactive Linux Command-Line Trainer

476 stars41 forksGoNOASSERTION

At a glance

What is it?
ShellGym is a root-run daemon with a web UI that turns a disposable Linux box into a drill gym for shell actions. It never touches your shell, so the reps transfer, but it also assumes you can hand it a throwaway host.
Who is it for?
Adopt ShellGym if you have a disposable Linux host and want to drill shell actions rather than read about them, or if you are authoring a learning path and want a validation engine that checks live system state. Do not adopt it on a machine you care about: the reps ask for real file, process and port changes, and the README says to use a disposable VM, droplet or instance.
Can I use it commercially?
Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
Is it still maintained?
Yes. The repository last received commits 6 days ago.
What is it written in?
Mainly Go, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 24, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • iximiuz/shellgym476 ★ · +63
Star history
Repository2026-09-172026-11-24
iximiuz/shellgym413476

63 Stars in the last 68 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The problem ShellGym targets: fluency, not understanding

The README draws the line itself: "Learn the idea in a tutorial. Build the reflex in ShellGym." Tutorials explain concepts; ShellGym drills them. The claim is that reading about navigating the file tree, stdio redirection or signals is not the same as performing those actions without thinking, and that fluency only comes from repetition.

The audience is therefore narrower than "people learning Linux". It is people who already accept that they need reps. A beginner who has never opened a terminal gets little from a trainer that watches for a directory change; the bundled sample-linux-101 path is the reference curriculum, not a complete course. The second audience is content authors: ShellGym defines a format rather than a curriculum, so anyone writing a lab or an onboarding track can ship it as a path.

How the observation layer works without touching your shell

The design decision that shapes everything else is zero instrumentation. The README states that the student's shell is not modified: no prompt hooks, no wrappers, no special shell functions. All observation happens from the outside, in an ordinary Linux terminal.

Three mechanisms do the work. procfs is used for discovering interactive shells, reading their working directories, and scanning processes, files and ports. The kernel proc connector is described as "a netlink firehose of every exec() on the box", used to notice which commands the user runs. Plain state checks cover the rest: a file exists, a process is running, a port is listening. A rep is a single concrete action (enter a directory, create a file, kill a process, free a port) and it completes automatically the moment system state changes. There is no check button and no copy-paste.

Because nothing is injected, the argument goes, skills transfer one-to-one to any real terminal. The trade-off is that ShellGym is a root-level observer of the whole box. It has to be, since it reads other processes and the netlink feed. That is also why the README pushes you onto a disposable host. docs/detection.md is where each mechanism is documented; the README does not restate the details.

Installing ShellGym and running your first rep

ShellGym runs on a plain Linux host as root. The quickest path is a release tarball, which bundles the shellgym binary and the sample learning path. The README gives this snippet, which picks the architecture and unpacks in place:

bash
arch=$(uname -m | sed 's/x86_64/amd64/; s/aarch64/arm64/')
curl -L "https://github.com/iximiuz/shellgym/releases/latest/download/shellgym_linux_${arch}.tar.gz" | tar xz

If you prefer to build, the repository has a Makefile target that produces bin/shellgym with CGO disabled, and the README suggests linking it into the working directory:

bash
make build
ln -s bin/shellgym shellgym

Start the daemon against the bundled path. The --path flag points at the learning path directory and --user tells the daemon whose shell activity to watch:

bash
sudo ./shellgym serve --path "$PWD/paths/sample-linux-101" --user $USER

For a long session you can run it under systemd-run instead, which detaches the unit and collects it when it exits:

bash
sudo systemd-run --unit=shellgym --collect \
    "$PWD/shellgym" serve --path "$PWD/paths/sample-linux-101" --user $USER

Then open the UI at the address the README uses, http://127.0.0.1:63636, and arrange the split screen yourself. ShellGym does not open a terminal for you. The web UI is the trainer half; you type into your own terminal beside it, either with a terminal that can show a browser pane (the README names cmux) or with your OS window tiling. If you would rather skip setup entirely, the project's online playground is a regular Ubuntu VM with ShellGym and Go preinstalled and the split screen already arranged, and it requires a free sign-in with GitHub.

What ShellGym is not: a safe sandbox or a self-contained course

The most important limitation is stated as a caution in the README: reps ask you to perform real actions on the live system, so use ShellGym only with a disposable Linux host, such as a local VM, an iximiuz Labs Linux Playground, a DigitalOcean droplet or an EC2 instance. This is not a sandbox that confines what you type. If a rep asks you to kill a process or free a port, that happens on the machine the daemon is running on, as root.

The second limitation concerns resuming. Progress is persisted on disk, /var/lib/shellgym by default, and survives daemon restarts and reboots; randomized parameters are sticky per attempt so a half-done unit looks the same after a resume. But the README is explicit that most learning paths expect the student to modify live system state, so successful resuming may depend on that state being preserved. If another process removes or modifies files the path needs, the restart can break and progress will be reset. A trainer that grades the machine rather than a transcript inherits the machine's fragility.

The third is scope. ShellGym defines a format, not a curriculum. If you want a finished course, you get one reference path, sample-linux-101. Everything else is authoring work.

Authoring paths, and the validate and solve commands

A learning path is a directory tree. The path holds path.yaml with id, title and user; modules are directories with a numeric prefix that defines order and an optional module.md intro; units sit inside modules and each unit.md is one rep, with YAML frontmatter defining setup scripts, verification tasks, hints and a hidden reference solution. A unit completes when all of its tasks are met. Units can be parametric with randomized directory names, tokens and ports, can have variants drawn per attempt, can depend on state left by earlier units, and can be filtered by distro or host capabilities.

The CLI supports that workflow directly. shellgym validate lints and renders a path without running it, which is what the Makefile uses in its validate target:

bash
./bin/shellgym validate --path paths/sample-linux-101

shellgym solve auto-types reference solutions into a real pty shell, simulating a student pass. That is the closest thing to an end-to-end test for authored content, and it depends on the same pty dependency the go.mod lists. shellgym skills prints embedded authoring guides for AI-assisted content work. The full format reference is docs/authoring-guide.md, and architecture details are in docs/design.md.

How ShellGym differs from a guided lab environment

The obvious alternative is a hosted, browser-based terminal lab: a container or VM you drive through a web terminal, with the exercise text in the same page. The difference in approach is where observation happens. In that model the environment controls the terminal, so it can inspect what you type and what the shell reports. ShellGym deliberately refuses that, because a wrapped shell is a different shell from the one on your laptop.

That refusal costs you convenience. You have to build the split screen yourself, the daemon needs root and a disposable box, and the detection layer has to infer intent from procfs, the proc connector and state checks rather than from a command stream. In exchange, the README's claim is that skills practiced in the gym transfer one-to-one to any real terminal, and the path format stays portable: a path is a directory of markdown and YAML, not a plugin for a hosting platform. If your goal is to hand someone a preconfigured course inside a managed browser tab, ShellGym is the wrong tool. If your goal is reps on a machine that behaves like the one you actually administer, the outside-observation design is the point.

Maintenance, distribution and licence questions to settle

The repository is not archived, and the last push was on 2026-09-17. Releases are frequent and versioned in the 0.0.x range, with v0.0.14 published on 2026-09-16, one day before that push. A 0.0.x version number is a signal about API and path-format stability, not a promise: the authoring format is documented in docs/authoring-guide.md, and nothing in the README states a compatibility guarantee for paths written against an earlier release. If you author a path, expect to re-run shellgym validate after upgrading and to read the release notes for format changes.

Upgrade cost is otherwise low. The build is a single CGO-disabled Go binary, so there is no runtime to install on the target host; the Makefile's dist target assembles a self-provisioning bundle containing the binary, the paths directory and e2e/start.sh into dist/shellgym-dist.tar.gz. Note that the Makefile comment says this bundle is published at https://labs.iximiuz.com/__static__/shellgym-dist.tar.gz and is downloaded by the e2e playground's init task, so the distribution channel is tied to the project's own infrastructure.

The licence is the open question. The repository metadata reports NOASSERTION, meaning GitHub could not classify the LICENSE.md file automatically. Read LICENSE.md directly before you plan to redistribute a modified binary or sell a course built on the path format; nothing here is legal advice, and the README does not discuss licensing at all.

Editorial conclusion

Adopt ShellGym if you have a disposable Linux host and want to drill shell actions rather than read about them, or if you are authoring a learning path and want a validation engine that checks live system state. Do not adopt it on a machine you care about: the reps ask for real file, process and port changes, and the README says to use a disposable VM, droplet or instance. Before committing, verify the path format against docs/authoring-guide.md, confirm that shellgym validate passes on your own path, and check that your distro exposes the procfs and kernel proc connector interfaces the detection layer relies on.

Frequently asked questions

Does ShellGym modify my shell or install prompt hooks?

No. The README states that the student's shell is not modified in any way: no prompt hooks, no wrappers, no special shell functions. Observation happens from the outside using procfs, the kernel proc connector and plain state checks.

Can I run ShellGym on my normal work machine?

The README advises against it. Reps ask you to perform real actions on the live system, so it says to use ShellGym only with a disposable Linux host such as a local VM, an iximiuz Labs Linux Playground, a droplet or an EC2 instance.

What port does the ShellGym web UI listen on?

The README opens the UI at http://127.0.0.1:63636 after starting the daemon, and the Makefile's run target passes --addr :63636 to shellgym serve.

Official sources

  1. Issues
  2. iximiuz/shellgym on GitHub
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/iximiuz-shellgym.svg)](https://hysenlabs.com/projects/iximiuz-shellgym)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/iximiuz-shellgym.svg)](https://hysenlabs.com/projects/iximiuz-shellgym)

Was this useful?