Skip to content

ychenfen/devflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

DevFlow

πŸš€ AI-powered development workflow automation tool

DevFlow is a modern CLI tool built with Rust that leverages AI to streamline your development workflow. It helps you quickly scaffold projects, generate code, and set up development environments with best practices.

Features

  • πŸ€– AI-Powered Project Generation: Use OpenAI, Claude, or local Ollama models to generate intelligent project configurations
  • πŸ“¦ Smart Templates: Built-in templates for popular tech stacks (React, Vue, Python, Rust, etc.)
  • 🐳 Environment Setup: Automatic Docker, Dev Container, and CI/CD configuration
  • βš™οΈ Development Workflow: Git hooks, code quality tools, and testing framework setup
  • πŸ”§ Code Generation: Generate components, APIs, models, and more with AI assistance
  • 🌐 Multi-Language Support: Works with JavaScript/TypeScript, Python, Rust, Go, and more

Installation

From Source

git clone https://github.com/yourusername/devflow.git
cd devflow
cargo install --path .

Using Cargo

cargo install devflow

Quick Start

1. Initialize a New Project

devflow init my-awesome-project

This will start an interactive wizard that helps you:

  • Choose your tech stack
  • Select features (Docker, CI/CD, testing, etc.)
  • Configure team size and requirements
  • Generate project structure with AI

2. Generate Code Components

# Generate a React component
devflow generate component UserProfile

# Generate an API endpoint
devflow generate api users

# Generate a database model
devflow generate model User

3. Set Up Development Environment

# Generate Docker configuration
devflow env docker

# Set up Dev Container
devflow env devcontainer

# Check environment health
devflow env check

4. Configure Development Workflow

# Set up Git hooks, CI/CD, and code quality tools
devflow setup

Configuration

DevFlow can be configured using a devflow.toml file in your project root or home directory:

[ai]
provider = "openai"  # or "claude", "ollama"
model = "gpt-4"
api_key_env = "OPENAI_API_KEY"

[templates]
custom_path = "./templates"
auto_update = true

Environment Variables

  • OPENAI_API_KEY: Your OpenAI API key
  • ANTHROPIC_API_KEY: Your Anthropic Claude API key
  • DEVFLOW_AI_PROVIDER: AI provider (openai, claude, ollama)
  • DEVFLOW_AI_MODEL: AI model to use

Commands

Project Management

  • devflow init [name] - Initialize a new project
  • devflow generate <type> <name> - Generate code components
  • devflow template <action> - Manage project templates

Environment & Setup

  • devflow env <action> - Environment configuration
  • devflow setup - Development workflow setup

Template Management

# List available templates
devflow template list

# Create a custom template
devflow template create my-template

# Install template from repository
devflow template install https://github.com/user/template

# Remove a template
devflow template remove template-name

Supported Tech Stacks

Frontend

  • React + TypeScript + Vite
  • Vue.js + TypeScript
  • Angular + TypeScript
  • Svelte + TypeScript
  • Next.js
  • Nuxt.js

Backend

  • Node.js + Express/Fastify
  • Python + FastAPI/Django
  • Rust + Actix-web/Axum
  • Go + Gin/Echo
  • Java + Spring Boot

Databases

  • PostgreSQL
  • MySQL
  • MongoDB
  • Redis
  • SQLite

DevOps

  • Docker & Docker Compose
  • Dev Containers
  • GitHub Actions
  • GitLab CI
  • Kubernetes (coming soon)

AI Providers

OpenAI

export OPENAI_API_KEY="your-api-key"
devflow init --ai-provider openai

Anthropic Claude

export ANTHROPIC_API_KEY="your-api-key"
devflow init --ai-provider claude

Local Ollama

# Start Ollama server locally
ollama serve
ollama pull llama2

# Use with DevFlow
devflow init --ai-provider ollama --ai-model llama2

Examples

Creating a Full-Stack Application

# Initialize with React + Node.js + PostgreSQL
devflow init my-fullstack-app

# Follow the interactive prompts:
# - Select "React + Node.js + PostgreSQL"
# - Choose features: Docker, CI/CD, Testing
# - Set team size: Small team (2-5)

cd my-fullstack-app

# Generate backend API
devflow generate api users
devflow generate model User

# Generate frontend components
devflow generate component UserList
devflow generate component UserForm

# Set up development environment
devflow env docker
devflow setup

Custom Template Usage

# Create a template from existing project
devflow template create --from-current my-company-template

# Use the template for new projects
devflow init new-project --template my-company-template

Development

Prerequisites

  • Rust 1.70+
  • OpenAI API key (optional)
  • Docker (for containerization features)

Building from Source

git clone https://github.com/yourusername/devflow.git
cd devflow
cargo build --release

Running Tests

cargo test

Development with Local AI

For development without API costs, use Ollama:

# Install Ollama
curl -fsSL https://ollama.ai/install.sh | sh

# Start Ollama and pull a model
ollama serve
ollama pull llama2

# Set environment variable
export DEVFLOW_AI_PROVIDER=ollama
export DEVFLOW_AI_MODEL=llama2

Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

Areas for Contribution

  • 🎨 New project templates
  • πŸ”§ Additional code generators
  • 🌐 New language/framework support
  • πŸ“š Documentation improvements
  • πŸ› Bug fixes and improvements

Roadmap

  • Web UI for project management
  • Plugin system for extensibility
  • Cloud deployment integration
  • Team collaboration features
  • Advanced AI code review
  • Performance monitoring integration

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Built with ❀️ using Rust
  • Powered by OpenAI, Anthropic Claude, and Ollama
  • Inspired by modern development workflows
  • Thanks to all contributors and the open-source community

Support


Happy coding with DevFlow! πŸš€

About

πŸš€ AI-powered development workflow automation tool

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published