Repository navigation
ok v0.1.0
The first release of ok: a portable scripting language and task runner in one static binary. The same script runs on Linux, macOS and Windows, on x86-64 and arm64.
Highlights
- Commands without a shell.
run cargo build --releasepasses each word as one argument, so quoting can't break. Output streams, is captured, or is piped depending on whererunstands. - Data formats built in.
read,write,parseandtohandle JSON, JSON Lines, CSV, TSV, TOML, YAML and.env, with pipelines likeread("users.csv") | where .active == "true" | sort .name. - A portable standard library. Files, paths, globbing, text and regex, time, hashing, HTTPS
fetchand zip/tar, with no coreutils needed. - Scripts get a CLI for free. The signature of
fn main(input: path, --out: path = "out.json")becomes the command line, with--helpand argument checking. - Task runner. Tasks in
ok.okwith arguments,needs, up-to-date checks, namespaces, confirmations,.envfiles and shell completions. - Trust. Projects you clone ask before their tasks run, and ask again when their files change.
- Errors that explain themselves. Each error points at the line, underlines the problem and suggests a fix.
Install
Download the binary for your machine below, check it against SHA256SUMS, rename it to ok (ok.exe on Windows) and put it on your PATH.
In a project, run ok self init once. It writes ./ok, ok.cmd and ok.ps1 wrappers that download this exact version (checksum-verified) the first time they run, so contributors and CI need nothing installed.
See the README, the language spec and the examples. The full list of changes is in the changelog.
Licensed under MIT OR Apache-2.0. Notices for the bundled dependencies are in THIRD_PARTY.md.