PlaycademyPlaycademy

Commands

Complete reference for all Playcademy CLI commands

Overview

This is a comprehensive reference of all available Playcademy CLI commands organized by category.

Authentication

login

Authenticate with your Playcademy account.

Command
$ playcademy login$ playcademy login --sso                        # Browser-based SSO$ playcademy login --env production             # Login to production$ playcademy login -e user@email.com            # Prompts for password$ playcademy login -e user@email.com -p mypass  # Non-interactive

Options:

OptionDescription
-e, --email <email>Email address (prompts for password if -p not provided)
-p, --password <pass>Password (use with -e for non-interactive login)
--ssoUse browser-based SSO authentication
--env <env>Environment to authenticate with (staging or production)

logout

Remove stored credentials.

Command
$ playcademy logout               # Logout from default profile$ playcademy logout work          # Logout from named profile$ playcademy logout --env production

Arguments:

ArgumentDescriptionDefault
[profile]Profile name to logout fromdefault

Options:

OptionDescription
--env <env>Environment to logout from (staging or production)

me

Display current user information and authentication status.

Command
$ playcademy me$ playcademy me --env production

Shows your:

  • User ID and email
  • Developer status
  • Current environment
  • Active profile

Options:

OptionDescription
--env <env>Environment to check user information from (staging or production)

profiles / profiles list

List all stored authentication profiles across all environments.

Command
$ playcademy profiles       # Defaults to list$ playcademy profiles list$ playcademy profiles ls    # Alias

profiles remove

Remove a specific authentication profile.

Command
$ playcademy profiles remove            # Remove default profile$ playcademy profiles remove work       # Remove named profile$ playcademy profiles rm work           # Alias$ playcademy profiles remove --env production work

Arguments:

ArgumentDescriptionDefault
[name]Profile name to removedefault

Options:

OptionDescription
--env <env>Environment to remove profile from (staging or production)

profiles reset

Remove all authentication profiles across all environments.

Command
$ playcademy profiles reset$ playcademy profiles clear   # Alias

Requires confirmation before removing all profiles.


Developer Access

dev

Start the local backend development server.

Command
$ playcademy dev$ playcademy dev --port 9000      # Custom port$ playcademy dev --no-reload      # Disable hot reload$ playcademy dev --no-logger      # Disable request logging

Options:

OptionDescription
-p, --port <port>Backend server port (default: 8788)
--no-reloadDisable hot module replacement
--no-loggerDisable HTTP request logging

See Development Guide for details.

dev apply

Apply for developer status to deploy your project.

Command
$ playcademy dev apply$ playcademy dev apply --env production

Approval is typically granted within 8 hours. Check your status with playcademy dev status.

Need help? Join our Discord

Options:

OptionDescription
--env <env>Environment to apply for developer status in (staging or production)

dev status

Check your current developer status.

Command
$ playcademy dev status$ playcademy dev status --env production

Shows whether your developer application is:

  • none - Not applied yet
  • pending - Application submitted, awaiting review
  • approved - Developer access granted

Options:

OptionDescription
--env <env>Environment to check developer status from (staging or production)

Project Setup

create

The fastest way to start a new Playcademy project.

bun create playcademy my-app
npm create playcademy my-app
pnpm create playcademy my-app
yarn create playcademy my-app

Arguments:

ArgumentDescriptionDefault
[project-dir]Directory name for new project(prompts if omitted)

init

Initialize Playcademy in an existing project (adds config to current directory).

Command
$ playcademy init$ playcademy init --force    # Overwrite existing config

When to Use init vs create

  • Use create playcademy to start a brand new project from scratch
  • Use playcademy init to add Playcademy to an existing project

Options:

OptionDescription
-f, --forceOverwrite existing configuration file

Timeback

timeback init

Add Timeback integration to an existing project.

Command
$ playcademy timeback init

Prompts for Timeback configuration (subjects, grades) and updates your playcademy.config.js file.

After the Fact

Use this if you didn't enable the Timeback integration during playcademy init

timeback setup

Configures Timeback resources for your project.

