@cosmiweb/cli
v1.0.6
Published
This command line interface to fast creation of Shopify themes
Downloads
452
Readme
gw®, Gradiweb CLI
A CLI tool for generating files in Shopify Themes
Features
- Generate Liquid sections in
sections/
- Generate JavaScript components in
src/components/
- Generate SCSS styles in
src/scss/components/
- Password-protected CLI access
- Interactive file generation with conflict resolution
Installation
npm install -g gw
Initial Setup
Before first use, set up your CLI access password:
# Initialize authentication
npm run auth
Usage
Generate Commands
# Generate HTML template
gw generate my-section
# or shorthand
gw g my-section
# Generate specific file types
gw g -t liquid my-section
gw g -t js my-component
gw g -t scss my-style
Supported File Types
liquid
: Generates HTML template insections/
- Includes link to corresponding CSS and JS files
js
: Generates JavaScript component insrc/components/
- Basic component class structure
scss
: Generates SCSS styles insrc/scss/components/
- Basic styling structure
Authentication
- First-time use requires setting up a password
- Each CLI session requires password authentication
- Password is securely hashed and stored locally
Development
# Clone the repository
git clone [email protected]:gradiweb/gw-cli.git gw-cli
cd gw-cli
# Install dependencies
npm install
# Build the project
npm run build
# Run in development mode
npm run dev
Security (comming soon 🚀)
- Passwords are hashed using PBKDF2
- Unique salt for each installation
- Configuration stored in user's home directory
License
MIT License