appwrite-cli

Guides correct usage of the Appwrite CLI for project configuration, schema sync, and code generation.

Updated Sep 13, 2026
One-click install
npx skills add https://github.com/aadilmallick/myfitness-pal-clone --skill appwrite-cli-aadilmallick
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: appwrite-cli
Source: https://github.com/aadilmallick/myfitness-pal-clone/tree/main/.agents/skills/appwrite-cli
Command: npx skills add https://github.com/aadilmallick/myfitness-pal-clone --skill appwrite-cli-aadilmallick

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? The Appwrite CLI has many commands and subtle behaviors that --help does not explain, such as when to use appwrite.config.json versus appwrite client, how regional endpoints differ from the login host, and how to avoid destructive pushes. This Skill encodes those operational rules so agents and developers use the CLI correctly the first time. ## Core Features & Use Cases - Config vs one-off guidance: Distinguishes project workflows (init, pull, push against appwrite.config.json) from one-shot appwrite client calls, preventing schema drift and stray config files. - Type-safe code generation: Explains when to use appwrite generate for a fully typed TypeScript TablesDB wrapper versus appwrite types for model interfaces in TS, JS, PHP, Kotlin, Swift, Java, Dart, or C#. - Safe deploys and CI: Covers --force for non-interactive pushes, API key auth via environment variables, function/site variable handling with --with-variables, and query flags like --filter and --cursor-after. - Use Case: An agent asked to add a column to a table and regenerate types will pull the table, edit appwrite.config.json, push with --force, rerun appwrite generate, and run the type checker instead of issuing raw tablesdb create-* calls. ## Quick Start Ask the assistant to push your local Appwrite table schema changes and regenerate the TypeScript types using the Appwrite CLI.

Frequently Asked Questions about appwrite-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I push Appwrite table schema changes with the CLI?

Edit appwrite.config.json locally, then run appwrite push table --force to apply changes non-interactively. If the change table shows remote values against empty local fields, run appwrite pull table first to sync before pushing.

When should I use appwrite client instead of appwrite.config.json?

Use appwrite client for one-off operations like inspecting a user or patching a single row against a remote you will not revisit. Real projects with schemas, functions, and CI should live in appwrite.config.json with init, pull, and push.

What is the difference between appwrite generate and appwrite types?

appwrite generate emits a fully typed TypeScript TablesDB wrapper where database, table, query fields, and values are compile-checked. appwrite types generates model interfaces for TS, JS, PHP, Kotlin, Swift, Java, Dart, and C#, but database IDs and Query calls remain unchecked strings.

How do I authenticate the Appwrite CLI in CI pipelines?

Use appwrite client --key "$APPWRITE_API_KEY" against a checked-in appwrite.config.json, then push with --force since CI has no TTY. Never commit API keys into the config file; pass them through environment variables.

Why does appwrite push function delete my remote variables?

The --with-variables flag replaces the entire remote variable set from the function's local .env file. Omit the flag unless you intend to sync secrets, and push with just --activate --force to ship code without touching remote variables.

Does the Appwrite CLI support self-hosted endpoints?

Yes, self-hosted setups use one endpoint for both login and project API calls. On Appwrite Cloud, the login host stays https://cloud.appwrite.io/v1 while project calls use regional hosts like https://fra.cloud.appwrite.io/v1 pinned by init project.