Command
$ playcademy timeback setup$ playcademy timeback setup --dry-run    # Preview without making changes$ playcademy timeback setup -v           # Verbose output$ playcademy timeback setup --env production

Requires Timeback configuration in your playcademy.config.js:

playcademy.config.js
export default {
    name: 'My Project',
    integrations: {
        timeback: {
            courses: [
                {
                    subject: 'Math',
                    grade: 3,
                    metadata: {
                        metrics: {
                            totalXp: 1000, // REQUIRED before running setup
                        },
                    },
                },
                // ... other courses
            ],
        },
    },
}

Required: totalXp

You must set totalXp for each course before running setup. The command will fail if any course is missing this value.

Options:

OptionDescription
--dry-runPreview changes without creating resources
-v, --verboseOutput detailed information
--env <env>Environment to setup Timeback in (staging or production)

timeback verify

Verify Timeback resources are correctly configured.

Command
$ playcademy timeback verify$ playcademy timeback verify -v          # Verbose output$ playcademy timeback verify --env production

Checks that all OneRoster resources (course, classes, academic session, etc.) exist and are properly linked.

Options:

OptionDescription
-v, --verboseOutput detailed resource information
--env <env>Environment to verify Timeback in (staging or production)

timeback update

Update Timeback integration configuration.

Command
$ playcademy timeback update$ playcademy timeback update -v          # Verbose output$ playcademy timeback update --env production

Updates OneRoster resources to match your current playcademy.config.js settings.

Required: totalXp

Like setup, the update command requires totalXp to be set for all courses.

Options:

OptionDescription
-v, --verboseOutput detailed information
--env <env>Environment to update Timeback in (staging or production)

timeback cleanup

Remove Timeback integration (keeps project metadata).

Command
$ playcademy timeback cleanup$ playcademy timeback cleanup --env production

Deletes OneRoster resources but preserves your project on Playcademy.

Options:

OptionDescription
--env <env>Environment to remove Timeback from (staging or production)

Database

db init

Add database integration to an existing project.

Command
$ playcademy db init

Scaffolds database files (schema, types, Drizzle config) and updates your package.json.

After the Fact

Use this if you didn't enable the database integration during playcademy init

db schema

Print the full database schema.

Command
$ playcademy db schema            # Pretty-printed output$ playcademy db schema --raw      # Raw SQL (for piping to files)$ playcademy db schema --full     # Include full schema hash / migration tag

When using the migrate strategy, --full output shows the latest migration tag instead of a schema hash.

Options:

OptionDescription
--rawOutput raw SQL only (for piping)
--fullShow full schema hash or latest migration tag

db diff

Show schema changes since last deployment.

Command
$ playcademy db diff

Displays the SQL statements that will be applied on next deployment. Works with both schema strategies:

  • Push mode: Shows diff-generated SQL from schema snapshot comparison
  • Migrate mode: Shows SQL from unapplied migration files

Useful for reviewing schema changes before deploying.

db migrate-from-push

Switch from push-mode to the migration-file strategy. Run bun db:generate first to create a baseline migration, then this command marks it as already applied and updates local state.

Command
$ playcademy db migrate-from-push
OptionDescription
--envEnvironment: staging (default) or production

db reset

Reset database (deletes all data and recreates from schema).

Command
$ playcademy db reset  # Local$ playcademy db reset -f  # Local, skip confirmation$ playcademy db reset --remote  # Reset staging$ playcademy db reset --remote --env production  # Reset production

Options:

OptionDescription
--remoteReset remote deployed database
--envEnvironment: staging (default) or production
-f, --forceSkip confirmation prompt (local only)
--debugEnable debug mode

Destructive Operation

Remote reset requires two confirmations:

  1. Yes/no prompt
  2. Type the project slug to confirm

All data will be deleted!

db seed

Seed database with initial data (resets by default).

Command
$ playcademy db seed  # Local: reset and seed$ playcademy db seed --no-reset  # Local: seed without reset$ playcademy db seed custom-seed.ts  # Use custom seed file$ playcademy db seed --remote  # Remote: reset and seed staging$ playcademy db seed --remote --no-reset  # Remote: seed without reset$ playcademy db seed --remote -f  # Skip secrets sync check$ playcademy db seed --remote --env production  # Production

Arguments:

ArgumentDescriptionDefault
[file]Custom seed file path (optional)server/db/seed.ts

Options:

OptionDescription
--no-resetSkip database reset before seeding
--remoteSeed remote deployed database
--envEnvironment: staging (default) or production
-f, --forceSkip secrets sync check (remote only)
--debugEnable debug mode

Are you sure?

Remote seeding with reset will drop all tables and delete all of your data

See Database Integration Guide for seed file documentation.


KV Storage

kv init

Add KV storage integration to an existing project.

Command
$ playcademy kv init

Updates your playcademy.config.js to enable KV storage.

After the Fact

Use this if you didn't enable KV storage during playcademy init

kv list

List all keys in your KV namespace.

Command
$ playcademy kv list          # Formatted output$ playcademy kv ls            # Alias$ playcademy kv list --raw    # One key per line$ playcademy kv list --json   # JSON array

Options:

OptionDescription
--rawOutput key names one per line (for piping)
--jsonOutput as JSON array
--remoteUse remote KV storage instead of local
--envEnvironment: staging (default) or production

kv get

Get the value for a specific key.

Command
$ playcademy kv get user:demo-user:state          # Pretty-printed output$ playcademy kv get config:theme --raw            # Raw value only$ playcademy kv get user:123 --json               # Force JSON output

Arguments:

ArgumentDescription
<key>Key name to read

Options:

OptionDescription
--rawOutput raw value without formatting
--jsonForce JSON pretty-printing
--remoteUse remote KV storage instead of local
--envEnvironment: staging (default) or production

kv set

Set a key-value pair.

Command
$ playcademy kv set config:theme "dark"                       # String value$ playcademy kv set user:123 '{"score":100,"level":5}'        # JSON data$ playcademy kv set template:email --file templates/email.html # From file

Arguments:

ArgumentDescription
<key>Key name to set
[value]Value to store (optional if using --file)

Options:

OptionDescription
--file <path>Read value from file
--rawOutput minimal confirmation
--jsonOutput result as JSON
--remoteUse remote KV storage instead of local
--envEnvironment: staging (default) or production

kv delete

Delete a specific key.

Command
$ playcademy kv delete user:123$ playcademy kv del cache:temp    # Alias$ playcademy kv rm session:old    # Alias

Arguments:

ArgumentDescription
<key>Key name to delete

Options:

OptionDescription
--rawOutput minimal confirmation
--jsonOutput result as JSON
--remoteUse remote KV storage instead of local
--envEnvironment: staging (default) or production

Aliases: del, rm

kv clear

Clear all keys from your KV namespace.

Command
$ playcademy kv clear          # Asks for confirmation$ playcademy kv clear --force  # Skip confirmation$ playcademy kv clear -f       # Short flag

Removes all keys after confirmation. Use with caution in development.

Options:

OptionDescription
-f, --forceSkip confirmation prompt
--rawOutput count of deleted keys
--jsonOutput result as JSON
--remoteUse remote KV storage instead of local
--envEnvironment: staging (default) or production

kv inspect

Inspect metadata and value for a specific key.

Command
$ playcademy kv inspect user:demo-user:state$ playcademy kv inspect config:theme --json

Shows key size, type (JSON or String), and the value.

Arguments:

ArgumentDescription
<key>Key name to inspect

Options:

OptionDescription
--rawOutput size in bytes only
--jsonOutput metadata as JSON
--remoteUse remote KV storage instead of local
--envEnvironment: staging (default) or production

kv stats

Show statistics about your KV namespace.

Command
$ playcademy kv stats$ playcademy kv stats --json   # JSON output$ playcademy kv stats --raw    # Total key count only

Displays:

  • Total number of keys
  • Total storage size
  • Largest key with size
  • Keys grouped by prefix

Options:

