@postxl/cli
v1.4.1
Published
Command-line interface for PostXL code generation framework
Readme
PXL CLI
Small command line tool that helps with the development of PXL projects.
Currently, the CLI provides the following commands:
pxl generate: Generate code for a PXL projectpxl create-project(alias:pxl new): Create a new PostXL project
pxl generate
The pxl generate command generates code for a PXL project.
Usage
In the project root, ensure that a project-schema.json and a generate.ts file exist. See the template project for an example.
cd /projects/my-project
pxl generate <project-name>See pxl generate --help for more information.
pxl create-project / pxl new
The pxl create-project command creates a new PostXL project with a selected schema template. It scaffolds the project structure, installs dependencies, runs the initial code generation, and generates the Prisma client.
Usage
Run the command from the PostXL repository root:
pxl create-project
# or
pxl newThe CLI will interactively prompt you for:
- Project name: The display name for your project
- Project slug: A URL-friendly identifier (auto-suggested from the name)
- Schema template: Choose from available starter schemas
- Project location: Either a standalone project (outside the workspace) or a workspace project (in the
projects/folder)
Options
| Option | Description |
| --------------------------- | ------------------------------------------- |
| -n, --name <name> | Project name (skip interactive prompt) |
| -s, --slug <slug> | Project slug (skip interactive prompt) |
| --schema <schema> | Schema template to use |
| -p, --project-path <path> | Custom path for the generated project |
| --skip-git | Skip initializing a git repository |
| --skip-generate | Skip running the initial project generation |
Examples
# Interactive mode
pxl new
# Non-interactive with all options
pxl new --name "My App" --slug my-app --schema simple
# Create at a specific path
pxl new --name "My App" -p /path/to/my-appSee pxl create-project --help for more information.
