Sulat.com / Writing on AIFriday, December 4, 2026
Enter →
Developer Tools/4 December 2026

Charm’s Turtle puts 98 Unix tools in Go

Charm's Turtle is 98 Unix tools in pure Go, built to behave the same on Windows, macOS, Linux and FreeBSD. I built them, diffed them against GNU and timed them.

3D Charm Turtle mascot walking over glowing green shell commands, Go coreutils
Illustration: Sulat, featuring the Charm Turtle mascot

At a glance

  • Turtle is a Go library of 98 Unix tools from Charm, built to behave the same on Windows, macOS, Linux and FreeBSD.
  • In my test, 43 of 46 command groups matched GNU coreutils output. The three differences were wc column padding, cmp quoting and du block units.
  • The tools run as importable Go packages, against an in-memory filesystem, and inside an mvdan/sh shell with no system tools installed.
  • Crush and Task already ship it. On Linux, Crush defaults to the system tools unless the coreutils option is set to turtle.
  • Hashing and copying match GNU speed, but sorting and line counting ran 10 to 16 times slower on my Linux machine.

Charm, the company behind Crush and Bubble Tea, has released Turtle, a set of 98 Unix command-line tools written in pure Go. The tools are meant to behave the same on macOS, Windows, Linux and FreeBSD. I built all 98, ran about 50 of them against GNU coreutils, used the library from Go with no disk involved, and ran it inside a Go shell with no system tools installed. Output matched in 43 of 46 checks. Turtle is also about ten times slower than GNU at sorting.

Charm’s post on X announcing Turtle, 3 December.

What Turtle is

Turtle is an Apache-2.0 repository from Charm, announced on its blog on 30 November by Andrey Nering, who also maintains Task. It holds three Go modules. coreutils is the 98 programs, from cp and mv to sort, grep, sed, tar and zip. fsx is a filesystem interface that extends Go’s read-only io/fs with writes. shcoreutils plugs the tools into the mvdan/sh shell interpreter.

Stack: fsx filesystem under 98-program coreutils under shcoreutils shell middleware
Turtle is three Go modules stacked on one filesystem layer.

The reason is Windows. Task and Crush both run shell commands through mvdan/sh, and Windows doesn’t ship cp, rm or mv by default. Both had been using Go utilities from the u-root project. According to the Task blog, u-root’s maintainers reverted the refactors Task needed to make those utilities importable, which left Task pinned to an old commit. Turtle replaces that with an implementation Charm controls. The Turtle post says it was made possible by Crush and Charm’s Prism models via Hyper.

Turtle’s README states the limit up front: the goal is not 100% compatibility. It aims for generally compatible with POSIX and GNU, importable packages, state isolated from the system including the filesystem, the ability to run fully in memory, and zero dependencies.

What I ran

Everything ran on an x86-64 Ubuntu 24.04.5 virtual machine with an Intel Xeon 2.30 GHz processor, 4 cores, 15 GiB of memory and a virtual disk, on Linux kernel 6.18.44. The Go toolchain was 1.26.8, which Turtle’s go.mod requires. The GNU side was coreutils 9.4. I tested coreutils v0.2.1, shcoreutils v0.2.2 and fsx v0.1.0. These are the build commands.

Code
git clone https://github.com/charmbracelet/turtle
cd turtle/coreutils
go build -o bin/ ./cmd/...
GOOS=windows GOARCH=amd64 go build -o win/ ./cmd/...

All 98 programs built in 11 seconds. Each binary is about 3 MB. I also cross-compiled the full set for Windows on amd64, macOS on arm64, FreeBSD on amd64 and Linux on arm64, and built ls for WebAssembly. Only the Linux binaries and the WASI build ran. The WASI ls listed a directory under Node 22’s built-in WASI support. I didn’t run the Windows, macOS or FreeBSD builds.

Terminal: go build produces 98 Turtle coreutils binaries and a Windows build
One build command gives 98 standalone tools, and the Windows build works the same way.

