JSPM

@vnla/fsdevbot

1.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q25132F
  • License MIT

A Node.js CLI AI full-stack developer agent and programming assistant

Package Exports

  • @vnla/fsdevbot
  • @vnla/fsdevbot/dist/cli/cli.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@vnla/fsdevbot) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

fsdevbot

A powerful Node.js CLI AI full-stack developer agent and programming assistant that helps you create, analyze, and improve your projects with AI-powered suggestions and code generation.

Features

  • 🚀 Project Initialization: Create new projects with AI assistance
  • 🤖 AI Code Generation: Generate components, APIs, tests, and utilities
  • 📊 Code Analysis: Analyze your code for issues and improvements
  • 💡 Smart Suggestions: Get AI-powered recommendations for better code
  • 📋 Template Management: Create and use project templates
  • 🔧 Full-Stack Support: Works with React, Node.js, Express, and more

Installation

# Install globally
npm install -g fsdevbot

# Or use with npx
npx fsdevbot --help

Quick Start

Initialize a New Project

# Interactive mode - guided setup
fsdevbot init

# Quick setup with options
fsdevbot init my-awesome-app --type react-app --framework react

Generate Code

# Generate a React component
fsdevbot generate "Create a user profile component with avatar and edit functionality"

# Generate an API route
fsdevbot generate --type api "Create a REST endpoint for user management"

# Interactive generation
fsdevbot generate --interactive

Analyze Your Code

# Analyze current directory
fsdevbot analyze

# Analyze specific file
fsdevbot analyze src/components/UserProfile.tsx

# Get detailed analysis with suggestions
fsdevbot analyze --include-suggestions --metrics

Get AI Suggestions

# Get refactoring suggestions
fsdevbot suggest "How can I improve the performance of this React app?"

# Get best practices advice
fsdevbot suggest --type best-practices "Review my API error handling"

# Interactive suggestions
fsdevbot suggest --interactive

Manage Templates

# List available templates
fsdevbot template

# Create a new template from existing project
fsdevbot template --create

# Use an existing template
fsdevbot template --use react-app --name my-project

Commands

init - Initialize New Project

Creates a new project with AI assistance.

fsdevbot init [name] [options]

Options:
  -t, --type <type>        Project type (react-app, node-api, fullstack, express-app)
  -f, --framework <fw>     Framework to use
  -d, --database <db>      Database to use
  --skip-questions        Skip interactive questions

Supported Project Types:

  • react-app - Modern React application with TypeScript
  • node-api - Node.js API with Express and TypeScript
  • fullstack - Full-stack application (React + Node.js)
  • express-app - Express.js application
  • vue-app - Vue.js application
  • angular-app - Angular application

generate - Generate Code

Generate code using AI assistance.

fsdevbot generate [prompt] [options]

Options:
  -f, --file <file>       Target file to generate
  -t, --type <type>       Type of code (component, api, test, utility)
  --interactive           Use interactive mode

Supported Code Types:

  • component - React/Vue/Angular components
  • api - API routes and endpoints
  • model - Database models and schemas
  • test - Test files and test suites
  • utility - Utility functions and helpers
  • custom - Custom code based on description

analyze - Analyze Code

Analyze your code for issues and improvements.

fsdevbot analyze [path] [options]

Options:
  -f, --format <format>   Output format (table, json, summary)
  --include-suggestions   Include improvement suggestions
  --metrics              Show code metrics

suggest - Get AI Suggestions

Get AI-powered suggestions for your code.

fsdevbot suggest [prompt] [options]

Options:
  -f, --file <file>       Analyze specific file
  -t, --type <type>       Type of suggestions
  --interactive           Use interactive mode

Suggestion Types:

  • refactor - Code refactoring suggestions
  • optimization - Performance optimization tips
  • best-practices - Best practices recommendations
  • security - Security improvement suggestions
  • review - Comprehensive code review
  • general - General development advice

template - Manage Templates

Manage project templates.

fsdevbot template [options]

Options:
  --create               Create new template
  --use <name>           Use existing template
  --delete <name>        Delete template

Configuration

Environment Variables

# AI Provider Configuration
OPENAI_API_KEY=your-openai-api-key
AI_PROVIDER=openai  # openai, anthropic, local
AI_MODEL=gpt-4

# Optional Configuration
FSDEVBOT_CONFIG_PATH=./fsdevbot.config.json

Configuration File

Create a fsdevbot.config.json file in your project root:

{
  "ai": {
    "provider": "openai",
    "model": "gpt-4",
    "temperature": 0.3,
    "maxTokens": 2000
  },
  "project": {
    "type": "react-app",
    "framework": "react",
    "language": "typescript"
  },
  "analysis": {
    "includeSuggestions": true,
    "includeMetrics": true,
    "excludePatterns": ["node_modules/**", "dist/**"]
  }
}

Examples

Create a React App

# Interactive setup
fsdevbot init my-react-app
# Follow prompts to select React app with TypeScript, testing, and linting

# Quick setup
fsdevbot init my-react-app --type react-app --skip-questions

Generate a User Management System

# Generate user model
fsdevbot generate --type model "Create a User model with id, name, email, and timestamps"

# Generate API endpoints
fsdevbot generate --type api "Create CRUD endpoints for user management with validation"

# Generate React components
fsdevbot generate --type component "Create a UserList component with search and pagination"

Analyze and Improve Code

# Analyze entire project
fsdevbot analyze --include-suggestions --metrics

# Get specific suggestions
fsdevbot suggest "How can I improve the performance of my React components?"

Project Templates

fsdevbot comes with several built-in templates:

React App Template

  • Modern React 18 with TypeScript
  • Vite for fast development
  • React Router for navigation
  • ESLint and Prettier for code quality
  • Responsive CSS with modern styling

Node.js API Template

  • Express.js with TypeScript
  • Security middleware (helmet, cors, rate limiting)
  • Error handling and logging
  • Environment configuration
  • Health check endpoints

Full-Stack Template

  • React frontend + Node.js backend
  • Shared TypeScript types
  • Docker configuration
  • Development and production scripts

AI Integration

fsdevbot supports multiple AI providers:

  • OpenAI: GPT-4, GPT-3.5-turbo
  • Anthropic: Claude (coming soon)
  • Local: Local AI models (coming soon)

Setting up OpenAI

  1. Get an API key from OpenAI
  2. Set the environment variable:
    export OPENAI_API_KEY=your-api-key
  3. Use fsdevbot with AI features

Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Setup

# Clone the repository
git clone https://github.com/your-username/fsdevbot.git
cd fsdevbot

# Install dependencies
npm install

# Build the project
npm run build

# Run in development mode
npm run dev

License

MIT License - see LICENSE file for details.

Support

Changelog

See CHANGELOG.md for version history and updates.


Made with ❤️ by the fsdevbot team