@canva/cli: Upload your app from the terminal

:package: canva apps upload is here

Build and upload your app in one command

Uploading a new version of your app used to mean building it, opening the Developer Portal, and uploading your app.js and messages_en.json files by hand. canva apps upload does all of that for you. It builds your app, extracts its translations, and uploads everything in one go. Like the rest of the CLI, it also works when an AI agent or another non-interactive environment is running it.


:chequered_flag: Get started

Update the CLI, then run this command from your app’s directory:

# grab the 2.14.0 release
npm i -g @canva/cli@latest

canva apps upload

If you aren’t logged in, the CLI offers to log you in first.


:hammer_and_wrench: A few ways to use it

See what will happen first. Add --dry-run to preview the upload without building or uploading anything.

canva apps upload --dry-run

Upload a build you already have. --prebuilt uploads the output you already have, without rebuilding your app or extracting its translations.

canva apps build
canva apps upload --prebuilt

:counterclockwise_arrows_button: Keeping canva-app.json in sync

Before uploading, the CLI compares your local canva-app.json with the Developer Portal, so your app’s settings stay in step with the code you’re uploading.

For example, if you’ve added a new intent in your code that needs additional permissions, but haven’t enabled it in the Developer Portal yet, the CLI shows a comparison like this:

Without that change, the new code would rely on an intent or permissions that aren’t enabled for your app yet. When the CLI finds a difference like this, it asks whether to push your local changes or skip them and continue the upload.

To preselect your sync preference, use --drift-strategy:

canva apps upload --drift-strategy push

:clapper_board: See it in action


:books: Learn more

Run canva apps upload --help to see every option.

To learn more about managing your app’s configuration with canva-app.json, see App configuration. For the rest of the CLI’s commands, see the Canva CLI docs.

2 Likes