Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .optimize-cache.json
Original file line number Diff line number Diff line change
Expand Up @@ -1470,6 +1470,13 @@
"static/images/docs/auth/ssr/ssr.png": "a9a58a3a053dbfec7eef50894d973049254ac9af4ed7159f93a5dd95dc0faf94",
"static/images/docs/command-center/command-center.png": "4e32c190ab1fbc74040c43b2d85a8404af9b553bb9672c1a842fee92ecd48b31",
"static/images/docs/command-center/dark/command-center.png": "d3c26f78c419d22fa9779baf884561ac117a0597347310e54e6ee14c972c8a11",
"static/images/docs/command-line/cli-login-authorize.png": "2aa6671d82af9c66fee500f6f8e1b1ba1c59a8e29ecc4fb36c8600d1eb52f1dd",
"static/images/docs/command-line/cli-login-confirm-code.png": "0a3e03c35fb8be0cbbce52820a96df10897739ff628e1514ade2118e68b0a1af",
"static/images/docs/command-line/cli-login-device-connected.png": "74e5537076aca6e1fd5ed2b228a45baa06562df2fef11a80087a85446d70620d",
"static/images/docs/command-line/cli-login-terminal.png": "e0e7937e0eb5f92806caf6be0e0389ed01f80d44cc62e075d9943e355feaa2f3",
"static/images/docs/command-line/dark/cli-login-authorize.png": "5792cbbf2886618b8db4e90f4b0f7a411a3bd48390ac3871d16c1fa199ffc7d8",
"static/images/docs/command-line/dark/cli-login-confirm-code.png": "b7acfc07697c241e056765603e421d7b3c31caf3c08e8efd32e2da5b60580d05",
"static/images/docs/command-line/dark/cli-login-device-connected.png": "f990ce61579a61ab20f636d4f10870e15bfd89c173f64e468462e1363cc30d90",
"static/images/docs/databases/ai-suggestions-enable.png": "d331d502fb141cf28478cad2b2e96f0e622eae9c97625976c756ff52343dad77",
"static/images/docs/databases/ai-suggestions-review.png": "9796a6afa6164126acdfea67561c560fade3d39e51d2fec6bd9d6cf034ef0aa1",
"static/images/docs/databases/csv-export.png": "978aeeb301b9d7571793a5184fe955dae7a8a3ab7fbd0c613b12ccac73d51980",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
layout: post
title: "Announcing Device Authorization for the Appwrite CLI: Log in from your browser"
description: The Appwrite CLI now signs you in through your browser. Confirm a device code, review permissions, and authorize, without typing credentials into your terminal.
date: 2026-07-29
cover: /images/blog/announcing-cli-device-authorization/cover.avif

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need a cover sorted out

timeToRead: 4
author: chirag-aggarwal
category: announcement
featured: false
callToAction: true
faqs:
- question: "What is Device Authorization in the Appwrite CLI?"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should include OAuth

answer: "Device Authorization is the new login flow for the Appwrite CLI. Instead of prompting for your credentials in the terminal, the CLI shows a code and a URL. You confirm the code in your browser, review the requested permissions, and authorize the CLI with your Appwrite account."
- question: "Which command starts the new login flow?"
answer: "The same command as before: `appwrite login`. If you use a self-hosted instance, add the `--endpoint` flag with your instance URL. The only thing that changes is what happens after you run it."
- question: "What permissions does the Appwrite CLI request?"
answer: "The authorization screen lists the exact access you grant: viewing your identity and fully managing your Appwrite account on your behalf. You review and approve these permissions in the browser before the CLI can act."
- question: "How do I revoke the CLI's access to my account?"
answer: "You can revoke access anytime from your Appwrite account settings. Once revoked, the CLI can no longer act on your behalf until you authorize it again."
- question: "Does the new login flow affect CI pipelines?"
answer: "No. Non-interactive mode, which authenticates with an API key through `appwrite client`, is unchanged and remains the recommended approach for CI and scripting."
---

Signing in to a CLI should not mean typing your account password into a terminal prompt. Your identity already lives in your browser, and that is where authentication should happen.

Today, we are announcing **Device Authorization** for the Appwrite CLI. Running `appwrite login` now hands the sign-in process to your browser, so you can authenticate the CLI with the account session you already trust.

