Run hck in the browser
A cut replacement that splits on regex delimiters and can reorder fields.
Try it live
Nothing is downloaded until you press Run.
Reorder CSV columns
Installs hck 0.11.6 from the signed catalog (every chunk is verified before it is written), then runs the commands below in the VM's shell.
hck --version hck -d, -D, -f3,1 data.csv
$ hck --version hck git:v0.11.6-modified $ hck -d, -D, -f3,1 data.csv lang,id rust,1 go,2
What it is
hck selects columns like cut, but its delimiter can be a regex (whitespace by default), fields can be selected by header name, and they come out in the order you list them. In the browser it is a fast column extractor for CSV and log data in client-side pipelines.
Package facts
- version
0.11.6- runs on
- RISC-V VM (
elf-app,riscv64gc-linux-musl) - download
- 1.2 MB compressed · 1 file
- command
hck- requires
- nothing else — a static binary
- license
Unlicense OR MIT(upstream)- upstream
- github.com/sstadick/hck
- categories
- Data, Text
- catalog
- generation 12, Ed25519-signed
Install and run it from your page
With the SDK, installApp resolves hck 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.
import { createNano } from "@userland-run/nano-sdk";
const nano = await createNano({ image: { wasm: "/nano/console.wasm" }, ramMB: 512 });
await nano.installApp("hck"); // signature-verified, cached in OPFS
const r = await nano.shExec("hck --version");
console.log(r.stdout);Typical usage of the upstream command-line tool:
hck -d, -D, -f3,1 data.csv
Related apps
- choose1.3.7Select fields from each line by index or range — a human-friendly alternative to cut and simple awk.RISC-V VM963 kB
- sd1.0.0Find and replace text with familiar regex syntax — a simpler sed for substitutions.RISC-V VM956 kB
- dasel3.11.1Select, put and delete data in JSON, YAML, TOML, XML, CSV and more with a single selector syntax.RISC-V VM3.7 MB