Skip to content

User's Guide

Pak is a package manager for application components. It installs, caches, and manages packages sourced from GitHub repositories, npm, or local directories. Pak is language and runtime agnostic — originally designed for C/C++ embedded systems projects, but works with any project type.

Features

  • Install, uninstall, upgrade, and list packages
  • Global package cache at ~/.paks for fast repeated installs
  • Automatic recursive dependency resolution
  • Semantic versioning (SemVer 2.0) with flexible range expressions
  • Export a subset of package files to your project directory
  • Override third-party package configurations locally
  • Profile-based configuration (dev/prod)
  • Lifecycle event scripts (preinstall, postinstall, etc.)
  • Sources packages from GitHub, npm, or local directories

How Pak Works

When you install a package, Pak:

  1. Checks the local cache (~/.paks) for a matching version
  2. If not cached, resolves the package endpoint (GitHub, npm, or local path) and downloads it
  3. Copies the package into your project's paks/NAME/ directory
  4. Exports selected runtime files to lib/NAME/ (if export is enabled)
  5. Records the dependency in your package.json

Directory Layout

project/
    package.json        # Project manifest — paks dependencies defined here
    paks/               # Installed packages (full package contents)
        NAME/
    lib/                # Exported package files (runtime use)
        NAME/
~/.paks/                # Global cache
    NAME/OWNER/VERSION/

Next Steps

Released under the GPL-2.0 License.