What is the PAS CLI?

The PAS CLI is the command line tool you use to create, develop, and run software for the Scheer PAS platform. You install it once and call it through pas. It connects your computer to a platform, creates a PAS Code project, generates the components of your application, and runs that project on your computer or on a cluster. What you build with it is deployed and operated in the Scheer PAS Control Hub (refer to The Control Hub for further information).

Purpose of the PAS CLI

With the PAS CLI you can:

  • Connect your computer to one or more Scheer PAS platforms and manage your Git access to them.

  • Create a PAS Code project with the structure the platform expects.

  • Generate the components of an application: apps and services, together with the agents provided by a service.

  • Run and test the project on your computer.

The PAS CLI is the only supported way to create a project and its components. The build pipeline and the platform rely on the structure the PAS CLI generates.

We recommend that you let the coding agent write the configuration for you. We have set it up with the necessary capabilities.

The PAS CLI Commands

Every action of the PAS CLI is a command. You call a command through pas, followed by the command name and its arguments:

pas <command> [arguments] [options]

The commands are grouped by the task they belong to:

  • pas platform groups everything about the connection between your computer and a platform: the sign-in, the active platform, and your Git access.

  • pas new creates a project.

  • pas generate groups the generators that scaffold apps, services, and agents.

  • pas start runs the project, on your computer or on a cluster.

  • pas info reports the installed PAS CLI.

The same conventions apply to every command. Required arguments stand in angle brackets, optional arguments in square brackets, and the PAS CLI prompts you for a value you leave out. Add --help to any command to print its arguments and options.

For the complete list of commands with all their options, refer to Commands.

AI-Assisted Development

The PAS CLI ships skills for AI coding assistants. A skill is a packaged instruction set that your assistant loads when it recognizes a matching task. Each skill describes which command to call, which options apply, and what to do with the result.

Skill

What it covers

pas-generate-project

Creating a project, with or without example components.

pas-generate-app

Generating a frontend application.

pas-generate-service

Generating a backend service.

pas-generate-agent

Generating an agent inside a service.

pas-generate-bundle-deployment

Grouping components that are built and deployed together.

The skills keep your assistant on the supported path: it scaffolds through the PAS CLI instead of writing project files by hand, so your project stays consistent with what the platform expects. They cover scaffolding only. They do not decide what your application does, and they do not deploy anything. Each skill also requires an approved specification before it scaffolds, so the decision about what is built stays with you.

How the PAS CLI Fits into PAS Code

The PAS CLI covers the part of PAS Code that happens on your computer. Everything that happens after you push is the responsibility of the platform and the Control Hub (refer to The Control Hub for details).

The PAS CLI in the Toolchain

There are three ways to run what you build, and the PAS CLI covers the first two:

  • Local development. pas start runs the project on your computer. This is the fastest way to see a change.

  • Cluster development. pas start --profile <profile> switches your Kubernetes context to the cluster named in the profile file at ~/.pas/profiles/<profile>.json and starts Tilt, which runs the project on that cluster. Use it when you need conditions close to the platform rather than speed.

  • Publishing to the platform. A push builds and publishes your project, you can then deploy it from within the Control Hub.

The PAS CLI works on your computer and against two services of the active platform: the identity service, for the sign-in, and the Git service, for your repositories. It stores what it needs locally. Your platform connections are stored in ~/.pas/platforms.json, your cluster profiles in ~/.pas/profiles/.

From Source to a Deployable Project

A change travels the same path every time:

  1. pas platform login connects your computer to a platform.

  2. pas new creates the project and, on request, its repository on the platform.

  3. pas generate adds the components.

  4. pas start runs the project while you develop it.

  5. git push hands the project to the platform pipeline.

The pipeline needs no further configuration, because the PAS CLI generated your project to the structure the pipeline expects.

What Happens After the Push

Your push starts the platform pipeline. The pipeline builds the components of your project, creates a version, publishes the images and the configuration, and registers the version with the platform. The Control Hub lists every published project and version in the Projects view. From there, deployment is a Control Hub task.

📗