Thank you for contributing to PKS CLI! This guide covers the development workflow, release process, and conventions.
PKS CLI uses a single-branch model with main as the only long-lived branch:
- Maintainers (and agents working for them) commit and push directly to main
- Everyone else opens a PR against main; without write access a direct push is rejected
- Every push to main publishes preview packages automatically (
X.Y.Z-preview.{build}) - Release Please creates Release PRs on main
- Merging a Release PR publishes stable releases to NuGet and npm
maintainer: push to main (CI validates after the push)
external: fork → PR to main (CI validates) → merge
↓
Preview package published (6.3.0-preview.42)
Release Please updates the Release PR
↓
When ready: merge the Release PR
↓
Stable release published (6.3.0)
The Release PR is your gate. Features accumulate on main, Release Please keeps updating the PR with the changelog, and you merge it when you're ready to cut a release.
# Clone the repository
git clone https://github.com/pksorensen/pks-cli.git
cd pks-cli
# Build and test
dotnet build PKS.CLI.sln
dotnet test
# Run locally without installing
cd src
dotnet run -- [command] [options]Maintainers: run the CI checks locally, then commit and push to
main. There is no branch or PR step.
External contributors:
# 1. Fork the repository, then create a feature branch from main
git checkout main
git pull origin main
git checkout -b feat/my-feature
# 2. Develop with conventional commits
git commit -m "feat(init): add Blazor template support"
# 3. Push and open PR against main
git push origin feat/my-feature
gh pr create --base main --title "feat(init): add Blazor template support"This project uses Conventional Commits to drive automatic versioning and changelog generation.
<type>(<scope>): <subject>
<body>
<footer>
| Type | Description | Version Bump |
|---|---|---|
feat |
New feature | Minor (1.0.0 → 1.1.0) |
fix |
Bug fix | Patch (1.0.0 → 1.0.1) |
perf |
Performance improvement | Patch |
docs |
Documentation only | No bump |
style |
Formatting, no code change | No bump |
refactor |
Code restructuring | No bump |
test |
Adding/modifying tests | No bump |
build |
Build system/dependencies | No bump |
ci |
CI configuration | No bump |
chore |
Maintenance | No bump |
revert |
Revert a commit | Patch |
Breaking changes trigger a major version bump:
# Using ! after type/scope
feat!: change configuration file format
# Or using BREAKING CHANGE footer
feat: remove deprecated API endpoints
BREAKING CHANGE: The /api/v1/* endpoints have been removed.
Use /api/v2/* instead.Scopes map to Release Please package components:
| Scope | Package | Example |
|---|---|---|
cli |
pks-cli (main CLI) | feat(cli): add status command |
init |
CLI init command | fix(init): handle spaces in project name |
agent |
Agent management | feat(agent): add list subcommand |
mcp |
MCP integration | fix(mcp): resolve SSE timeout |
deploy |
Deployment features | feat(deploy): add Coolify support |
hooks |
Git hooks | fix(hooks): correct validation logic |
devcontainer |
DevContainer template | feat(devcontainer): add Node.js support |
claude-dotnet-9 |
Claude .NET 9 template | fix(claude-dotnet-9): update base image |
claude-dotnet-10-full |
Claude .NET 10 template | feat(claude-dotnet-10-full): add Aspire |
pks-fullstack |
Fullstack template | feat(pks-fullstack): add Blazor frontend |
templates |
All templates | fix(templates): normalize line endings |
- Keep the subject line under 50 characters
- Use imperative mood ("add feature" not "added feature")
- Don't end the subject line with a period
- Separate subject from body with a blank line
- Use the body to explain what and why, not how
- Reference issues in the footer (
Closes #42)
- Open PRs against main
- CI runs automatically: format check, build, tests, hooks validation
- Get at least one review approval
- Squash merge preferred for clean commit history
- Delete your feature branch after merge
CI runs on every PR and on every push to main. All of these must pass:
dotnet format --verify-no-changes— code formattingdotnet build --warnaserror— clean builddotnet test --filter "Category=Core&Reliability!=Unstable"— core tests- Hooks validation
PKS CLI uses Release Please in manifest mode with per-package versioning.
| Package | Path | Tag Format | NuGet ID |
|---|---|---|---|
| pks-cli | src/ |
v6.2.0 |
pks-cli |
| DevContainer | templates/devcontainer/ |
devcontainer-v5.0.0 |
PKS.Templates.DevContainer |
| Claude .NET 9 | templates/claude-dotnet-9/ |
claude-dotnet-9-v4.0.0 |
PKS.Templates.ClaudeDotNet9 |
| Claude .NET 10 Full | templates/claude-dotnet-10-full/ |
claude-dotnet-10-full-v5.0.0 |
PKS.Templates.ClaudeDotNet10.Full |
| PksFullstack | templates/pks-fullstack/ |
pks-fullstack-v4.1.0 |
PKS.Templates.PksFullstack |
| File | Purpose |
|---|---|
release-please-config.json |
Package definitions and release settings |
.release-please-manifest.json |
Per-package version tracking |
src/version.txt |
CLI version (managed by Release Please) |
templates/*/version.txt |
Template versions (managed by Release Please) |
1. Conventional commits land on main (maintainer push or merged PR)
↓
2. Preview NuGet packages published automatically (X.Y.Z-preview.{build})
↓
3. Release Please creates/updates a Release PR with changelog
↓
4. Review the Release PR — it previews the version bump and changelog
↓
5. Merge the Release PR when ready → triggers:
• NuGet stable package publish
• npm stable package publish (@latest tag)
• GitHub Release creation
Every push to main automatically publishes preview packages, separate from Release Please:
- NuGet:
pks-cliversionX.Y.Z-preview.{build_number} - Install with:
dotnet tool install -g pks-cli --prerelease
These allow testing the latest code without waiting for a stable release.
# Full test suite
dotnet test
# Core tests only (matches CI)
dotnet test --filter "Category=Core&Reliability!=Unstable"
# Format check
dotnet format --verify-no-changes PKS.CLI.sln- Run
dotnet format PKS.CLI.slnto fix formatting - Run
dotnet build --warnaserrorto check for warnings - Run
dotnet testto ensure all tests pass - Verify commit messages follow conventional commit format
| Script | Usage | Purpose |
|---|---|---|
scripts/get-package-version.sh |
./scripts/get-package-version.sh [scope] |
Read current version |
scripts/update-version.sh |
./scripts/update-version.sh <version> [scope] |
Update version in csproj/version.txt |
scripts/sync-npm-versions.sh |
./scripts/sync-npm-versions.sh |
Sync npm package versions |
Scopes: cli, devcontainer, claude-dotnet-9, claude-dotnet-10-full, pks-fullstack, all
Open an issue at pksorensen/pks-cli!