Skip to content

project command

This command allows you to work with formae projects.

Usage

formae project [OPTIONS] [COMMAND]

Commands

Command Description
init Initialize a project

Initializing a project

Usage

formae project init [OPTIONS] [path]

Options

Option Description
--include Packages to include (can be specified multiple times) [default: "aws"]
--schema Schema to use for the project [default: "pkl"]

Package Resolution

By default, packages are resolved from the formae package registry at hub.platform.engineering. For plugin developers testing locally-installed plugins, append @local to the package name to resolve from the local plugin directory instead.

Examples:

# Initialize with AWS (resolved from registry)
formae project init --include aws ./myproject

# Initialize with multiple packages from registry
formae project init --include aws --include gcp ./myproject

# Initialize with a local plugin (for plugin developers)
formae project init --include aws --include myplugin@local ./myproject

When using @local, formae looks up the plugin in ~/.pel/formae/plugins/<name>/ and resolves the schema from the local installation directory.

Generated Files

The command creates:

  • PklProject - PKL project configuration with package dependencies
  • PklProject.deps.json - Resolved dependency lock file
  • main.pkl - Starter forma file

Example PklProject with mixed dependencies:

amends "pkl:Project"

dependencies {
  ["formae"] {
    uri = "package://hub.platform.engineering/plugins/pkl/schema/pkl/formae/formae@0.80.0"
  }
  ["aws"] {
    uri = "package://hub.platform.engineering/plugins/aws/schema/pkl/aws@0.80.0"
  }
  // Local plugin resolved from ~/.pel/formae/plugins/myplugin/v0.1.0/schema/pkl/
  ["myplugin"] = import("/home/user/.pel/formae/plugins/MYPLUGIN/v0.1.0/schema/pkl/PklProject")
}