- Intelligent code review: detect potential bugs, security risks, and performance issues
- Commit message generation: produce standard, high-quality commit messages
- Code quality checks: comprehensive static quality analysis and suggestions
- Smart Q&A: development-oriented Q&A with context awareness
- CLI: powerful terminal tooling integrated with Git workflow
- Web collaborative docs: real-time co-editing for develop documents
- Admin Console: full system management and monitoring
- Multi-auth support: username/password, CAS SSO, JWT
- Role-based access control: fine-grained permissions
- Analytics & insights: usage stats and trends
- System health monitoring: real-time status
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ nexcode_cli โ โ nexcode_web โ โ nexcode_admin โ
โ (Command Line) โ โ (Web UI) โ โ (Admin Panel) โ
โโโโโโโโโโโฌโโโโโโโโ โโโโโโโโโโโฌโโโโโโโโ โโโโโโโโโโโฌโโโโโโโโ
โ โ โ
โโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโ
โ nexcode_server โ
โ (FastAPI) โ
โโโโโโโโโโโฌโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโ
โ DB & LLMs โ
โ (SQLite/OpenAI) โ
โโโโโโโโโโโโโโโโโโโ
# 1) Clone the project
git clone https://github.com/your-org/nexcode.git
cd nexcode
# 2) Start all services
cd docker
docker-compose up -d
# 3) Access services
# Web: http://localhost:3000
# Admin: http://localhost:5433
# API Docs: http://localhost:8000/docsExpand detailed steps
cd nexcode_server
pip install -r requirements_server.txt
# Initialize DB
python scripts/init_db.py
# Start server
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000cd nexcode_web
npm install
npm run dev
# Visit: http://localhost:3000cd nexcode_admin
npm install
npm run dev
# Visit: http://localhost:5433cd nexcode_cli
pip install -e .
# Configure CLI
nexcode config set api_server.url "http://localhost:8000"
nexcode config set openai.api_key "your-openai-api-key"# Code quality checks
nexcode check # check current changes
nexcode check --files src/main.py # check specific files
# Smart commits
nexcode commit # generate and commit
nexcode commit --dry-run # preview commit message
# Intelligent Q&A
nexcode ask "How to optimize this function?" --files src/utils.py
nexcode ask "Difference between Git rebase and merge?"
# Git error diagnosis
nexcode diagnose # diagnose the last Git error
# Push strategy
nexcode push # get smart push suggestions
nexcode push --dry-run # preview push plan
# Repository analysis
nexcode analyze --type overview # project overview
nexcode analyze --type structure # structure analysis
nexcode analyze --type dependencies # dependency analysisVisit http://localhost:3000 with default accounts:
- Demo:
demo/demo123 - Admin:
admin/admin123
Key features:
- Dual-mode AI chat: built-in assistant + OpenAI GPT
- Runtime tunables: switch model, temperature, max tokens
- Contextual conversation: multi-turn with history
- Responsive design: desktop and mobile friendly
Visit http://localhost:5433
Highlights:
- System dashboard: status, performance, resource usage
- User management: accounts, roles, API keys
- Analytics: commit stats, quality trends, user activity
- System settings: global configs, CAS, security
- API monitoring: usage stats, latency, errors
import openai
# Use NexCode as a drop-in replacement
client = openai.OpenAI(
api_key="your-openai-api-key",
base_url="http://localhost:8000/v1"
)
response = client.chat.completions.create(
model="gpt-3.5-turbo",
messages=[{"role": "user", "content": "Hello, NexCode!"}]
)- Code Review based on Git diff
- Commit Message Generation
- Git Error Analysis
- Code Quality Check
- Intelligent Q&A (Git, code, workflow)
- Push Strategy Analysis
- Repository Analysis
- CLI, Web Chat UI, Admin Panel, Responsive UI
- Auth (multi-methods), RBAC, Usage Analytics
- OpenAI Compatibility Layer, Dockerized deployment
- Environment variables
- CLI config system (local & global)
- TOML-based prompt templates
- Multiple model providers (OpenAI, Azure OpenAI, ...)
-
Real repository analysis (read & analyze project files)
-
RAG Q&A over repository content
-
Context-aware code review with project history
-
Intelligent code completion
-
Test generation (
nexcode test) -
Doc generation (
nexcode doc) -
Code scaffolding (
nexcode generate) -
Refactoring assistant (
nexcode refactor) -
Dependency vulnerability scanning
-
Secrets scanning (
nexcode scan:secrets) -
Coverage reporting
-
Performance profiling
-
GitHub App for PR reviews
-
GitLab integration (webhooks)
-
Jenkins plugin (CI/CD)
-
Automation workflows (rule-based)
-
Collaborative code review
-
Team knowledge base
-
Linting / style enforcement
-
Technical debt tracking
-
Code complexity metrics
-
Architecture dependency analysis
-
Code evolution & hotspots
-
Developer productivity metrics
-
Multimodal understanding (images, diagrams)
-
Natural language programming for complex tasks
-
Smart debugging based on error traces
-
Automated refactoring
-
Plugin system
-
IDE integrations (VSCode, JetBrains)
-
Cloud/SaaS offering
-
Enterprise-scale deployment
- FastAPI (Python)
- SQLAlchemy, Alembic, Pydantic
- PostgreSQL/SQLite
- Next.js 14, React 18, TypeScript
- Tailwind CSS, Zustand, Framer Motion
- Click, GitPython, Rich, PyYAML
- OpenAI API, LangChain, Tiktoken, Jinja2
Environment variables (examples):
# OpenAI settings
OPENAI_API_KEY=sk-...
OPENAI_API_BASE=https://api.openai.com/v1
OPENAI_MODEL=gpt-3.5-turbo
# Database
DATABASE_URL=sqlite:///./nexcode.db
# Server
HOST=0.0.0.0
PORT=8000
DEBUG=false
# Auth
REQUIRE_AUTH=false
JWT_SECRET_KEY=your-secret-key
CAS_SERVER_URL=https://cas.example.comCLI config:
# View configs
nexcode config list
nexcode config get openai.api_key
# Set configs
nexcode config set openai.api_key "sk-..."
nexcode config set api_server.url "http://localhost:8000"
nexcode config set model.temperature 0.7
# Reset configs
nexcode config reset# 1) Clone
git clone https://github.com/your-org/nexcode.git
cd nexcode
# 2) Env
cp docker/.env.example docker/.env
# edit docker/.env
# 3) Start
cd docker
docker-compose up -d
# 4) Status
docker-compose ps
docker-compose logs -fExpand detailed steps
Backend:
cd nexcode_server
pip install -r requirements_server.txt
# Env
export OPENAI_API_KEY="your-key"
export DATABASE_URL="postgresql://user:pass@localhost/nexcode"
# Init DB
python scripts/init_db.py
# Run
uvicorn app.main:app --host 0.0.0.0 --port 8000Web:
cd nexcode_web
npm install
npm run build
# serve the build with nginx or any static serverAdmin:
cd nexcode_admin
npm install
npm run build
# serve the build with a static serverHealth checks:
curl http://localhost:8000/health
curl http://localhost:8000/health/detailedLogs:
docker-compose logs -f nexcode_server
# or a specific time window
docker-compose logs --since="2024-01-01" nexcode_serverWe welcome all kinds of contributions!
Workflow:
- Fork the repo
- Create a branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'feat: add amazing feature' - Push branch:
git push origin feature/amazing-feature - Open a Pull Request
Guidelines:
- Follow existing code style
- Add appropriate test coverage
- Update relevant docs
- Use Conventional Commits
Apache License. See LICENSE.
Thanks to these awesome projects and communities:
- OpenAI โ LLM capabilities
- FastAPI โ high-performance web framework
- Next.js โ excellent React framework
- Click โ Python CLI framework
- Ant Design โ enterprise-grade UI components
- Project: https://github.com/your-org/nexcode
- Docs: https://nexcode.dev
- Issues: https://github.com/your-org/nexcode/issues
- Discussions: https://github.com/your-org/nexcode/discussions
NexCode Team โ Empower every line of code with AI
โญ If you find this project helpful, please give us a star!
