plankit

pk init

Configures a repository in one run:

No tag is placed: no version tag means nothing has been released, and the first release covers the whole history. Work committed before init is in it like everything after. Init says how many commits precede its own and names the command that keeps them as history instead, git tag v0.0.0 <sha> at the last of them. Nothing is pushed. The plans directory is not created here. The preserve hook creates it when the first plan is preserved, so a repository that never preserves a plan never gains the directory.

Starting a repository

git init -b main
pk init

pk init --push publishes main and develop once origin exists. Set the remote's default branch to develop so clones start on the working branch. A repository started on develop instead runs pk init --release main, and main is created at the root.

Procedure

Run pk init in the repository, or pk init --project-dir <dir> from anywhere else, and relay its output. There is nothing left to commit. pk init --push also pushes both branches, when the developer asks for that.

Usage

pk init
pk init --release main
pk init --branch dev
pk init --push
pk init --dry-run
pk init --format json

--release names the branch to guard and release into; the default is the branch checked out. When origin's default branch is another, init refuses rather than guard a working branch, and names both. A named branch that does not exist is created at the root commit. --branch names the working branch to create; the default is develop. --no-commit writes the files and stops, to read them first; guard blocks a session from committing them on the release branch, so the developer commits and branches by hand. --push pushes the release branch and the working branch to origin, and refuses to start without one. --dry-run previews every step without writing. --format json emits one object: root, release, created, committed, branch, pushed, and dryRun.

pk init refuses to run twice; edit .pk.json once it exists. pk status reads it back and reports the first problem, and notes a missing branch or plugin entry.

In a repository still carrying the files a v0.x pk setup copied in, the refusal says so and points at pk help overview: those files wire the hooks the plugin already ships, so each one fires twice.

Flags

  --branch <value>
        Working branch to create when the release branch is the only one (default develop)
  --dry-run
        Preview without making any changes
  --format <value>
        Output format: text or json (default text)
  --no-commit
        Leave .pk.json and .claude/settings.json uncommitted
  --push
        Push the release branch, the tag, and the working branch to origin
  --release <value>
        Release branch to guard (default: the branch currently checked out)

Every command also accepts --plain, --project-dir <value>, and --quiet; see pk help help.