Skip to content

ok v0.1.0

Choose a tag to compare

@github-actions github-actions released this 25 Nov 22:00
· 35 commits to main since this release

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 --release passes each word as one argument, so quoting can't break. Output streams, is captured, or is piped depending on where run stands.
  • Data formats built in. read, write, parse and to handle JSON, JSON Lines, CSV, TSV, TOML, YAML and .env, with pipelines like read("users.csv") | where .active == "true" | sort .name.
  • A portable standard library. Files, paths, globbing, text and regex, time, hashing, HTTPS fetch and 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 --help and argument checking.
  • Task runner. Tasks in ok.ok with arguments, needs, up-to-date checks, namespaces, confirmations, .env files 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.