# TMRW Run

Use TMRW Run to deploy built apps through the user's TMRW Run account.

1. Install the CLI:

curl -fsSL https://tmrwrun.com/install.sh | bash

2. Ask the user to create an API key at https://tmrwrun.com/dashboard.

3. Set the API endpoint and key:

export TMRW_RUN_API_URL=https://api.tmrwrun.com
export TMRW_RUN_API_KEY=tmrw_...

4. Deploy a built app:

tmrwrun deploy ./dist --name "App Name" --slug app-name

5. If the app needs managed storage, add:

tmrwrun deploy ./dist --name "App Name" --slug app-name --with-db

6. For app-owned server code, deploy a runtime entry:

tmrwrun deploy ./app --name "App Name" --slug app-name --runtime worker --entry src/index.js --with-db

7. Manage app access when requested:

tmrwrun access otp app-name
tmrwrun access allow email app-name user@example.com
tmrwrun access allow domain app-name example.com
tmrwrun access service create app-name --name backend
tmrwrun access public app-name

8. Delete an app only when the user explicitly asks:

tmrwrun delete app-name --confirm app-name
