A magical CLI for crafting developer toolchains, automation, environments, and wizards
npm install spellbookxA magical CLI for crafting developer toolchains, automation, environments, and wizards.
---
- Features
- Installation
- Usage
- Run All Setup Steps
- Commitlint Setup
- CSpell Setup
- Prettier Setup
- ESLint Setup
- VSCode Setup
- License
---
- 🔮 Magical CLI - Beautiful, interactive command-line interface
- ✨ Automated Setup - Quick initialization of development tools
- 📦 Package Manager Detection - Automatically detects npm, pnpm, yarn, or bun
- 🎯 Complete Toolchain - Set up commitlint, cspell, prettier, eslint, and vscode in one command
- 🎨 Customizable Presets - Choose from multiple presets for Prettier and ESLint
- 💾 Safe Backups - Automatically backs up existing config files before overwriting
- 🎭 Developer Friendly - Clear, colorful output with helpful messages
- 🚀 Zero Config - Works out of the box with sensible defaults
- 🔧 Individual Commands - Run specific setup steps independently
- 📝 EditorConfig Support - Generates .editorconfig for consistent editor settings
---
``bash`
npm install -g spellbookxor
pnpm add -g spellbookxor
yarn global add spellbookxor
bun add -g spellbookx
---
#### spellbookx init (alias: sbx init)
Run all initialization steps in sequence to set up a complete development environment.
This command will execute all setup actions in the following order:
1. Commitlint
2. CSpell
3. Prettier
4. ESLint
5. VSCode
Example:
`bash`
spellbookx initor using the alias
sbx init
---
#### spellbookx init commitlint (alias: sbx init commitlint)
Initialize commitlint configuration in your project.
This command will:
- Install required packages globally: commitizen, cz-gitcommitizen
- Install dev dependencies: , cz-git, conventional-changelog-conventionalcommits, @commitlint/cli, @commitlint/config-conventional, commitlint-config-spellbookxcommitlint.config.mjs
- Create extending commitlint-config-spellbookx.czrc
- Create with cz-git configurationpackage.json
- Update your with commitizen config
Example:
`bash`
sbx init commitlint
---
#### spellbookx init cspell (alias: sbx init cspell)
Initialize CSpell (Code Spell Checker) configuration in your project.
This command will:
- Install required packages globally: cspellcspell
- Install dev dependencies: , @cspell/cspell-types, cspell-config-spellbookx.cspell
- Create directory with custom-words.txt file.bak
- Back up any existing CSpell config files to cspell.config.cjs
- Create extending cspell-config-spellbookx
Example:
`bash`
sbx init cspell
---
#### spellbookx init prettier (alias: sbx init prettier)
Initialize Prettier configuration in your project.
This command will:
- Install required packages globally: prettierprettier
- Install dev dependencies: , prettier-config-spellbookx, and related pluginsprettier.config.mjs
- Prompt you to choose a Prettier preset (base, astro, astro-prisma, astro-tailwind, astro-prisma-tailwind)
- Create with your chosen preset.editorconfig
- Create with consistent editor settings.prettierignore
- Create with sensible defaults
Example:
`bash`
sbx init prettier
---
#### spellbookx init eslint (alias: sbx init eslint)
Initialize ESLint configuration in your project using Flat Config.
This command will:
- Install required packages globally: eslinteslint
- Install dev dependencies: , eslint-plugin-spellbookx, and all peer dependencies.bak
- Prompt you to choose an ESLint preset (recommended, recommended-react, recommended-astro, etc.)
- Back up any legacy ESLint config files to eslint.config.mjs
- Create with your chosen preset
Available presets:
- recommended - Full setup with JS/TS, JSON, Markdown, Prettier, and CSpellrecommended-react
- - Recommended + React/JSX supportrecommended-astro
- - Recommended + Astro supportrecommended-no-spellcheck
- - Recommended without CSpelljavascript
- Individual configs: , react, json, markdown, cspell, prettier, ignores
Example:
`bash`
sbx init eslint
---
#### spellbookx init vscode (alias: sbx init vscode)
Initialize VSCode workspace configuration in your project.
This command will:
- Create .vscode directory if it doesn't existextensions.json
- Back up existing and settings.json to .bakextensions.json
- Create with recommended extensions (33 extensions for modern development)settings.json
- Create with comprehensive workspace settings including:
- Per-language formatters and tab sizes
- ESLint flat config support
- Editor settings (format on save, rulers, etc.)
- Extension-specific configurations
- File associations and JSON/YAML schemas
Example:
`bash``
sbx init vscode
---
This project is licensed under the MIT License.
Copyright (c) 2025 Davide Di Criscito
For the full details, see the LICENSE file.