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.
$ 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-interactiveOptions:
| Option | Description |
|---|---|
-e, --email <email> | Email address (prompts for password if -p not provided) |
-p, --password <pass> | Password (use with -e for non-interactive login) |
--sso | Use browser-based SSO authentication |
--env <env> | Environment to authenticate with (staging or production) |
logout
Remove stored credentials.
$ playcademy logout # Logout from default profile$ playcademy logout work # Logout from named profile$ playcademy logout --env productionArguments:
| Argument | Description | Default |
|---|---|---|
[profile] | Profile name to logout from | default |
Options:
| Option | Description |
|---|---|
--env <env> | Environment to logout from (staging or production) |
me
Display current user information and authentication status.
$ playcademy me$ playcademy me --env productionShows your:
- User ID and email
- Developer status
- Current environment
- Active profile
Options:
| Option | Description |
|---|---|
--env <env> | Environment to check user information from (staging or production) |
profiles / profiles list
List all stored authentication profiles across all environments.
$ playcademy profiles # Defaults to list$ playcademy profiles list$ playcademy profiles ls # Aliasprofiles remove
Remove a specific authentication profile.
$ playcademy profiles remove # Remove default profile$ playcademy profiles remove work # Remove named profile$ playcademy profiles rm work # Alias$ playcademy profiles remove --env production workArguments:
| Argument | Description | Default |
|---|---|---|
[name] | Profile name to remove | default |
Options:
| Option | Description |
|---|---|
--env <env> | Environment to remove profile from (staging or production) |
profiles reset
Remove all authentication profiles across all environments.
$ playcademy profiles reset$ playcademy profiles clear # AliasRequires confirmation before removing all profiles.
Developer Access
dev
Start the local backend development server.
$ playcademy dev$ playcademy dev --port 9000 # Custom port$ playcademy dev --no-reload # Disable hot reload$ playcademy dev --no-logger # Disable request loggingOptions:
| Option | Description |
|---|---|
-p, --port <port> | Backend server port (default: 8788) |
--no-reload | Disable hot module replacement |
--no-logger | Disable HTTP request logging |
See Development Guide for details.
dev apply
Apply for developer status to deploy your project.
$ playcademy dev apply$ playcademy dev apply --env productionApproval is typically granted within 8 hours. Check your status with playcademy dev status.
Need help? Join our Discord
Options:
| Option | Description |
|---|---|
--env <env> | Environment to apply for developer status in (staging or production) |
dev status
Check your current developer status.
$ playcademy dev status$ playcademy dev status --env productionShows whether your developer application is:
none- Not applied yetpending- Application submitted, awaiting reviewapproved- Developer access granted
Options:
| Option | Description |
|---|---|
--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-appnpm create playcademy my-apppnpm create playcademy my-appyarn create playcademy my-appArguments:
| Argument | Description | Default |
|---|---|---|
[project-dir] | Directory name for new project | (prompts if omitted) |
init
Initialize Playcademy in an existing project (adds config to current directory).
$ playcademy init$ playcademy init --force # Overwrite existing configWhen to Use init vs create
- Use
create playcademyto start a brand new project from scratch - Use
playcademy initto add Playcademy to an existing project
Options:
| Option | Description |
|---|---|
-f, --force | Overwrite existing configuration file |
Timeback
timeback init
Add Timeback integration to an existing project.
$ playcademy timeback initPrompts 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.
$ playcademy timeback setup$ playcademy timeback setup --dry-run # Preview without making changes$ playcademy timeback setup -v # Verbose output$ playcademy timeback setup --env productionRequires Timeback configuration in your 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:
| Option | Description |
|---|---|
--dry-run | Preview changes without creating resources |
-v, --verbose | Output detailed information |
--env <env> | Environment to setup Timeback in (staging or production) |
timeback verify
Verify Timeback resources are correctly configured.
$ playcademy timeback verify$ playcademy timeback verify -v # Verbose output$ playcademy timeback verify --env productionChecks that all OneRoster resources (course, classes, academic session, etc.) exist and are properly linked.
Options:
| Option | Description |
|---|---|
-v, --verbose | Output detailed resource information |
--env <env> | Environment to verify Timeback in (staging or production) |
timeback update
Update Timeback integration configuration.
$ playcademy timeback update$ playcademy timeback update -v # Verbose output$ playcademy timeback update --env productionUpdates 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:
| Option | Description |
|---|---|
-v, --verbose | Output detailed information |
--env <env> | Environment to update Timeback in (staging or production) |
timeback cleanup
Remove Timeback integration (keeps project metadata).
$ playcademy timeback cleanup$ playcademy timeback cleanup --env productionDeletes OneRoster resources but preserves your project on Playcademy.
Options:
| Option | Description |
|---|---|
--env <env> | Environment to remove Timeback from (staging or production) |
Database
db init
Add database integration to an existing project.
$ playcademy db initScaffolds 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.
$ 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 tagWhen using the migrate strategy, --full output shows the latest migration tag instead of a schema hash.
Options:
| Option | Description |
|---|---|
--raw | Output raw SQL only (for piping) |
--full | Show full schema hash or latest migration tag |
db diff
Show schema changes since last deployment.
$ playcademy db diffDisplays 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.
$ playcademy db migrate-from-push| Option | Description |
|---|---|
--env | Environment: staging (default) or production |
db reset
Reset database (deletes all data and recreates from schema).
$ playcademy db reset # Local$ playcademy db reset -f # Local, skip confirmation$ playcademy db reset --remote # Reset staging$ playcademy db reset --remote --env production # Reset productionOptions:
| Option | Description |
|---|---|
--remote | Reset remote deployed database |
--env | Environment: staging (default) or production |
-f, --force | Skip confirmation prompt (local only) |
--debug | Enable debug mode |
Destructive Operation
Remote reset requires two confirmations:
- Yes/no prompt
- Type the project slug to confirm
All data will be deleted!
db seed
Seed database with initial data (resets by default).
$ 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 # ProductionArguments:
| Argument | Description | Default |
|---|---|---|
[file] | Custom seed file path (optional) | server/db/seed.ts |
Options:
| Option | Description |
|---|---|
--no-reset | Skip database reset before seeding |
--remote | Seed remote deployed database |
--env | Environment: staging (default) or production |
-f, --force | Skip secrets sync check (remote only) |
--debug | Enable 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.
$ playcademy kv initUpdates 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.
$ playcademy kv list # Formatted output$ playcademy kv ls # Alias$ playcademy kv list --raw # One key per line$ playcademy kv list --json # JSON arrayOptions:
| Option | Description |
|---|---|
--raw | Output key names one per line (for piping) |
--json | Output as JSON array |
--remote | Use remote KV storage instead of local |
--env | Environment: staging (default) or production |
kv get
Get the value for a specific key.
$ 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 outputArguments:
| Argument | Description |
|---|---|
<key> | Key name to read |
Options:
| Option | Description |
|---|---|
--raw | Output raw value without formatting |
--json | Force JSON pretty-printing |
--remote | Use remote KV storage instead of local |
--env | Environment: staging (default) or production |
kv set
Set a key-value pair.
$ 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 fileArguments:
| Argument | Description |
|---|---|
<key> | Key name to set |
[value] | Value to store (optional if using --file) |
Options:
| Option | Description |
|---|---|
--file <path> | Read value from file |
--raw | Output minimal confirmation |
--json | Output result as JSON |
--remote | Use remote KV storage instead of local |
--env | Environment: staging (default) or production |
kv delete
Delete a specific key.
$ playcademy kv delete user:123$ playcademy kv del cache:temp # Alias$ playcademy kv rm session:old # AliasArguments:
| Argument | Description |
|---|---|
<key> | Key name to delete |
Options:
| Option | Description |
|---|---|
--raw | Output minimal confirmation |
--json | Output result as JSON |
--remote | Use remote KV storage instead of local |
--env | Environment: staging (default) or production |
Aliases: del, rm
kv clear
Clear all keys from your KV namespace.
$ playcademy kv clear # Asks for confirmation$ playcademy kv clear --force # Skip confirmation$ playcademy kv clear -f # Short flagRemoves all keys after confirmation. Use with caution in development.
Options:
| Option | Description |
|---|---|
-f, --force | Skip confirmation prompt |
--raw | Output count of deleted keys |
--json | Output result as JSON |
--remote | Use remote KV storage instead of local |
--env | Environment: staging (default) or production |
kv inspect
Inspect metadata and value for a specific key.
$ playcademy kv inspect user:demo-user:state$ playcademy kv inspect config:theme --jsonShows key size, type (JSON or String), and the value.
Arguments:
| Argument | Description |
|---|---|
<key> | Key name to inspect |
Options:
| Option | Description |
|---|---|
--raw | Output size in bytes only |
--json | Output metadata as JSON |
--remote | Use remote KV storage instead of local |
--env | Environment: staging (default) or production |
kv stats
Show statistics about your KV namespace.
$ playcademy kv stats$ playcademy kv stats --json # JSON output$ playcademy kv stats --raw # Total key count onlyDisplays:
- Total number of keys
- Total storage size
- Largest key with size
- Keys grouped by prefix
Options:
| Option | Description |
|---|---|
--raw | Output total key count only |
--json | Output statistics as JSON |
--remote | Use remote KV storage instead of local |
--env | Environment: staging (default) or production |
kv seed
Seed KV namespace with key-value pairs from a JSON file.
$ 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 confirmationUseful for populating test data during development.
Arguments:
| Argument | Description |
|---|---|
<file> | Path to JSON seed file |
Options:
| Option | Description |
|---|---|
--replace | Clear existing keys before seeding |
-f, --force | Skip confirmation prompt |
--raw | Output count of seeded keys |
--json | Output result as JSON |
--remote | Use remote KV storage instead of local |
--env | Environment: 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.
$ 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 prefixEach entry includes the key, parsed value, and email/name from KV metadata (if the game attaches user identity on writes).
Options:
| Option | Description |
|---|---|
--remote | Use remote KV storage instead of local |
--env | Environment: staging (default) or production |
-o, --output | Write to file instead of stdout |
--format | Output format: json (default) or csv |
--prefix | Filter keys by prefix |
Bucket Storage
bucket init
Add bucket storage integration to an existing project.
$ playcademy bucket initUpdates 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).
$ 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 arrayOptions:
| Option | Description |
|---|---|
--prefix <value> | Filter files by key prefix |
--raw | Output file keys one per line (for piping) |
--json | Output as JSON array |
--remote | Use remote bucket instead of local |
--env | Environment: staging (default) or production |
bucket get
Download a file or get file metadata (local or remote).
$ 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 JSONArguments:
| Argument | Description |
|---|---|
<key> | File key to retrieve |
Options:
| Option | Description |
|---|---|
-o, --output <path> | Download file to specified path |
--raw | Output file content to stdout |
--json | Output metadata as JSON |
--remote | Use remote bucket instead of local |
--env | Environment: staging (default) or production |
bucket put
Upload a file to bucket (local or remote).
$ 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 # ProductionArguments:
| Argument | Description |
|---|---|
<key> | Key to store file under |
<file> | Local file path to upload |
Options:
| Option | Description |
|---|---|
--raw | Output minimal confirmation |
--json | Output result as JSON |
--remote | Use remote bucket instead of local |
--env | Environment: staging (default) or production |
bucket delete
Delete a file from bucket (local or remote).
$ 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 # ProductionArguments:
| Argument | Description |
|---|---|
<key> | File key to delete |
Options:
| Option | Description |
|---|---|
--raw | Output minimal confirmation |
--json | Output result as JSON |
--remote | Use remote bucket instead of local |
--env | Environment: staging (default) or production |
bucket bulk
Upload all files from a directory to bucket.
$ 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 remoteHow Directory Paths Work
The source directory name is automatically stripped from uploaded keys:
$ playcademy bucket bulk ./assets$ playcademy bucket bulk ./assets --prefix assets# ā Uploaded as: images/logo.png# To include the directory name, use --prefix:# ā Uploaded as: assets/images/logo.pngIgnore Patterns
The bucket bulk command automatically skips any files ignored by your .gitignore.
Arguments:
| Argument | Description |
|---|---|
<directory> | Directory to upload from |
Options:
| Option | Description |
|---|---|
--prefix <value> | Add prefix to all uploaded keys |
--dry-run | Show what would be uploaded without uploading |
--raw | Output minimal confirmation |
--json | Output result as JSON |
--remote | Use remote bucket instead of local |
--env | Environment: staging (default) or production |
Example:
$ playcademy bucket bulk ./assets --prefix my-project-v1/ --remoteUploaded 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.
$ playcademy secrets push$ playcademy secrets push --env productionShows a diff preview before applying changes:
- Added: Secrets in
.envthat don't exist on remote - Updated: Secrets whose values have changed since last push
- Removed: Secrets on remote that aren't in
.env
Options:
| Option | Description |
|---|---|
--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).
$ playcademy secrets list$ playcademy secrets ls # Alias$ playcademy secrets list --env productionOptions:
| Option | Description |
|---|---|
--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
$ playcademy domain add play.example.com --env production$ playcademy domain add staging.example.com --env stagingWhat it does:
- Creates custom hostname with automatic SSL provisioning
- Returns DNS validation records to configure at your registrar
Example output:
$ playcademy domain add play.example.com --env productionā 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:
| Argument | Description |
|---|---|
<hostname> | Subdomain to add (e.g. play.example.com) |
Options:
| Option | Description |
|---|---|
--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.
$ playcademy domain list --env production$ playcademy domain ls --env staging # AliasShows all configured custom domains with their validation status.
Options:
| Option | Description |
|---|---|
--env <env> | Required. Environment to list domains from (staging or production) |
--json | Output as JSON |
--raw | Output hostnames only (one per line) |
Alias: ls
domain verify
Check custom domain validation status.
$ playcademy domain verify play.example.com --env production$ playcademy domain status play.example.com --env production # AliasChecks the current validation status and displays any pending DNS records.
Arguments:
| Argument | Description |
|---|---|
<hostname> | Custom domain to check status |
Options:
| Option | Description |
|---|---|
--env <env> | Required. Environment to check domain in (staging or production) |
--json | Output as JSON |
--refresh | Trigger a validation refresh before checking status |
Alias: status
domain delete
Remove a custom domain from your project.
$ playcademy domain delete play.example.com --env production$ playcademy domain rm play.example.com --env production -f # Alias, skip confirmationRemoves the custom hostname and SSL certificate.
Arguments:
| Argument | Description |
|---|---|
<hostname> | Custom domain to delete |
Options:
| Option | Description |
|---|---|
--env <env> | Required. Environment to delete domain from (staging or production) |
-f, --force | Skip 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.
$ playcademy vite configInstalls @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.tsor creates a new one - Adds the
playcademy()plugin to your Vite configuration
Custom Routes
api init
Add custom API routes to an existing project.
$ playcademy api initScaffolds 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.
$ playcademy dev$ playcademy dev --port 9000 # Custom port$ playcademy dev --no-reload # Disable hot reload$ playcademy dev --no-logger # Disable request loggingOptions:
| Option | Description |
|---|---|
-p, --port <port> | Backend server port (default: 8788) |
--no-reload | Disable hot module replacement |
--no-logger | Disable HTTP request logging |
See Development Guide for details.
Deployment
deploy
Deploy your project to Playcademy.
$ 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 outputOptions:
| Option | Description |
|---|---|
-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) |
--backend | Force backend deployment |
--no-backend | Skip backend deployment |
--force-backend | Force backend deployment even if no changes detected |
--dry-run | Validate configuration without deploying |
-v, --verbose | Show detailed output |
--debug | Show 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.
$ playcademy projects list$ playcademy projects ls # Alias$ playcademy projects list --env productionShows project name, slug, platform, type, and version.
Options:
| Option | Description |
|---|---|
--env <env> | Environment to list projects from (staging or production) |
projects delete
Delete a deployed project.
$ 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 productionArguments:
| Argument | Description | Default |
|---|---|---|
[slug] | Project slug to delete | (interactive prompt) |
Options:
| Option | Description |
|---|---|
-f, --force | Skip 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:
- Inside a project directory: Run
playcademy logsand it reads the slug from yourplaycademy.config.js - Anywhere: Run
playcademy logs <slug>with an explicit slug (useful for admins or tailing other projects)
$ 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 historyArguments:
| Argument | Description | Default |
|---|---|---|
[slug] | Game slug to stream logs for | (from config file) |
Options:
| Option | Description |
|---|---|
--env <env> | Environment to stream logs from (staging or production) |
--history | Include recent log history (last 100 logs) |
Example output:
$ playcademy logs my-project # or cd my-project && playcademy logsā 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:123Log 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.
$ playcademy debug bundle$ playcademy debug bundle --minify # Minified output$ playcademy debug bundle --sourcemap # Include source maps$ playcademy debug bundle -o bundle.js # Custom output pathGenerates 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:
| Option | Description |
|---|---|
-o, --output <path> | Output file path (default: .playcademy/worker-bundle.js) |
--minify | Minify the output |
--sourcemap | Include source maps |
Upgrade
upgrade
Upgrade the Playcademy CLI to the latest (or a specific) version.
$ playcademy upgrade # Upgrade to latest$ playcademy upgrade 0.18.0 # Upgrade to specific versionChecks 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:
| Argument | Description | Default |
|---|---|---|
[version] | Target version to install | latest |
Environment Variables
Control CLI behavior with environment variables:
| Variable | Description | Default |
|---|---|---|
PLAYCADEMY_ENV | Environment: staging or production | staging |
PLAYCADEMY_BASE_URL | Override API endpoint | Based on environment |
PLAYCADEMY_PROFILE | Authentication profile to use | default |
PLAYCADEMY_API_TOKEN | API 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 listGlobal Options
These options work with most commands:
| Option | Description |
|---|---|
--help | Show help for command |
--version | Show CLI version |
--verbose | Enable detailed logging |
--debug | Show debug information |
What's Next?
Authentication Guide
Learn how login workflows, profiles, and environment isolation operate.
Development Guide
Practice using commands while running the local backend server.
Deployment Guide
See how command flags translate into real deployment workflows.
Quick Start
Build your first project to get hands-on with the most common commands.