OptionDescription
--rawOutput total key count only
--jsonOutput statistics as JSON
--remoteUse remote KV storage instead of local
--envEnvironment: staging (default) or production

kv seed

Seed KV namespace with key-value pairs from a JSON file.

Command
$ playcademy kv seed seeds/kv.json           # Seed from file$ playcademy kv seed seeds/kv.json --replace # Clear existing keys first$ playcademy kv seed seeds/kv.json --force   # Skip overwrite confirmation

Useful for populating test data during development.

Arguments:

ArgumentDescription
<file>Path to JSON seed file

Options:

OptionDescription
--replaceClear existing keys before seeding
-f, --forceSkip confirmation prompt
--rawOutput count of seeded keys
--jsonOutput result as JSON
--remoteUse remote KV storage instead of local
--envEnvironment: staging (default) or production

Seed file format:

{
    "user:demo-user:state": {
        "score": 100,
        "level": 1
    },
    "config:theme": "dark",
    "highscore:global": "1000"
}

kv dump

Export all KV data as JSON or CSV. Includes user identity from key metadata when present.

Command
$ playcademy kv dump                                    # Local JSON to stdout$ playcademy kv dump --remote --env production          # Remote JSON to stdout$ playcademy kv dump --remote -o students.json          # Write to file$ playcademy kv dump --remote --format csv -o data.csv  # Export as CSV$ playcademy kv dump --prefix user:                     # Filter by prefix

Each entry includes the key, parsed value, and email/name from KV metadata (if the game attaches user identity on writes).

Options:

OptionDescription
--remoteUse remote KV storage instead of local
--envEnvironment: staging (default) or production
-o, --outputWrite to file instead of stdout
--formatOutput format: json (default) or csv
--prefixFilter keys by prefix

Bucket Storage

bucket init

Add bucket storage integration to an existing project.

Command
$ playcademy bucket init

Updates your playcademy.config.js to enable bucket storage.

After the Fact

Use this if you didn't enable bucket storage during playcademy init

bucket list

List files in your bucket (local or remote).

Command
$ playcademy bucket list  # Formatted table output$ playcademy bucket ls  # Alias$ playcademy bucket list --prefix images/  # Filter by prefix$ playcademy bucket list --remote  # Remote staging$ playcademy bucket list --remote --env production  # Remote production$ playcademy bucket list --remote --prefix screenshots/  # Remote with prefix$ playcademy bucket list --raw  # Keys only, one per line$ playcademy bucket list --json  # JSON array

Options:

OptionDescription
--prefix <value>Filter files by key prefix
--rawOutput file keys one per line (for piping)
--jsonOutput as JSON array
--remoteUse remote bucket instead of local
--envEnvironment: staging (default) or production

bucket get

Download a file or get file metadata (local or remote).

Command
$ playcademy bucket get screenshot.png  # Show metadata$ playcademy bucket get screenshot.png -o local.png  # Download to file$ playcademy bucket get config.json -o backup.json --remote  # Remote staging$ playcademy bucket get data.json -o prod-data.json --remote --env production  # Production$ playcademy bucket get data.json --raw  # Output to stdout$ playcademy bucket get screenshot.png --json  # Metadata as JSON

Arguments:

ArgumentDescription
<key>File key to retrieve

Options:

OptionDescription
-o, --output <path>Download file to specified path
--rawOutput file content to stdout
--jsonOutput metadata as JSON
--remoteUse remote bucket instead of local
--envEnvironment: staging (default) or production

bucket put

Upload a file to bucket (local or remote).

Command
$ playcademy bucket put screenshot.png ./local.png  # Upload locally$ playcademy bucket put data.json ./data.json  # Upload JSON$ playcademy bucket put config.json ./config.json --remote  # Remote staging$ playcademy bucket put banner.png ./assets/banner.png --remote --env production  # Production

Arguments:

ArgumentDescription
<key>Key to store file under
<file>Local file path to upload

Options:

OptionDescription
--rawOutput minimal confirmation
--jsonOutput result as JSON
--remoteUse remote bucket instead of local
--envEnvironment: staging (default) or production