I also ran the module’s own test suite. 130 packages pass. Run as root, two tests that check for permission errors fail, which is expected because root bypasses permissions. As an unprivileged user the find package passes, and one test in the main package still fails: its “utility not found” case returns status 126 where the test expects 127. I haven’t traced that.

Does it match GNU

I wrote a script of 46 command groups covering about 50 tools: sorting, counting, cutting, sed, grep, hashes, diff, cp -r, find, tar, gzip, zip, date, xargs, timeout and more. I ran it once against the system tools and once against the Turtle binaries, then diffed the two outputs. Both outputs were 184 lines. Three groups differ.

Terminal diff of GNU and Turtle output showing three differences: wc, cmp and du
Of 46 command groups, three printed differently: wc padding, cmp quoting and du units.
  • wc with several files pads the columns to a common width in GNU. Turtle prints single spaces. With one file the two are identical.
  • cmp quotes the file name in its end-of-file message, cmp: EOF on 'f.txt', where GNU doesn’t.
  • du counts in 512-byte units, which is the POSIX default. GNU counts in 1 KiB units unless POSIXLY_CORRECT is set. With that variable set, GNU gave the same numbers as Turtle. Turtle’s -k flag matched GNU’s default.

None of the three would break a script that handles whitespace sensibly, but a script that parses du output without -k would read double the sizes. The date, archive, checksum and exit-code checks all matched, including a gzip round trip through the system gzip and a timeout exit status.

Using it as a library

This is the part GNU can’t offer. Every program is a Go package with New and Run. A Runtime struct holds the standard streams, the working directory, the environment and the filesystem, so nothing touches process-wide state. I gave a Runtime an fsx.MemoryFS and ran six tools against it. This is the core of the program.

Code
mem := fsx.MemoryFS{
    "fruit.txt": &fsx.MemoryFile{Data: []byte("banana\napple\ncherry\napple\n"), Mode: 0o644},
}
rt := &coreutils.Runtime{
    Stdout: &out, Stderr: &errb, Stdin: bytes.NewReader(nil),
    FS: mem, WorkingDir: "",
}
run(mkdir.New(rt), "-p", "backup/2026")
run(cp.New(rt), "fruit.txt", "backup/2026/fruit.txt")
run(sort.New(rt), "-u", "fruit.txt")
run(grep.New(rt), "-c", "apple", "backup/2026/fruit.txt")
Terminal: Go program runs mkdir, cp, sort, grep and ls on Turtle's in-memory filesystem
Six Turtle tools ran against an in-memory filesystem and left nothing on disk.

One detail to know: MemoryFS keys follow Go’s io/fs rules, so they’re relative paths such as fruit.txt. A key like /work/fruit.txt makes mkdir fail with “invalid argument”. The package describes itself as meant mostly for tests, which fits: Turtle’s own suite runs almost entirely in memory.

Inside a Go shell

The README’s shcoreutils snippet is a one-line change to an mvdan/sh interpreter. I wrapped it in a small program that takes a script on the command line and ran it with an empty PATH, the situation on a bare Windows machine. Here’s the command, verbatim.

Code
env -i PATH=/nonexistent ./shdemo 'mkdir -p out/deep; printf "pear\napple\nfig\n" > f.txt; sort f.txt | grep -n a; cp f.txt out/deep/; find out -type f; seq 1 5 | xargs -n2 echo; sha256sum f.txt'
Terminal: Turtle shell runs sort, grep, cp and find with empty PATH while plain sh fails
With an empty PATH, the Turtle shell still sorts and copies. Plain sh can’t find sort.

Every command ran, including the ones that call other commands, xargs and find. Plain sh with the same empty PATH stopped at sort with status 127. The middleware has a priority setting: Turtle first (the default), system tools first with Turtle as the fallback, or automatic, which means Turtle on Windows and system tools elsewhere.

In Crush and Task

