Quickstart
From nothing to a deployed change.
-
Install the CLI
Section titled “Install the CLI”Terminal window curl -fsSL https://docs.polymesa.com/install.sh | shTerminal window polymesa --versionOther platforms and manual downloads: Install.
-
Authenticate
Section titled “Authenticate”Terminal window polymesa auth login --url https://api.polymesa.comOpens a browser, then stores the token under the
defaultalias. Confirm:Terminal window polymesa auth whoami -
Pull your configuration
Section titled “Pull your configuration”Terminal window polymesa retrieve ./my-workspacecd my-workspaceYou now have
entities/,guest_files/,automations/,groups/,share_rules/, andemail_senders/. This is a good moment togit init— configuration is code, and deploys are much less frightening with history. -
Generate types
Section titled “Generate types”Terminal window polymesa types .Writes entity definitions into
.polymesa/so your editor can autocomplete against your actual schema. -
Write a trigger
Section titled “Write a trigger”Create
automations/Issue/ApplyDefaults.ts:import { BeforeInsert, BeforeResult } from "platform:triggers";import { Issue } from "platform:entities";export default class ApplyDefaults implements BeforeInsert<Issue> {beforeInsert(newRecords: Issue[]): BeforeResult<Issue> {for (const issue of newRecords) {issue.priority ??= "P3";issue.status ??= issue.assignee_id ? "assigned" : "new";}return newRecords;}}Note the array. Triggers are always bulk.
-
Preview the deploy
Section titled “Preview the deploy”Terminal window polymesa deploy . --dry-runReports what would change per folder, without writing anything. Read it before every real deploy — this is where an unintended delete shows up.
-
Deploy
Section titled “Deploy”Terminal window polymesa deploy .Create an issue in the app and confirm the defaults applied.
- Command reference — every command and flag
- Triggers — validation, rejection, bulk patterns
- Querying with SQL — reads, writes, and injection safety