From e524690fd2b2814f61ccbe7e9f91c9e6fcd6eb7b Mon Sep 17 00:00:00 2001 From: John Donmoyer Date: Thu, 12 Feb 2026 11:12:30 -0500 Subject: [PATCH 1/3] update deno deploy CLI docs with new commands and flags Add documentation for create (full flags + interactive wizard), database management, switch, and logout subcommands. Add CLI alternatives to Deploy reference pages for apps, databases, env vars, and observability. --- deploy/getting_started.md | 8 + deploy/reference/apps.md | 48 ++- deploy/reference/databases.md | 76 +++++ deploy/reference/env_vars_and_contexts.md | 47 +++ deploy/reference/observability.md | 9 + runtime/reference/cli/deploy.md | 389 +++++++++++++++++++++- 6 files changed, 563 insertions(+), 14 deletions(-) diff --git a/deploy/getting_started.md b/deploy/getting_started.md index 633a69a80..1aa9d92be 100644 --- a/deploy/getting_started.md +++ b/deploy/getting_started.md @@ -35,6 +35,14 @@ An application is a single deployed web service with one build configuration, build history, environment variables, attached custom domains, a linked GitHub repository, etc. +:::info + +You can also create and configure apps from the command line with +`deno deploy create`. See the +[Apps reference](/deploy/reference/apps/#using-the-cli) for details. + +::: + ## Select a repo 1. Choose the GitHub repository for your application: diff --git a/deploy/reference/apps.md b/deploy/reference/apps.md index 8155293aa..1deb2235c 100644 --- a/deploy/reference/apps.md +++ b/deploy/reference/apps.md @@ -12,7 +12,9 @@ organization and is used in default domain names. ## Creating an application -To create an application: +### Using the dashboard + +To create an application from the web dashboard: 1. Click the "+ Create App" button on the organization page 2. Select the GitHub repository to deploy from @@ -20,9 +22,6 @@ To create an application: 4. Set up build configuration 5. Add any required environment variables -> ⚠️ Currently, applications must be linked to a GitHub repository during -> creation. - The build configuration determines how the application is built during the deployment process. Builds are automatically triggered on each push to the linked repository or when manually clicking "Deploy Default Branch". For @@ -34,6 +33,47 @@ Environment Variables". For more details on environment variables, see the [Environment Variables and Contexts](/deploy/reference/env_vars_and_contexts/) documentation. +### Using the CLI + +You can also create applications from the command line with `deno deploy create`. +Running without flags starts an interactive wizard that walks you through each +step: + +```bash +deno deploy create +``` + +For CI/CD pipelines or scripting, provide flags to skip the wizard entirely: + +```bash +deno deploy create \ + --org my-org \ + --app my-api \ + --source local \ + --framework-preset fresh \ + --build-timeout 5 \ + --build-memory-limit 1024 \ + --region us +``` + +You can also create apps that deploy from a GitHub repository: + +```bash +deno deploy create \ + --org my-org \ + --app my-app \ + --source github \ + --owner my-github-org \ + --repo my-repo \ + --framework-preset astro \ + --build-timeout 10 \ + --build-memory-limit 2048 \ + --region global +``` + +For the full list of flags and options, see the +[`deno deploy create` CLI reference](/runtime/reference/cli/deploy/#create-application). + ## Renaming an application Applications can be renamed by editing the app slug on the app settings page. diff --git a/deploy/reference/databases.md b/deploy/reference/databases.md index f22b7213c..3dcdac0d0 100644 --- a/deploy/reference/databases.md +++ b/deploy/reference/databases.md @@ -34,6 +34,8 @@ There are two ways to add a database instance to your Deno Deploy organization: ### Linking an external database +#### Using the dashboard + To link an existing external database instance you can either: - go to the "Databases" page in your organization dashboard and click the "Link @@ -94,8 +96,38 @@ to upload the specific CA certificate that was used to sign your database's certificate. You can usually obtain this from your database provider's documentation or console. +#### Using the CLI + +You can also link an external PostgreSQL database using the CLI: + +```bash +deno deploy database link my-db "postgres://user:pass@host:5432/mydb" --org my-org +``` + +Or use individual flags instead of a connection string: + +```bash +deno deploy database link my-db \ + --hostname db.example.com \ + --username admin \ + --password secret \ + --port 5432 \ + --org my-org +``` + +Use `--dry-run` to test the connection without actually linking: + +```bash +deno deploy database link my-db "postgres://user:pass@host:5432/mydb" --dry-run +``` + +For the full list of options, see the +[`deno deploy database link` CLI reference](/runtime/reference/cli/deploy/#link-an-external-database). + ### Provisioning a managed database +#### Using the dashboard + To create and attach a managed database instance from Deno Deploy, you can either: @@ -124,6 +156,21 @@ Once you're ready, click "Provision" to create the database instance. Deno Deploy will handle the provisioning process and set up the necessary infrastructure on your behalf. +#### Using the CLI + +You can also provision a managed database from the CLI: + +```bash +# Provision a Deno KV database +deno deploy database provision my-kv-db --kind denokv --org my-org + +# Provision a Prisma Postgres database (region is required) +deno deploy database provision my-pg-db --kind prisma --region us-east-1 --org my-org +``` + +For the full list of options, see the +[`deno deploy database provision` CLI reference](/runtime/reference/cli/deploy/#provision-a-database). + ## Linking databases to your apps After creating or linking a database instance, you can assign it to your apps. @@ -161,6 +208,17 @@ To assign a database to an app you can either: dropdown. - Go to the "Databases" tab in your app settings, click on "Attach Database", then select the database instance from the dropdown. +- Use the CLI: + +```bash +deno deploy database assign my-db --app my-api --org my-org +``` + +To detach a database from an app: + +```bash +deno deploy database detach my-db --app my-api --org my-org +``` Once assigned, Deno Deploy will automatically create the necessary isolated databases for each environment within that app. @@ -398,6 +456,24 @@ instance instead. ## Database management +### Using the CLI + +You can manage databases entirely from the command line: + +```bash +# List all databases in your organization +deno deploy database list --org my-org + +# Query a database +deno deploy database query my-db mydb "SELECT * FROM users LIMIT 10" + +# Delete a database +deno deploy database delete my-old-db --org my-org +``` + +For the full list of database commands, see the +[`deno deploy database` CLI reference](/runtime/reference/cli/deploy/#database-management). + ### Organization level You can view and manage your database instances from the "Databases" page in diff --git a/deploy/reference/env_vars_and_contexts.md b/deploy/reference/env_vars_and_contexts.md index 047b7fba8..a117d8f09 100644 --- a/deploy/reference/env_vars_and_contexts.md +++ b/deploy/reference/env_vars_and_contexts.md @@ -81,6 +81,53 @@ To remove a variable, click the "Remove" button next to it. To edit a variable, click the "Edit" button next to it to modify its name, value, secret status, or applicable contexts. +### Using the CLI + +You can also manage environment variables from the command line with +`deno deploy env`: + +```bash +# List all environment variables +deno deploy env list --org my-org --app my-api + +# Add a plain text variable +deno deploy env add SITE_NAME "My App" --org my-org --app my-api + +# Add a secret variable +deno deploy env add API_KEY "sk-secret-value" --secret --org my-org --app my-api + +# Update a variable's value +deno deploy env update-value API_KEY "new-value" --org my-org --app my-api + +# Update which contexts a variable applies to +deno deploy env update-contexts API_KEY Production Build --org my-org --app my-api + +# Delete a variable +deno deploy env delete OLD_API_KEY --org my-org --app my-api + +# Load variables from a .env file +deno deploy env load .env.production --org my-org --app my-api +``` + +:::info + +You can use `deno deploy switch --org my-org --app my-api` to set a default +organization and application, so you don't need to pass `--org` and `--app` on +every command. + +::: + +When loading from a `.env` file, the CLI automatically detects which variables +are likely secrets based on their names (e.g. keys containing `SECRET`, `TOKEN`, +`PASSWORD`). Use `--non-secrets` to override this for specific keys: + +```bash +deno deploy env load .env.production --non-secrets PUBLIC_URL SITE_NAME +``` + +For the full list of options, see the +[`deno deploy env` CLI reference](/runtime/reference/cli/deploy/#environment-variables-management). + ## Using environment variables in your code Access environment variables using the `Deno.env.get` API: diff --git a/deploy/reference/observability.md b/deploy/reference/observability.md index e6ee3955d..600a2cfcd 100644 --- a/deploy/reference/observability.md +++ b/deploy/reference/observability.md @@ -29,6 +29,15 @@ that specific trace and span. For such logs, a "View trace" button appears in the logs interface, allowing you to open the relevant trace in an overlay drawer for detailed inspection. +You can also stream logs from the command line: + +```bash +deno deploy logs --org my-org --app my-api +``` + +For more options, see the +[`deno deploy logs` CLI reference](/runtime/reference/cli/deploy/#application-logs). + ## Traces Traces in Deno Deploy are captured in three ways: diff --git a/runtime/reference/cli/deploy.md b/runtime/reference/cli/deploy.md index 127a1f23c..a8ce83ac5 100644 --- a/runtime/reference/cli/deploy.md +++ b/runtime/reference/cli/deploy.md @@ -35,19 +35,160 @@ system's keyring: ### Create application -Creates a new application in Deno Deploy. +Creates a new application in Deno Deploy. When run without flags, an interactive +wizard walks you through each step. When any configuration flag is provided, the +command runs in non-interactive mode (useful for CI/CD pipelines and scripting). ```bash deno deploy create [root-path] ``` -**Options:** +The optional `[root-path]` argument sets the local project directory. Defaults to +the current working directory. + +#### General options - `-h, --help` - Show help information -- `--org ` - The name of the organization to create the application for +- `--org ` - The organization to create the app in +- `--app ` - The application name (used in the default URL) +- `--allow-node-modules` - Include `node_modules` when uploading +- `--no-wait` - Skip waiting for the first build to complete +- `--dry-run` - Validate flags and run through the flow without actually + creating anything + +#### Source options + +These flags control where the app code comes from: + +- `--source ` - Deploy from a GitHub repo or the local filesystem +- `--owner ` - GitHub owner/organization (required when source is + `github`) +- `--repo ` - GitHub repository name (required when source is `github`) + +#### Build configuration options + +- `--app-directory ` - Path to the app directory within the project +- `--framework-preset ` - Use a framework preset for build defaults. + Supported values: `astro`, `nextjs`, `nuxt`, `remix`, `solidstart`, + `sveltekit`, `fresh`, `lume`, or `""` (none) +- `--do-not-use-detected-build-config` - Skip auto-detected build settings and + use only the provided flags +- `--install-command ` - Install command (e.g. `"deno install"`) +- `--build-command ` - Build command (e.g. `"deno task build"`) +- `--pre-deploy-command ` - Command to run after building but before + deploying + +#### Runtime mode options + +- `--runtime-mode ` - Whether the app runs as a server or a + static site + +**Dynamic mode** (server): + +- `--entrypoint ` - The entrypoint file (e.g. `main.ts`) +- `--arguments ` - Arguments passed to the entrypoint (can be specified + multiple times) +- `--working-directory ` - Working directory for the process + +**Static mode** (static site): + +- `--static-dir ` - Directory containing the static files to serve +- `--single-page-app` - Serve `index.html` for routes that don't match a file + (instead of returning 404) + +#### Build resource options + +- `--build-timeout ` - Build timeout. Allowed values: `5`, `10`, `15`, + `20`, `25`, `30` +- `--build-memory-limit ` - Build memory limit in MB. Allowed values: + `1024`, `2048`, `3072`, `4096` +- `--region ` - Deployment region. Allowed values: `us`, `eu`, `global` + +#### Interactive wizard + +When you run `deno deploy create` without flags, an interactive wizard guides you +through each configuration step: + +1. **Organization** - Select which org to create the app in +2. **App name** - Choose a name for your app +3. **Source** - Deploy from GitHub or a local directory +4. **GitHub repo** _(if source is GitHub)_ - Select the owner and repo +5. **App directory** - Pick the directory within your project (auto-detects + workspace members) +6. **Build configuration** - Auto-detects framework settings. You can accept the + detected config or configure manually (framework preset, install/build + commands, runtime mode, etc.) +7. **Build timeout** - How long the build can run +8. **Build memory limit** - How much memory the build gets +9. **Region** - Where to deploy (`us`, `eu`, or `global`) +10. **Confirm** - Review and confirm before creating + +#### Examples + +Create an app interactively: ```bash -deno deploy create --org my-organization +deno deploy create +``` + +Create a local dynamic app with all flags (non-interactive): + +```bash +deno deploy create \ + --org my-org \ + --app my-api \ + --source local \ + --runtime-mode dynamic \ + --entrypoint main.ts \ + --install-command "deno install" \ + --build-command "deno task build" \ + --build-timeout 5 \ + --build-memory-limit 1024 \ + --region us +``` + +Create a static site: + +```bash +deno deploy create \ + --org my-org \ + --app my-site \ + --source local \ + --runtime-mode static \ + --static-dir dist \ + --single-page-app \ + --build-command "deno task build" \ + --build-timeout 10 \ + --build-memory-limit 2048 \ + --region us +``` + +Use a framework preset (fewer flags needed since the preset provides defaults): + +```bash +deno deploy create \ + --org my-org \ + --app my-fresh-app \ + --source local \ + --framework-preset fresh \ + --build-timeout 5 \ + --build-memory-limit 1024 \ + --region us +``` + +Deploy from a GitHub repo: + +```bash +deno deploy create \ + --org my-org \ + --app my-app \ + --source github \ + --owner my-github-org \ + --repo my-repo \ + --framework-preset astro \ + --build-timeout 10 \ + --build-memory-limit 2048 \ + --region global ``` ### Environment variables management @@ -80,8 +221,16 @@ deno deploy env add Adds an environment variable to the application. +**Options:** + +- `--secret` - Mark the variable as a secret. Secret values are hidden in the + dashboard and in `env list` output. + ```bash deno deploy env add DATABASE_URL "postgresql://user:pass@localhost/db" + +# Add a secret environment variable +deno deploy env add API_KEY "sk-secret-value" --secret ``` #### Update environment variable value @@ -125,10 +274,187 @@ deno deploy env delete OLD_API_KEY deno deploy env load ``` -Loads environment variables from a `.env` file into the application. +Loads environment variables from a `.env` file into the application. The CLI +automatically detects which variables are likely secrets based on their names +(e.g. keys containing `SECRET`, `TOKEN`, `PASSWORD`, etc.) and marks them +accordingly. + +**Options:** + +- `--non-secrets ` - Keys from the `.env` file that should be treated + as non-secrets, overriding the auto-detection ```bash deno deploy env load .env.production + +# Load and treat specific keys as non-secrets +deno deploy env load .env.production --non-secrets PUBLIC_URL SITE_NAME +``` + +### Database management + +Manage database instances for your organization. + +```bash +deno deploy database +``` + +**Options:** + +- `-h, --help` - Show help information +- `--org ` - The name of the organization + +#### Provision a database + +```bash +deno deploy database provision --kind [--region ] +``` + +Creates a new database instance. + +**Options:** + +- `--kind ` - The type of database to provision (required) +- `--region ` - The primary region for the database (required for Prisma) + +```bash +# Provision a Deno KV database +deno deploy database provision my-kv-db --kind denokv + +# Provision a Prisma Postgres database +deno deploy database provision my-pg-db --kind prisma --region us-east-1 +``` + +#### Link an external database + +```bash +deno deploy database link [connectionString] +``` + +Links an external PostgreSQL database to your organization. You can provide a +connection string or use individual flags. + +**Options:** + +- `--hostname ` - Database hostname (conflicts with connection string) +- `--username ` - Database username (conflicts with connection string) +- `--password ` - Database password (conflicts with connection string) +- `--port ` - Database port (conflicts with connection string) +- `--cert ` - SSL certificate for the connection +- `--dry-run` - Test the connection without actually linking + +```bash +# Link using a connection string +deno deploy database link my-db "postgres://user:pass@host:5432/mydb" + +# Link using individual flags +deno deploy database link my-db \ + --hostname db.example.com \ + --username admin \ + --password secret \ + --port 5432 + +# Test the connection first +deno deploy database link my-db "postgres://user:pass@host:5432/mydb" --dry-run +``` + +#### Assign a database to an app + +```bash +deno deploy database assign [--app ] +``` + +Assigns a database instance to an application. If `--app` is not provided, you +will be prompted to select one interactively. + +```bash +deno deploy database assign my-db --app my-api +``` + +#### Detach a database from an app + +```bash +deno deploy database detach [--app ] +``` + +Removes the connection between a database instance and an application. + +```bash +deno deploy database detach my-db --app my-api +``` + +#### Query a database + +```bash +deno deploy database query [query...] +``` + +Executes a SQL query against a database. + +```bash +deno deploy database query my-db mydb "SELECT * FROM users LIMIT 10" +``` + +#### List databases + +```bash +deno deploy database list [search] +``` + +Lists all database instances in the organization. Also available as +`database ls`. + +```bash +# List all databases +deno deploy database list + +# Filter by name +deno deploy database list my-db +``` + +#### Delete a database + +```bash +deno deploy database delete +``` + +Permanently deletes a database instance. Also available as `database remove` or +`database rm`. + +```bash +deno deploy database delete my-old-db +``` + +### Switch organization and application + +Sets the default organization and application for subsequent commands, so you +don't have to pass `--org` and `--app` every time. + +```bash +deno deploy switch [--org ] [--app ] +``` + +When run without flags, an interactive prompt lets you select the org and app. + +**Options:** + +- `--org ` - The organization to switch to +- `--app ` - The application to switch to + +```bash +# Switch interactively +deno deploy switch + +# Switch to a specific org and app +deno deploy switch --org my-company --app my-api +``` + +### Logout + +Removes the stored authentication token. + +```bash +deno deploy logout ``` ### Application logs @@ -246,15 +572,58 @@ deno deploy --prod deno deploy --org my-company --app my-api --prod ``` -### Environment setup +### Creating applications + +```bash +# Start the interactive creation wizard +deno deploy create + +# Create with a framework preset +deno deploy create --org my-company --app my-site \ + --source local --framework-preset fresh \ + --build-timeout 5 --build-memory-limit 1024 --region us + +# Create a static site from a GitHub repo +deno deploy create --org my-company --app my-docs \ + --source github --owner my-github-org --repo my-docs-repo \ + --runtime-mode static --static-dir dist --single-page-app \ + --build-command "npm run build" \ + --build-timeout 10 --build-memory-limit 2048 --region global +``` + +### Switching context ```bash -# Create a new application -deno deploy create --org my-company +# Set a default org and app so you don't have to pass --org/--app every time +deno deploy switch --org my-company --app my-api + +# Now these commands use the saved org and app automatically +deno deploy env list +deno deploy logs +``` + +### Database management +```bash +# Provision a Deno KV database +deno deploy database provision my-kv --kind denokv --org my-company + +# Link an external PostgreSQL database +deno deploy database link my-pg "postgres://user:pass@host:5432/db" --org my-company + +# Assign a database to an app +deno deploy database assign my-kv --app my-api + +# Query a database +deno deploy database query my-pg mydb "SELECT count(*) FROM users" +``` + +### Environment setup + +```bash # Set up environment variables -deno deploy env add DATABASE_URL "postgresql://..." -deno deploy env add API_KEY "your-api-key" +deno deploy env add DATABASE_URL "postgresql://..." --secret +deno deploy env add SITE_NAME "My App" # Load from .env file deno deploy env load .env.production From 582b4389132c128c9239b7c0b6f90444daa3272d Mon Sep 17 00:00:00 2001 From: John Donmoyer Date: Thu, 12 Feb 2026 11:41:21 -0500 Subject: [PATCH 2/3] format --- deploy/reference/apps.md | 6 +++--- runtime/reference/cli/deploy.md | 11 ++++++----- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/deploy/reference/apps.md b/deploy/reference/apps.md index 1deb2235c..ac70e9080 100644 --- a/deploy/reference/apps.md +++ b/deploy/reference/apps.md @@ -35,9 +35,9 @@ documentation. ### Using the CLI -You can also create applications from the command line with `deno deploy create`. -Running without flags starts an interactive wizard that walks you through each -step: +You can also create applications from the command line with +`deno deploy create`. Running without flags starts an interactive wizard that +walks you through each step: ```bash deno deploy create diff --git a/runtime/reference/cli/deploy.md b/runtime/reference/cli/deploy.md index a8ce83ac5..7e41513b5 100644 --- a/runtime/reference/cli/deploy.md +++ b/runtime/reference/cli/deploy.md @@ -43,8 +43,8 @@ command runs in non-interactive mode (useful for CI/CD pipelines and scripting). deno deploy create [root-path] ``` -The optional `[root-path]` argument sets the local project directory. Defaults to -the current working directory. +The optional `[root-path]` argument sets the local project directory. Defaults +to the current working directory. #### General options @@ -106,8 +106,8 @@ These flags control where the app code comes from: #### Interactive wizard -When you run `deno deploy create` without flags, an interactive wizard guides you -through each configuration step: +When you run `deno deploy create` without flags, an interactive wizard guides +you through each configuration step: 1. **Organization** - Select which org to create the app in 2. **App name** - Choose a name for your app @@ -315,7 +315,8 @@ Creates a new database instance. **Options:** - `--kind ` - The type of database to provision (required) -- `--region ` - The primary region for the database (required for Prisma) +- `--region ` - The primary region for the database (required for + Prisma) ```bash # Provision a Deno KV database From 7d8e4b5e25e79615ba8ab000124d487769dba914 Mon Sep 17 00:00:00 2001 From: John Donmoyer Date: Thu, 12 Feb 2026 11:55:47 -0500 Subject: [PATCH 3/3] revert databases, env vars, and observability changes; update apps page Focus this branch on apps and deno deploy create command only. Reverts CLI sections from databases, env_vars_and_contexts, and observability back to main. Adds intro paragraph to apps creating section and fixes button label. --- deploy/reference/apps.md | 6 +- deploy/reference/databases.md | 76 ----------------------- deploy/reference/env_vars_and_contexts.md | 47 -------------- deploy/reference/observability.md | 9 --- 4 files changed, 5 insertions(+), 133 deletions(-) diff --git a/deploy/reference/apps.md b/deploy/reference/apps.md index ac70e9080..0bd7335c4 100644 --- a/deploy/reference/apps.md +++ b/deploy/reference/apps.md @@ -12,11 +12,15 @@ organization and is used in default domain names. ## Creating an application +Applications can be created from the +[Deno Deploy dashboard](https://dash.deno.com) or from the command line using +the [`deno deploy` CLI](/runtime/reference/cli/deploy/). + ### Using the dashboard To create an application from the web dashboard: -1. Click the "+ Create App" button on the organization page +1. Click the "+ New App" button on the Application overview page 2. Select the GitHub repository to deploy from 3. Configure the app slug (name) 4. Set up build configuration diff --git a/deploy/reference/databases.md b/deploy/reference/databases.md index 3dcdac0d0..f22b7213c 100644 --- a/deploy/reference/databases.md +++ b/deploy/reference/databases.md @@ -34,8 +34,6 @@ There are two ways to add a database instance to your Deno Deploy organization: ### Linking an external database -#### Using the dashboard - To link an existing external database instance you can either: - go to the "Databases" page in your organization dashboard and click the "Link @@ -96,38 +94,8 @@ to upload the specific CA certificate that was used to sign your database's certificate. You can usually obtain this from your database provider's documentation or console. -#### Using the CLI - -You can also link an external PostgreSQL database using the CLI: - -```bash -deno deploy database link my-db "postgres://user:pass@host:5432/mydb" --org my-org -``` - -Or use individual flags instead of a connection string: - -```bash -deno deploy database link my-db \ - --hostname db.example.com \ - --username admin \ - --password secret \ - --port 5432 \ - --org my-org -``` - -Use `--dry-run` to test the connection without actually linking: - -```bash -deno deploy database link my-db "postgres://user:pass@host:5432/mydb" --dry-run -``` - -For the full list of options, see the -[`deno deploy database link` CLI reference](/runtime/reference/cli/deploy/#link-an-external-database). - ### Provisioning a managed database -#### Using the dashboard - To create and attach a managed database instance from Deno Deploy, you can either: @@ -156,21 +124,6 @@ Once you're ready, click "Provision" to create the database instance. Deno Deploy will handle the provisioning process and set up the necessary infrastructure on your behalf. -#### Using the CLI - -You can also provision a managed database from the CLI: - -```bash -# Provision a Deno KV database -deno deploy database provision my-kv-db --kind denokv --org my-org - -# Provision a Prisma Postgres database (region is required) -deno deploy database provision my-pg-db --kind prisma --region us-east-1 --org my-org -``` - -For the full list of options, see the -[`deno deploy database provision` CLI reference](/runtime/reference/cli/deploy/#provision-a-database). - ## Linking databases to your apps After creating or linking a database instance, you can assign it to your apps. @@ -208,17 +161,6 @@ To assign a database to an app you can either: dropdown. - Go to the "Databases" tab in your app settings, click on "Attach Database", then select the database instance from the dropdown. -- Use the CLI: - -```bash -deno deploy database assign my-db --app my-api --org my-org -``` - -To detach a database from an app: - -```bash -deno deploy database detach my-db --app my-api --org my-org -``` Once assigned, Deno Deploy will automatically create the necessary isolated databases for each environment within that app. @@ -456,24 +398,6 @@ instance instead. ## Database management -### Using the CLI - -You can manage databases entirely from the command line: - -```bash -# List all databases in your organization -deno deploy database list --org my-org - -# Query a database -deno deploy database query my-db mydb "SELECT * FROM users LIMIT 10" - -# Delete a database -deno deploy database delete my-old-db --org my-org -``` - -For the full list of database commands, see the -[`deno deploy database` CLI reference](/runtime/reference/cli/deploy/#database-management). - ### Organization level You can view and manage your database instances from the "Databases" page in diff --git a/deploy/reference/env_vars_and_contexts.md b/deploy/reference/env_vars_and_contexts.md index a117d8f09..047b7fba8 100644 --- a/deploy/reference/env_vars_and_contexts.md +++ b/deploy/reference/env_vars_and_contexts.md @@ -81,53 +81,6 @@ To remove a variable, click the "Remove" button next to it. To edit a variable, click the "Edit" button next to it to modify its name, value, secret status, or applicable contexts. -### Using the CLI - -You can also manage environment variables from the command line with -`deno deploy env`: - -```bash -# List all environment variables -deno deploy env list --org my-org --app my-api - -# Add a plain text variable -deno deploy env add SITE_NAME "My App" --org my-org --app my-api - -# Add a secret variable -deno deploy env add API_KEY "sk-secret-value" --secret --org my-org --app my-api - -# Update a variable's value -deno deploy env update-value API_KEY "new-value" --org my-org --app my-api - -# Update which contexts a variable applies to -deno deploy env update-contexts API_KEY Production Build --org my-org --app my-api - -# Delete a variable -deno deploy env delete OLD_API_KEY --org my-org --app my-api - -# Load variables from a .env file -deno deploy env load .env.production --org my-org --app my-api -``` - -:::info - -You can use `deno deploy switch --org my-org --app my-api` to set a default -organization and application, so you don't need to pass `--org` and `--app` on -every command. - -::: - -When loading from a `.env` file, the CLI automatically detects which variables -are likely secrets based on their names (e.g. keys containing `SECRET`, `TOKEN`, -`PASSWORD`). Use `--non-secrets` to override this for specific keys: - -```bash -deno deploy env load .env.production --non-secrets PUBLIC_URL SITE_NAME -``` - -For the full list of options, see the -[`deno deploy env` CLI reference](/runtime/reference/cli/deploy/#environment-variables-management). - ## Using environment variables in your code Access environment variables using the `Deno.env.get` API: diff --git a/deploy/reference/observability.md b/deploy/reference/observability.md index 600a2cfcd..e6ee3955d 100644 --- a/deploy/reference/observability.md +++ b/deploy/reference/observability.md @@ -29,15 +29,6 @@ that specific trace and span. For such logs, a "View trace" button appears in the logs interface, allowing you to open the relevant trace in an overlay drawer for detailed inspection. -You can also stream logs from the command line: - -```bash -deno deploy logs --org my-org --app my-api -``` - -For more options, see the -[`deno deploy logs` CLI reference](/runtime/reference/cli/deploy/#application-logs). - ## Traces Traces in Deno Deploy are captured in three ways: