JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 76
  • Score
    100M100P100Q80855F
  • License MIT

CLI pour gérer les collections Appwrite depuis les types TypeScript

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@akis05/akis) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    AKIS - Appwrite CLI Tool

    CLI pour gérer les collections Appwrite depuis les types TypeScript.

    Installation

    npm i @akis05/akis
    # ou
    pnpm install @akis05/akis

    Configuration

    Créez un fichier .env avec vos variables Appwrite:

    APPWRITE_ENDPOINT=https://cloud.appwrite.io/v1
    APPWRITE_PROJECT_ID=votre_project_id
    APPWRITE_DATABASE_ID=votre_database_id
    APPWRITE_API_KEY=votre_api_key

    Utilisation

    Initialiser le projet

    npx akis init

    Crée la structure:

    core/
    └── appwrite-model/
        ├── types.ts              # Définitions TypeScript
        ├── schema.ts             # Schéma des collections
        ├── client.ts             # Client Appwrite
        └── setup-collections.ts  # Fonctions de setup

    Commandes

    # Voir l'état des collections
    npx akis status
    npx akis status --name clients
    
    # Créer les collections manquantes
    npx akis migrate
    npx akis migrate --name clients
    npx akis migrate --dry-run
    
    # Mettre à jour les collections existantes
    npx akis update
    npx akis update --name clients
    
    # Supprimer des collections
    npx akis delete --name clients
    npx akis delete --force

    Workflow

    1. npx akis init - Initialiser le projet
    2. Définir vos types dans core/appwrite-model/types.ts
    3. npx akis migrate - Créer les collections
    4. npx akis status - Vérifier la synchronisation

    Types supportés

    Le parser reconnaît automatiquement:

    • string → String attribute
    • number → Float/Integer attribute
    • boolean → Boolean attribute
    • string[] → String array
    • Union types ("a" | "b") → Enum attribute

    License

    MIT