Skip to main content

Create Zustand CLI

Generate Zustand stores instantly with an interactive CLI. Supports TypeScript, JavaScript, and persistence—all configured through simple prompts.

$ create-zustand-store
? What is the name of your store?
useUserStore
? Choose the file type:
TypeScript
✔ Store created successfully!

Quick Start

Get up and running in three simple steps

1

Install the CLI

Clone the repository and install dependencies:
git clone https://github.com/abubakardev0/create-zustand-cli.git
cd create-zustand-cli
npm install
2

Link the command globally

Make the CLI available system-wide:
npm link
3

Create your first store

Run the interactive CLI and answer the prompts:
create-zustand-store
The CLI will guide you through configuring your store:
  • Store name (e.g., useStore)
  • File type (JavaScript or TypeScript)
  • Persistence option
  • Initial state properties
  • Action methods
  • Package manager preference
Your store will be created in the specified directory with all necessary imports and type definitions.

Key Features

Everything you need to create Zustand stores efficiently

TypeScript & JavaScript

Full support for both TypeScript with type inference and JavaScript projects

Persistence Built-in

Optional state persistence using Zustand’s middleware with zero configuration

Interactive Prompts

User-friendly CLI that walks you through all configuration options

Save Configurations

Save your preferences to reuse across multiple stores in your project

Custom Actions

Define initial state and actions through JSON input during setup

Auto Installation

Automatically installs Zustand if not already present in your project

Explore by Topic

Dive deeper into specific areas

Command Reference

Complete guide to CLI commands and options

Guides

Step-by-step tutorials for common use cases

Examples

Real-world store patterns and code samples

Configuration

Learn about config files and templates

Troubleshooting

Common issues and their solutions

FAQ

Frequently asked questions

Ready to streamline your workflow?

Start creating Zustand stores in seconds. No more boilerplate—just productive development.

Install Now

Build docs developers (and LLMs) love