bucket delete

Delete a file from bucket (local or remote).

Command
$ playcademy bucket delete screenshot.png  # Local$ playcademy bucket del temp.json  # Alias$ playcademy bucket rm old-file.png  # Alias$ playcademy bucket delete temp-file.json --remote  # Remote staging$ playcademy bucket delete old-asset.png --remote --env production  # Production

Arguments:

ArgumentDescription
<key>File key to delete

Options:

OptionDescription
--rawOutput minimal confirmation
--jsonOutput result as JSON
--remoteUse remote bucket instead of local
--envEnvironment: staging (default) or production

bucket bulk

Upload all files from a directory to bucket.

Command
$ playcademy bucket bulk ./assets  # Local$ playcademy bucket bulk ./images --prefix project-assets/  # With prefix$ playcademy bucket bulk ./assets --remote  # Remote staging$ playcademy bucket bulk ./dist --remote --env production --prefix v1.0/  # Production$ playcademy bucket bulk ./assets --dry-run  # Preview locally$ playcademy bucket bulk ./assets --dry-run --remote  # Preview remote

How Directory Paths Work

The source directory name is automatically stripped from uploaded keys:

Command
$ playcademy bucket bulk ./assets$ playcademy bucket bulk ./assets --prefix assets
Output
# → Uploaded as: images/logo.png# To include the directory name, use --prefix:# → Uploaded as: assets/images/logo.png

Ignore Patterns

The bucket bulk command automatically skips any files ignored by your .gitignore.

Arguments:

ArgumentDescription
<directory>Directory to upload from

Options:

OptionDescription
--prefix <value>Add prefix to all uploaded keys
--dry-runShow what would be uploaded without uploading
--rawOutput minimal confirmation
--jsonOutput result as JSON
--remoteUse remote bucket instead of local
--envEnvironment: staging (default) or production

Example:

Command
$ playcademy bucket bulk ./assets --prefix my-project-v1/ --remote
Output
Uploaded 5 files (1.2 MB) to stagingPrefix: project-v1/

Remote Operations

All bucket commands support --remote to work with deployed storage.

See Bucket Integration Guide for more details.

Environment Isolation

A separate bucket is provisioned for both staging and production environments.

Use --env production to access production storage (omitting = staging).


Secrets

secrets push

Push secrets from your local .env file to the remote environment.

Command
$ playcademy secrets push$ playcademy secrets push --env production

Shows a diff preview before applying changes:

  • Added: Secrets in .env that don't exist on remote
  • Updated: Secrets whose values have changed since last push
  • Removed: Secrets on remote that aren't in .env

Options:

OptionDescription
--env <env>Environment to push secrets to (staging or production)

See Secrets Guide for complete workflow.

secrets list

List all configured secrets on remote (keys only, values are never shown).

Command
$ playcademy secrets list$ playcademy secrets ls              # Alias$ playcademy secrets list --env production

Options:

OptionDescription
--env <env>Environment to list secrets from (staging or production)

Custom Domains

Custom domains must be subdomains (e.g. play.example.com). Apex domains like example.com are not supported.

All domain commands require the --env flag (or PLAYCADEMY_ENV environment variable) to specify the target environment.

domain add

Command
$ playcademy domain add play.example.com --env production$ playcademy domain add staging.example.com --env staging

What it does:

  • Creates custom hostname with automatic SSL provisioning
  • Returns DNS validation records to configure at your registrar

Example output:

Command
$ playcademy domain add play.example.com --env production
Output
āœ” Custom domain registered: play.example.com — configure DNS to activateā”Œā”€ DNS RECORDS REQUIRED│ Add these DNS records to play.example.com at your domain registrar:└─1. Ownership Verification  Type: TXT  Name: _cf-custom-hostname.play.example.com  Value: abc123...2. SSL Certificate Validation  Type: TXT  Name: _acme-challenge.play.example.com  Value: xyz789...3. Traffic Routing  Type: CNAME  Name: play.example.com  Value: playcademy.ggā”Œā”€ NEXT STEPS│ 1. Add the DNS records shown above to your domain registrar│ 2. Run playcademy domain verify play.example.com --env production to check validation status│ │ Note: DNS propagation can take up to 24 hours. SSL certificates│ are provisioned automatically once DNS records are verified.│ │ Learn more: https://docs.playcademy.net/platform/cli/deployment#custom-domains└─

