imuii
v0.6.0
Published
IM-UII CLI - Modern CLI tool for initializing Next.js and Vite projects with automatic Git integration, deployment setup, and project management. Create new projects from templates or add IM-UII to existing projects with smart detection.
Maintainers
Keywords
Readme
IM-UII CLI
CLI tool untuk menginisialisasi project IM-UII dan mendaftarkan project ke server.
Instalasi
Global Install (Recommended)
npm install -g imuiiAtau gunakan npx (tidak perlu install)
npx imuii initCommands
IM-UII CLI menyediakan berbagai commands untuk mengelola project:
imuii check # Check prerequisites (account & Git setup) ⭐ NEW
imuii init # Initialize new project or add to existing
imuii login # Login to IM-UII CLI
imuii logout # Logout from IM-UII CLI
imuii whoami # Show current logged in user
imuii status # Show project status
imuii update # Update project configuration
imuii config view # View configuration file
imuii config validate # Validate configuration
imuii git sync # Sync with remote repository
imuii git status # Show Git status
imuii git pull # Pull from remoteLihat COMMANDS.md untuk dokumentasi lengkap semua commands.
Penggunaan
Inisialisasi Project
CLI mendukung 2 skenario:
1. Project Baru - Buat project dari template
imuii init
# CLI akan tanya: "What type of project?"
# Pilih: "Create new project from template"
# Pilih template yang diinginkan
# CLI akan buat project baru dengan template yang dipilih2. Project Existing - Tambahkan IM-UII ke project yang sudah ada
imuii init
# CLI akan otomatis deteksi project existing
# CLI akan tambahkan imuii.json ke project yang sudah adaTemplate yang Disupport
Frontend Frameworks:
- Next.js (React + TypeScript/JavaScript)
- Vite + React (TypeScript/JavaScript)
Backend Frameworks:
- Node.js + Express
- Node.js + TypeScript
Proses Setup
CLI akan:
- Mendeteksi project type (baru vs existing)
- Project Baru: Auto-detect framework & language dari template
- Project Existing: Auto-detect framework & language dari project
- Meminta input dari user untuk konfigurasi
- Membuat file
imuii.json - Mendaftarkan project ke server IM-UII (dengan fallback mode jika server tidak bisa diakses)
- Git Integration: Setup Git repository dengan secret key dari server
- Remote Connection: Connect ke repository URL dari server
- Mencoba set GitHub secret otomatis (jika tersedia)
Environment Variables
# Production (default)
export IMUII_API_URL=https://api.imuii.id
export IMUII_API_TOKEN=your_token_here
# Development (override jika diperlukan)
export IMUII_API_URL=http://localhost:8080
export IMUII_API_TOKEN=your_token_hereKonfigurasi
File imuii.json akan dibuat dengan struktur:
{
"name": "my-project",
"framework": "nextjs",
"language": "typescript",
"buildCommand": "npm install && npm run build",
"startCommand": "npm start",
"domain": "my-project",
"email": "[email protected]"
}Requirements
- Node.js 16+
- Git (untuk Git integration)
- GitHub CLI (
gh) untuk set secret otomatis (opsional) - Akses ke server IM-UII
Git Integration
CLI secara otomatis mengintegrasikan Git workflow:
✅ Automatic Git Setup
- Initialize Git repository
- Create initial commit
- Setup environment variables (.env)
- Connect to remote repository dari server
- Configure Git secrets
🔧 Git Workflow
# CLI akan otomatis:
git init
git add .
git commit -m "Initial commit"
git remote add origin https://github.com/Lab-Sisjarkom-IMUII/your-project.git
git push -u origin main🔐 Secret Management
# Environment variables (.env)
IMUII_SECRET=imuii_9132748520d28439e9dcc186e7ab1a2d92f455d8a87fd9f717c0b825032cd761
IMUII_PROJECT_ID=your-projectDevelopment
# Install dependencies
npm install
# Link untuk testing lokal
npm link
# Test di project lain
cd /path/to/your/project
imuii initPublish
# Login ke npm
npm login
# Publish
npm publish --access publicDokumentasi
- README.md - Getting started (file ini)
- CLI-DOCUMENTATION.md - Dokumentasi lengkap CLI (untuk web documentation)
- WEB-DOCUMENTATION-SUMMARY.md - Summary untuk web team
- COMMANDS.md - Complete command reference
- USAGE.md - Detailed usage guide
- API.md - API integration documentation
- TEMPLATES.md - Template documentation
License
MIT
