Skip to main content

Planhub

Planhub is a CLI app that syncs local planning artifacts (plans, issues, milestones written as .md files) to GitHub Issues via the API.

Goals

  • Keep planning artifacts in git and reviewable.
  • Generate/update GitHub issues and milestones from local files.
  • Make planning conversational: we can edit .md files and sync later.

How It Works

Planhub keeps planning data next to the code it describes. Each repository gets a .plan/ folder containing milestones and issues as Markdown files with YAML front matter. You edit these files like normal docs, then planhub sync maps them to GitHub issues and milestones.

Installation

Global install from PyPI (recommended for CLI usage). pipx gives you a clean CLI install without polluting your system Python, and puts planhub on your PATH:

pipx install planhub

Project-local install with uv (inside your repo). This keeps the tool in a virtual environment for that repo:

uv venv
uv pip install planhub

First Run (Required)

Run planhub setup immediately after installation to create the global config at ~/.planhub/config.yaml (created only if missing):

planhub setup

Without this setup step, sync defaults and other CLI behavior may be missing.

Commands

  • planhub init
    • Creates the standard .plan/ structure in the current repo.
    • Use --dry-run to preview the folders that would be created.
  • planhub setup
    • Creates the global config file at ~/.planhub/config.yaml (if missing).
    • Use --dry-run to preview what would be created.
  • planhub issue <title>
    • Creates a new GitHub issue with the given title.
    • Requires credentials and a GitHub remote.origin.url.
  • planhub sync
    • Reads .plan/ files and creates or updates GitHub issues and milestones.
    • Imports existing GitHub issues into .plan/ when credentials and a GitHub remote.origin.url are available.
    • Imports all GitHub milestones into .plan/ (including open milestones with only closed issues, empty milestones, and closed milestones under .plan/archive/milestones). Closed milestone issues are imported into the milestone folder; closed backlog/root issues are not imported as files.
    • Prints explicit operation counts for import/create/update/archive/delete.
    • Writes the GitHub number back into each file after creation.
    • GitHub is the source of truth for issue state during sync.
    • GitHub is also the source of truth for milestone state during sync; local milestone files are reconciled from GitHub before archive moves run.
    • For existing issues, sync does not push local state or state_reason to GitHub; it reconciles those fields from the GitHub response.
    • Sync runs in three phases: parse files, build a sync plan, then apply it.
    • Use --dry-run to validate files without writing changes.
    • Use --verbose for path-level planned changes, or --compact for concise output. CLI flags override config.
    • Creating issues or milestones also requires credentials and a GitHub remote.origin.url.
    • Closed synced root issues are archived under .plan/archive/issues by default (or deleted when sync.closed_issues.policy: delete is configured).
    • Milestone issues remain inside their milestone folder. When milestone.md has state: "closed", sync moves the whole milestone directory to .plan/archive/milestones. If set back to state: "open", sync moves that directory back under .plan/milestones.

Credentials

Planhub can reuse your GitHub CLI session or a token stored in the environment. The simplest path is to authenticate once with gh, and the CLI will fetch a token automatically.

gh auth login

Alternatively, create a personal access token and export it:

  1. GitHub → Settings → Developer settings → Personal access tokens.
  2. Create a fine-grained token for the target repo(s).
  3. Grant Issues: Read (and Write if you will push updates later).
export GITHUB_TOKEN=ghp_your_token_here

Suggested Data Repo Layout

.plan/
  issues/
    20260127-backlog-issue.md
  milestones/
    stage-1/
      milestone.md
      issues/
        issue-001.md
      assets/
        diagram.png

Front Matter Tips

  • milestone can be a title or a number; use milestone: null to clear it.
  • Use labels: [] or assignees: [] to remove them on GitHub.
  • state_reason requires state: "closed".

Config

  • ~/.planhub/config.yaml and .plan/config.yaml are layered (repo overrides global).
  • Set sync.behavior.verbosity to compact (default) or verbose.

Development

Setup

Install development dependencies:

uv sync --dev

Pre-commit Hooks

This project uses pre-commit to run code quality checks before commits. Install the hooks:

uv run pre-commit install

The hooks will automatically run on git commit. They check for:

  • Code formatting and linting (ruff)
  • Trailing whitespace and end-of-file fixes
  • YAML, JSON, and TOML syntax
  • Merge conflicts and other common issues

To run hooks manually:

uv run pre-commit run --all-files

Version Bumping

This project includes a grow.py script for bumping versions and creating releases:

./grow.py

The script will:

  1. Read the current version from pyproject.toml
  2. Show commits since the last tag
  3. Prompt for the new version
  4. Update the version in pyproject.toml
  5. Create a commit with a changelog of commits since the last release
  6. Create an annotated tag with the new version
  7. Optionally push commits and tags to the remote repository

The changelog commit includes all commit messages since the last tag, making it easy to see what changed in each release on GitHub.

License

Planhub is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). See LICENSE for the full text.

Next Steps

  • Implement the parsing + GitHub sync logic.
  • Add CI to validate file formats.

Metadata

Release files for planhub 0.3.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for planhub 0.3.6
File Size Uploaded Provenance
planhub-0.3.6.tar.gz 130.3 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for planhub 0.3.6
File Interpreter ABI Platform
planhub-0.3.6-py3-none-any.whl Python 3 none any Details

Total release size: 171.7 kB

Release files / planhub-0.3.6.tar.gz

Download URL planhub-0.3.6.tar.gz
Size 130.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a2bd186f430e21be7684c42fe0ff659100a6b5f4b837746312195f71355ae35b
BLAKE2b-256 checksum
How to use checksums
190da91c3cf462d5866f47973b4c8a9b7f1b20a326315af5a1b4d1e52b357487
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 19, 2026.

Transparency log

Release files / planhub-0.3.6-py3-none-any.whl

Download URL planhub-0.3.6-py3-none-any.whl
Size 41.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6b7a7bd12dd02c6566fd30b4c8734f4c0f2d86854c070f3c61f647b97301b3cc
BLAKE2b-256 checksum
How to use checksums
e2a8bf59bf5d7deb81907311fa0598d93f8ceefe9f54b33291d48993b594e736
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 19, 2026.

Transparency log

Security for planhub 0.3.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for planhub-0.3.6.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page