メインコンテンツまでスキップ
ドキュメント

ptool

シェルと自動化ワークフローのための Lua スクリプティング。

Lua で小さく鋭い自動化スクリプトを書き、コマンドラインツールのように配布して使えます。

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

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

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

まずガイドから始めて、次にモジュール別の Lua API ドキュメントをスクリプトの手引きとして参照してください。

ptool を選ぶ理由

自動化スクリプトのための実用的なランタイム

スクリプトファースト

普通の Lua ファイルを書いて ptool で実行できます。ランタイムは ptool と p の両方にユーティリティを公開します。

機能を同梱

semver、ファイル、HTTP、SSH、テンプレート、データベース、テキスト処理のヘルパーを、別々のツールを組み合わせずに使えます。

CLI 向け

シェルコマンド、引数解析、shebang スクリプト、構造化 API を 1 か所にまとめ、実用的な自動化を組み立てられます。

For AI

Give assistants raw Markdown instead of rendered HTML

ptool publishes the source docs as static files so agents can read the original Markdown directly.

1. Start here

Tell your assistant to fetch the manifest first. It lists every document title, locale, permalink, and raw Markdown URL.

/raw/manifest.json

3. Tell the model what to do

Example: read the manifest, select the matching locale and page, then load the raw Markdown instead of scraping the rendered site.

Fetch /raw/manifest.json, find the page for "/docs/intro", then read its rawUrl.