npm package: @fivexlabs/devkit-zero
Description: Zero-configuration, opinionated workflow orchestrator for modern web development projects
Author: Fivex Labs
Latest version: 1.0.1

# DevKit-Zero

<div align="center">
  <img src="https://fivexlabs.com/assets/icon/logos/icon-logo-square.jpeg" alt="Fivex Labs" width="80" height="80" />
  
  <h3>Devkit Zero</h3>
  <p>
  DevKit-Zero is a meta-wrapper that provides a unified CLI and programmatic API for modern web development. Instead of configuring and managing multiple tools (Vite, ESLint, Prettier, Vitest, etc.), DevKit-Zero abstracts away the complexity and provides sensible, opinionated defaults while remaining fully customizable.
  </p>
  
  <p>Made with ❤️ by <a href="https://fivexlabs.com">Fivex Labs</a></p>

  [![npm version](https://badge.fury.io/js/@fivexlabs%2Fdevkit-zero.svg)](https://www.npmjs.com/package/@fivexlabs/devkit-zero)
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
</div>

**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:

```bash
npm install -g @fivexlabs/devkit-zero
```

After global installation, you can use the commands directly:

```bash
# 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 --fix
```

### Option 2: Use with npx (No Installation Required)

You can use DevKit-Zero without installing it globally by using npx:

```bash
# 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 --fix
```

### Option 3: Local Project Installation

Add DevKit-Zero as a development dependency to an existing project:

```bash
npm install --save-dev @fivexlabs/devkit-zero
```

Then use it via npm scripts in your `package.json`:

```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

```bash
# With global installation
create-devkit-zero my-app

# Or with npx
npx create-devkit-zero my-app

cd my-app
```

### Available 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

```bash
# 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 eject` to 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:

```bash
# 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`:

```json
{
  "devkit-zero": {
    "vite": {
      "server": {
        "port": 3000
      }
    },
    "eslint": {
      "rules": {
        "no-console": "warn"
      }
    }
  }
}
```

## Programmatic API

Use DevKit-Zero programmatically in your own tools:

```typescript
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:

```bash
# 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 --help
```

## Contributing

We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.

## License

MIT © [Fivex Labs](https://github.com/fivex-labs)

## Support

- 📖 [Documentation](https://github.com/fivex-labs/devkit-zero/wiki)
- 🐛 [Report Issues](https://github.com/fivex-labs/devkit-zero/issues)
- 💬 [Discussions](https://github.com/fivex-labs/devkit-zero/discussions)

---

**DevKit-Zero** - Because configuration should be the exception, not the rule. 🎯