Skip to content
Merged
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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Change Log

## 22.0.0

* Breaking: Renamed `project update-deny-canonical-email-policy` to `update-deny-aliased-email-policy`
* Breaking: Moved organization API key commands to the new `organization` group (`list-keys`, `create-key`, `get-key`, `update-key`, `delete-key`)
* Breaking: Moved project management to the new `organization` group (`list-projects`, `create-project`, `get-project`, `update-project`, `delete-project`)
* Added: `presences` commands to track presence and usage
* Added: `project get` command

## 21.0.1

* Fixed: Kotlin type generation now emits `Long` for Appwrite integer attributes to match the Android and Kotlin SDK models
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Once the installation is complete, you can verify the install using

```sh
$ appwrite -v
21.0.1
22.0.0
```

### Install using prebuilt binaries
Expand Down Expand Up @@ -83,7 +83,7 @@ $ scoop install https://raw.githubusercontent.com/appwrite/sdk-for-cli/master/sc
Once the installation completes, you can verify your install using
```
$ appwrite -v
21.0.1
22.0.0
```

## Getting Started
Expand Down
329 changes: 83 additions & 246 deletions bun.lock

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions bunfig.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@

[install]
minimumReleaseAge = 604800 # 7d
# Exempt `tmp` from the release-age policy so the security fix for
# GHSA-ph9p-34f9-6g65 (landed in tmp@0.2.6) can be installed before the
# 7d window elapses. Remove this entry once 0.2.6+ ages out.
minimumReleaseAgeExcludes = ["tmp"]
4 changes: 4 additions & 0 deletions cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ import { health } from './lib/commands/services/health.js';
import { locale } from './lib/commands/services/locale.js';
import { messaging } from './lib/commands/services/messaging.js';
import { migrations } from './lib/commands/services/migrations.js';
import { organization } from './lib/commands/services/organization.js';
import { organizations } from './lib/commands/services/organizations.js';
import { presences } from './lib/commands/services/presences.js';
import { project } from './lib/commands/services/project.js';
import { projects } from './lib/commands/services/projects.js';
import { proxy } from './lib/commands/services/proxy.js';
Expand Down Expand Up @@ -214,7 +216,9 @@ if (process.argv.includes('-v') || process.argv.includes('--version')) {
.addCommand(locale)
.addCommand(messaging)
.addCommand(migrations)
.addCommand(organization)
.addCommand(organizations)
.addCommand(presences)
.addCommand(project)
.addCommand(projects)
.addCommand(proxy)
Expand Down
6 changes: 6 additions & 0 deletions docs/examples/organization/create-key.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
```bash
appwrite organization create-key \
--key-id <KEY_ID> \
--name <NAME> \
--scopes one two three
```
5 changes: 5 additions & 0 deletions docs/examples/organization/create-project.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
```bash
appwrite organization create-project \
--project-id '' \
--name <NAME>
```
4 changes: 4 additions & 0 deletions docs/examples/organization/delete-key.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
```bash
appwrite organization delete-key \
--key-id <KEY_ID>
```
4 changes: 4 additions & 0 deletions docs/examples/organization/delete-project.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
```bash
appwrite organization delete-project \
--project-id <PROJECT_ID>
```
4 changes: 4 additions & 0 deletions docs/examples/organization/get-key.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
```bash
appwrite organization get-key \
--key-id <KEY_ID>
```
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```bash
appwrite projects get \
appwrite organization get-project \
--project-id <PROJECT_ID>
```
4 changes: 4 additions & 0 deletions docs/examples/organization/list-keys.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
```bash
appwrite organization list-keys \
--limit 25
```
4 changes: 4 additions & 0 deletions docs/examples/organization/list-projects.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
```bash
appwrite organization list-projects \
--limit 25
```
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
```bash
appwrite organizations update-key \
--organization-id <ORGANIZATION_ID> \
appwrite organization update-key \
--key-id <KEY_ID> \
--name <NAME> \
--scopes one two three
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
```bash
appwrite projects update \
appwrite organization update-project \
--project-id <PROJECT_ID> \
--name <NAME>
```
6 changes: 0 additions & 6 deletions docs/examples/organizations/create-key.md

This file was deleted.

5 changes: 0 additions & 5 deletions docs/examples/organizations/delete-key.md

This file was deleted.

5 changes: 0 additions & 5 deletions docs/examples/organizations/get-key.md

This file was deleted.

4 changes: 0 additions & 4 deletions docs/examples/organizations/list-keys.md

This file was deleted.

4 changes: 4 additions & 0 deletions docs/examples/presences/delete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
```bash
appwrite presences delete \
--presence-id <PRESENCE_ID>
```
3 changes: 3 additions & 0 deletions docs/examples/presences/get-usage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```bash
appwrite presences get-usage
```
4 changes: 4 additions & 0 deletions docs/examples/presences/get.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
```bash
appwrite presences get \
--presence-id <PRESENCE_ID>
```
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```bash
appwrite projects list \
appwrite presences list \
--limit 25
```
4 changes: 4 additions & 0 deletions docs/examples/presences/update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
```bash
appwrite presences update \
--presence-id <PRESENCE_ID>
```
5 changes: 5 additions & 0 deletions docs/examples/presences/upsert.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
```bash
appwrite presences upsert \
--presence-id <PRESENCE_ID> \
--status <STATUS>
```
3 changes: 3 additions & 0 deletions docs/examples/project/get.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```bash
appwrite project get
```
4 changes: 4 additions & 0 deletions docs/examples/project/update-deny-aliased-email-policy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
```bash
appwrite project update-deny-aliased-email-policy \
--enabled false
```
4 changes: 0 additions & 4 deletions docs/examples/project/update-deny-canonical-email-policy.md

This file was deleted.

6 changes: 0 additions & 6 deletions docs/examples/projects/create.md

This file was deleted.

4 changes: 2 additions & 2 deletions install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
# You can use "View source" of this page to see the full script.

# REPO
$GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/21.0.0/appwrite-cli-win-x64.exe"
$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/21.0.0/appwrite-cli-win-arm64.exe"
$GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/22.0.0/appwrite-cli-win-x64.exe"
$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/22.0.0/appwrite-cli-win-arm64.exe"

$APPWRITE_BINARY_NAME = "appwrite.exe"

Expand Down
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ verifyMacOSCodeSignature() {
downloadBinary() {
echo "[2/5] Downloading executable for $OS ($ARCH) ..."

GITHUB_LATEST_VERSION="21.0.0"
GITHUB_LATEST_VERSION="22.0.0"
GITHUB_FILE="appwrite-cli-${OS}-${ARCH}"
GITHUB_URL="https://github.com/$GITHUB_REPOSITORY_NAME/releases/download/$GITHUB_LATEST_VERSION/$GITHUB_FILE"

Expand Down
1 change: 1 addition & 0 deletions lib/commands/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,7 @@ const ConfigIncludesSchema = z

const ConfigSchema = z
.object({
organizationId: z.string().optional(),
projectId: z.string(),
projectName: z.string().optional(),
endpoint: z.string().optional(),
Expand Down
1 change: 1 addition & 0 deletions lib/commands/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ const generateAction = async (
}

const config: ConfigType = {
organizationId: project.organizationId,
projectId: project.projectId,
projectName: project.projectName,
endpoint:
Expand Down
6 changes: 3 additions & 3 deletions lib/commands/generic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const getCurrentAccount = async (): Promise<Models.User | null> => {
globalConfig.setEndpoint(endpoint);
}

const client = await sdkForConsole(false);
const client = await sdkForConsole({ requiresAuth: false });
const accountClient = new Account(client);

try {
Expand Down Expand Up @@ -308,7 +308,7 @@ export const loginCommand = async ({
normalizeCloudConsoleEndpoint(globalConfig.getEndpoint()),
);

const client = await sdkForConsole(false);
const client = await sdkForConsole({ requiresAuth: false });
const accountClient = new Account(client);
const legacyClient = createLegacyConsoleClient(
globalConfig.getEndpoint() || DEFAULT_ENDPOINT,
Expand Down Expand Up @@ -348,7 +348,7 @@ export const loginCommand = async ({
// Use legacy client for login to extract cookies from response
const legacyClient = createLegacyConsoleClient(configEndpoint);

const client = await sdkForConsole(false);
const client = await sdkForConsole({ requiresAuth: false });
let accountClient = new Account(client);

let account;
Expand Down
Loading