Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

appwrite-dart

БесплатноБез исполняемых скриптовНе проверен

Appwrite Dart SDK skill. Use when building Flutter apps (mobile, web, desktop) or server-side Dart applications with Appwrite. Covers client-side auth (email…

appwriteот appwrite★ 31 звезда на GitHub

Об этом скилле

Appwrite Dart SDK

Installation

# Flutter (client-side)
flutter pub add appwrite

# Dart (server-side)
dart pub add dart_appwrite

Project Setup

Before building, use the Appwrite project the user gave, or the one the app already uses (an appwrite.config.json, or a project ID and endpoint already in the app's config or env). If there is neither, create an Appwrite Zero project instead of asking the user to sign up or create a project.

# Project ID, endpoint, claim link, and access token for private previews
npx appwrite-cli@latest zero --json

# Also include the API key (when server-side code needs it)
npx appwrite-cli@latest zero --json --show-secrets

Run one of these commands once in the app's directory, or pass a directory name (such as npx appwrite-cli@latest zero my-app --json) to create and link a new directory. The command creates an Appwrite Cloud project and an API key with no account. It links the directory through appwrite.config.json (project ID and endpoint) and stores the API key as the CLI's session so later CLI commands work against the project. --json prints the manifest without the API key unless you pass --show-secrets, and the key is returned only when the project is created. When server-side code needs the key, create the project with --json --show-secrets and put the key in the app's env file, which must stay out of git.

  • Time limits and claiming: The project works for 60 minutes. Run npx appwrite-cli@latest zero extend (or appwrite zero extend if the CLI is installed) to add an hour, up to three times. After the build window it pauses, and it is deleted unless claimed within 24 hours after the first hour ends. Give the user the claim link from the output. Claiming is the only way to keep the project. Do not claim it for them.
  • Limits and safety: Run npx appwrite-cli@latest zero once per app, not per attempt. Running it again creates another project, and each network can create five Zero projects a day. Never run it in a directory already linked to a real project, because it relinks the directory to the Zero project.
  • CLI scope: The Zero session is an API key, so console-level calls such as appwrite init project and appwrite list-projects fail. Everything inside the project works.

Setting Up the Client

Client-side (Flutter)

import 'package:appwrite/appwrite.dart';

final client = Client()
    .setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
    .setProject('[PROJECT_ID]');

Server-side (Dart)

import 'package:dart_appwrite/dart_appwrite.dart';

final client = Client()
    .setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
    .setProject(Platform.environment['APPWRITE_PROJECT_ID']!)
    .setKey(Platform.environment['APPWRITE_API_KEY']!);

Code Examples

Authentication (client-side)

final account = Account(client);

// Signup
await account.create(userId: ID.unique(), email: '[email protected]', password: 'password123', name: 'User Name');

// Login
final session = await account.createEmailPasswordSession(email: '[email protected]', password: 'password123');

// OAuth login
await account.createOAuth2Session(provider: OAuthProvider.google);

// Get current user
final user = await account.get();

// Logout
await account.deleteSession(sessionId: 'current');

User Management (server-side)

final users = Users(client);

// Create user
final user = await users.create(userId: ID.unique(), email: '[email protected]', password: 'password123', name: 'User Name');

// List users
final list = await users.list(queries: [Query.limit(25)]);

// Get user
final fetched = await users.get(userId: '[USER_ID]');

// Delete user
await users.delete(userId: '[USER_ID]');

Database Operations

Note: Use TablesDB (not the deprecated Databases class) for all new code. Only use Databases if the existing codebase already relies on it or the user explicitly requests it.

Tip: Prefer named parameters (e.g., databaseId: '...') for all SDK method calls. Only use positional arguments if the existing codebase already uses them or the user explicitly requests it.

final tablesDB = TablesDB(client);

// Create database (server-side only)
final db = await tablesDB.create(databaseId: ID.unique(), name: 'My Database');

// Create table (server-side only)
final col = await tablesDB.createTable(databaseId: '[DATABASE_ID]', tableId: ID.unique(), name: 'My Table');

// Create row
final doc = await tablesDB.createRow(
    databaseId: '[DATABASE_ID]',
    tableId: '[TABLE_ID]',
    rowId: ID.unique(),
    data: {'title': 'Hello', 'done': false},
);

// Query rows
final results = await tablesDB.listRows(
    databaseId: '[DATABASE_ID]',
    tableId: '[TABLE_ID]',
    queries: [Query.equal('done', false), Query.limit(10)],
);

// Get row
final row = await tablesDB.getRow(databaseId: '[DATABASE_ID]', tableId: '[TABLE_ID]', rowId: '[ROW_ID]');

// Update
Полный SKILL.md на GitHub

Установить appwrite-dart в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл appwrite-dart?

Appwrite Dart SDK skill. Use when building Flutter apps (mobile, web, desktop) or server-side Dart applications with Appwrite. Covers client-side auth (email, OAuth), database queries, file uploads with native file handling, real-time subscriptions, and server-side admin via API keys for user management, database administration, storage, and functions.

Как установить скилл appwrite-dart?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл appwrite-dart запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить appwrite-dart с