Crush v0.103.0, released on 26 November, switched its built-in shell to Turtle with a coreutils option. I installed Crush v0.105.0 and asked Claude Haiku 5.5 to run cat --version and sort through Crush’s bash tool, once with default settings and once with coreutils set to turtle.

Terminal: Crush shows GNU cat by default, then Turtle v0.2.1 after setting coreutils to turtle
Same Crush prompt twice: GNU cat by default, Turtle once the option is set.

By default, on Linux, Crush used the system tools. With the option set it ran Turtle v0.2.1. That fits the four modes in the release notes.

Four Crush coreutils modes: turtle, system, auto and off, with what each does
Crush lets you choose Turtle, the system tools, or a mix.

Task ships Turtle too. Its blog says the new coreutils are on by default on Windows, where system utilities are missing and starting external programs is slow, and that other systems prefer the system tools and fall back to Turtle. Task plans to turn it on everywhere in a later release if this one goes well, and a coreutils: setting in .taskrc.yml takes the same four values.

Speed

Charm doesn’t claim speed, and the numbers show why. I timed each tool on a 66 MB file of two million lines, five runs each, taking the median, in the C locale and with output written to a file.

TaskGNU (ms)Turtle (ms)
sort, 2M lines5545,480
sort -n -k174311,024
wc -l17279
grep -c57190
cut -d’ ‘ -f21581,059
sed s/line/L/5131,773
tac1591,378
seq 1 500000086306
sha256sum5153
md5sum9897
cat5658
cp, 66 MB6360
gzip -c2,1431,867
Median of five runs on the machine described above.
Bar chart: Turtle slower than GNU, wc -l 16x, sort 10x, hashing and cp about equal
Hashing and copying match GNU. Sorting and line counting are the slow spots.

Hashing, copying, cat and gzip are level with GNU. Text processing is where Turtle trails: sorting and counting lines run 10 to 16 times slower. A second pass in the C.UTF-8 locale gave the same picture, except that GNU’s wc with all three counts dropped from 768 ms to 219 ms, ahead of Turtle’s 283 ms. This is one machine on Linux. I haven’t timed Windows, where Task says built-ins beat launching external programs.

What “identical” leaves out

Charm’s post says Turtle gives identical behaviour across shell commands. The README is more careful, and so is the repository. A DEVIATIONS.md file of about 500 lines lists where Turtle departs from the specs. For example, grep has no backreferences in basic regular expressions and no -P, and diff leaves out options such as -l pagination and --color. The compatibility table marks seven utilities as not implemented: ps, who, df, mkfifo, iconv, curl and wget. “Identical across platforms” is the design goal, and the Windows, macOS and FreeBSD builds are the part I haven’t been able to check.

How it compares

ProjectLanguageWhat it’s for
Turtle (Charm)GoImportable tools for Go programs and shells, runnable in memory
uutils coreutilsRustDrop-in GNU replacement. Release 0.13.0 on 20 November passes 684 of 707 GNU tests
Coreutils for Windows (Microsoft)Rust, on uutilsPreview package of Unix-style tools for Windows, installed with WinGet
BusyBox-w32COne binary of applets for Windows
u-rootGoThe earlier Go utilities that Task and Crush used
Source: each project’s own documentation and release notes.

The difference that matters is the form. uutils and Microsoft’s package are programs you install and put on a path. Turtle is a library first, so a Go program can call cp without starting a process, test against an in-memory filesystem, or ship its own tools to a machine that has none.

What I’d do

If you write Go that shells out to cp, rm or mv and has to work on Windows, or embeds mvdan/sh, Turtle is the thing to try, and the in-memory runtime makes those code paths easy to test. If you run Crush or Task on Linux or macOS, leave them on system or auto, because the system tools are faster and fuller. If you need a drop-in GNU replacement for scripts, Turtle isn’t that. It says so itself, and the three output differences I found are the kind a script can trip on.


Sources