userland.run70Try the demo
Catalog app · RISC-V VM

Run tokei in the browser

Count lines of code, comments and blanks per language across a project.

Try it live

Nothing is downloaded until you press Run.

catalog app

Check the installed tokei build

Installs tokei 14.0.0 from the signed catalog (every chunk is verified before it is written), then runs the commands below in the VM's shell.

bash
tokei --version
tokei --help | head -n 3
loading…
Expected output
$ tokei --version
tokei 14.0.0 compiled with serialization support: json
$ tokei --help | head -n 3
Count your code, quickly.
Support this project on GitHub Sponsors: https://github.com/sponsors/XAMPPRocky

What it is

tokei scans a directory, recognises over 150 languages by extension and prints a table of files, lines, code, comments and blank lines per language.

Package facts

version
14.0.0
runs on
RISC-V VM (elf-app, riscv64gc-linux-musl)
download
1.7 MB compressed · 1 file
command
tokei
requires
nothing else — a static binary
license
MIT OR Apache-2.0 (upstream)
upstream
github.com/XAMPPRocky/tokei
categories
Text
catalog
generation 12, Ed25519-signed

Install and run it from your page

With the SDK, installApp resolves tokei in the signed index, fetches its content-addressed chunks from the CDN, verifies each one and writes the files into the VM. Details in Installing catalog apps.

javascript
import { createNano } from "@userland-run/nano-sdk";

const nano = await createNano({ image: { wasm: "/nano/console.wasm" }, ramMB: 512 });
await nano.installApp("tokei"); // signature-verified, cached in OPFS

const r = await nano.shExec("tokei --version");
console.log(r.stdout);

Typical usage of the upstream command-line tool:

bash
tokei --sort code

Caveats

← All 32 catalog apps