Skip to main content
Docs

ptool

Lua-powered scripting for shell and automation workflows.

Build small, sharp automation scripts with Lua, then ship them like command-line tools.

example.lua
ptool.use("v0.1.0")

local who = ptool.ask("Deploy target?", {
  default = "staging",
})

ptool.run("echo", {"deploying", who})

Start with the guide, then use the full API reference as your scripting manual.

Why ptool

A practical runtime for automation scripts

Script-first

Write plain Lua files and run them with ptool. The runtime exposes utilities under both ptool and p.

Batteries included

Use helpers for semver, files, HTTP, SSH, templates, databases, and text processing without assembling separate tools.

CLI-friendly

Mix shell commands, argument parsing, shebang scripts, and structured APIs in one place for practical automation.