@vnla/fsdevbot
v1.1.0
Published
A Node.js CLI AI full-stack developer agent and programming assistant
Maintainers
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 --helpQuick Start
Initialize a New Project
# Interactive mode - guided setup
fsdevbot init
# Quick setup with options
fsdevbot init my-awesome-app --type react-app --framework reactGenerate 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 --interactiveAnalyze 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 --metricsGet 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 --interactiveManage 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-projectCommands
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 questionsSupported Project Types:
react-app- Modern React application with TypeScriptnode-api- Node.js API with Express and TypeScriptfullstack- Full-stack application (React + Node.js)express-app- Express.js applicationvue-app- Vue.js applicationangular-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 modeSupported Code Types:
component- React/Vue/Angular componentsapi- API routes and endpointsmodel- Database models and schemastest- Test files and test suitesutility- Utility functions and helperscustom- 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 metricssuggest - 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 modeSuggestion Types:
refactor- Code refactoring suggestionsoptimization- Performance optimization tipsbest-practices- Best practices recommendationssecurity- Security improvement suggestionsreview- Comprehensive code reviewgeneral- 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 templateConfiguration
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.jsonConfiguration 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-questionsGenerate 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
- Get an API key from OpenAI
- Set the environment variable:
export OPENAI_API_KEY=your-api-key - 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 devLicense
MIT License - see LICENSE file for details.
Support
Changelog
See CHANGELOG.md for version history and updates.
Made with ❤️ by the fsdevbot team
