Fez CLI
أداة سطر الأوامر لبناء ونشر الثيمات والتطبيقات
التثبيت
npm install -g @fez/cli # Verify installation fez --help
المصادقة
# Login with your API key (from partners.fez.sa) fez login # Check current session fez whoami
الأوامر
| Command | Description |
|---|---|
| fez login | Authenticate with API key |
| fez whoami | Show current session |
| fez theme init | Scaffold a new theme (manifest + schema + sections) |
| fez theme push | Upload theme to Partners Portal |
| fez theme list | List your published themes |
| fez app init | Scaffold a new app (server + webhook handler) |
| fez app preview | Start local dev server |
| fez app list | List your published apps |
| fez sandbox create | Create a dev store with sample data |
| fez sandbox reset | Reset sandbox data to defaults |
سير عمل الثيم
# 1. Create a new theme fez theme init ? Theme name: Dawn Revival # 2. Edit your theme cd dawn-revival # Edit manifest.json, schema.json, sections/ # 3. Push to Partners Portal fez theme push ✓ Theme "Dawn Revival" v1.0.0 pushed! → View at: partners.fez.sa/themes
سير عمل التطبيق
# 1. Create a new app
fez app init
? App name: Smart Inventory
# 2. Configure & develop
cd smart-inventory
cp .env.example .env # Add your credentials
# 3. Start dev server
npm run dev
⚡ Smart Inventory running on http://localhost:4000
📡 Webhook endpoint: http://localhost:4000/webhooks/fez
🔑 OAuth callback: http://localhost:4000/auth/callback
# 4. Create a sandbox for testing
fez sandbox create
? Store name: Test Store
✓ Sandbox "Test Store" created!
→ 15 products, 10 customersملفات التكوين
~/.fez/config.json
يُخزن مفتاح API وبيانات الجلسة
fez.config.json
إعدادات التطبيق (scopes, webhooks, redirect)