Arguments:

ArgumentDescription
<hostname>Subdomain to add (e.g. play.example.com)

Options:

OptionDescription
--env <env>Required. Environment to add domain to (staging or production)

Cloudflare Users

If your domain is on Cloudflare, the CNAME record must be DNS-only (gray cloud).

A proxied (orange cloud) CNAME will cause a "CNAME Cross-User Banned" error.

domain list

List all custom domains for your project.

Command
$ playcademy domain list --env production$ playcademy domain ls --env staging   # Alias

Shows all configured custom domains with their validation status.

Options:

OptionDescription
--env <env>Required. Environment to list domains from (staging or production)
--jsonOutput as JSON
--rawOutput hostnames only (one per line)

Alias: ls

domain verify

Check custom domain validation status.

Command
$ playcademy domain verify play.example.com --env production$ playcademy domain status play.example.com --env production   # Alias

Checks the current validation status and displays any pending DNS records.

Arguments:

ArgumentDescription
<hostname>Custom domain to check status

Options:

OptionDescription
--env <env>Required. Environment to check domain in (staging or production)
--jsonOutput as JSON
--refreshTrigger a validation refresh before checking status

Alias: status

domain delete

Remove a custom domain from your project.

Command
$ playcademy domain delete play.example.com --env production$ playcademy domain rm play.example.com --env production -f   # Alias, skip confirmation

Removes the custom hostname and SSL certificate.

Arguments:

ArgumentDescription
<hostname>Custom domain to delete

Options:

OptionDescription
--env <env>Required. Environment to delete domain from (staging or production)
-f, --forceSkip confirmation prompt

Aliases: rm, remove

DNS Propagation

DNS records can take up to 24 hours to propagate. Use playcademy domain verify to check validation status.


Vite Plugin

vite config

Add the Playcademy Vite plugin to an existing project.

Command
$ playcademy vite config

Installs @playcademy/vite-plugin and configures it in your vite.config.ts.

What it does:

  • Installs @playcademy/vite-plugin (if not already installed)
  • Updates existing vite.config.ts or creates a new one
  • Adds the playcademy() plugin to your Vite configuration

Custom Routes

api init

Add custom API routes to an existing project.

Command
$ playcademy api init

Scaffolds a server/api/ directory with a sample route and updates your config file.

After the Fact

Use this if you didn't enable the custom routes integration during playcademy init


Development

dev

Start the local backend development server.

Command
$ playcademy dev$ playcademy dev --port 9000      # Custom port$ playcademy dev --no-reload      # Disable hot reload$ playcademy dev --no-logger      # Disable request logging

Options:

OptionDescription
-p, --port <port>Backend server port (default: 8788)
--no-reloadDisable hot module replacement
--no-loggerDisable HTTP request logging

See Development Guide for details.


Deployment

deploy

Deploy your project to Playcademy.

Command
$ playcademy deploy$ playcademy deploy --env production     # Deploy to production$ playcademy deploy --backend            # Force backend deployment$ playcademy deploy --no-backend         # Skip backend deployment$ playcademy deploy --dry-run            # Validate without deploying$ playcademy deploy -v                   # Verbose output

Options:

OptionDescription
-c, --config <path>Path to config file
-n, --name <name>Project display name
-d, --description <desc>Project description
-e, --emoji <emoji>Project emoji icon
-b, --build <path>Path to project zip file
-u, --external-url <url>External URL (for external projects)
--env <env>Environment (staging or production, default: staging)
--backendForce backend deployment
--no-backendSkip backend deployment
--force-backendForce backend deployment even if no changes detected
--dry-runValidate configuration without deploying
-v, --verboseShow detailed output
--debugShow debug information

Priority

CLI flags > config file > interactive prompts

