@zaisma/cli 0.69.0 → 0.70.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -17,6 +17,8 @@ To play a multiplayer game on your own computer before uploading it, run `zaisma
17
17
 
18
18
  A background shader lives in a folder of its own: `image.glsl` (Shadertoy's `mainImage`), `buffer-a.glsl` to `buffer-d.glsl` if it has buffers, `channels.json` wiring each pass's channels to a buffer or a texture file, and the textures (`zaisma help` shows the folder). `zaisma check ./sky` draws it as Zaisma's check does, in your Chrome, and saves a sheet picture of it under Zaisma's glass beside the folder; `zaisma shader ./sky --game sky-hopper --screen wide` sends its textures and the shader.
19
19
 
20
+ A clip is up to 6 seconds of the game, silent and looping, that the game's shared links play in iMessage, Discord and Telegram. Record one on the bench with **Record a clip** (`zaisma play-locally`), or make any MP4 (H.264, no sound, fitting inside 1200 by 630); `zaisma clip ./clip.mp4 --game sky-hopper` sends it with its first frame as the still, taken in your Chrome (or `--still <picture>`). `zaisma clip remove --game sky-hopper` removes it.
21
+
20
22
  For scripts, CI and AI tools: every command takes `--json` and prints the API's answer as-is, or its `{ "error": { code, message, field, fix, retry_after_sec } }`. Commands refuse flags and choices they don't take instead of ignoring them, and the exit code says how it went: `0` done (for upload: passed), `1` failed, `2` a wrong command line (nothing was sent), `3` held for a person to look at, `4` rejected, `5` still scanning, `6` the check found something to fix. `zaisma help --json` lists every command, flag and code.
21
23
 
22
24
  Found a bug in Zaisma, or missing something? Search the developer forum first with `zaisma forum --search "too_big"`. `zaisma forum post --kind bug --title "…" --category mcp --text "…"` starts a public topic, and `zaisma forum message …` sends Zaisma a private one (logs, an unreleased game). `zaisma forum` lists your topics and messages, `zaisma forum <topic_id>` shows one with its replies, and `zaisma forum reply <topic_id> --text "…"` replies (`--reopen` if a fixed one is back). Posts say an AI wrote them unless you add `--by-me`. Everything here uses the [developer API](https://github.com/zaisma/zaisma-sdk/blob/main/docs/DEVELOPER-API.md#the-upload-command).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zaisma/cli",
3
- "version": "0.69.0",
3
+ "version": "0.70.0",
4
4
  "description": "Upload and publish browser games on Zaisma from the command line.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://zaisma.com",
package/skill/SKILL.md CHANGED
@@ -33,7 +33,7 @@ The MCP also serves this skill and its references as resources (`zaisma://skill`
33
33
 
34
34
  **Ask the developer first** before making a game players can play private or a draft again (they lose access), and before ending a live room; those calls need `"confirm": true`. Anything that spends money (top-ups, budgets, Stripe) or deletes a game others played waits for the developer's passkey on zaisma.com: show them `confirm_url` from the `confirmation_needed` answer.
35
35
 
36
- **Show it well.** A listed game needs a cover and at least one gallery picture (`add_image`); the cover guide is at zaisma.com/developers/covers and the background guide at zaisma.com/developers/backgrounds. `preview_game_page` pictures every place players meet the game before anything is sent.
36
+ **Show it well.** A listed game needs a cover and at least one gallery picture (`add_image`); the cover guide is at zaisma.com/developers/covers and the background guide at zaisma.com/developers/backgrounds. `preview_game_page` pictures every place players meet the game before anything is sent. A clip (`add_clip`, up to 6 silent seconds of the game playing) makes every shared link play in iMessage, Discord and Telegram: record it on the bench's Record a clip (or `POST /bench/api/clips`), then `zaisma clip <file.mp4> --game <slug>`.
37
37
 
38
38
  ## Pick the path by the game
39
39
 
@@ -16,7 +16,7 @@ claude mcp add --transport http zaisma https://zaisma.com/mcp --header "Authoriz
16
16
 
17
17
  Apps that can't send a key connect by signing in instead. In claude.ai: Settings → Connectors → Add custom connector, with `https://zaisma.com/mcp`; ChatGPT and other apps the same way, wherever they add a remote MCP server. The app opens a Zaisma page where you choose what it may do and tap your passkey, then you're back in the app with every tool working. The key command above stays the way for Claude Code and the upload command.
18
18
 