# How it works

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably add an info note at the end or a subsection that clarifies that existing API key based auth and flows won't break and that they are still recommended for CI workflows, etc.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should also be more explicitly covered in the docs


The new flow follows the OAuth 2.0 device authorization pattern. Run `appwrite login`, and the CLI displays a device code and a URL, then waits for approval.

![The Appwrite CLI displaying a device code and URL](/images/docs/command-line/cli-login-terminal.avif)

Press Enter to open the URL, or copy it into any browser. Confirm the code on the page matches the one in your terminal and click **Continue**.

![Confirming the device code in the browser](/images/docs/command-line/dark/cli-login-confirm-code.avif)

Review the permissions the CLI requests and click **Authorize**. Once approved, the CLI detects the authorization and finishes signing you in.

![Authorizing the Appwrite CLI in the Console](/images/docs/command-line/dark/cli-login-authorize.avif)

# Consent you can see

Before the CLI can act on your behalf, the browser shows you exactly what access you are granting: viewing your identity and fully managing your Appwrite account.

Authorization is also reversible. You can revoke the CLI's access anytime from your Appwrite account settings.

# Get started

Update the Appwrite CLI to the latest version and run:

```sh
appwrite login
```

The [CLI installation guide](/docs/tooling/command-line/installation#login) walks through every step with screenshots.

# More resources

- [Introducing generate command in the Appwrite CLI: Create a type-safe SDK from your schema](/blog/post/appwrite-generate)
- [Announcing the Projects API: Configure your project with Server SDKs](/blog/post/announcing-projects-api)
- [Announcing the Keys API: Create and manage API keys with Server SDKs](/blog/post/announcing-api-keys-api)
- [Join the Appwrite Community on Discord](https://appwrite.io/discord)
14 changes: 14 additions & 0 deletions src/routes/changelog/(entries)/2026-07-29.markdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
layout: changelog
title: Browser-based login for the Appwrite CLI
date: 2026-07-29
cover: /images/blog/announcing-cli-device-authorization/cover.avif
---

`appwrite login` now signs you in through your browser using device authorization. The CLI displays a code and a URL, you confirm the code and approve the requested permissions in the browser, and the terminal completes the login automatically.

Authorization uses your Console session, and you can revoke the CLI's access anytime from your account settings. Update to the latest version of the CLI to get the new flow. Non-interactive mode with API keys for CI is unchanged.

{% arrow_link href="/blog/post/announcing-cli-device-authorization" %}
Read the announcement
{% /arrow_link %}
34 changes: 33 additions & 1 deletion src/routes/docs/tooling/command-line/installation/+page.markdoc
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,39 @@ Add the `--endpoint` flag if you're using a self-hosted instance of Appwrite. Th
```sh
appwrite login --endpoint "<URL_HERE>"
```
You can log in to multiple accounts or change the **current** account by re-running the command.

The CLI signs you in through your browser using device authorization. It displays a code and a URL, then waits for approval.

![Appwrite CLI login in the terminal](/images/docs/command-line/cli-login-terminal.avif)

Press `Enter` to open the URL in your default browser, or copy the URL and open it manually. In the browser, confirm that the device code matches the code shown in your terminal, then click **Continue**.

{% only_dark %}
![Confirm your device code](/images/docs/command-line/dark/cli-login-confirm-code.avif)
{% /only_dark %}
{% only_light %}
![Confirm your device code](/images/docs/command-line/cli-login-confirm-code.avif)
{% /only_light %}

Review the permissions requested by the CLI, then click **Authorize**.

{% only_dark %}
![Authorize Appwrite CLI](/images/docs/command-line/dark/cli-login-authorize.avif)
{% /only_dark %}
{% only_light %}
![Authorize Appwrite CLI](/images/docs/command-line/cli-login-authorize.avif)
{% /only_light %}

Once authorized, the browser confirms that your device is connected. Return to your terminal, where the CLI continues automatically and completes the login.

{% only_dark %}
![Device connected](/images/docs/command-line/dark/cli-login-device-connected.avif)
{% /only_dark %}
{% only_light %}
![Device connected](/images/docs/command-line/cli-login-device-connected.avif)
{% /only_light %}

You can log in to multiple accounts or change the **current** account by re-running the command. You can revoke the CLI's access anytime in your account settings.

# Initialization {% #initialization %}

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading