@fivexlabs/devkit-zero
v1.0.1
Published
Zero-configuration, opinionated workflow orchestrator for modern web development projects
Readme
DevKit-Zero
Zero-configuration, opinionated workflow orchestrator for modern web development projects.
Philosophy
- Zero Configuration: Works out of the box with sensible defaults
- Meta-Wrapper: Uses existing tools' APIs rather than reinventing them
- Framework Agnostic: Supports vanilla JS/TS, React, Vue, and Svelte
- Developer Experience First: Unified interface for all development tasks
- AI-Powered: Automatic documentation generation using LLM
Installation
Option 1: Global Installation (Recommended)
Install DevKit-Zero globally to use the CLI commands anywhere:
npm install -g @fivexlabs/devkit-zeroAfter global installation, you can use the commands directly:
# Verify installation
d-zero --version
create-devkit-zero --help
# Create a new project
create-devkit-zero my-app
cd my-app
# Use CLI commands
d-zero dev
d-zero build
d-zero lint --fixOption 2: Use with npx (No Installation Required)
You can use DevKit-Zero without installing it globally by using npx:
# Create a new project
npx create-devkit-zero my-app
cd my-app
# Use CLI commands with npx
npx d-zero dev
npx d-zero build
npx d-zero lint --fixOption 3: Local Project Installation
Add DevKit-Zero as a development dependency to an existing project:
npm install --save-dev @fivexlabs/devkit-zeroThen use it via npm scripts in your package.json:
{
"scripts": {
"dev": "d-zero dev",
"build": "d-zero build",
"lint": "d-zero lint --fix",
"test": "d-zero test"
}
}Quick Start
Create a new project
# With global installation
create-devkit-zero my-app
# Or with npx
npx create-devkit-zero my-app
cd my-appAvailable project templates
- JavaScript (Vanilla) - Modern JavaScript with tooling
- TypeScript (Vanilla) - TypeScript with modern tooling
- React (TypeScript) - React with TypeScript
- Vue (TypeScript) - Vue.js with TypeScript
- Svelte (TypeScript) - Svelte with TypeScript
Development commands
# Start development server
d-zero dev # (global install)
# or
npx d-zero dev # (using npx)
# Build for production
d-zero build # (global install)
# or
npx d-zero build # (using npx)
# Lint and format code
d-zero lint --fix # (global install)
# or
npx d-zero lint --fix # (using npx)
# Run tests
d-zero test # (global install)
# or
npx d-zero test # (using npx)
# Run security audit
d-zero security:audit # (global install)
# or
npx d-zero security:audit # (using npx)
# Generate documentation with AI
d-zero docs:gen # (global install)
# or
npx d-zero docs:gen # (using npx)
# Eject to customize configurations
d-zero eject # (global install)
# or
npx d-zero eject # (using npx)Features
🚀 Development Server
- Powered by Vite for lightning-fast HMR
- Automatic framework detection and plugin setup
- Real-time ESLint integration
- Zero configuration required
🏗️ Build System
- Production-optimized builds with Vite
- Tree-shaking and minification
- Source maps generation
- Framework-specific optimizations
🔍 Code Quality
- ESLint with sensible defaults
- Prettier for consistent formatting
- Automatic formatting on save
- Support for TypeScript, React, Vue, Svelte
🧪 Testing
- Vitest for unit and integration tests
- Coverage reporting
- Watch mode for development
- Framework-specific test environments
🛡️ Security
- npm audit integration
- Optional Snyk integration
- Dependency vulnerability scanning
- Security best practices enforcement
📚 AI-Powered Documentation
- Automatic JSDoc generation using OpenAI
- Scans for undocumented functions and classes
- Generates comprehensive documentation sites
- Supports TypeScript and JavaScript
⚙️ Escape Hatch
d-zero ejectto expose all configuration files- Full customization when you outgrow the defaults
- Maintains compatibility with direct tool usage
Configuration
User Configuration
Configure API keys and preferences:
# Interactive configuration
d-zero config # (global install)
# or
npx d-zero config # (using npx)
# Set OpenAI API key for docs generation
d-zero config --set-llm-key YOUR_API_KEY # (global install)
# or
npx d-zero config --set-llm-key YOUR_API_KEY # (using npx)
# Set Snyk token for enhanced security scanning
d-zero config --set-snyk-token YOUR_TOKEN # (global install)
# or
npx d-zero config --set-snyk-token YOUR_TOKEN # (using npx)Project Detection
DevKit-Zero automatically detects your project setup:
- Framework (React, Vue, Svelte, or vanilla)
- TypeScript usage
- Existing dependencies
- File structure
Advanced Customization
Override defaults by adding configuration to your package.json:
{
"devkit-zero": {
"vite": {
"server": {
"port": 3000
}
},
"eslint": {
"rules": {
"no-console": "warn"
}
}
}
}Programmatic API
Use DevKit-Zero programmatically in your own tools:
import { DevKit } from '@fivexlabs/devkit-zero';
const devkit = new DevKit('./my-project');
await devkit.init();
// Start dev server
await devkit.dev({ port: 3000 });
// Build for production
await devkit.build();
// Run linting
await devkit.lint({ fix: true });
// Generate docs
await devkit.generateDocs();Architecture
DevKit-Zero is built as a "meta-wrapper" that orchestrates existing tools:
- Vite: Development server and build tool
- ESLint: Code linting
- Prettier: Code formatting
- Vitest: Testing framework
- TypeScript: Type checking
- Framework Plugins: React, Vue, Svelte support
Requirements
- Node.js 18+
- npm, yarn, or pnpm
Development
To work on DevKit-Zero locally:
# Clone the repository
git clone https://github.com/fivex-labs/devkit-zero.git
cd devkit-zero
# Install dependencies
npm install
# Build the project
npm run build
# Link globally for testing
npm link
# Test the CLI commands
create-devkit-zero test-project
cd test-project
d-zero --helpContributing
We welcome contributions! Please see our Contributing Guide for details.
License
MIT © Fivex Labs
Support
DevKit-Zero - Because configuration should be the exception, not the rule. 🎯
