From f54d16ae15dffb1386b6e7d79a7e963d4a8a66a7 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 21 Aug 2026 06:46:27 +0530 Subject: [PATCH] docs: add guided CLI function setup docs --- src/partials/cli-function.md | 6 +++--- src/routes/changelog/(entries)/2026-08-19.markdoc | 15 +++++++++++++++ .../tooling/command-line/commands/+page.markdoc | 2 +- .../tooling/command-line/functions/+page.markdoc | 13 ++++++++++++- 4 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 src/routes/changelog/(entries)/2026-08-19.markdoc diff --git a/src/partials/cli-function.md b/src/partials/cli-function.md index da294cebae1..e07d8c08132 100644 --- a/src/partials/cli-function.md +++ b/src/partials/cli-function.md @@ -2,13 +2,13 @@ You can create functions using the CLI without needing to access the Console. {% partial file="cli-disclaimer.md" /%} -To deploy your function with the Appwrite CLI, use the `appwrite init functions` command to create a starter function and paste your code into the generated file and folder. +To create a function with the Appwrite CLI, start the guided `appwrite init function` workflow. It walks you through runtime selection, local or GitHub-backed source, execution access, generated domains, and environment variables before it writes files or creates resources. ```sh -appwrite init functions +appwrite init function ``` -To deploy the generated code, add any dependencies and push the function using the following command: +After the review step, the CLI can save the function locally or create and deploy it immediately. To deploy the generated code later, add any dependencies and push the function using the following command: ```sh appwrite push functions diff --git a/src/routes/changelog/(entries)/2026-08-19.markdoc b/src/routes/changelog/(entries)/2026-08-19.markdoc new file mode 100644 index 00000000000..aa59a713307 --- /dev/null +++ b/src/routes/changelog/(entries)/2026-08-19.markdoc @@ -0,0 +1,15 @@ +--- +layout: changelog +title: Guided function setup in the Appwrite CLI +date: 2026-08-19 +--- + +The Appwrite CLI now walks you through function setup with a guided `appwrite init function` flow instead of dropping you straight into a starter folder. + +During setup, the CLI can collect the runtime, build and runtime compute, execution access, regional or edge networking, generated domains, local or GitHub source, and environment variables. Before anything is written or created, it shows a final review so you can save, deploy, start over, or exit without changing anything. + +This makes it easier to scaffold Functions from the terminal without switching back to the Console for the first round of configuration. + +{% arrow_link href="/docs/tooling/command-line/functions#initialize-function" %} +Learn about CLI function setup +{% /arrow_link %} diff --git a/src/routes/docs/tooling/command-line/commands/+page.markdoc b/src/routes/docs/tooling/command-line/commands/+page.markdoc index 0c52d28e15d..45e6a53f38d 100644 --- a/src/routes/docs/tooling/command-line/commands/+page.markdoc +++ b/src/routes/docs/tooling/command-line/commands/+page.markdoc @@ -79,7 +79,7 @@ Run `appwrite --help` to browse commands grouped by what you want to do, includi * Description --- * `init [options]` -* The init command provides a convenient wrapper for creating and initializing projects, functions, tables, buckets, teams, and messaging-topics in Appwrite. +* The init command provides a convenient wrapper for creating and initializing projects, functions, tables, buckets, teams, and messaging-topics in Appwrite. For functions, it opens a guided setup flow with a final review before files or resources are created. --- * `pull` * The pull command helps you pull your Appwrite project, functions, tables, buckets, teams, and messaging-topics. diff --git a/src/routes/docs/tooling/command-line/functions/+page.markdoc b/src/routes/docs/tooling/command-line/functions/+page.markdoc index c66003000ac..29343da9c22 100644 --- a/src/routes/docs/tooling/command-line/functions/+page.markdoc +++ b/src/routes/docs/tooling/command-line/functions/+page.markdoc @@ -13,9 +13,20 @@ The CLI handles the creation, deployment, and execution of Appwrite Functions, a Create a new function using the following command: ```sh -appwrite init functions +appwrite init function ``` +The function setup flow is guided. The CLI can prompt you for: + +- the runtime to scaffold +- build and runtime compute settings +- execution access +- regional or edge networking with generated domains +- local source or a GitHub-backed setup +- environment variables to import before the first deployment + +Before it creates files or Appwrite resources, the CLI shows a final review so you can save the configuration, create and deploy immediately, start over, or exit without writing anything. + # Pull function {% #pull-function %} You can also pull your existing Appwrite Functions from the Appwrite Console using the `pull` command in the folder containing your `appwrite.config.json` file.