See Deployment Guide for the complete workflow.


Project Management

projects list

List all your deployed projects.

Command
$ playcademy projects list$ playcademy projects ls              # Alias$ playcademy projects list --env production

Shows project name, slug, platform, type, and version.

Options:

OptionDescription
--env <env>Environment to list projects from (staging or production)

projects delete

Delete a deployed project.

Command
$ playcademy projects delete              # Interactive selection$ playcademy projects delete my-project   # Delete by slug$ playcademy projects rm my-project -f    # Alias, skip confirmation$ playcademy projects delete my-project --env production

Arguments:

ArgumentDescriptionDefault
[slug]Project slug to delete(interactive prompt)

Options:

OptionDescription
-f, --forceSkip confirmation prompt
--env <env>Environment to delete project from (staging or production)

Aliases: rm, remove

Permanent Action

Deleting a project removes it from Playcademy permanently.

This cannot be undone.


Logs

logs

Stream real-time logs from your deployed application.

There are two ways to use this command:

  1. Inside a project directory: Run playcademy logs and it reads the slug from your playcademy.config.js
  2. Anywhere: Run playcademy logs <slug> with an explicit slug (useful for admins or tailing other projects)
Command
$ playcademy logs                      # Uses config file for slug$ playcademy logs my-project           # Explicit slug$ playcademy logs --env production     # Production environment$ playcademy logs --history            # Include recent log history

Arguments:

ArgumentDescriptionDefault
[slug]Game slug to stream logs for(from config file)

Options:

OptionDescription
--env <env>Environment to stream logs from (staging or production)
--historyInclude recent log history (last 100 logs)

Example output:

Command
$ playcademy logs my-project # or cd my-project && playcademy logs
Output
āœ” Connected to staging logs for "my-project"✦ Press ctrl+c to stop10:39:51 AM GET /api/hello 200 OK10:39:52 AM POST /api/validate-answer 200 OK10:39:53 AM WARN [MyService]: Cache miss for user:123

Log History

By default, only new logs are streamed.

Use --history to include recent logs from before you connected.


Debug Commands

debug bundle

Bundle and inspect the backend code.

Command
$ playcademy debug bundle$ playcademy debug bundle --minify         # Minified output$ playcademy debug bundle --sourcemap      # Include source maps$ playcademy debug bundle -o bundle.js     # Custom output path

Generates the backend bundle and shows:

  • Bundle size
  • Registered custom routes
  • Built-in integration routes
  • Configuration details

Useful for debugging bundling issues or inspecting what gets deployed.

Options:

OptionDescription
-o, --output <path>Output file path (default: .playcademy/worker-bundle.js)
--minifyMinify the output
--sourcemapInclude source maps

Upgrade

upgrade

Upgrade the Playcademy CLI to the latest (or a specific) version.

Command
$ playcademy upgrade                  # Upgrade to latest$ playcademy upgrade 0.18.0           # Upgrade to specific version

Checks the current version, fetches the target version from the registry, and re-runs the standalone installer to replace the binary in place.

Legacy Install Detected

If the CLI detects a legacy npm/bun global install, it prints migration instructions instead of upgrading.

Arguments:

ArgumentDescriptionDefault
[version]Target version to installlatest

Environment Variables

Control CLI behavior with environment variables:

VariableDescriptionDefault
PLAYCADEMY_ENVEnvironment: staging or productionstaging
PLAYCADEMY_BASE_URLOverride API endpointBased on environment
PLAYCADEMY_PROFILEAuthentication profile to usedefault
PLAYCADEMY_API_TOKENAPI key for authentication(none)

Examples:

# Deploy to production
PLAYCADEMY_ENV=production playcademy deploy

# Use specific profile
PLAYCADEMY_PROFILE=work playcademy deploy

# Use API key authentication
PLAYCADEMY_API_TOKEN=your-api-key playcademy projects list

Global Options

These options work with most commands:

OptionDescription
--helpShow help for command
--versionShow CLI version
--verboseEnable detailed logging
--debugShow debug information

What's Next?

On this page