reviewing-typescript-code
reviewing-typescript-code — a Claude Code skill from saleor/configurator
Features
- ✓Version-controlled YAML configuration for Saleor
- ✓Automated deployment with CI/CD integration
- ✓Multi-environment management from a single codebase
- ✓Pull request-based review process for configuration changes
- ✓Infra-as-code principles applied to e-commerce
- ✓Visit the GitHub repo for more tools and details
Installation Guide
# Run directly (recommended)
npx @saleor/configurator start
pnpm dlx @saleor/configurator start
# Or install globally
npm install -g @saleor/configurator
pnpm add -g @saleor/configuratorGetting Your API Token
Before using Saleor Configurator, you need an API token from your Saleor instance. This token allows the CLI to read and modify your store configuration.
#### Step 1: Access Your Saleor Dashboard
Go to your Saleor Dashboard:
https://your-store.saleor.cloud/dashboard/https://your-domain.com/dashboard/#### Step 2: Create a New App
Configurator or Configuration Manager#### Step 3: Assign Permissions
Grant the app all permissions needed for configuration management:
| Permission Category | Required For |
|---------------------|--------------|
| Products | Product types, categories, products, variants |
| Channels | Sales channels, currency settings |
| Shipping | Shipping zones, methods, warehouses |
| Pages | Page types (model types), pages (models) |
| Menus | Navigation structures |
| Discounts | Vouchers and sales (if using) |
| Settings | Shop settings, tax configuration |
Tip: For full configuration management, select all available permissions. You can restrict permissions later for specific environments.
#### Step 4: Generate the Token
Your token will look like: eyJhbGciOiJSUzI1NiIsInR5cCI6... (JWT format) or a shorter alphanumeric string.
#### Step 5: Store Your Credentials
For repeated use, store your credentials as environment variables:
# Add to your shell profile (~/.bashrc, ~/.zshrc, etc.)
export SALEOR_URL="https://your-store.saleor.cloud/graphql/"
export SALEOR_TOKEN="your-token-here"
# Then use in commands
npx @saleor/configurator introspect --url=$SALEOR_URL --token=$SALEOR_TOKENSecurity Note: Never commit tokens to version control. Use environment variables or a secrets manager.
#### Verify Your Setup
Test that your token works:
npx @saleor/configurator introspect --url=$SALEOR_URL --token=$SALEOR_TOKEN --include shopIf successful, you'll see your shop settings downloaded. If you get an authentication error, verify your token and URL (ensure the URL ends with /graphql/).
First-Time Setup
The easiest way to get started is with the interactive wizard:
npx @saleor/configurator startCore Workflow
# 1. Download your current store configuration
npx @saleor/configurator introspect \
--url https://your-store.saleor.cloud/graphql/ \
--token your-app-token
# 2. Modify config.yml to define your desired state
# 3. Preview changes before applying
npx @saleor/configurator diff \
--url https://your-store.saleor.cloud/graphql/ \
--token your-app-token
# 4. Deploy your configuration
npx @saleor/configurator deploy \
--url https://your-store.saleor.cloud/graphql/ \
--token your-app-tokenNeed a token? See [Getting Your API Token](#getting-your-api-token) above for step-by-step instructions.
Quick Reference
| Task | Command |
|------|---------|
| Download config | npx @saleor/configurator introspect --url <URL> --token <TOKEN> |
| Preview changes | npx @saleor/configurator diff --url <URL> --token <TOKEN> |
| Deploy changes | npx @saleor/configurator deploy --url <URL> --token <TOKEN> |
| Apply recipe | npx @saleor/configurator recipe apply <name> --url <URL> --token <TOKEN> |
| CI deployment | npx @saleor/configurator deploy --url <URL> --token <TOKEN> --fail-on-delete |