Files
pad/skills/INSTALL.md
T
xarmian ac05d8a2b1 fix(cli): fail fast and quiet on non-interactive workspace init (BUG-2538, BUG-2577) (#1111)
* Fail fast and quiet on non-interactive `pad workspace init`

BUG-2538: initCmd drove runBrowserSetup/doBrowserLogin unconditionally
when the instance needed first-run setup or login, blocking a
non-interactive caller (script, CI, headless agent) on a browser
handoff nobody can complete. Gate both branches on
canPromptForConfig(), mirroring the precedent already used by
`pad init` (init.go:205-206), and fail fast with a hint pointing at
`pad init --email/--name/--password` or `pad auth setup`/`pad auth
login`.

BUG-2577: offerSkillInstall (shared by workspace init and workspace
link) printed a "(Y/n): " prompt even when the answer would be
auto-defaulted rather than read, because it gated on cli.IsTerminal()
(stdin only). Switch to canPromptForConfig() (stdin AND stdout),
which is the same predicate now used for BUG-2538 and the more robust
of the two checks already in the codebase.

Claude-Session: https://claude.ai/code/session_01BhQoeaWXxJbvw86ezzK8dt

* Fix wrong remedy in BUG-2538's !Authenticated error message

codex r1: the !Authenticated branch suggested `pad init
--email/--name/--password`, but those headless flags only bootstrap
the first admin account and only fire when SetupRequired — for an
already-set-up-but-unauthenticated instance, `pad init` falls through
to its own ungated Step 4 re-auth (BUG-2592), so the suggestion
relocated the hang instead of avoiding it. Drop the pad-init
suggestion in this branch only; point at `pad auth login` and note
there's no non-interactive login path yet. SetupRequired branch is
unchanged — its pad-init suggestion is correct for that state.

Claude-Session: https://claude.ai/code/session_01BhQoeaWXxJbvw86ezzK8dt

* Fix two more inaccurate remedies flagged by codex r2

1. SetupRequired branch: `pad init --email/--name/--password` silently
   eats the caller's workspace name/--template — pad init creates its
   own CWD-named workspace as a side effect, so a re-run of the
   original `pad workspace init <name> --template <t>` short-circuits
   on the link pad init just made with no signal <name>/<t> were
   ignored. Switch the remedy to `pad auth setup
   --email/--name/--password`, which bootstraps the admin account only
   (no workspace side effects), then re-run the original command.

2. !Authenticated branch: the "no non-interactive login path exists"
   claim was false — `pad auth login --interactive` reads
   email/password off a plain, TTY-ungated bufio.Reader
   (doInteractiveLogin, cmd_auth.go:554+; BUG-1886 made it
   piped-bytes-safe), so it works fine when credentials are piped in.
   Reworded to point at it and dropped the incorrect BUG-2592
   reference (that bug tracks pad init's ungated Step 4, not a missing
   login mechanism).

TestWorkspaceInitNonTTYSetupRequired's assertion updated from "pad
init" to "pad auth setup" to match; TestWorkspaceInitNonTTYNotAuthenticated
needed no change (still asserts "pad auth login").

Claude-Session: https://claude.ai/code/session_01BhQoeaWXxJbvw86ezzK8dt

* Update skill docs invalidated by the non-interactive fast-fail fix

codex r3: BUG-2538/BUG-2577 made this diff's own docs stale. Four
files (skills/pad/SKILL.md, plugin/skills/pad/SKILL.md,
plugin/skills/onboard/SKILL.md, plugin/skills/capture/SKILL.md) still
say non-interactive `pad workspace init` on a configured-but-
unauthenticated machine "blocks for minutes with no non-interactive
fallback" — that was true pre-fix (per BUG-2541's verification) and is
false now. Reworded the WHY without dropping the underlying
do-not-run-blind guidance: an agent's tool call is always
non-interactive, so it now gets a fast, actionable error instead of a
hang, but the error still just says a human needs an interactive
terminal — `pad auth whoami` remains the right check to run instead.
Where the docs' `pad init` claims are about the still-unfixed
session-expired path (BUG-2592, this diff's Step-4 sibling, left
untouched), those claims are unchanged and now cite BUG-2592
explicitly.

skills/INSTALL.md:24 updated separately (P3): notes the
non-interactive silent-install branch of `pad workspace init`'s skill
offer, alongside the existing interactive-prompt description.

Docs only, no Go changes — go build/test and embed.go's
//go:embed skills/pad/SKILL.md still resolve; no test asserts the old
wording.

Claude-Session: https://claude.ai/code/session_01BhQoeaWXxJbvw86ezzK8dt
2026-08-15 18:41:50 -04:00

2.0 KiB

Pad — Claude Code Skill

Installation

1. Install the Pad binary

# Via Homebrew
brew install PerpetualSoftware/tap/pad

# Or build from source
git clone https://github.com/PerpetualSoftware/pad
cd pad && make build
cp pad /usr/local/bin/

2. Initialize a workspace and install the skill

cd ~/projects/myapp
pad workspace init "My App"

pad workspace init will detect that the /pad skill isn't installed and offer to install it for detected tools — interactively it prompts (Y/n); non-interactively (stdin or stdout isn't a terminal) it installs silently for all detected tools instead of prompting. You can also install manually:

pad agent install claude     # Install for Claude Code
pad agent status             # Check installed integrations
pad agent update             # Update the version bundled in the binary

When you update the pad binary, run pad agent status to check if your installed integrations are outdated. If they are, run pad agent update to sync them.

3. Use it

Type /pad in Claude Code followed by anything in natural language:

/pad what should I work on next?
/pad I finished the OAuth fix
/pad create a task to add rate limiting --priority high
/pad let's brainstorm about the API redesign
/pad how far along are we?
/pad prep for standup

The /pad skill is a natural-language interface — there are no rigid commands. It interprets your intent and uses the pad CLI under the hood.

How It Works

  1. The /pad skill is a single SKILL.md file installed at .claude/skills/pad/SKILL.md
  2. It tells Claude how to use the pad CLI to manage your project
  3. The CLI auto-starts a local server on first use — no setup needed
  4. Data is stored in SQLite at ~/.pad/pad.db
  5. The web UI is at http://localhost:7777 (embedded in the binary)
  6. All agent actions are attributed as "agent via skill" in the activity feed
  7. The agent loads and follows your project conventions and playbooks automatically

Web UI

pad server open
# or visit http://localhost:7777