Skip to main content

Development Setup

Portless uses a pnpm workspace monorepo with Turborepo for build orchestration. The publishable package lives in packages/portless/.

Prerequisites

  • Node.js 20 or higher
  • pnpm (install via npm install -g pnpm)
  • Git
  • macOS or Linux (Windows support may work but is not officially supported)

Clone and Install

Build

Build all packages in the monorepo:
This uses Turborepo to build packages in dependency order.

Run Tests

Portless has a comprehensive test suite:

Linting and Type Checking

Local Development

To test your changes locally:
  1. Build the package:
  2. Link it globally:
  3. Use it in any project:
  4. After changes, rebuild and the linked version will update:

Debugging

For debugging the proxy server:

Monorepo Structure

Package Manager Rules

Portless uses pnpm for all package management:
Exception: Global install instructions for end users should use npm install -g since it’s universal and most developers have npm by default.

Making Changes

Code Style

  • No emojis anywhere in the codebase (code, comments, output, docs)
  • Use TypeScript for all source files
  • Follow the existing code style (enforced by ESLint and Prettier)
  • Write clear, concise comments for complex logic

Testing

  • Add tests for new features
  • Update existing tests when changing behavior
  • Ensure all tests pass before submitting a PR:

Documentation

When a change affects how humans or agents use portless, update all three of these:
  1. README.md - User-facing documentation
  2. skills/portless/SKILL.md - Agent skill for AI coding assistants
  3. packages/portless/src/cli.ts - --help output
This ensures consistency across all documentation surfaces.

Pull Request Guidelines

Before Submitting

  1. Test your changes:
  2. Update the changelog: Add a description of your changes to CHANGELOG.md under the “Unreleased” section (or create one if it doesn’t exist).
  3. Update documentation if needed (see above).
  4. Build successfully:

PR Title Format

Use conventional commit format:
  • feat: add support for custom proxy headers
  • fix: resolve certificate trust issue on Arch Linux
  • docs: update installation instructions
  • refactor: simplify route matching logic
  • test: add e2e tests for worktree detection

PR Description

Include:
  1. What - What changes did you make?
  2. Why - Why were these changes necessary?
  3. How - How did you implement the solution?
  4. Testing - What testing did you do?
Example:

Review Process

  1. A maintainer will review your PR
  2. Address any feedback or requested changes
  3. Once approved, a maintainer will merge your PR
  4. Your changes will be included in the next release

Commit Messages

Use clear, descriptive commit messages:

Release Process

(For maintainers)
  1. Update version in packages/portless/package.json
  2. Move “Unreleased” section in CHANGELOG.md to a new version section
  3. Commit changes: git commit -m "chore: release v0.x.x"
  4. Create git tag: git tag v0.x.x
  5. Push changes and tag: git push && git push --tags
  6. Publish to npm:

Getting Help

Code of Conduct

Be respectful and considerate of others. We’re all here to make portless better.
  • Be welcoming and inclusive
  • Respect differing viewpoints and experiences
  • Accept constructive criticism gracefully
  • Focus on what’s best for the community
  • Show empathy towards other community members
Thank you for contributing to Portless!