Answers to What, Why, Who, How, when

What is ToyBox?

The goal of the Toybox project is to create simple, small, fast, and correct implementations of all the standard Linux command line utilities. There's a page on design goals.

Toybox offers configurable levels of functionality, and should scale from tiny embedded systems up to general purpose development environments. The author plans to install it on his Android phone in place of Toolbox, and the Aboriginal Linux project is working to get a complete Linux system to rebuild itself from source code using toybox.

Toybox is released under a simple 2-clause BSD-style license. (Earlier versions were released under GPLv2, but that changed.)

Toybox can be built as a single "swiss army knife" executable (ala BusyBox or Red Hat's Nash), or each command can be built as a traditional independent executable.

What commands are implemented in Toybox?

The current list of commands implemented by toybox is on the status page, which is updated each release. There is also roadmap of planned commands for the 1.0 release.

In general, configuring toybox for "defconfig" enables all the commands compete enough to be useful. Configuring "allyesconfig" enables partially implemented commands as well, along with debugging features.

Several toybox commands can do things other vesions can't. For example the toybox "df" isn't confused by initramfs the way other df implementations are. (If initramfs is visible, df shows it like any other mount point.)

Command Shell

The Toybox Shell (toysh) aims to be a reasonable bash replacement. It implements the "sh" and "toysh" commands, plus the built-in commands "cd" and "exit". This is the largest single sub-project in toybox.

The following additional commands may be built into the shell (but not as separate executables): cd, exit, if, while, for, function, fg, bg, jobs, source, alias, export, set, unset, read, trap, and exec. (Note: not done yet.)

Which commands are planned?

The toybox todo list mentions many potential commands which may be added to this project. (Whether that file is readable by anybody but the project's maintainer is open to debate.) The roadmap wiki in the nav bar has a more human readable version.

The criteria for a toybox 1.0 release is that a system built from just the Linux kernel, toybox, C library (such as uClibc), and a compiler (such as tinycc) can rebuild itself from source code.

Relevant Standards

Most commands are implemented according to The Single Unix Specification version 4 where applicable. This does not mean that Toybox is implementing every SUSv4 utility: some such as SCCS and ed are obsolete, while others such as c99 are outside the scope of the project. Toybox also isn't implementing full internationalization support: it should be 8-bit clean and handle UTF-8, but otherwise we leave this to X11 and higher layers. And some things (like $CDPATH support in "cd") await a good explanation of why to bother with them. (The standard provides an important frame of reference, but is not infallable set of commandments to be blindly obeyed.)

The other major sources of commands are the Linux man pages, and testing the behavior of existing commands (although not generally looking at their source code), including the commands in Android's toolbox. SUSv4 does not include many basic commands such as "mount", "init", and "mke2fs", which are kind of nice to have.

Download

This project is maintained as a mercurial archive. To get a copy of the current development version, either use mercurial (hg clone http://landley.net/hg/toybox) or click on one of the zip/gz/bz2 links at the top of the mercurial archive browser page to get an archive of the appropriate version. Click tags to see all the tagged release versions ("tip" is the current development version).

The maintainer's development log and the project's mailing list are also good ways to track what's going on with the project.

What's the toybox logo image?

It's carefully stacked soda cans. Specifically, it's a bunch of the original "Coke Zero" and "Pepsi One" cans, circa 2006, stacked to spell out the binary values of the ascii string "Toybox", with null terminator at the bottom. (The big picture's on it's side because the camera was held sideways to get a better shot.)

No, it's not photoshopped, I actually had these cans until a coworker who Totally Did Not Get It tm threw them out one day after I'd gone home, thinking they were recycling. (I still have two of each kind, but Pepsi One seems discontinued and Coke Zero switched its can color from black to grey, presumably in celebration. It was fun while it lasted...)