pascal command comes from the @pascal-app/cli package. It runs the open-source
Pascal editor on your machine, connects MCP clients to your local projects, lets a
hosted autonomous agent link itself to the person accountable for it, hands briefs
to the hosted Architect, and deploys static viewers to Pascal hosting. This page is the
command reference. For a walkthrough of the first run, Docker self-hosting and local
agents, see Run Pascal locally.
Install
You need Node.js 22.13 or newer, with npm. Run the CLI without installing it:npx first run installs the same version globally once the editor is
healthy, so the shorter pascal command works afterwards. To install it yourself:
npx @pascal-app/cli.
Commands
Run the editor
--port asks for a specific loopback port. If it’s taken, Pascal says so and picks a
free one. Without it, the operating system assigns a free port. --foreground keeps the
editor attached to the terminal; the command then exits with the editor’s exit code.
Open projects
open, resume, projects and the project commands also accept --runtime <path>,
used when they have to start the editor.
Update and diagnose
--version takes an exact version such as 1.0.6, or latest. --runtime applies
when the target is the version you’re running. update doesn’t touch
your projects or a globally installed pascal command. Update the command itself with
npm install --global @pascal-app/cli@latest.
Connect MCP clients
pascal mcp connect uses the MCP service in the npm package, so it works on a machine
that has never downloaded the web runtime. pascal mcp setup needs the global pascal
command at the same version as the CLI you run it with. See
Local MCP with the Pascal CLI for
client setup.
Claim a hosted agent
Both commands read the agent’s hosted Pascal API key from
PASCAL_API_KEY, send it to
Pascal, and never store or print it. --no-open or --json skips opening the browser.
A new claim supersedes the agent’s previous code. These commands don’t upload or link
local projects. See
Agent accounts and workspace invitations.
Run the hosted Architect
These commands need@pascal-app/cli 1.0.6 or newer. They hand a brief to the Architect,
Pascal’s building model, which designs in one of your hosted projects while you follow
the run, detach from it, check on it or cancel it. They’re a thin client over the
Pascal API Responses endpoint: every run starts in
background mode, so it runs on
Pascal, not on your machine.
You need:
- A Pascal API key in
PASCAL_API_KEY: one you created in Settings, or an autonomous agent’s key. Its user or organization must be able to edit the project. The CLI sends it to Pascal and never stores or prints it. Without it, everyarchitectcommand fails withagent_api_key_missing. - A hosted project id for
--project. The Architect always works in an existing project; a run without one is rejected witharchitect_invalid_request. - Pascal credits. Each run spends credits, like a turn in the editor’s chat. See Credits.
Start a run
status
and cancel commands for it.
Run in the background
--detach returns as soon as Pascal accepts the run:
Check or cancel a run
status prints the run’s ID, status, model, project, credit cap, creation time and any
error, then the output so far. cancel prints the same details without the output.
A run that already ended comes back as it ended. Only the person who started a run can
cancel it.
With --json, run, status and cancel all print the run in this shape:
status is one of queued, in_progress, completed, failed, cancelled or
incomplete; text output writes in_progress as in progress. projectId,
maxCredits, createdAt and outputText are null when there’s nothing to report.
error is null, or an object with a code and a message, either of which can be
null. A run that ends incomplete carries its reason as the message, for example
max_credits when it reached its credit cap.
Deploy a hosted viewer
This command ships in the next@pascal-app/cli release after 1.1.1. It uploads a static
build of your viewer to Pascal hosting and makes it live at the address Pascal assigned
when you registered the viewer, such as https://misty-cove-4tg7.pascal-viewer.app.
It’s a thin client over the viewer hosting endpoints.
You need:
- A hosted viewer. Register it under Settings → Viewers → Host on Pascal and pass
its ID to
--viewer. The CLI doesn’t create viewers. - A Pascal API key in
PASCAL_API_KEYthat can manage the viewer’s workspace. The CLI sends it to Pascal and never stores or prints it.--dry-rundoesn’t need it.
index.html at its top. Hidden files, folders and
symlinks, such as .DS_Store, are skipped and listed, except a top-level .well-known/.
Any other symlink stops the deploy before anything uploads. So do files with an invalid path
or an extension that isn’t on the hosting allowlist; the error lists up to 10 of those so
you can fix the build in one pass. Limits are 2,000 files, 100 MiB in total and 25 MiB per
file.
--json:
url is the live address. It’s null only against an older Pascal server that doesn’t
return one. A dry run prints schemaVersion, "dryRun": true, fileCount, totalBytes,
skipped, and files with each file’s path, size, sha256 and contentType.
Plugins
The CLI doesn’t install plugins yet: any other
plugin subcommand fails with
plugin_command_unavailable. See Create a plugin.
The web editor runtime
The npm package holds only the CLI and the MCP service. The web editor itself is a separate archive per CLI version,pascal-web-runtime-<version>.tar.gz, attached to
the matching GitHub release. Each CLI
version pins its runtime by URL, size and SHA-256 digest.
First start
The first command that starts the editor (editor, start, open, resume,
projects, the project commands, or update) downloads the archive into
~/.pascal/tmp and shows its progress. Then it:
- Checks the archive against the SHA-256 digest published inside the npm package. On
a mismatch it deletes the download and installs nothing (
runtime_digest_mismatch). - Extracts it and installs it into
~/.pascal/runtime/<version>. - Starts the editor on it.
~/.pascal/data are separate and untouched.
After you upgrade the CLI, a running editor keeps its older runtime. pascal editor
warns you, and pascal restart or pascal update switches to the runtime the new CLI
pins.
Offline and air-gapped machines
Download the archive for your CLI version on a connected machine, copy it over, and pass it with--runtime:
--runtime goes through the same digest check as a download, so
it must be the archive for the CLI version you’re running. --runtime also accepts an
extracted runtime directory, which is installed as it is, without a digest check; use it
for a runtime you built yourself from the
editor repository.
When a download fails, the error (runtime_download_failed) prints the archive URL, its
expected digest and the --runtime command to run once you’ve copied the file.
Proxies
Downloads go throughHTTPS_PROXY (or ALL_PROXY), including a proxy with basic
authentication, and skip hosts listed in NO_PROXY. Only https:// archive URLs are
accepted.
Script the CLI
JSON output
Commands that take--json print one JSON document on stdout instead of text, for
example:
editor and start, --json also skips the automatic global install; add
--no-open to editor to keep the browser closed. pascal logs and
pascal mcp connect don’t take --json.
Errors
Without--json, an error prints Error: <message> on stderr. With --json, it prints
one line of JSON on stderr:
error is a stable code to branch on, message is for people, and details appears
only when there’s more to say, such as the HTTP status of a hosted request and the
error code Pascal answered with:
Exit codes
With
--foreground, pascal editor and pascal start exit with the editor process’s
own code. pascal architect run exits 0 only when the run ends completed, and 1
when it ends failed, cancelled or incomplete.
Common error codes
Environment variables
Related
- Run Pascal locally: first run, files on disk, updates and Docker
- Connect an AI agent: local and hosted MCP
- Pascal API (v1): call the hosted Architect from your own code
- Ask the Architect over MCP: the same runs from an MCP client