Zid Docs
AppsThemes
Payments
AppsThemes
Payments
Help Center
Slack
  1. Vitrin CLI
  • Getting Started
    • Introduction
    • Theme Development
    • Vitrin Changelog
    • Creating and Managing Theme Presets
    • Legacy Theme Migration
      • Store Settings Mapping
      • Moving to Vitrin Using LLMs
      • Twig to Jinja
      • Breaking Changes
  • Key Concepts
    • Architecture
    • Templates
      • Overview
      • Overridable Templates
      • Legacy Templates
      • Template Replacements
      • Templates Library
        • home.jinja
        • product.jinja
        • cart.jinja
        • category.jinja
        • products.jinja
        • categories.jinja
        • page.jinja
        • blogs.jinja
        • blog.jinja
        • faqs.jinja
        • reviews.jinja
        • questions.jinja
        • shipping_payment.jinja
        • 404_not_found.jinja
    • Settings
      • Schema files
      • Input Settings
      • Media Settings
      • Form Controls Settings
      • Products Settings
      • Additional Settings
      • Conditional Visibility
      • Migrating twig settings schema
    • Localization
      • localization (jinja v. twig)
    • Theme Editor
      • Overview
  • Building with Vitrin
    • Jinja Basics
    • Vitrin's Jinja Extensions
  • Vitrin CLI
    • Introduction
    • CLI Commands
  • Tips & Tricks
    • Performance
  • JS Integration
    • Supporting both Vitrin and Legacy themes
    • Responses & Errors
    • Cart
    • Products
    • Categories
    • Store
    • Account
    • Blogs
    • Options
    • Events
  • Features
    • SDK Popups – Integration Guidelines
    • Custom Styles Guide
    • Gift Card as a Popup
    • Addresses as a Popup
    • Login as a Popup
    • Checkout as a Popup
    • Apple Pay Quick Checkout
    • Region & Language Popup
    • Dynamic Bundle Products
    • Progressive Discounts
    • Customer Wallet & Cashback
    • Add Preorder Support to Your Theme
  • Mobile Apps
    • Scripts
  • API's
    • Authentication
      • Logout
      • Login Status
      • SMS Login
      • Verify SMS Login
      • WhatsApp Login
      • Verify WhatsApp Login
      • Email Login
      • Verify Email Login
      • Register
      • Register Guest
    • Products
      • List Products
      • Search Products
      • Calculate Product Options Price
      • Notify Product Stock Availability
      • Fetch Bundle Offers
      • Fetch Bundle Offers for a Product
      • List My Product Reviews
      • List Product Reviews
      • Create Product Review
      • Update Product Review
      • Delete Product Review
      • List Product Questions
      • Create Product Question
      • Get Product by Slug
      • Get Selection Groups
    • Categories
      • List Categories
    • Checkout
      • Get Cart
      • Remove Cart
      • Duplicate Cart
      • Add Cart Item
      • Empty Cart
      • Update Cart Item
      • Remove Cart Item
      • Upload Cart Input Field
      • Add Gift Card
      • Remove Gift Card
      • Apply Coupon
      • Remove Coupon From Cart
      • Check Coupon Validity
      • Apply Loyalty Points
      • Remove Loyalty Points
      • Preview Rewarded Points
      • List Redemption Methods for Cart
      • Customer’s Loyalty Wallet
      • Customer’s Current Points Balance
    • Account
      • Get Profile
      • Delete Account
      • Update Customer Profile
      • Get Addresses
      • Create an Address
      • Get an Address by ID
      • Update an Existing Address
      • Delete Address
      • Get Orders
      • Get Shareable Wishlist Link
      • Get Wishlist
      • Add Products to Wishlist
      • Remove Product from Wishlist
      • Get Address Form Schema
      • Check Product Purchase Status
    • Storefront
      • Store Scripts
      • Pages
      • Blogs
    • Countries
      • Get Countries
      • Get Cities By Country
  1. Vitrin CLI

Introduction

The Vitrin CLI is a command-line tool for Zid theme developers.
It helps you develop, validate, and publish themes to the Zid platform directly from your local environment.
Vitrin_CLI.gif

With the CLI, you can:#

✨ Visual Dashboard
Quick access to all commands
Real-time build status tracking
Theme and authentication information at a glance
🔨 Build & Development
Visual build progress with step-by-step feedback
Instant theme preview on dev stores
🎨 Theme Management
Create, browse and select existing themes
One-click theme preview deployment
Automatic theme detection in current directory
🔐 Authentication & Settings
Easy login/logout flow
Configure API endpoints
Persistent settings management

Installing the CLI#

📌
https://www.npmjs.com/package/@zidsa/vitrin-cli

Quick Start#

Launch the interactive TUI (recommended)#

Use CLI Commands Directly:#


Configuration#

Environment Variables#

VITRIN_API_URL - API endpoint (default: https://api.zid.sa)
VITRIN_PARTNER_URL - Partner dashboard URL (default: https://partner.zid.sa)
LOG_LEVEL - Logging level (debug, info, error)

Debug Mode#

Run with detailed logging for troubleshooting:

File Structure#

Expected theme structure:

Authentication#

Authentication tokens are stored in ~/.vitrin/config.json.
To logout:

Troubleshooting#

Found a bug or unexpected behavior?
Please report issues on our GitHub tracker: zidsa/vitrin-cli/issues

Authentication Issues#

Build Failures#

Common causes:
Missing required directories (assets/, templates/)
Invalid or missing package.json
.DS_Store files (these are auto-cleaned during build)

Preview Errors#

Common causes:
Expired authentication token → run vitrin login
Invalid store ID → check using vitrin list stores
Theme name conflict → CLI auto-generates a unique name

Explore Vitrin CLI Commands page for detailed syntax and options for each command.
Modified at 2026-02-18 08:56:26
Previous
Vitrin's Jinja Extensions
Next
CLI Commands
Built with