-
Notifications
You must be signed in to change notification settings - Fork 318
docs: CLI workflow updates for webhooks, deployment logs, and run command #2892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| --- | ||
| layout: changelog | ||
| title: "CLI workflow updates: webhook management, deployment logs, and run improvements" | ||
| date: 2026-04-16 | ||
| --- | ||
|
|
||
| The Appwrite CLI has received several workflow improvements for push, pull, run, and deployment commands. | ||
|
|
||
| **Webhook management** is now available through the CLI. Use `appwrite pull webhooks` and `appwrite push webhooks` to sync webhook configurations between your local project and the Appwrite Console. Webhooks are also included in `push all` and `pull all` flows, so your entire project configuration stays in sync. | ||
|
|
||
| **Realtime deployment log streaming** now displays build logs directly in your terminal when pushing functions or sites. The CLI connects via WebSocket for live output and automatically falls back to polling if the connection drops. Use `--no-logs` to disable streaming for async deployments. | ||
|
|
||
| **Local function emulation** with `appwrite run functions` now validates source code before starting and uses improved startup detection to ensure the runtime is ready before reporting success. | ||
|
|
||
| {% arrow_link href="/docs/tooling/command-line/webhooks" %} | ||
| Learn about CLI webhook management | ||
| {% /arrow_link %} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,131 @@ | ||
| --- | ||
| layout: article | ||
| title: Webhooks | ||
| description: Manage your Appwrite webhooks using the Command-Line Tool (CLI) with push and pull commands. | ||
| --- | ||
|
|
||
| {% partial file="cli-disclaimer.md" /%} | ||
|
|
||
| The Appwrite CLI can manage webhooks for your project. Webhooks allow you to receive HTTP callbacks when events occur in your Appwrite project, such as when a user is created or a document is updated. | ||
|
|
||
| # Pull webhooks {% #pull-webhooks %} | ||
|
|
||
| Pull your existing Appwrite webhooks from the Appwrite Console using the `pull` command in the folder containing your `appwrite.config.json` file. | ||
|
|
||
| ```sh | ||
| appwrite pull webhooks | ||
| ``` | ||
|
|
||
| When pulling, if a webhook exists locally but has been deleted remotely, the CLI will warn you and ask for confirmation before removing it from your local configuration. | ||
|
|
||
| # appwrite.config.json {% #appwritejson %} | ||
|
|
||
| After [initializing](/docs/tooling/command-line/installation#initialization) your Appwrite project and pulling your existing webhooks, your `appwrite.config.json` file should look similar to the following: | ||
|
|
||
| ```json | ||
| { | ||
| "projectId": "<PROJECT_ID>", | ||
| "endpoint": "https://<REGION>.cloud.appwrite.io/v1", | ||
| "webhooks": [ | ||
| { | ||
| "$id": "abc123", | ||
| "name": "Order notifications", | ||
| "url": "https://example.com/webhooks/orders", | ||
| "events": [ | ||
| "databases.*.collections.*.documents.*.create", | ||
| "databases.*.collections.*.documents.*.update" | ||
| ], | ||
| "enabled": true, | ||
| "tls": true | ||
| }, | ||
| { | ||
| "$id": "def456", | ||
| "name": "User signup alerts", | ||
| "url": "https://example.com/webhooks/users", | ||
| "events": [ | ||
| "users.*.create" | ||
| ], | ||
| "enabled": true, | ||
| "tls": true | ||
| } | ||
| ] | ||
| } | ||
| ``` | ||
|
|
||
| Each webhook supports the following fields: | ||
|
|
||
| {% table %} | ||
| * Field | ||
| * Description | ||
| --- | ||
| * `$id` | ||
| * Unique identifier for the webhook. | ||
| --- | ||
| * `name` | ||
| * Human-readable name for the webhook. | ||
| --- | ||
| * `url` | ||
| * The URL endpoint that receives the webhook HTTP callbacks. | ||
| --- | ||
| * `events` | ||
| * Array of [Appwrite events](/docs/advanced/platform/events) that trigger the webhook. | ||
| --- | ||
| * `enabled` | ||
| * Whether the webhook is active. Set to `false` to temporarily disable it. | ||
| --- | ||
| * `tls` | ||
| * Whether TLS certificate verification is enabled for the webhook endpoint. | ||
| --- | ||
| {% /table %} | ||
|
|
||
| # Push webhooks {% #push-webhooks %} | ||
|
|
||
| {% partial file="cli-push-command.md" /%} | ||
|
|
||
| ```sh | ||
| appwrite push webhooks | ||
| ``` | ||
|
|
||
| When pushing, the CLI will create new webhooks or update existing ones based on the `$id` field. You will be prompted to select which webhooks to push unless you use the `--all` flag. | ||
|
|
||
| ```sh | ||
| appwrite push webhooks --all | ||
| ``` | ||
|
|
||
| # Push and pull all {% #push-pull-all %} | ||
|
|
||
| Webhooks are included in the `push all` and `pull all` flows alongside functions, tables, teams, buckets, and topics. | ||
|
|
||
| ```sh | ||
| appwrite push all | ||
| appwrite pull all | ||
| ``` | ||
|
|
||
| # Commands {% #commands %} | ||
|
|
||
| The webhooks commands allow you to manage your project webhooks. Appwrite webhook CLI commands generally follow the following syntax: | ||
|
|
||
| ```sh | ||
| appwrite projects [COMMAND] [OPTIONS] | ||
|
Comment on lines
+107
to
+109
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Every other CLI resource page uses its own top-level namespace (e.g., Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time! |
||
| ``` | ||
|
|
||
| {% table %} | ||
| * Command | ||
| * Description | ||
| --- | ||
| * `list-webhooks [options]` | ||
| * Get a list of all the webhooks for your project. Use query parameters to filter results. | ||
| --- | ||
| * `create-webhook [options]` | ||
| * Create a new webhook for your project. Provide a name, URL, and list of events. | ||
| --- | ||
| * `get-webhook [options]` | ||
| * Get a webhook by its unique ID. | ||
| --- | ||
| * `update-webhook [options]` | ||
| * Update a webhook by its unique ID. You can modify the name, URL, events, enabled status, and TLS settings. | ||
| --- | ||
| * `delete-webhook [options]` | ||
| * Delete a webhook by its unique ID. | ||
| --- | ||
| {% /table %} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
pushdescription uses "topics" while thepulldescription on line 77 and theinitdescription on line 74 both use "messaging-topics". This creates a subtle inconsistency for users scanning the table.