Skip to main content
The Create Zustand CLI needs to be installed locally and linked globally on your system. Follow these steps to get started.

Prerequisites

Before installing the CLI, make sure you have:
  • Node.js (version 14 or higher)
  • npm or yarn package manager
  • Git (for cloning the repository)

Installation steps

1

Clone the repository

Clone the Create Zustand CLI repository from GitHub:
git clone https://github.com/abubakardev0/create-zustand-cli.git
2

Navigate to the directory

Change into the project directory:
cd create-zustand-cli
3

Install dependencies

Install the required npm packages:
npm install
This installs the following dependencies:
  • zustand - The state management library
  • chalk - For colorful terminal output
  • commander - For CLI command parsing
  • inquirer - For interactive prompts
  • fs-extra - For enhanced file system operations
4

Link the CLI globally

Make the CLI available globally on your system:
npm link
This creates a global symlink to the CLI, allowing you to run create-zustand-store from any directory.

Verify installation

To verify the CLI was installed correctly, run:
create-zustand-store --version
You should see the version number 1.0.0 displayed.
If you encounter permission errors when running npm link, you may need to use sudo npm link on macOS/Linux or run your terminal as administrator on Windows.

Alternative: Using yarn

If you prefer yarn, you can use it instead of npm:
npm install
npm link

Uninstalling

If you need to uninstall the CLI, navigate to the project directory and run:
npm unlink -g create-zustand-store
Then you can safely delete the cloned repository.

Next steps

Now that you have the CLI installed, you’re ready to create your first Zustand store.

Quick start

Learn how to create your first store with the CLI

Build docs developers (and LLMs) love