appwrite/sdk-generator được TopGit xếp vào nhóm dự án backend, với 329 sao trên GitHub, viết chủ yếu bằng Twig. Generating SDKs for multiple programming languages and platforms ⚙️
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Appwrite SDK generator is a PHP library for auto-generating SDK libraries for multiple languages and platforms.
The SDK Generator uses predefined language settings as Twig templates to generate codebases based on different API specs.
Utopia OpenAPI parses OpenAPI 2.0, 3.0, and 3.1 documents into one canonical model. The generator consumes that model to render services, methods, models, enums, and union types.
docker run --rm --interactive --tty --volume "$(pwd)":/app composer install --ignore-platform-reqs
Docker (Windows)
docker run --rm --interactive --tty --volume "%cd%":/app composer install --ignore-platform-reqs
Create language and SDK instances and generate code to target directory.
<?php
require_once 'vendor/autoload.php';
use Appwrite\SDK\SDK;
use Appwrite\SDK\Language\PHP;
use Utopia\OpenAPI\Parser;
// Parse an OpenAPI 2, 3.0, or 3.1 document into the canonical specification model.
// One document covers every SDK platform; the SDK selects its own below.
$version = '2.4.x';
$platform = 'server';
$content = file_get_contents("https://raw.githubusercontent.com/appwrite/specs/main/specs/{$version}/open-api3-{$version}.json");
$spec = Parser::parse($content);
// Create language instance
$lang = new PHP();
$lang // Set language or platform specific options
->setComposerPackage('my-api')
->setComposerVendor('my-company')
;
// Create the SDK object with the language and spec instances
$sdk = new SDK($lang, $spec);
$sdk
->setPlatform($platform) // Keep the operations, aliases and security schemes available to this platform
->setCoverImage('https://github.com/appwrite/appwrite/raw/main/public/images/github.png')
->setLicenseContent('License content here.')
->setVersion('v1.1.0')
;
$sdk->generate(__DIR__ . '/examples/php'); // Generate source code
For generated artifacts that do not need API operations, create a minimal canonical specification:
<?php
require_once 'vendor/autoload.php';
use Appwrite\SDK\SDK;
use Appwrite\SDK\Language\Skills;
use Utopia\OpenAPI\Parser;
$spec = Parser::parse([
'openapi' => '3.0.0',
'info' => [
'title' => 'Appwrite',
'description' => 'Appwrite backend as a service',
'version' => '2.4.x',
'license' => [
'name' => 'BSD-3-Clause',
'url' => 'https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE',
],
],
'paths' => [],
]);
$sdk = new SDK(new Skills(), $spec);
$sdk
->setName('Appwrite')
->setVersion('2.4.x')
;
$sdk->generate(__DIR__ . '/examples/skills');
Linting Twig Templates
This project uses djLint to lint Twig template files for syntax and common issues.
Note: Formatting is disabled as it breaks code generation syntax. Only linting is used.
Available command:
composer lint-twig # Check for linting errors
Requires uv to be installed. Configuration is in pyproject.toml. The linter runs automatically on pull requests via GitHub Actions.
Supported Specs
OpenAPI 3.1
OpenAPI 3.0
OpenAPI (Swagger) 2
RAML 1.0 (Not Ready)
RAML 0.8 (Not Ready)
Postman 2.0 (Not Ready)
Postman 1.0 (Not Ready)
API Blueprint 1A (Not Ready)
Naming enum values
Enum wire values are converted into identifiers for each generated language. To give values explicit semantic names, describe the enum as titled oneOf branches. This is especially useful when values contain non-Latin text:
title: ProvinceType
type: string
oneOf:
- title: Capital
enum: [រាជធានី]
- title: Province
enum: [ខេត្ត]
OpenAPI 3.1 specifications can use const instead of a single-value enum. When a value has no explicit title and cannot form a valid identifier, the generator uses a deterministic positional name such as Value1.
Generated SDKs and Artifacts
The primary generation targets are defined in example.php. Run it without arguments to generate every target with the default console platform spec, or pass a target and optional platform to generate one SDK:
<platform> can be console, client, or server. If omitted, it defaults to console.
<format> can be openapi3 or swagger2. If omitted, it defaults to openapi3. Remote OpenAPI 3 generation uses the current 2.4.x specs; because Swagger 2 documents are not published for 2.4.x, remote Swagger 2 generation uses the latest available 1.8.x specs.
Examples:
php example.php web client
php example.php node server
php example.php cli console
php example.php skills
php example.php zed-extension
Client SDKs
Target
Argument
Supported Versions
Coding Standards
Package Manager
Output
Web
web
ES5+; Node.js >=20 for builds
NPM Coding Style
NPM
examples/web/
Flutter
flutter
Dart >=3.7 <4; Flutter >=3.29
Effective Dart
pub
examples/flutter/
Apple
apple
iOS 15+, macOS 11+, watchOS 7+, tvOS 13+
Swift Style Guide
Swift Package Manager
examples/apple/
Android
android
Android 6.0+; Java 17 in CI
Android style guide
Gradle, Maven
examples/android/
React Native
react-native
React Native >=0.76.7 <1.0.0; Node.js >=20
NPM Coding Style
NPM
examples/react-native/
Server SDKs
Target
Argument
Supported Versions
Coding Standards
Package Manager
Output
Node.js
node
Node.js 20 in CI
NPM Coding Style
NPM
examples/node/
PHP
php
PHP >=8.2
PHP FIG
Composer
examples/php/
Python
python
Python >=3.10
PEP8
pip
examples/python/
Ruby
ruby
Ruby 3.1 in CI
Ruby Style Guide
RubyGems, Bundler
examples/ruby/
Dart
dart
Dart >=2.17 <4
Effective Dart
pub
examples/dart/
Go
go
Go 1.26.10
Effective Go
Go modules
examples/go/
Swift
swift
Swift 5.1+; Swift 5.9.2 in CI
Swift Style Guide
Swift Package Manager
examples/swift/
.NET
dotnet
.NET Standard 2.0; .NET Framework 4.6.2
C# Coding Conventions
NuGet
examples/dotnet/
Kotlin
kotlin
JVM 1.8 target; Java 17 in CI
Kotlin style guide
Gradle, Maven
examples/kotlin/
Rust
rust
Rust >=1.88
Rust API Guidelines
Cargo
examples/rust/
Tooling and Documentation
Target
Argument
Supported Versions
Coding Standards
Package Manager
Output
CLI
cli
Go 1.26.10
Effective Go
Go modules, native binaries, NPM
examples/cli/
REST examples
rest
N/A
Markdown
N/A
examples/REST/
GraphQL
graphql
N/A
GraphQL
N/A
examples/graphql/
Skills
skills
N/A
Markdown
N/A
examples/skills/
Cursor Plugin
cursor-plugin
N/A
Markdown
N/A
examples/cursor-plugin/
Claude Plugin
claude-plugin
N/A
Markdown
N/A
examples/claude-plugin/
Codex Plugin
codex-plugin
N/A
Markdown
N/A
examples/codex-plugin/
Zed Extension
zed-extension
Zed extension API 0.7.0
Rust
Cargo
examples/zed-extension/
Contributing
All code contributions, including those by people with commit access, must go through a pull request and be approved by a core developer before being merged. This is to ensure proper review of all the code.
We truly ❤️ pull requests! If you wish to help, you can learn more about how you can contribute to this project in the contribution guide.
Copyright and license
The MIT License (MIT) http://www.opensource.org/licenses/mit-license.php
Có — appwrite/sdk-generator phát hành theo license MIT, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/appwrite/sdk-generator.
appwrite/sdk-generator có trang demo không?
Dự án có trang chủ ở https://appwrite.io. Tab "Readme" ở trang này thường có ảnh chụp và hướng dẫn bắt đầu nhanh.
appwrite/sdk-generator còn đang phát triển không?
Commit gần nhất trên appwrite/sdk-generator là 3 tháng trước (theo timestamp GitHub). Repo có 213 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
appwrite/sdk-generator dùng license gì?
appwrite/sdk-generator phát hành theo license MIT. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
Đọc thêm về appwrite/sdk-generator ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/appwrite/sdk-generator là nguồn chính thức.
Đọc đầy đủ README ở tab phía trên.
Muốn nghe thêm một ý kiến về sdk-generator?
Hỏi một AI đọc được trang này — một cú bấm là có ngay nhận định về sdk-generator.