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
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Change Log

## 25.0.0

* Breaking: Removed the `organizations` command group covering billing, plans, invoices, and add-ons
* Added: `organization` commands accept `--organization-id` to target another organization
* Added: `project` commands accept `--project-id` to target another project
* Added: Grouped `--help` screen with follow-up command hints after each action
* Added: `push` and `pull` document `--all` and `--id` in their own help
* Added: `client` reports the configured `organizationId`
* Fixed: `login` warns and signs in to the base Cloud endpoint instead of failing on a regional one
* Fixed: `init` no longer stacks a region prefix onto an already regional endpoint
* Fixed: `notifications` and `oauth2 list-organizations`, `list-projects` call the console, not the linked project
* Fixed: Passwords are masked in full instead of revealing a tail
* Updated: Timestamps, durations, sizes, and large counts render in human-readable form
* Updated: Enabled and disabled lists collapse into wrapped groups instead of wide tables
* Updated: Condensed output notes how many fields `--raw` would add
* Updated: Prompts and errors listing several accounts print one account per line
* Updated: `teams` hints and `register` visibility point at `organization` and `login`
* Updated: Dropped the `deploy` placeholder command, which only printed a "use `push`" warning

## 24.1.0

* Added: `previousKey` on an attribute or column renames it in place on `push`
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
24.1.0
25.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
24.1.0
25.0.0
```

## Getting Started
Expand Down
2 changes: 1 addition & 1 deletion bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 23 additions & 16 deletions cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ const oldWidth = process.stdout.columns;
process.stdout.columns = 100;
/** ---------------------------------------------- */

import { program } from 'commander';
import { program, Option } from 'commander';
import chalk from 'chalk';
import inquirer from 'inquirer';

import packageJson from './package.json' with { type: 'json' };
import { commandDescriptions, cliConfig } from './lib/parser.js';
import { followUpHintFor } from './lib/hints.js';
import { formatMainHelp } from './lib/help.js';
import {
getLatestVersionForCurrentInstallation,
compareVersions,
Expand All @@ -30,7 +32,7 @@ import { init } from './lib/commands/init.js';
import { types } from './lib/commands/types.js';
import { pull } from './lib/commands/pull.js';
import { run } from './lib/commands/run.js';
import { push, deploy } from './lib/commands/push.js';
import { push } from './lib/commands/push.js';
import { update } from './lib/commands/update.js';
import { generate } from './lib/commands/generate.js';

Expand All @@ -47,7 +49,6 @@ import { migrations } from './lib/commands/services/migrations.js';
import { notifications } from './lib/commands/services/notifications.js';
import { oauth2 } from './lib/commands/services/oauth2.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 { proxy } from './lib/commands/services/proxy.js';
Expand Down Expand Up @@ -142,32 +143,39 @@ if (process.argv.includes('-v') || process.argv.includes('--version')) {
.description(commandDescriptions['main'])
.configureHelp({
helpWidth: process.stdout.columns || 80,
// The grouped screen sets its own order, but `sortSubcommands`
// also drives Help.visibleCommands, which the completion
// scripts enumerate — keep it so their output stays stable.
sortSubcommands: true,
formatHelp: formatMainHelp,
})
.helpOption('-h, --help', 'Display help for command')
.version(version, '-v, --version', 'Output the version number')
.option('-V, --verbose', 'Show complete error log')
.option('-j, --json', 'Output filtered JSON without empty values')
.option('-R, --raw', 'Output full JSON response (secrets still redacted unless --show-secrets is set)')
.option('--show-secrets', 'Display sensitive values like secrets and tokens in output')
.helpOption('-h, --help', 'Display help for a command')
.version(version, '-v, --version', 'Output the CLI version')
.option('-V, --verbose', 'Show full error stack traces')
.option('-j, --json', 'Output filtered JSON (empty values omitted)')
.option('-R, --raw', 'Output the full raw JSON response')
.option('--show-secrets', 'Reveal secrets and tokens in output (redacted by default)')
.hook('preAction', async (_thisCommand, actionCommand) => {
if (isCompletionCommand(actionCommand)) {
return;
}

await migrate();
})
.option('-f,--force', 'Flag to confirm all warnings')
.option('-a,--all', 'Flag to push all resources')
.option('--id [id...]', 'Flag to pass a list of ids for a given action')
.option('--report', 'Enable reporting in case of CLI errors')
.option('-f, --force', 'Skip confirmation prompts')
// Parsed at the root so `appwrite --all push` keeps working, but
// documented on `push` and `pull`, which are what they act on.
.addOption(new Option('-a, --all', 'Push or pull every resource').hideHelp())
.addOption(new Option('--id [id...]', 'Limit the action to these resource ids').hideHelp())
.option('--report', 'Print a prefilled bug report link on error')
.hook('preAction', (_thisCommand, actionCommand) => {
const commandConfig = actionCommand as typeof actionCommand & {
outputFields?: string[];
};
cliConfig.displayFields = Array.isArray(commandConfig.outputFields)
? commandConfig.outputFields
: [];
cliConfig.followUpHint = followUpHintFor(actionCommand);
})
.on('option:json', () => {
cliConfig.json = true;
Expand Down Expand Up @@ -196,13 +204,13 @@ if (process.argv.includes('-v') || process.argv.includes('--version')) {
})
.showSuggestionAfterError()
.addCommand(whoami)
.addCommand(register)
// `login` is the entry point; `register` only prints a signup link.
.addCommand(register, { hidden: true })
.addCommand(login)
.addCommand(init)
.addCommand(pull)
.addCommand(push)
.addCommand(types)
.addCommand(deploy)
.addCommand(run)
.addCommand(update)
.addCommand(generate)
Expand All @@ -220,7 +228,6 @@ if (process.argv.includes('-v') || process.argv.includes('--version')) {
.addCommand(notifications)
.addCommand(oauth2)
.addCommand(organization)
.addCommand(organizations)
.addCommand(presences)
.addCommand(project)
.addCommand(proxy)
Expand Down
5 changes: 0 additions & 5 deletions docs/examples/organizations/add-credit.md

This file was deleted.

4 changes: 0 additions & 4 deletions docs/examples/organizations/cancel-downgrade.md

This file was deleted.

5 changes: 0 additions & 5 deletions docs/examples/organizations/confirm-addon-payment.md

This file was deleted.

4 changes: 0 additions & 4 deletions docs/examples/organizations/create-baa-addon.md

This file was deleted.

8 changes: 0 additions & 8 deletions docs/examples/organizations/create-downgrade-feedback.md

This file was deleted.

6 changes: 0 additions & 6 deletions docs/examples/organizations/create-invoice-payment.md

This file was deleted.

4 changes: 0 additions & 4 deletions docs/examples/organizations/create-premium-geo-db-addon.md

This file was deleted.

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

This file was deleted.

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

This file was deleted.

4 changes: 0 additions & 4 deletions docs/examples/organizations/delete-backup-payment-method.md

This file was deleted.

4 changes: 0 additions & 4 deletions docs/examples/organizations/delete-default-payment-method.md

This file was deleted.

4 changes: 0 additions & 4 deletions docs/examples/organizations/delete.md

This file was deleted.

4 changes: 0 additions & 4 deletions docs/examples/organizations/estimation-create-organization.md

This file was deleted.

4 changes: 0 additions & 4 deletions docs/examples/organizations/estimation-delete-organization.md

This file was deleted.

5 changes: 0 additions & 5 deletions docs/examples/organizations/estimation-update-plan.md

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

4 changes: 0 additions & 4 deletions docs/examples/organizations/get-available-credits.md

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

4 changes: 0 additions & 4 deletions docs/examples/organizations/get-plan.md

This file was deleted.

4 changes: 0 additions & 4 deletions docs/examples/organizations/get-scopes.md

This file was deleted.

4 changes: 0 additions & 4 deletions docs/examples/organizations/get-usage.md

This file was deleted.

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

This file was deleted.

5 changes: 0 additions & 5 deletions docs/examples/organizations/list-aggregations.md

This file was deleted.

5 changes: 0 additions & 5 deletions docs/examples/organizations/list-credits.md

This file was deleted.

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

This file was deleted.

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

This file was deleted.

5 changes: 0 additions & 5 deletions docs/examples/organizations/set-backup-payment-method.md

This file was deleted.

5 changes: 0 additions & 5 deletions docs/examples/organizations/set-billing-address.md

This file was deleted.

5 changes: 0 additions & 5 deletions docs/examples/organizations/set-billing-email.md

This file was deleted.

5 changes: 0 additions & 5 deletions docs/examples/organizations/set-billing-tax-id.md

This file was deleted.

5 changes: 0 additions & 5 deletions docs/examples/organizations/set-default-payment-method.md

This file was deleted.

5 changes: 0 additions & 5 deletions docs/examples/organizations/update-budget.md

This file was deleted.

5 changes: 0 additions & 5 deletions docs/examples/organizations/update-plan.md

This file was deleted.

5 changes: 0 additions & 5 deletions docs/examples/organizations/validate-invoice.md

This file was deleted.

4 changes: 0 additions & 4 deletions docs/examples/organizations/validate-payment.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/24.1.0/appwrite-cli-win-x64.exe"
$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/24.1.0/appwrite-cli-win-arm64.exe"
$GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/25.0.0/appwrite-cli-win-x64.exe"
$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/25.0.0/appwrite-cli-win-arm64.exe"

$APPWRITE_BINARY_NAME = "appwrite.exe"

Expand Down
Loading