19
- Every tool is a call to this API (`apps/site/src/mcp.ts`): `list_games`, `create_game`, `get_game`, `get_playing_now`, `get_whats_on`, `update_game`, `check_game` (what Zaisma would refuse in a game and what won't work on Zaisma, before uploading; see Checking a game below), `upload_files` (small games up to 5 MB, sent as file contents), `get_version`, `update_version` (a version's notes before it's live), `publish_version` (also rolls back and publishes later), `cancel_scheduled_publish`, `end_preview_links`, `add_image`, `remove_image`, `add_shader`, `check_shader` (a shader drawn as the check would, before it's sent; see Backgrounds below), `remove_shader`, `set_background`, `preview_game_page` (pictures of every place players meet the game, from what you're still designing; see Seeing it as players do below), `add_tester_link`, `update_tester_link`, `remove_tester_link`, `get_reports`, `get_stats`, `get_history`, `get_qr_code` (the game's link, or a room's, as a QR code), `export_game` (everything about a game as one .zip; see Export everything below), `get_logs` (what the game server printed, see A game server's logs below), `get_player`, `get_access` (what the key can do), `get_activity` (your account's activity, needs a full key), the inbox's `list_inbox`, `update_inbox_notice`, `delete_inbox_notice` and `set_inbox_settings`, a game's `announce_event` and `reply_to_bug_report` (see The inbox below), `list_api_keys` (your keys and connected apps with their end dates, last use and whether Zaisma turned one off; needs a full key), the sign-in apps' `list_sign_in_apps`, `create_sign_in_app`, `update_sign_in_app` and `delete_sign_in_app`, hosting credit's `get_credit`, `top_up_credit`, `refund_top_up`, `start_credit_plan`, `change_credit_plan`, `stop_credit_plan` and `get_spending_request` (see Hosting and credit below), Zaisma Pro's `get_pro`, `start_pro`, `cancel_pro`, `resume_pro` and `refund_pro` (see Zaisma Pro below), `get_storage`, `set_storage_budget`, `delete_version` and `delete_game`, `bring_back_game`, `erase_game_now`, `get_game_deletion_request` (see Storage below), the Stripe account's `get_stripe_account`, `connect_stripe_account`, `update_stripe_account` and `disconnect_stripe_account` (see Selling with the buy sheet below), the webhooks' `list_webhooks`, `create_webhook`, `update_webhook`, `delete_webhook`, `test_webhook` and `list_webhook_deliveries` (see Webhooks below), a game's secrets' `list_secrets`, `set_secret` and `delete_secret` (see Secrets below), `create_ticket_secret` (the secret a game's own server signs voice tickets with; see Voice below), the items' `list_items`, `set_item`, `remove_item`, `set_purchase_settings`, `grant_item`, `list_purchases`, `get_purchase`, `refund_purchase`, `mark_purchase_handled` and `get_player_items` (see Items and purchases below), a game's kept rooms' `list_kept_rooms`, `delete_kept_room`, `bring_back_kept_room` and `erase_kept_room_now`, `restore_kept_room`, `undo_kept_room_restore`, `list_kept_room_restores`, `restore_every_kept_room`, `get_kept_room_restore_batch`, `undo_every_kept_room_restore` (see Kept rooms below), a game's live rooms' `list_rooms`, `get_room`, `send_room_message`, `send_to_every_room`, `list_room_messages`, `cancel_room_message`, `kick_player` and `end_room` (see Reaching live rooms below), the game database's `get_database`, `query_database`, `batch_database`, `export_database`, `import_database`, `erase_player`, `restore_database` and `undo_database_restore` (see The game database below), cloud saves' `list_saves`, `get_save`, `change_save`, `replace_save`, `reset_save`, `list_save_copies`, `get_save_copy` and `restore_save_copy` (see Cloud saves below), and the developer forum's `search_forum`, `get_topic`, `post_topic`, `message_zaisma`, `reply_to_topic`, `vote`, `rate_post`, `bookmark_post`, `report_post`, `forum_people`, `still_happening`, `flag_misplaced`, `follow_topic` and `mark_answer` (see The developer forum below). Bigger builds go through the upload command. Making a game players can play private or a draft again, and ending a live room (`end_room`), need `"confirm": true`, so the AI asks you first.
19
+ Every tool is a call to this API (`apps/site/src/mcp.ts`): `list_games`, `create_game`, `get_game`, `get_playing_now`, `get_whats_on`, `update_game`, `check_game` (what Zaisma would refuse in a game and what won't work on Zaisma, before uploading; see Checking a game below), `upload_files` (small games up to 5 MB, sent as file contents), `get_version`, `update_version` (a version's notes before it's live), `publish_version` (also rolls back and publishes later), `cancel_scheduled_publish`, `end_preview_links`, `add_image`, `remove_image`, `add_clip`, `remove_clip`, `add_shader`, `check_shader` (a shader drawn as the check would, before it's sent; see Backgrounds below), `remove_shader`, `set_background`, `preview_game_page` (pictures of every place players meet the game, from what you're still designing; see Seeing it as players do below), `add_tester_link`, `update_tester_link`, `remove_tester_link`, `get_reports`, `get_stats`, `get_history`, `get_qr_code` (the game's link, or a room's, as a QR code), `export_game` (everything about a game as one .zip; see Export everything below), `get_logs` (what the game server printed, see A game server's logs below), `get_player`, `get_access` (what the key can do), `get_activity` (your account's activity, needs a full key), the inbox's `list_inbox`, `update_inbox_notice`, `delete_inbox_notice` and `set_inbox_settings`, a game's `announce_event` and `reply_to_bug_report` (see The inbox below), `list_api_keys` (your keys and connected apps with their end dates, last use and whether Zaisma turned one off; needs a full key), the sign-in apps' `list_sign_in_apps`, `create_sign_in_app`, `update_sign_in_app` and `delete_sign_in_app`, hosting credit's `get_credit`, `top_up_credit`, `refund_top_up`, `start_credit_plan`, `change_credit_plan`, `stop_credit_plan` and `get_spending_request` (see Hosting and credit below), Zaisma Pro's `get_pro`, `start_pro`, `cancel_pro`, `resume_pro` and `refund_pro` (see Zaisma Pro below), `get_storage`, `set_storage_budget`, `delete_version` and `delete_game`, `bring_back_game`, `erase_game_now`, `get_game_deletion_request` (see Storage below), the Stripe account's `get_stripe_account`, `connect_stripe_account`, `update_stripe_account` and `disconnect_stripe_account` (see Selling with the buy sheet below), the webhooks' `list_webhooks`, `create_webhook`, `update_webhook`, `delete_webhook`, `test_webhook` and `list_webhook_deliveries` (see Webhooks below), a game's secrets' `list_secrets`, `set_secret` and `delete_secret` (see Secrets below), `create_ticket_secret` (the secret a game's own server signs voice tickets with; see Voice below), the items' `list_items`, `set_item`, `remove_item`, `set_purchase_settings`, `grant_item`, `list_purchases`, `get_purchase`, `refund_purchase`, `mark_purchase_handled` and `get_player_items` (see Items and purchases below), a game's kept rooms' `list_kept_rooms`, `delete_kept_room`, `bring_back_kept_room` and `erase_kept_room_now`, `restore_kept_room`, `undo_kept_room_restore`, `list_kept_room_restores`, `restore_every_kept_room`, `get_kept_room_restore_batch`, `undo_every_kept_room_restore` (see Kept rooms below), a game's live rooms' `list_rooms`, `get_room`, `send_room_message`, `send_to_every_room`, `list_room_messages`, `cancel_room_message`, `kick_player` and `end_room` (see Reaching live rooms below), the game database's `get_database`, `query_database`, `batch_database`, `export_database`, `import_database`, `erase_player`, `restore_database` and `undo_database_restore` (see The game database below), cloud saves' `list_saves`, `get_save`, `change_save`, `replace_save`, `reset_save`, `list_save_copies`, `get_save_copy` and `restore_save_copy` (see Cloud saves below), and the developer forum's `search_forum`, `get_topic`, `post_topic`, `message_zaisma`, `reply_to_topic`, `vote`, `rate_post`, `bookmark_post`, `report_post`, `forum_people`, `still_happening`, `flag_misplaced`, `follow_topic` and `mark_answer` (see The developer forum below). Bigger builds go through the upload command. Making a game players can play private or a draft again, and ending a live room (`end_room`), need `"confirm": true`, so the AI asks you first.
20
20
 
21
21
  Every tool has an output schema, and answers are compact JSON. Arguments are closed: one a tool doesn't take is refused (`unknown_field`, with the arguments it does take), never quietly dropped, and a missing required one is `missing_field`. A refused call is a tool result with `isError: true`, the error object below as its `structuredContent` and its message, fix and code as its text; each tool's listed output schema is its answer or that error, because MCP clients check both against it. The tools that are easy to get wrong (`update_game`, `check_game`, `upload_files`, `publish_version`, `search_forum`, `post_topic`, `change_save`, `replace_save`, `set_secret`) carry good examples in their input schema and bad ones at the end of their description.
22
22
 
@@ -165,6 +165,19 @@ The HTTP status goes with the code, as listed. The list lives in `ERROR_CODES` (
165
165
  | `background_not_ready` | 409 | The image or shader isn't this game's, isn't approved yet, or is for the other screen. |
166
166
  | `bad_color` | 400 | The color isn't #RRGGBB. |
167
167
 
168
+ **Clips**
169
+
170
+ | Code | HTTP | Meaning |
171
+ | --- | --- | --- |
172
+ | `not_a_clip` | 415 | A clip is one MP4 file, not fragmented, with one H.264 picture track. |
173
+ | `clip_has_sound` | 400 | A clip is silent, and this one has a sound track. |
174
+ | `clip_too_long` | 400 | A clip runs at most 6 seconds. |
175
+ | `clip_too_big` | 413 | A clip is at most 6 MB. |
176
+ | `bad_clip_dimensions` | 400 | A clip fits inside 1200 by 630 px, and is at least 600 by 315. |
177
+ | `bad_clip_still` | 400 | A clip comes with its still: its first frame, a PNG, JPEG or WebP the clip's size, up to 2 MB. |
178
+ | `clip_refused` | 422 | The clip can't be used. |
179
+ | `no_clip` | 404 | The game has no clip. |
180
+
168
181
  **Uploading versions**
169
182
 
170
183
  | Code | HTTP | Meaning |
@@ -671,7 +684,7 @@ Every call is checked before any of it runs, in this order: the key's access, wh
671
684
  | --- | --- |
672
685
  | `GET /games` | Your games, each with its `alerts` (see Alerts below), and `unread_topic_count`: how many of your forum topics Zaisma has replied to or changed since you last opened them. |
673
686
  | `POST /games` | Make a game: `{"title", "slug"?, "description"?, "glass_tint_color"?, "devices"?, "controls"?, "genres"?, "screen_orientation"?, "play_modes"?, "cloud_saves_enabled"?, "account_offer_enabled"?, "deleted_account_erase_enabled"?, "friend_joins_enabled"?, "performance_measuring_enabled"?, "microphone_enabled"?, "multiplayer_mode"?, "room_browsing"?, "account_requirement"?, "minimum_player_age_years"?, "game_server_allowed_hosts"?, "own_server_urls"?, "links"?, "link_out_url"?}`. It starts as a draft that only you can see. Publishing is never limited, but an account holds at most 50 games that no real players play; a game with players frees its slot. |
674
- | `GET /games/:slug` | One game with its `alerts` (see Alerts below), `playing_now_player_count` (the exact number of people playing it now: browsers that pressed Play and still have it on screen, and players in your Zaisma rooms, each counted once however many rooms they sit in, from the last 6 minutes; players see it from 3 up), `images`, `versions` (newest first, each with its `review_reason` and scan `findings`) and `testers`. |
687
+ | `GET /games/:slug` | One game with its `alerts` (see Alerts below), `playing_now_player_count` (the exact number of people playing it now: browsers that pressed Play and still have it on screen, and players in your Zaisma rooms, each counted once however many rooms they sit in, from the last 6 minutes; players see it from 3 up), `images`, `clip` (see Clips), `versions` (newest first, each with its `review_reason` and scan `findings`) and `testers`. |
675
688
  | `PATCH /games/:slug` | Change any of `new_slug` (the game's link, only while `can_change_slug`: a draft or private game never published, with no tester links or kept rooms; else `slug_locked`), `title`, `description`, `visibility`, `devices`, `controls`, `genres`, `screen_orientation`, `play_modes`, `cloud_saves_enabled`, `account_offer_enabled`, `deleted_account_erase_enabled`, `friend_joins_enabled`, `performance_measuring_enabled`, `microphone_enabled`, `room_browsing`, `multiplayer_mode`, `account_requirement`, `minimum_player_age_years`, `game_server_allowed_hosts`, `own_server_urls`, `links`, `glass_tint_color`, `demo_game_slug`, `full_game_item_name` (the game's price to play, see "Sell your game once" under Items and purchases; it needs `purchase_access` `write`), `monthly_budget_cents` (the game's monthly budget from your hosting credit, see Hosting and credit; it needs `credit_access` `write`, and a first or higher budget answers `confirmation_needed`). Leave out what stays the same; `null` clears it. Answers with the `game`, `review_message` (set when new words wait for review), `game_server_problem` (why the game's own game server can't run yet, or `null`) and `next_steps`. |
676
689
 
677
690
  A game looks like: `slug`, `page_url`, `can_change_slug`, `title`, `description`, `visibility`, `is_waiting_for_zaisma_lists` (a listed game from a new developer, waiting for real players and a few quiet days before Zaisma's own lists show it; its link plays meanwhile), `zaisma_lists_wait` (where a live waiting game stands, null when it isn't waiting or isn't live: `is_held_by_reports`, true when reports a person or triage upheld hold it, never who reported or what they wrote, and `progress`, null when only a report holds it: `live_duration_days` of `minimum_live_duration_days`, `counted_player_count` of `minimum_counted_player_count` and `quiet_duration_days` of `minimum_quiet_duration_days`, the same limits that open the lists every hour), `review_status`, `review_reason`, `erases_at`, `is_erase_now_allowed`, `country_blocks`, `devices`, `controls`, `genres`, `screen_orientation`, `play_modes`, `cloud_saves_enabled`, `account_offer_enabled`, `deleted_account_erase_enabled`, `friend_joins_enabled`, `performance_measuring_enabled`, `microphone_enabled`, `multiplayer_mode`, `room_browsing`, `account_requirement`, `minimum_player_age_years`, `game_server_allowed_hosts`, `own_server_urls`, `has_ticket_secret` (whether its own server has a ticket secret for voice, see Voice), `links`, `link_out_url`, `link_out_who_can_open`, `link_out_review_reason`, `details_waiting_for_review` (a title or description from before Nov 25, 2026 still waiting for a person; new words apply at once), `glass_tint_color`, `monthly_budget_cents` (`null`: no paid hosting), `purchase_label` (what the game page says it sells, see In-game purchases), `refund_policy` and `refund_policy_text` (`null` until it states one), `full_game_item_name` (`null`: free to play), `demo_game_slug` (`null`: no demo), `first_published_at` (when it first went live; it never moves), `big_update_at` (the last marked big update; `null`: none yet), `recently_updated_at` (where Browse's Recently updated places it) and `updated_at`.
@@ -782,6 +795,7 @@ In the .zip:
782
795
  - `versions.json`: every version Zaisma keeps, with its patch notes, review status and findings, as `GET /games/:slug` answers them without the preview links; `folder_path` is where its files are, or `null` for a version that's still being scanned, held or rejected. Those carry no files, so nothing unscanned or held leaves through an export.
783
796
  - `versions/<version_id>/…`: each version's files, as they were uploaded.
784
797
  - `images/<kind>-<image_id>.png` (or `.jpg`, `.webp`): the cover, square cover and gallery pictures that passed review.
798
+ - `clip/clip.mp4` and `clip/still.jpg`: the clip its links play and its still, when it has one.
785
799
  - `shaders/<screen>-<shader_id>.glsl`: each shader that passed its check, with its buffer passes beside it as `<screen>-<shader_id>.buffer-a.glsl` to `.buffer-d.glsl`.
786
800
  - `database.sql`: the game database as SQLite's SQL dump, the same text `export_database` answers part by part. `zaisma export` also makes it `database.sqlite`, the file the Node runner takes as `--database-file`.
787
801
  - `saves.jsonl`: every player's cloud save, one JSON object a line, as `get_save` answers it (`player_id`, `sha256`, `size_bytes`, `saved_at`, `changed_by_kind`, `save_copy_count`, `version_id`, `local_storage_items`, `indexeddb_databases`). Earlier copies of saves stay out.
@@ -1697,6 +1711,33 @@ curl -X POST "https://zaisma.com/api/dev/games/sky-hopper/images?kind=cover" \
1697
1711
  -H "Authorization: Bearer $ZAISMA_KEY" --data-binary @cover.png
1698
1712
  ```
1699
1713
 
1714
+ ## Clips
1715
+
1716
+ A clip is up to 6 seconds of your game, silent and looping, that every link to the game or one of its rooms unfolds into, playing, in the apps that play one (iMessage, Discord, Telegram). Every other app (WhatsApp, X, Slack, LinkedIn, Signal) shows its still, the clip's first frame, so an iPhone's picture turns into the clip without a jump. It's your art alone: Zaisma draws nothing on it, and the app prints the title ("Join my match in" the title for a room link) under it. Pick a moment that shows the game playing, never a loader or "click to start", and that loops well. Without a clip, links show the share picture, then the cover, then the first gallery picture; a game with no picture at all gets Zaisma's card with its title on it, which moves where apps play a clip.
1717
+
1718
+ | Call | What it does |
1719
+ | --- | --- |
1720
+ | `PUT /games/:slug/clip` | Send the clip: JSON `{ "clip_base64", "still_base64" }`, the MP4 and its first frame, each base64 (a `data:` URL prefix is fine), up to 11 MB together. Answers with the `clip` (`id`, `review_status`, `review_reason`, `width_px`, `height_px`, `duration_ms`, `size_bytes`, `clip_url`, `still_url`, `created_at`), a `review_message` and `next_steps`. |
1721
+ | `DELETE /games/:slug/clip` | Remove it, waiting or showing; answers `removed_clip_ids`. |
1722
+
1723
+ `GET /games/:slug` answers the game's `clip` beside its `images`, or `null`.
1724
+
1725
+ **What a clip is.** One MP4 file with one H.264 picture track (what every app that plays a link's video plays), no sound track (`clip_has_sound`), at most 6 seconds (`clip_too_long`), fitting inside 1200 by 630 px and at least 600 by 315 (`bad_clip_dimensions`), up to 6 MB (`clip_too_big`; about 3 MB is usual). Anything else is `not_a_clip`, a fragmented MP4 (as a browser's recorder saves one) included. Its still is a PNG, JPEG or WebP the same width and height as the clip, up to 2 MB (`bad_clip_still`); Zaisma keeps it as the share card's JPEG. Any video becomes a clip with:
1726
+
1727
+ ```bash
1728
+ ffmpeg -i in.mp4 -t 6 -an -vf "scale=1200:630:force_original_aspect_ratio=decrease:force_divisible_by=2" -c:v libx264 -pix_fmt yuv420p -movflags +faststart clip.mp4
1729
+ ```
1730
+
1731
+ **What's checked.** The same as a cover: image matching checks the clip's frames and its still for known abuse material and approves it at once (when matching can't answer, a person looks, usually within a day; a match is refused with `clip_refused`); it keeps the cover lines above, and players report one that breaks them. A newly approved clip replaces the old one. A game has one clip, swapped any time. Its size and its still's count toward the account's storage, and sending one passes the day's new-data limit (`storage_full`, `new_data_limit`), like any file; fetches of it are free. It's served at `https://zaisma.com/clips/<id>.mp4` and `/clips/<id>/still` once approved; before that only you can see it.
1732
+
1733
+ **Making one.** `npx @zaisma/cli play-locally`, then press Record a clip on the bench's bar at the moment you choose: it records the game's canvas as it plays, fits it inside the card, plays it back, and sends it to Zaisma with Send to Zaisma when the bench has your key, or says the command. Your AI records too: `POST /bench/api/clips` (the game server README's bench API). Any MP4, made any way, goes with `npx @zaisma/cli clip <file.mp4> --game <slug>`, which takes the still from the first frame in your computer's Chrome (or give `--still <picture>`).
1734
+
1735
+ ```bash
1736
+ curl -X PUT "https://zaisma.com/api/dev/games/sky-hopper/clip" \
1737
+ -H "Authorization: Bearer $ZAISMA_KEY" -H "Content-Type: application/json" \
1738
+ -d "{\"clip_base64\": \"$(base64 < clip.mp4)\", \"still_base64\": \"$(base64 < still.jpg)\"}"
1739
+ ```
1740
+
1700
1741
  ## Seeing it as players do
1701
1742
 
1702
1743
  Every place players meet a game can be seen before it's published or even sent: the game page, the home's cards, the game's link as a chat unfolds it, and the game while it plays, each on a laptop and a phone, drawn by the same code players get. The dashboard shows it live beside Details, Images and Background, from what's typed or picked before it's saved; your AI gets the same as pictures:
@@ -1941,6 +1982,8 @@ The files a version needed before its first frame in its run in Chrome are prelo
1941
1982
  | `zaisma play-locally [folder] [--port <port>] [--game <slug>] [--on-network] [--no-open]` | Play the game on this computer with its game server and a test bench: each player on Zaisma's own game page, blocking and buying through it (Zaisma's buy sheet with a test card that's never charged), players made on this computer with an age band and social mode, their friends, blocks, items and refunds set in their details, and a dev bar to add or switch players; with no key and nothing sent, it runs `npx @zaisma/game-server@1 play-locally` | none |
1942
1983
  | `zaisma upload <folder> --game <slug> [--patch-notes "…"] [--publish-when-approved [--match-update-mode next_match\|now] [--big-update]]` | Check, fix what it can, upload a version, sending only new files, and wait for its scan | Uploading versions, above |
1943
1984
  | `zaisma shader <folder> --game <slug> --screen wide\|phone` | Send a shader's folder: each texture as an image of kind `shader_texture` (one the game has already, byte for byte, is used again), waited for until approved, then the shader | `POST /games/:slug/images?kind=shader_texture`, `POST /games/:slug/shaders` |
1985
+ | `zaisma clip <file> --game <slug> [--still <picture>]` | Send a clip: the MP4 and its first frame as the still, taken in this computer's Chrome unless `--still` gives it | `PUT /games/:slug/clip` |
1986
+ | `zaisma clip remove --game <slug>` | Remove the game's clip | `DELETE /games/:slug/clip` |
1944
1987
  | `zaisma versions <slug>` | The game and its versions, with preview links | `GET /games/:slug` |
1945
1988
  | `zaisma publish <slug> <version_id> [--scheduled-publish-at <time>] [--match-update-mode next_match\|now] [--big-update] [--patch-notes "…"]` | Publish, roll back, or publish later | `POST /games/:slug/versions/:id/publish` |
1946
1989
  | `zaisma unschedule <slug> <version_id>` | Cancel a publish-later | `DELETE /games/:slug/versions/:id/publish` |
@@ -2041,8 +2084,8 @@ Errors only the command answers with, beside the API's own codes (it also uses `
2041
2084
  | `unknown_shader_file` | A file in a shader's folder isn't one the command reads, or no channel in channels.json names it. |
2042
2085
  | `bad_channels_file` | A shader's channels.json isn't JSON, or isn't an object of the folder's passes, each a list of channels. |
2043
2086
  | `shader_texture_not_approved` | shader, check: a texture sent for the shader was rejected, or still waits for a person, so the shader wasn't sent. |
2044
- | `no_chrome` | check: there's no Chrome on this computer to draw the shader in, and no --game with ZAISMA_KEY to draw it on Zaisma. |
2045
- | `local_chrome_failed` | check: the Chrome on this computer couldn't draw the shader. |
2087
+ | `no_chrome` | check: there's no Chrome on this computer to draw the shader in, and no --game with ZAISMA_KEY to draw it on Zaisma; clip: none to take the still from the clip, and no --still. |
2088
+ | `local_chrome_failed` | check: the Chrome on this computer couldn't draw the shader; clip: it couldn't take the clip's first frame. |
2046
2089
  | `game_server_not_run` | play-locally: npx couldn't run @zaisma/game-server, which runs the game on this computer. |
2047
2090
  | `server_unreachable` | Zaisma couldn't be reached: no connection, or a wrong ZAISMA_API. |
2048
2091
  | `unexpected_answer` | Zaisma answered without JSON, like a page from a network in between. |
@@ -110,6 +110,17 @@ Every error the developer API and MCP answer with, as `{ "error": { code, messag
110
110
  - `background_not_ready` (HTTP 409): The image or shader isn't this game's, isn't approved yet, or is for the other screen. Fix: Wait until get_game shows the image or shader approved for this screen, then call set_background again. https://zaisma.com/developers/errors/background_not_ready
111
111
  - `bad_color` (HTTP 400): The color isn't #RRGGBB. Fix: Give the color as #RRGGBB, like #1A2B3C. https://zaisma.com/developers/errors/bad_color
112
112
 
113
+ ## Clips
114
+
115
+ - `not_a_clip` (HTTP 415): A clip is one MP4 file, not fragmented, with one H.264 picture track. Fix: Send an MP4 with one H.264 track, like the bench's Record a clip makes, or make one with ffmpeg (libx264, -movflags +faststart). https://zaisma.com/developers/errors/not_a_clip
116
+ - `clip_has_sound` (HTTP 400): A clip is silent, and this one has a sound track. Fix: Take the sound track out (ffmpeg's -an) and send it again. https://zaisma.com/developers/errors/clip_has_sound
117
+ - `clip_too_long` (HTTP 400): A clip runs at most 6 seconds. Fix: Cut it to at most 6 seconds that loop well (ffmpeg's -t 6) and send it again. https://zaisma.com/developers/errors/clip_too_long
118
+ - `clip_too_big` (HTTP 413): A clip is at most 6 MB. Fix: Save it at a lower bitrate (about 4 megabits a second) and send it again. https://zaisma.com/developers/errors/clip_too_big
119
+ - `bad_clip_dimensions` (HTTP 400): A clip fits inside 1200 by 630 px, and is at least 600 by 315. Fix: Scale it to fit inside 1200 by 630 px (ffmpeg's scale=1200:630:force_original_aspect_ratio=decrease) and send it again. https://zaisma.com/developers/errors/bad_clip_dimensions
120
+ - `bad_clip_still` (HTTP 400): A clip comes with its still: its first frame, a PNG, JPEG or WebP the clip's size, up to 2 MB. Fix: Send the clip's first frame as still_base64, the same size as the clip; the upload command's clip makes it for you. https://zaisma.com/developers/errors/bad_clip_still
121
+ - `clip_refused` (HTTP 422): The clip can't be used. Fix: Send a different clip. https://zaisma.com/developers/errors/clip_refused
122
+ - `no_clip` (HTTP 404): The game has no clip. Fix: Call get_game to see the game's clip; add_clip sends one. https://zaisma.com/developers/errors/no_clip
123
+
113
124
  ## Uploading versions
114
125
 
115
126
  - `bad_files` (HTTP 400): files isn't a list of files in the shape the call takes. Fix: Give files as a list of { path, content_base64 } or { path, size_bytes, sha256 }, as the call's input schema shows. https://zaisma.com/developers/errors/bad_files
@@ -115,6 +115,7 @@ Every ID Zaisma makes says its kind in its value: `<kind>_<random>`, the kind in
115
115
  | `game` | `game_…` |
116
116
  | `version` | `version_…` |
117
117
  | `image` | `image_…` |
118
+ | `clip` (a game's short silent loop its shared links play) | `clip_…` |
118
119
  | `shader` | `shader_…` |
119
120
  | `tester` | `tester_…` |
120
121
  | `topic` (known issues too) | `topic_…` |
@@ -239,6 +240,7 @@ One name per concept. The API and MCP column is snake_case; the SDK and game ser
239
240
  | The Zaisma skill: the workflow and its references, for any AI, installed by the upload command | `zaisma skill` (the command); MCP resources `zaisma://skill`, `zaisma://sdk`, `zaisma://naming`, `zaisma://errors`, `zaisma://game-server`, `zaisma://developer-api`, `zaisma://multiplayer`, `zaisma://loading`, `zaisma://phones`, `zaisma://saves`; MCP prompts `make_game`, `publish_game`, `fix_problem` | |
240
241
  | How many accounts have a game in their favorites (Your games) now, never who | `favorite_count` | |
241
242
  | A cover or gallery picture | `image_id` | |
243
+ | A game's clip: up to 6 seconds of the game, silent and looping, that its shared links unfold into where an app plays one, and its still (the clip's first frame) everywhere else | `clip` on a game: `id`, `review_status`, `review_reason`, `width_px`, `height_px`, `duration_ms`, `size_bytes`, `clip_url`, `still_url`, `created_at`; inputs `clip_base64`, `still_base64`; tools `add_clip`, `remove_clip`; the upload command's `clip`; the bench's Record a clip and `POST /bench/api/clips` (`clip_file`, `still_file`); errors `not_a_clip`, `clip_has_sound`, `clip_too_long`, `clip_too_big`, `bad_clip_dimensions`, `bad_clip_still`, `clip_refused`, `no_clip`, `no_canvas`. Inside: `game_clips`, `CLIP_LIMITS` | `CLIP_LIMITS` |
242
244
  | A game's world behind Zaisma's glass, for one screen, and what it shows | `background`: `screen`, `source` (`zaisma`, `image`, `shader`, and on phone `wide`), `image_id`, `shader_id`, `still_url`; pictures are images of `kind` `background` and `phone_background` | |
243
245
  | Which screen a background is for | `screen`: `wide` (desktops and tablets), `phone` (composed for a tall screen); errors `bad_screen`, `bad_background_source`, `background_not_ready` | |
244
246
  | A small program that paints a background live | `shader_id`; a shader's `image` pass and `buffers`, `quality_checks`, `has_quality_levels`, `flash_count`, `still_url`, `frame_urls`, each pass's `source_url`, `buffer_count`, `texture_count`, `texture_image_ids`. Its source keeps Shadertoy's names on purpose (`mainImage`, `fragColor`, `fragCoord`, `iResolution`, `iTime`, `iTimeDelta`, `iFrame`, `iChannel0` to `iChannel3`, `iChannelResolution`), the form AI already writes, so nothing is left to guess; Zaisma's own inputs follow them (`iQuality`, `iGlassPanes`, `iGlassPaneCount`) | `SHADER_LIMITS`, `ShaderManifest` |
@@ -422,7 +424,7 @@ One name per concept. The API and MCP column is snake_case; the SDK and game ser
422
424
  | A game database's use this month, and the most a game can keep | `database_use_this_month`: `read_row_count`, `written_row_count`, `storage_size_bytes`, `maximum_storage_size_bytes`; at it, `database_full` | `MAXIMUM_DATABASE_SIZE_BYTES`, `MAXIMUM_GAME_STORAGE_SIZE_BYTES` (Zaisma's own code); `database_full`, and `hosting_paused` an hour after the game's hosting paused |
423
425
  | A request from a game to its own game server outside any room, and what that answers | `request_count` (in a day's `game_server`) | `Zaisma.server.request(request, { serverUrl })` answers the `answer`; the game server's `onRequest(player, request, server)`, with `server.database`; sent to `POST /v1/requests/<slug>` as `{ pass, request }`, answered `{ answer }` |
424
426
  | A game server's schedules, and one run of one | `schedules` (in stats): `schedule_name`, `cron`, `version_id`, `next_run_at`, `last_run_at`; `scheduled_run_count` (in a day's `game_server`) | `schedules: [{ name, cron }]` (`Schedule`, up to `SCHEDULE_LIMITS.maximumScheduleCount`, cron in UTC); `onSchedule(run, server)` with `run.name`, `run.cron`, `run.scheduledAt` (`ScheduledRun`), and `server.database` |
425
- | A friend request a game offers, sent only once the player says yes on Zaisma's page, and who takes them | the social setting `who_can_send_friend_requests`: `nobody` (Invites only), `played_with` (People I play with: the same room now or within the last hour), `anyone`; in Zaisma's own code `friend_requests` (`sender_account_id`, `recipient_account_id`, `answer`: `accepted`, `turned_down`) and `room_visits` | `Zaisma.friends.sendRequest(playerId)` answers `{ status }`: `sent`, `cancelled`, `already_friends`, `not_taking_requests`; the room's `{ type: "friend_request", playerId }` from a game and `{ type: "friend_request" }` to the other player (look now, never who) |
427
+ | A friend request a game offers, sent only once the player says yes on Zaisma's page, and who takes them | the social setting `who_can_send_friend_requests`: `nobody` (Invites only), `played_with` (People I play with: the same room now or within the last hour), `anyone`; in Zaisma's own code `friend_requests` (`sender_account_id`, `recipient_account_id`, `answer`: `accepted`, `turned_down`; `taken_back_at_ms` when its sender took it back, `card_sent_at_ms` for one corner card a day per pair, `is_held` when it never reached its recipient) and `room_visits`; a waiting one's `can_show_card`; `takeBackFriendRequest` answers `{ status }`: `taken_back`, `friends` | `Zaisma.friends.sendRequest(playerId)` answers `{ status }`: `sent`, `cancelled`, `already_friends`, `not_taking_requests`; the room's `{ type: "friend_request", playerId }` from a game and `{ type: "friend_request" }` to the other player (look now, never who) |
426
428
  | A game played off its Zaisma page (exported, on another site, in a store), and its players on the developer's own server | | `Zaisma.setUpOffZaisma({ gameSlug, playerToken })` answers `{ isOffZaisma }` (refused with `bad_game_slug`, `bad_player_token`); `playerToken`, a player's proof from somewhere other than Zaisma (a Sign in with Zaisma ID token or the game's own token, up to 8 KB; `null` for a guest), sent in a hello or request in place of `pass` (`REQUEST_LIMITS.maximumPlayerTokenSizeBytes`); the player's `kind` `outside_zaisma`; `startServer`'s `identifyPlayer(playerToken, { origin })` answering `{ id, name }` or null (`IdentifyPlayer`, `OutsidePlayer`) and `outsideGuestsEnabled`; `signInWithZaismaPlayers({ signInAppIds, siteUrl, loadKeys, loadProfile })` and `guestPlayer()`; refused with `bad_player_token`; `checkChat`'s `null` passes. Inside: `OUTSIDE_PLAYER_LIMITS`, `OUTSIDE_ZAISMA_CHAT_SETTINGS`, `checkedOutsidePlayer`, `isPlayerToken`, `ChatMessage.hasOutsideReceiver` |
427
429
  | A game's own servers that players' browsers connect to, named in the game's menu and in the warning before play | `own_server_urls` (each `wss://` or `https://` and a host, like `wss://play.example.com`). Inside: `ownServerHostsOf`, `playsOnOwnServers`, the page's `has_own_servers`, `ownServerSheet`; `games.lists_held_at_ms` (a report holding such a game out of Zaisma's lists until a person decides) | `serverUrl` in `Zaisma.joinRoom` and `Zaisma.friends.setRoom` |
428
430
  | A new developer's listed game waiting for Zaisma's own lists (home, browsing, search) | `is_waiting_for_zaisma_lists` on a game, and where it stands, `zaisma_lists_wait`: `{ is_held_by_reports, progress }`, `progress` `{ live_duration_days, minimum_live_duration_days, counted_player_count, minimum_counted_player_count, quiet_duration_days, minimum_quiet_duration_days }`. Inside: `games.lists_opened_at_ms` (when they opened; they stay open), `LISTS_WAIT_LIMITS`, `listsWaitProgress`, `hasEarnedLists`, `owners.is_invited_developer` (let publish before the beta: established from the start) | |
package/zaisma.mjs CHANGED
@@ -152,8 +152,8 @@ const COMMAND_ERROR_CODES = {
152
152
  unknown_shader_file: "A file in a shader's folder isn't one the command reads, or no channel in channels.json names it.",
153
153
  bad_channels_file: "A shader's channels.json isn't JSON, or isn't an object of the folder's passes, each a list of channels.",
154
154
  shader_texture_not_approved: "shader, check: a texture sent for the shader was rejected, or still waits for a person, so the shader wasn't sent.",
155
- no_chrome: "check: there's no Chrome on this computer to draw the shader in, and no --game with ZAISMA_KEY to draw it on Zaisma.",
156
- local_chrome_failed: "check: the Chrome on this computer couldn't draw the shader.",
155
+ no_chrome: "check: there's no Chrome on this computer to draw the shader in, and no --game with ZAISMA_KEY to draw it on Zaisma; clip: none to take the still from the clip, and no --still.",
156
+ local_chrome_failed: "check: the Chrome on this computer couldn't draw the shader; clip: it couldn't take the clip's first frame.",
157
157
  game_server_not_run: "play-locally: npx couldn't run @zaisma/game-server, which runs the game on this computer.",
158
158
  server_unreachable: "Zaisma couldn't be reached: no connection, or a wrong ZAISMA_API.",
159
159
  unexpected_answer: "Zaisma answered without JSON, like a page from a network in between.",
@@ -218,6 +218,17 @@ const COMMANDS = {
218
218
  screen: { hasValue: true, isRequired: true, choices: SCREENS, about: "wide (desktops and tablets) or phone (composed for a tall screen)" },
219
219
  },
220
220
  },
221
+ clip: {
222
+ about:
223
+ "Send a game's clip: up to 6 seconds of it, silent and looping, that links to the game and its rooms unfold into, playing, in iMessage, Discord and Telegram, with its first frame everywhere else. " +
224
+ "An MP4 (H.264, no sound) fitting inside 1200 by 630, like play-locally's Record a clip makes; its still is taken from the first frame in the Chrome on this computer unless --still gives one",
225
+ arguments: [{ name: "file" }],
226
+ flags: {
227
+ game: { hasValue: true, isRequired: true, placeholder: "<slug>", about: "The game it's for" },
228
+ still: { hasValue: true, placeholder: "<picture>", about: "The clip's first frame as a PNG, JPEG or WebP the clip's size, when there's no Chrome here to take it" },
229
+ },
230
+ },
231
+ "clip remove": { about: "Remove a game's clip: its links go back to the share picture or cover", arguments: [], flags: { game: { hasValue: true, isRequired: true, placeholder: "<slug>", about: "The game" } } },
221
232
  versions: { about: "List a game's versions and preview links", arguments: [{ name: "slug" }], flags: {} },
222
233
  publish: {
223
234
  about: "Publish a version that passed, or roll back to an older one",
@@ -379,7 +390,7 @@ const COMMANDS = {
379
390
  help: { about: "This help; with --json, every command, flag, exit code and error code", arguments: [], flags: {} },
380
391
  };
381
392
  /** Commands with a second word, like zaisma forum post. */
382
- const SUBCOMMANDS = { links: ["set", "remove"], forum: ["post", "message", "reply"], database: ["query", "batch", "export", "import", "restore", "undo-restore"], saves: ["get", "change", "replace", "reset", "copies", "copy", "restore"], secrets: ["set", "delete"], items: ["set", "remove"], "kept-rooms": ["delete", "bring-back", "erase-now", "restore", "undo-restore", "restores", "restore-all", "restore-all-status", "undo-restore-all"] };
393
+ const SUBCOMMANDS = { clip: ["remove"], links: ["set", "remove"], forum: ["post", "message", "reply"], database: ["query", "batch", "export", "import", "restore", "undo-restore"], saves: ["get", "change", "replace", "reset", "copies", "copy", "restore"], secrets: ["set", "delete"], items: ["set", "remove"], "kept-rooms": ["delete", "bring-back", "erase-now", "restore", "undo-restore", "restores", "restore-all", "restore-all-status", "undo-restore-all"] };
383
394
  /** Flags every command takes. */
384
395
  const GLOBAL_FLAGS = {
385
396
  json: { hasValue: false, about: "Print the API's answer as JSON, as-is (on failure its { error }), and nothing else" },
@@ -922,6 +933,69 @@ async function drawInChrome(chromePath, manifest, textures, screen) {
922
933
  }
923
934
  }
924
935
 
936
+ /** zaisma clip <file> --game <slug> [--still <picture>], and zaisma clip remove --game <slug>. */
937
+ async function clip(command, values, flags) {
938
+ if (command === "clip remove") {
939
+ const answer = await api("DELETE", `/games/${flags.game}/clip`);
940
+ if (isJson) return printAnswer(answer);
941
+ console.log(`Removed ${flags.game}'s clip: its links show the share picture or cover again.\nPASS`);
942
+ return EXIT_CODES.done;
943
+ }
944
+ const clipBytes = await readFile(values.file).catch(() => refuse("not_a_file", { message: `${values.file} can't be read.`, field: "file", fix: "Give the clip's MP4 file, like the one play-locally's Record a clip saved." }));
945
+ let stillBytes;
946
+ if (flags.still) stillBytes = await readFile(flags.still).catch(() => refuse("not_a_file", { message: `${flags.still} can't be read.`, field: "still", fix: "Give the clip's first frame as a PNG, JPEG or WebP picture." }));
947
+ else {
948
+ const chromePath = findChrome([join(process.cwd(), ".wrangler/chrome"), join(process.cwd(), "chrome")]);
949
+ if (!chromePath) refuse("no_chrome", { message: "There's no Chrome on this computer to take the clip's first frame.", field: "still", fix: "Install Chrome (or set CHROME_PATH), or give the first frame with --still <picture>, like: ffmpeg -i clip.mp4 -frames:v 1 still.jpg" });
950
+ stillBytes = await firstFrameInChrome(chromePath, clipBytes);
951
+ }
952
+ const answer = await api("PUT", `/games/${flags.game}/clip`, { clip_base64: clipBytes.toString("base64"), still_base64: Buffer.from(stillBytes).toString("base64") });
953
+ if (isJson) return printAnswer(answer);
954
+ console.log(`${answer.review_message}\nThe clip: ${answer.clip.clip_url}\n${answer.clip.review_status === "approved" ? "PASS" : "WAITING"}`);
955
+ return EXIT_CODES.done;
956
+ }
957
+
958
+ /** A clip's first frame as a JPEG, decoded by the Chrome on this computer; nothing the page asks for leaves it. */
959
+ async function firstFrameInChrome(chromePath, clipBytes) {
960
+ const failed = (error) => refuse("local_chrome_failed", { message: `Chrome on this computer couldn't take the clip's first frame: ${error.message}`, field: "still", fix: "Make sure the clip is an H.264 MP4 (Chromium builds may lack H.264: set CHROME_PATH to Google Chrome), or give it with --still <picture>, like: ffmpeg -i clip.mp4 -frames:v 1 still.jpg" }, EXIT_CODES.failed);
961
+ let chrome;
962
+ try {
963
+ chrome = await openChrome(chromePath, "zaisma-clip-still-");
964
+ } catch (error) {
965
+ failed(error);
966
+ }
967
+ try {
968
+ const { targetId } = await chrome.send("Target.createTarget", { url: "about:blank" });
969
+ const { sessionId } = await chrome.send("Target.attachToTarget", { targetId, flatten: true });
970
+ const send = (method, parameters) => chrome.send(method, parameters, sessionId);
971
+ chrome.listen(sessionId, (method, parameters) => method === "Fetch.requestPaused" && send("Fetch.failRequest", { requestId: parameters.requestId, errorReason: "BlockedByClient" }).catch(() => {}));
972
+ await send("Fetch.enable", { patterns: [{ urlPattern: "http*" }] });
973
+ const { result: evaluated, exceptionDetails } = await send("Runtime.evaluate", {
974
+ expression: `(async () => {
975
+ const video = document.createElement("video");
976
+ video.muted = true; video.preload = "auto";
977
+ video.src = URL.createObjectURL(await (await fetch("data:video/mp4;base64,${clipBytes.toString("base64")}")).blob());
978
+ await new Promise((done, fail) => { video.onloadeddata = done; video.onerror = () => fail(new Error("it can't play this video")); });
979
+ video.currentTime = 0;
980
+ await new Promise((done) => (video.readyState >= 2 ? done() : (video.onseeked = done)));
981
+ const canvas = document.createElement("canvas");
982
+ canvas.width = video.videoWidth; canvas.height = video.videoHeight;
983
+ canvas.getContext("2d").drawImage(video, 0, 0);
984
+ return canvas.toDataURL("image/jpeg", 0.9).split(",")[1];
985
+ })()`,
986
+ awaitPromise: true,
987
+ returnByValue: true,
988
+ });
989
+ if (exceptionDetails) throw new Error(exceptionDetails.exception?.description?.split("\n")[0] ?? exceptionDetails.text);
990
+ return Buffer.from(evaluated.value, "base64");
991
+ } catch (error) {
992
+ if (error instanceof CommandError) throw error;
993
+ failed(error);
994
+ } finally {
995
+ await chrome.close();
996
+ }
997
+ }
998
+
925
999
  /** Draws the shader on Zaisma, as a check before sending (POST /games/:slug/shader-checks), after sending its textures; downloads its sheet. */
926
1000
  async function drawOnZaisma(slug, manifest, textures, screen) {
927
1001
  const textureImages = await sendTextures(slug, textures);
@@ -2251,6 +2325,7 @@ async function run({ command, values, flags, globalFlags, rest }) {
2251
2325
  return EXIT_CODES.done;
2252
2326
  }
2253
2327
  if (command === "check") return checkFolder(values, flags);
2328
+ if (command === "clip" || command === "clip remove") return clip(command, values, flags);
2254
2329
  if (command === "play-locally") return playLocally(values, flags);
2255
2330
  if (command === "export") return exportGame(values, flags);
2256
2331
  if (command === "upload") {