npm package: @hubspire/hubai
Description: AI-powered command-line interface (CLI) developed by HubSpire.
Author: sijeeshmiziha
Latest version: 0.2.85

# HubAI ⚡ AI-Driven Development

[![HUB_AI](https://hubai.s3.us-east-1.amazonaws.com/hubai-tonystark.jpeg)](https://hubai.s3.us-east-1.amazonaws.com/0429.mp4)

> Revolutionize your development workflow with HubAI, an innovative npm package leveraging artificial intelligence to simplify the creation and deployment of robust fullstack applications. Generate sophisticated applications with minimal effort, focusing on innovation rather than intricate technical details. With HubAI, you only need to provide a few prompts, and the package takes care of the heavy lifting.

Whether you're an experienced developer aiming for accelerated project timelines or a newcomer eager to explore fullstack development, HubAI empowers you to bring your ideas to life with ease.

## 📖 HubAI Documentation

### Overview ✨

HubAI is a next-generation code generation platform built for real-world software teams.
It enables predictable, scalable, and human-readable code generation for both frontend and backend systems.

HubAI automates the repetitive parts of software development while ensuring the code remains maintainable, understandable, and ready for long-term scaling.

Unlike traditional AI coding tools that act as black boxes, HubAI puts developers fully in control of their codebases.

### Why HubAI? 🤔

**Problems with Existing AI Coding Tools:**

- 💨 **Speed without stability**: 14% productivity boost, but a 7.2% drop in delivery stability (Google Cloud DORA Report 2024).
- 💰 **Efficiency hiding technical debt**: Up to 8x increase in code duplication (2024 market reports).
- ⏳ **Labor savings, but higher maintenance costs**: Short-term savings are offset by long-term bug-fixing overhead.

**Root causes:**

- 🔒 Black-box outputs.
- 🧩 Lack of workflow integration.
- 📈 Poor scalability and readability.

### Key Principles Behind HubAI 🎯

| Principle                   | How HubAI Approaches It                                         |
| --------------------------- | --------------------------------------------------------------- |
| **Predictability**          | Generates clear, human-readable code following strict patterns. |
| **Scalability**             | Microservice-ready structure with Apollo Federation.            |
| **Developer Control**       | Full transparency — no hidden abstractions or black boxes.      |
| **Best Practices Built-in** | Security, scalability, environment setups, testing integrated.  |
| **Workflow Integration**    | Dev, test, and deploy integrated into generated structures.     |

### ✨ What HubAI Generates

**NPM Workspace**

- 📦 Quickly set up a complete development environment
- 🏗️ MonoRepo & Microservice Architecture

**Backend:**

- 🏗️ Pre-built project structures.
- ⚙️ CRUD APIs.
- 🛡️ Secure authentication layers.
- 🌳 Environment management with `.envrc` and `direnv`.
- 🌐 GraphQL schemas and Apollo Federation setup.
- 🍃 Uses MongoDB as your data source out of the box

**Frontend:**

- ⚛️ Modular React UI components.
- 🔗 Service and API integration hooks.
- 📝 Auto-connected forms and UI elements based on backend schemas.

**Integration Layer:**

- ↔️ Seamless API bindings between frontend and backend.
- 🔌 Service adapters and API consumers.

### 🏛️ Architecture Philosophy

HubAI is designed around real-world scalable architecture patterns, including:

- 🌐 Apollo Federation for scalable microservices.
- 📦 Nx monorepo management.
- 🐳 Docker containerization for consistent dev environments.
- ✅ Automated Testing built into CI/CD pipelines.

### ✅ Benefits of Using HubAI

| Benefit                   | Description                                                     |
| ------------------------- | --------------------------------------------------------------- |
| **Accelerated MVPs**      | 4x–5x faster MVP development cycles.                            |
| **Stability and Quality** | Reduced integration bugs, clean QA processes integrated.        |
| **Cost-Effective Growth** | Enterprises save millions in dev hours and maintenance cycles.  |
| **Predictable Scaling**   | Codebases designed for team scaling from day one.               |
| **Developer Happiness**   | Transparent, editable, high-quality code generation experience. |

### 🛠️ Developer Workflow with HubAI

1. **Define Requirements**: Developers specify feature intents via prompts and structure templates.
2. **Backend Generation**: HubAI auto-generates scalable backend services, APIs, models, and infrastructure configs.
3. **Frontend Generation**: HubAI builds corresponding frontend UIs, forms, and integration layers automatically.
4. **Code Refinement**: Developers use editors like Cursor to refine, extend, or adjust the generated code — fully editable.
5. **Testing & Deployment**: Out-of-the-box testing suites and DevOps workflows ensure fast, safe deployments.

## 🚀 Getting Started

```bash
# Install HubAI globally
npm i @hubspire/hubai -g

# Set an LLM token (interactive: OpenAI, Claude, or Gemini)
hubi token

# Quick start: full Project Wizard (creates workspace, backend, and optional frontend)
hubi create:project

# Or manual flow ↓
# Create a new workspace
hubi create:workspace my-workspace
cd my-workspace

# Generate applications
# Frontend (Vite)
hubi create:app app-web -t vite
# Backend (Apollo GraphQL)
hubi create:app app-main -t apollo
# Express server
hubi create:app app-api -t express
# Serverless
hubi create:app app-sls -t serverless
# Subgraph (Apollo Federation)
hubi create:app app-users -t subgraph
# Gateway (Apollo Federation)
hubi create:app app-gateway -t gateway
# E2E Testing (Cypress)
hubi create:app app-web-e2e -t cypress

# Follow the interactive prompts to create your project
```

## 💡 HubAI is not just another AI coding tool.

It is a scalable, predictable, and developer-first platform designed to transform how modern teams build software.
Whether you're building an MVP or scaling a large product, HubAI empowers you with:

- 🛠️ Clean codebases
- 🔒 Secure infrastructure
- 🎛️ Full control over your stack
- 🚀 Faster delivery

Start building smarter with HubAI today! ⚡ 💻

---

### 📄 License

HubAI is open-source software licensed under the [MIT license](LICENSE).

---

## ✨ Show Your Support

If you find HubAI helpful, please give it a star on GitHub and share it with your friends!

Together, let's Build cool stuff. Spread good vibes. ⚡🌟

Made with ❤️ by the Hubspire team!

---