@amplifyup/cli
Init a project and push entity and component definitions.
@amplifyup/cli is the CLI for working inside an Amplify Up project. The command is amplifyup.
To start a new project, use create-amplifyup. That command adds this package as a devDependency.
Requires Node 20 or newer.
Install
npm install -D @amplifyup/cli
amplifyup init
Writes .amplifyup in the project root. It does not create a site in Amplify Up — add the site first, then pass that site’s site id (this is not the tracking ID the SDK uses).
Do not put an automation key in .amplifyup, even if that file is gitignored. Prefer AMPLIFYUP_API_KEY. Otherwise store the key in ~/.amplifyup/credentials or .amplifyup.local.
amplifyup init --api-url https://amplifyup.ai --site-id <site id>
{
"definitionsPath": "data",
"apiUrl": "https://amplifyup.ai",
"siteId": "<site id>"
}
| Flag | Effect |
|---|---|
--api-url <url> | Amplify Up app URL. Also AMPLIFYUP_API_URL. Production: https://amplifyup.ai. |
--site-id <id> | Site id. Also AMPLIFYUP_SITE_ID. |
--definitions-path <dir> | Folder of entity and component JSON. Defaults to data. |
If .amplifyup is missing, or definitionsPath is omitted, the folder is data.
amplifyup push
Reads entities/ and components/ under definitionsPath and upserts them on the site from .amplifyup. Those calls are Tenant APIs. Create an automation key with Components and entities in workspace settings, then pass it as AMPLIFYUP_API_KEY (that wins over any file). The CLI sends Authorization: Bearer. --verbose must mask the key.
Views and composed pages are not pushed — compose and deploy those in the dashboard.
apiUrl and siteId must already be set.
amplifyup push
Next step
- Install — Node SDK and
AmplifyUpProvider - Components — registry IDs that match what you push