galaxy-code 0.1.3 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +149 -600
- package/dist/app.d.ts +1 -1
- package/dist/app.js +5 -5
- package/dist/cli.js +4 -4
- package/dist/cli.min.js +589 -0
- package/dist/{node_modules/@workspace/agent-core/connections → connections}/claude.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/connections → connections}/claude.js +43 -10
- package/dist/{node_modules/@workspace/agent-core/connections → connections}/gemini.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/connections → connections}/gemini.js +36 -7
- package/dist/{node_modules/@workspace/agent-core/connections → connections}/index.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/connections → connections}/index.js +0 -1
- package/dist/{node_modules/@workspace/agent-core/connections → connections}/ollama.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/connections → connections}/ollama.js +12 -3
- package/dist/{node_modules/@workspace/agent-core/connections → connections}/types.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/connections → connections}/types.js +0 -1
- package/dist/{node_modules/@workspace/agent-core/prompts → prompts}/ba-it-analyzer.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/prompts → prompts}/ba-it-analyzer.js +0 -1
- package/dist/{node_modules/@workspace/agent-core/prompts → prompts}/index.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/prompts → prompts}/index.js +0 -1
- package/dist/{node_modules/@workspace/agent-core/prompts → prompts}/orchestrator.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/prompts → prompts}/orchestrator.js +0 -1
- package/dist/{node_modules/@workspace/agent-core/prompts → prompts}/planning-agent.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/prompts → prompts}/planning-agent.js +0 -1
- package/dist/{node_modules/@workspace/agent-core/prompts → prompts}/universal-agent.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/prompts → prompts}/universal-agent.js +0 -1
- package/dist/{node_modules/@workspace/agent-core/providers → providers}/agent-selector.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/providers → providers}/agent-selector.js +27 -19
- package/dist/{node_modules/@workspace/agent-core/providers → providers}/claude-agent.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/providers → providers}/claude-agent.js +46 -32
- package/dist/{node_modules/@workspace/agent-core/providers → providers}/gemini-agent.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/providers → providers}/gemini-agent.js +58 -34
- package/dist/{node_modules/@workspace/agent-core/providers → providers}/index.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/providers → providers}/index.js +0 -1
- package/dist/{node_modules/@workspace/agent-core/providers → providers}/ollama-agent.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/providers → providers}/ollama-agent.js +63 -34
- package/dist/{node_modules/@workspace/agent-core/providers → providers}/orchestrator.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/providers → providers}/orchestrator.js +31 -17
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/ba-it-analyzer.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/ba-it-analyzer.js +12 -3
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/code-generate-agent.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/code-generate-agent.js +12 -3
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/command-runner.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/command-runner.js +0 -1
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/document-parser.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/document-parser.js +0 -1
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/file-operations.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/file-operations.js +4 -3
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/galaxy-ui-integration.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/galaxy-ui-integration.js +1 -2
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/git-operations.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/git-operations.js +0 -1
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/index.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/index.js +0 -1
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/planning-agent.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/planning-agent.js +12 -3
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/progress-reporter.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/progress-reporter.js +8 -2
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/registry.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/registry.js +54 -10
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/tool-event-emitter.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/tool-event-emitter.js +0 -1
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/types.d.ts +0 -1
- package/dist/tools/types.js +1 -0
- package/dist/types.d.ts +1 -1
- package/dist/{node_modules/@workspace/agent-core/utils → utils}/config-manager.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/utils → utils}/config-manager.js +22 -3
- package/dist/{node_modules/@workspace/agent-core/utils → utils}/devtools.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/utils → utils}/devtools.js +2 -3
- package/dist/{node_modules/@workspace/agent-core/utils → utils}/message-formatters.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/utils → utils}/message-formatters.js +0 -1
- package/dist/{node_modules/@workspace/agent-core/utils → utils}/progress-tracker.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/utils → utils}/progress-tracker.js +12 -3
- package/package.json +14 -11
- package/dist/node_modules/@workspace/agent-core/connections/claude.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/connections/claude.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/connections/gemini.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/connections/gemini.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/connections/index.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/connections/index.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/connections/ollama.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/connections/ollama.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/connections/types.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/connections/types.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/index.d.ts +0 -13
- package/dist/node_modules/@workspace/agent-core/index.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/index.js +0 -22
- package/dist/node_modules/@workspace/agent-core/index.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/package.json +0 -53
- package/dist/node_modules/@workspace/agent-core/prompts/ba-it-analyzer.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/prompts/ba-it-analyzer.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/prompts/index.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/prompts/index.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/prompts/orchestrator.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/prompts/orchestrator.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/prompts/planning-agent.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/prompts/planning-agent.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/prompts/universal-agent.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/prompts/universal-agent.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/providers/agent-selector.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/providers/agent-selector.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/providers/claude-agent.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/providers/claude-agent.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/providers/gemini-agent.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/providers/gemini-agent.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/providers/index.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/providers/index.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/providers/ollama-agent.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/providers/ollama-agent.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/providers/orchestrator.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/providers/orchestrator.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/ba-it-analyzer.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/ba-it-analyzer.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/code-generate-agent.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/code-generate-agent.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/command-runner.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/command-runner.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/document-parser.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/document-parser.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/file-operations.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/file-operations.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/galaxy-ui-integration.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/galaxy-ui-integration.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/git-operations.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/git-operations.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/index.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/index.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/planning-agent.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/planning-agent.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/progress-reporter.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/progress-reporter.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/registry.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/registry.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/tool-event-emitter.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/tool-event-emitter.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/types.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/types.js +0 -2
- package/dist/node_modules/@workspace/agent-core/tools/types.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/types.d.ts +0 -40
- package/dist/node_modules/@workspace/agent-core/types.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/types.js +0 -9
- package/dist/node_modules/@workspace/agent-core/types.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/utils/config-manager.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/utils/config-manager.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/utils/devtools.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/utils/devtools.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/utils/message-formatters.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/utils/message-formatters.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/utils/progress-tracker.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/utils/progress-tracker.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,679 +1,228 @@
|
|
|
1
|
-
# 🌌 Galaxy
|
|
1
|
+
# 🌌 Galaxy Code
|
|
2
2
|
|
|
3
|
-
**AI
|
|
3
|
+
**AI-Powered Coding Assistant** - An intelligent CLI tool that helps you build, analyze, and enhance your software projects with AI.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/galaxy-code)
|
|
6
|
+
[](https://github.com/buikevin/galaxy-code/blob/main/LICENSE)
|
|
7
|
+
[](https://galaxy-code-cli.vercel.app)
|
|
6
8
|
|
|
7
|
-
##
|
|
9
|
+
## 🚀 Quick Start
|
|
8
10
|
|
|
9
|
-
|
|
10
|
-
>
|
|
11
|
-
> Galaxy CLI hiện đang trong giai đoạn phát triển và thử nghiệm Alpha. Phiên bản chính thức (stable release) sẽ được công bố trong tương lai khi dự án đã hoàn thiện và được kiểm thử kỹ lưỡng.
|
|
12
|
-
>
|
|
13
|
-
> **Lưu ý:**
|
|
14
|
-
> - ⚠️ Dự án chưa được public trên GitHub hay các kho package registry
|
|
15
|
-
> - 🔄 API và cấu trúc có thể thay đổi trong quá trình phát triển
|
|
16
|
-
> - ⛔ Không khuyến nghị sử dụng cho môi trường production hiện tại
|
|
17
|
-
>
|
|
18
|
-
> **Để cập nhật thông tin về phiên bản chính thức:**
|
|
19
|
-
> - 📧 Email: kevinbui210191@gmail.com / hieubt2@msb.com.vn
|
|
20
|
-
> - 📱 Theo dõi repository để nhận thông báo khi project được public
|
|
11
|
+
Install Galaxy Code globally:
|
|
21
12
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
## 📋 Mục lục
|
|
25
|
-
|
|
26
|
-
- [Giới thiệu](#giới-thiệu)
|
|
27
|
-
- [Công nghệ sử dụng](#công-nghệ-sử-dụng)
|
|
28
|
-
- [Kiến trúc hệ thống](#kiến-trúc-hệ-thống)
|
|
29
|
-
- [Luồng hoạt động](#luồng-hoạt-động)
|
|
30
|
-
- [Cài đặt](#cài-đặt)
|
|
31
|
-
- [Sử dụng](#sử-dụng)
|
|
32
|
-
- [AI Models & Vai trò](#ai-models--vai-trò)
|
|
33
|
-
- [Danh sách Tools](#danh-sách-tools)
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
|
|
37
|
-
## 🎯 Giới thiệu
|
|
38
|
-
|
|
39
|
-
**Galaxy CLI** là công cụ AI pair programming mạnh mẽ được xây dựng với:
|
|
40
|
-
|
|
41
|
-
- **Giao diện CLI hiện đại** sử dụng Ink (React for CLI)
|
|
42
|
-
- **Multi-AI orchestration** với Gemini 2.5 Flash làm trung tâm điều phối
|
|
43
|
-
- **27+ công cụ chuyên biệt** cho file operations, git, testing, document parsing
|
|
44
|
-
- **Intelligent planning** với qwen3-coder:480b-cloud
|
|
45
|
-
- **Business Analysis** với gpt-oss:120b-cloud
|
|
46
|
-
|
|
47
|
-
## 🛠 Công nghệ sử dụng
|
|
48
|
-
|
|
49
|
-
### Frontend CLI
|
|
50
|
-
|
|
51
|
-
- **Ink** - React cho terminal, render component như web app
|
|
52
|
-
- **ink-spinner** - Loading animations (dots, arc, etc.)
|
|
53
|
-
- **figlet** - ASCII art banner
|
|
54
|
-
- **TypeScript** - Type safety
|
|
55
|
-
|
|
56
|
-
### AI & LLM Stack
|
|
57
|
-
|
|
58
|
-
- **Google Gemini 2.5 Flash** - Orchestrator chính, tool calling
|
|
59
|
-
- **Ollama Models**:
|
|
60
|
-
- `gpt-oss:120b-cloud` - Business Analysis & Requirements
|
|
61
|
-
- `qwen3-coder:480b-cloud` - Code generation & Planning
|
|
62
|
-
|
|
63
|
-
### Tools & Utilities
|
|
64
|
-
|
|
65
|
-
- **Bun** - Fast runtime và package manager
|
|
66
|
-
- **PDF/DOCX/XLSX parsers** - Document analysis
|
|
67
|
-
- **Node.js child_process** - Command execution
|
|
68
|
-
- **Git CLI integration** - Version control
|
|
69
|
-
|
|
70
|
-
---
|
|
71
|
-
|
|
72
|
-
## 🏗 Kiến trúc hệ thống
|
|
73
|
-
|
|
74
|
-
```
|
|
75
|
-
┌─────────────────────────────────────────────┐
|
|
76
|
-
│ Galaxy CLI (Ink React App) │
|
|
77
|
-
│ - User Input với autocomplete │
|
|
78
|
-
│ - Spinner loading states │
|
|
79
|
-
│ - Figlet banner │
|
|
80
|
-
└─────────────────┬───────────────────────────┘
|
|
81
|
-
│
|
|
82
|
-
▼
|
|
83
|
-
┌─────────────────────────────────────────────┐
|
|
84
|
-
│ Gemini 2.5 Flash (Orchestrator) │
|
|
85
|
-
│ - Tool calling & function execution │
|
|
86
|
-
│ - Plan execution & todos display │
|
|
87
|
-
│ - Multi-language support (EN/VI) │
|
|
88
|
-
└─────────────────┬───────────────────────────┘
|
|
89
|
-
│
|
|
90
|
-
┌─────────┴─────────────┐
|
|
91
|
-
│ │
|
|
92
|
-
▼ ▼
|
|
93
|
-
┌───────────────┐ ┌──────────────────┐
|
|
94
|
-
│ BA Analyzer │ │ Planning Agent │
|
|
95
|
-
│ gpt-oss:120b │ │ qwen3-coder:480b │
|
|
96
|
-
│ │ │ Feature-driven │
|
|
97
|
-
└───────────────┘ └──────────────────┘
|
|
98
|
-
│ │
|
|
99
|
-
│ ▼
|
|
100
|
-
│ ┌──────────────────────┐
|
|
101
|
-
│ │ Execution Plan │
|
|
102
|
-
│ │ - Feature steps │
|
|
103
|
-
│ │ - Tool selection │
|
|
104
|
-
│ └──────────────────────┘
|
|
105
|
-
│ │
|
|
106
|
-
└───────────┬───────────┘
|
|
107
|
-
▼
|
|
108
|
-
┌───────────────────────────┐
|
|
109
|
-
│ Code Generate Agent │
|
|
110
|
-
│ qwen3-coder:480b-cloud │
|
|
111
|
-
│ │
|
|
112
|
-
│ ┌─────────────────────┐ │
|
|
113
|
-
│ │ Integrated Tools: │ │
|
|
114
|
-
│ │ - file_write │ │
|
|
115
|
-
│ │ - file_read │ │
|
|
116
|
-
│ │ - command_run │ │
|
|
117
|
-
│ │ - file_search │ │
|
|
118
|
-
│ └─────────────────────┘ │
|
|
119
|
-
│ │
|
|
120
|
-
│ Output: {step, status, │
|
|
121
|
-
│ message, filesCreated} │
|
|
122
|
-
└───────────────────────────┘
|
|
123
|
-
│
|
|
124
|
-
▼
|
|
125
|
-
┌───────────────────────────┐
|
|
126
|
-
│ Tool Registry (28 tools) │
|
|
127
|
-
│ │
|
|
128
|
-
│ 📁 File 🔧 Command │
|
|
129
|
-
│ 🔀 Git 📝 Document │
|
|
130
|
-
│ 🧪 Test 🔍 Search │
|
|
131
|
-
└───────────────────────────┘
|
|
13
|
+
```bash
|
|
14
|
+
npm install -g galaxy-code
|
|
132
15
|
```
|
|
133
16
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
**Trước đây** (Multi-agent):
|
|
137
|
-
|
|
138
|
-
- 11 agents riêng biệt
|
|
139
|
-
- Phức tạp, khó maintain
|
|
140
|
-
- Nhiều context switching
|
|
141
|
-
|
|
142
|
-
**Hiện tại** (Feature-Driven):
|
|
17
|
+
Or run directly with npx:
|
|
143
18
|
|
|
144
|
-
|
|
145
|
-
-
|
|
146
|
-
- BA Analyzer (gpt-oss) - Requirements analysis
|
|
147
|
-
- Planning Agent (qwen3-coder) - Feature-based planning
|
|
148
|
-
- Code Generate Agent (qwen3-coder) - Self-contained executor
|
|
149
|
-
- 28 focused tools
|
|
150
|
-
- Feature-driven execution (1 feature = 1 step)
|
|
151
|
-
|
|
152
|
-
---
|
|
153
|
-
|
|
154
|
-
## 🔄 Luồng hoạt động
|
|
155
|
-
|
|
156
|
-
### 1️⃣ **Analyze Existing Project**
|
|
157
|
-
|
|
158
|
-
```
|
|
159
|
-
User: "Phân tích dự án này"
|
|
160
|
-
│
|
|
161
|
-
├─> file_tree(cwd) → Lấy cấu trúc thư mục
|
|
162
|
-
├─> file_read(package.json, README) → Đọc tech stack
|
|
163
|
-
└─> Trả về phân tích toàn diện
|
|
19
|
+
```bash
|
|
20
|
+
npx galaxy-code
|
|
164
21
|
```
|
|
165
22
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
---
|
|
23
|
+
## 📚 Documentation
|
|
169
24
|
|
|
170
|
-
|
|
25
|
+
Comprehensive documentation is available at: [https://galaxy-code-cli.vercel.app](https://galaxy-code-cli.vercel.app)
|
|
171
26
|
|
|
172
|
-
|
|
173
|
-
User: "Tạo app Next.js e-commerce"
|
|
174
|
-
│
|
|
175
|
-
├─> 🔍 ba_it_analyze(userRequest, context)
|
|
176
|
-
│ ↓
|
|
177
|
-
│ ┌─────────────────────────────────────┐
|
|
178
|
-
│ │ BA Analysis Result (English) │
|
|
179
|
-
│ │ - projectName │
|
|
180
|
-
│ │ - type: "create_project" │
|
|
181
|
-
│ │ - coreFeatures: [...] │
|
|
182
|
-
│ │ - technicalStack: {...} │
|
|
183
|
-
│ │ - estimatedDevelopmentTime │
|
|
184
|
-
│ │ - recommendations: [...] │
|
|
185
|
-
│ │ - questionsForUser: [...] │
|
|
186
|
-
│ └─────────────────────────────────────┘
|
|
187
|
-
│ ↓
|
|
188
|
-
├─> 📊 PRESENT to User (Vietnamese/English)
|
|
189
|
-
│
|
|
190
|
-
│ 📊 **Phân tích dự án**: Next.js E-commerce
|
|
191
|
-
│ 💡 **Mô tả**: Ứng dụng thương mại điện tử...
|
|
192
|
-
│
|
|
193
|
-
│ **✨ Tính năng chính**:
|
|
194
|
-
│ - Catalog sản phẩm
|
|
195
|
-
│ - Giỏ hàng
|
|
196
|
-
│ - Thanh toán (Stripe)
|
|
197
|
-
│ ...
|
|
198
|
-
│
|
|
199
|
-
│ Bạn đồng ý phương án này?
|
|
200
|
-
│
|
|
201
|
-
│ ↓
|
|
202
|
-
├─> ⏸️ WAIT for user confirmation
|
|
203
|
-
│ ↓
|
|
204
|
-
├─> ✅ User: "Đồng ý, làm đi"
|
|
205
|
-
│ ↓
|
|
206
|
-
├─> 📋 plan_task(userContext, baAnalysis)
|
|
207
|
-
│ ↓
|
|
208
|
-
│ ┌─────────────────────────────────────────────┐
|
|
209
|
-
│ │ Feature-Driven Plan │
|
|
210
|
-
│ │ { │
|
|
211
|
-
│ │ summary: "Build e-commerce with 3 features",│
|
|
212
|
-
│ │ steps: [ │
|
|
213
|
-
│ │ {step: 1, tool: "command_run", │
|
|
214
|
-
│ │ action: "Init Next.js"}, │
|
|
215
|
-
│ │ {step: 2, tool: "install_dependencies"},│
|
|
216
|
-
│ │ {step: 3, tool: "code_generate", │
|
|
217
|
-
│ │ featureName: "Product Catalog", │
|
|
218
|
-
│ │ featureDescription: "...", │
|
|
219
|
-
│ │ priority: "must-have"}, │
|
|
220
|
-
│ │ {step: 4, tool: "code_generate", │
|
|
221
|
-
│ │ featureName: "Shopping Cart"}, │
|
|
222
|
-
│ │ {step: 5, tool: "code_generate", │
|
|
223
|
-
│ │ featureName: "Checkout"} │
|
|
224
|
-
│ │ ], │
|
|
225
|
-
│ │ estimatedTime: "long" │
|
|
226
|
-
│ │ } │
|
|
227
|
-
│ └─────────────────────────────────────────────┘
|
|
228
|
-
│ ↓
|
|
229
|
-
├─> 📋 **Present Plan with Todos**:
|
|
230
|
-
│
|
|
231
|
-
│ 📋 Implementation Plan (long):
|
|
232
|
-
│ ☐ Step 1: Initialize Next.js project
|
|
233
|
-
│ ☐ Step 2: Install dependencies
|
|
234
|
-
│ ☐ Step 3: Implement Product Catalog
|
|
235
|
-
│ ☐ Step 4: Implement Shopping Cart
|
|
236
|
-
│ ☐ Step 5: Implement Checkout
|
|
237
|
-
│
|
|
238
|
-
│ ↓
|
|
239
|
-
└─> 🚀 **Execute Steps Sequentially**:
|
|
240
|
-
|
|
241
|
-
Step 1: command_run("npm create next-app...")
|
|
242
|
-
☒ Step 1: Initialize Next.js - Completed
|
|
243
|
-
|
|
244
|
-
Step 2: install_dependencies()
|
|
245
|
-
☒ Step 2: Install dependencies - Installed
|
|
246
|
-
|
|
247
|
-
Step 3: code_generate({
|
|
248
|
-
step: 3,
|
|
249
|
-
featureName: "Product Catalog",
|
|
250
|
-
technicalStack: {...},
|
|
251
|
-
userStories: [...],
|
|
252
|
-
dataModel: [...]
|
|
253
|
-
})
|
|
254
|
-
↓ Code Generate Agent:
|
|
255
|
-
- Generates complete code
|
|
256
|
-
- Writes files: components/, api/, types/
|
|
257
|
-
- Returns: {step: 3, status: 'done', filesCreated: [...]}
|
|
258
|
-
☒ Step 3: Product Catalog - Created 5 files
|
|
259
|
-
|
|
260
|
-
Step 4: code_generate(Shopping Cart)
|
|
261
|
-
☒ Step 4: Shopping Cart - Created 3 files
|
|
262
|
-
|
|
263
|
-
Step 5: code_generate(Checkout)
|
|
264
|
-
☒ Step 5: Checkout - Created 4 files
|
|
265
|
-
|
|
266
|
-
✅ All steps completed! Created 12 files total.
|
|
267
|
-
```
|
|
27
|
+
## 🎯 What is Galaxy Code?
|
|
268
28
|
|
|
269
|
-
|
|
29
|
+
Galaxy Code is an AI-powered coding assistant that helps developers:
|
|
270
30
|
|
|
271
|
-
|
|
31
|
+
- **Create new projects** from scratch with AI planning
|
|
32
|
+
- **Analyze existing projects** to understand codebase structure
|
|
33
|
+
- **Add features** to existing applications intelligently
|
|
34
|
+
- **Generate production-ready code** with best practices
|
|
35
|
+
- **Manage development workflow** with integrated tools
|
|
272
36
|
|
|
273
|
-
|
|
274
|
-
User: "Thêm authentication vào app"
|
|
275
|
-
│
|
|
276
|
-
├─> 🔍 ba_it_analyze(userRequest, context)
|
|
277
|
-
│ │ type: "update_project"
|
|
278
|
-
│ ↓
|
|
279
|
-
├─> 📊 Present analysis
|
|
280
|
-
│ ↓
|
|
281
|
-
├─> 📋 plan_task(userContext, baAnalysis)
|
|
282
|
-
│ │ → Skip project setup
|
|
283
|
-
│ │ → Focus on feature implementation
|
|
284
|
-
│ ↓
|
|
285
|
-
└─> 🚀 Execute steps
|
|
286
|
-
```
|
|
37
|
+
Powered by advanced AI models and a comprehensive toolset, Galaxy Code acts as your AI pair programmer.
|
|
287
38
|
|
|
288
|
-
|
|
39
|
+
## 🛠 AI Model Support
|
|
289
40
|
|
|
290
|
-
|
|
41
|
+
Galaxy Code supports multiple AI providers:
|
|
291
42
|
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
```
|
|
43
|
+
### Claude (Anthropic)
|
|
44
|
+
- **Models**: Claude 3.5 Sonnet, Claude 3.5 Haiku, Claude Opus
|
|
45
|
+
- **Features**: Full tool use support, streaming responses
|
|
46
|
+
- **API Key**: `ANTHROPIC_API_KEY` environment variable
|
|
297
47
|
|
|
298
|
-
|
|
48
|
+
### Gemini (Google)
|
|
49
|
+
- **Models**: Gemini 2.5 Flash and other Gemini models
|
|
50
|
+
- **Features**: Tool calling, planning capabilities
|
|
51
|
+
- **API Key**: `GOOGLE_AI_API_KEY` or `GEMINI_API_KEY` environment variable
|
|
299
52
|
|
|
300
|
-
|
|
53
|
+
### Ollama (Local)
|
|
54
|
+
- **Models**: Any model hosted locally via Ollama
|
|
55
|
+
- **Features**: Privacy-focused, offline development
|
|
56
|
+
- **Setup**: Install Ollama and pull required models
|
|
301
57
|
|
|
302
|
-
|
|
58
|
+
## 🚀 Usage
|
|
303
59
|
|
|
304
|
-
|
|
305
|
-
- **Ollama** với models:
|
|
306
|
-
- `gpt-oss:120b-cloud`
|
|
307
|
-
- `qwen3-coder:480b-cloud`
|
|
308
|
-
- **Google Gemini API Key**
|
|
60
|
+
### Running Galaxy Code
|
|
309
61
|
|
|
310
|
-
|
|
62
|
+
After installation, simply run:
|
|
311
63
|
|
|
312
64
|
```bash
|
|
313
|
-
|
|
314
|
-
bun install
|
|
65
|
+
galaxy-code
|
|
315
66
|
```
|
|
316
67
|
|
|
317
|
-
|
|
68
|
+
Or with npx (no installation required):
|
|
318
69
|
|
|
319
70
|
```bash
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
71
|
+
npx galaxy-code
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### CLI Options (Startup Flags)
|
|
75
|
+
|
|
76
|
+
| Flag | Description | Default |
|
|
77
|
+
| ---------------- | ------------------------------------ | ----------- |
|
|
78
|
+
| `--help` | Show help information | - |
|
|
79
|
+
| `--version` | Display version | - |
|
|
80
|
+
| `--git` | Enable git operations | From config |
|
|
81
|
+
| `--test` | Enable test planning | From config |
|
|
82
|
+
| `--config` | Display current configuration | false |
|
|
83
|
+
| `--reset-config` | Reset configuration to defaults | false |
|
|
84
|
+
| `--dev` | Enable development mode with DevTools| false |
|
|
85
|
+
| `--no-auto-update`| Disable auto-update on startup | false |
|
|
86
|
+
|
|
87
|
+
### In-App Commands
|
|
88
|
+
|
|
89
|
+
While running Galaxy Code, you can use these commands:
|
|
90
|
+
|
|
91
|
+
| Command | Description |
|
|
92
|
+
| -------------------- | ---------------------------------------------- |
|
|
93
|
+
| `/help` | Show available commands |
|
|
94
|
+
| `/exit` | Exit the application |
|
|
95
|
+
| `/clear` | Clear conversation history |
|
|
96
|
+
| `/history` | Show recent inputs (last 10) |
|
|
97
|
+
| `/pwd` | Show current working directory |
|
|
98
|
+
| `/information` | Display system information |
|
|
99
|
+
| `/git true/false` | Enable/disable git operations |
|
|
100
|
+
| `/test true/false` | Enable/disable test planning |
|
|
101
|
+
| `/mode claude/gemini/ollama/manual` | Switch agent mode |
|
|
102
|
+
| `/config` | Open configuration folder |
|
|
324
103
|
|
|
325
|
-
###
|
|
104
|
+
### Example Usage
|
|
326
105
|
|
|
327
106
|
```bash
|
|
328
|
-
|
|
329
|
-
|
|
107
|
+
# Start with default settings
|
|
108
|
+
$ galaxy-code
|
|
330
109
|
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
```bash
|
|
334
|
-
bun run start
|
|
335
|
-
# hoặc
|
|
336
|
-
bun run dev
|
|
337
|
-
```
|
|
110
|
+
# Enable test planning from startup
|
|
111
|
+
$ galaxy-code --test
|
|
338
112
|
|
|
339
|
-
|
|
113
|
+
# Display current configuration
|
|
114
|
+
$ galaxy-code --config
|
|
340
115
|
|
|
341
|
-
|
|
116
|
+
# Reset configuration to defaults
|
|
117
|
+
$ galaxy-code --reset-config
|
|
342
118
|
|
|
343
|
-
|
|
119
|
+
# Enable development mode
|
|
120
|
+
$ galaxy-code --dev
|
|
344
121
|
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
bun run dev
|
|
348
|
-
|
|
349
|
-
# Production mode
|
|
350
|
-
bun run start
|
|
351
|
-
|
|
352
|
-
# Với CLI flags
|
|
353
|
-
bun run start --test # Enable test planning
|
|
354
|
-
bun run start --review # Enable review planning
|
|
355
|
-
bun run start --test --review # Enable both
|
|
356
|
-
bun run start --help # Show help
|
|
357
|
-
bun run start --version # Show version
|
|
122
|
+
# Disable auto-update
|
|
123
|
+
$ galaxy-code --no-auto-update
|
|
358
124
|
```
|
|
359
125
|
|
|
360
|
-
###
|
|
361
|
-
|
|
362
|
-
| Flag | Short | Default | Mô tả |
|
|
363
|
-
| ----------- | ----- | ------- | --------------------------- |
|
|
364
|
-
| `--help` | `-h` | - | Hiển thị trợ giúp |
|
|
365
|
-
| `--version` | `-v` | - | Hiển thị version |
|
|
366
|
-
| `--test` | - | `false` | Enable test planning step |
|
|
367
|
-
| `--review` | - | `false` | Enable review planning step |
|
|
368
|
-
|
|
369
|
-
### Commands (Trong CLI)
|
|
370
|
-
|
|
371
|
-
| Command | Mô tả | Example |
|
|
372
|
-
| -------------- | --------------------------- | ----------------------------------- |
|
|
373
|
-
| `/help` | Hiển thị danh sách lệnh | `/help` |
|
|
374
|
-
| `/exit` | Thoát khỏi Galaxy CLI | `/exit` |
|
|
375
|
-
| `/clear` | Xóa lịch sử hội thoại | `/clear` |
|
|
376
|
-
| `/history` | Xem 10 input gần nhất | `/history` |
|
|
377
|
-
| `/pwd` | Hiển thị thư mục làm việc | `/pwd` |
|
|
378
|
-
| `/information` | Hiển thị thông tin hệ thống | `/information` |
|
|
379
|
-
| `/test` | Toggle test planning | `/test true` hoặc `/test false` |
|
|
380
|
-
| `/review` | Toggle review planning | `/review true` hoặc `/review false` |
|
|
381
|
-
|
|
382
|
-
### Example Usage
|
|
126
|
+
### In-App Command Examples
|
|
383
127
|
|
|
384
128
|
```bash
|
|
385
|
-
#
|
|
386
|
-
>
|
|
129
|
+
# Analyze current project
|
|
130
|
+
> Analyze this project
|
|
387
131
|
|
|
388
|
-
#
|
|
389
|
-
>
|
|
132
|
+
# Create a new Next.js application
|
|
133
|
+
> Create a Next.js e-commerce app with TypeScript
|
|
390
134
|
|
|
391
|
-
#
|
|
392
|
-
>
|
|
135
|
+
# Add authentication to existing project
|
|
136
|
+
> Add JWT authentication to this app
|
|
393
137
|
|
|
394
|
-
#
|
|
395
|
-
>
|
|
138
|
+
# Ask technical questions
|
|
139
|
+
> What are React hooks?
|
|
396
140
|
|
|
397
|
-
#
|
|
141
|
+
# Enable test planning
|
|
398
142
|
> /test true
|
|
399
|
-
✅ Test planning enabled
|
|
400
|
-
|
|
401
|
-
# Kiểm tra thông tin hệ thống
|
|
402
|
-
> /information
|
|
403
|
-
📊 System Information:
|
|
404
|
-
Name: Galaxy CLI
|
|
405
|
-
Version: 2.0.0
|
|
406
|
-
Current Project: /home/user/my-project
|
|
407
|
-
Testing: ON
|
|
408
|
-
Review Code: OFF
|
|
409
|
-
```
|
|
410
|
-
|
|
411
|
-
---
|
|
412
|
-
|
|
413
|
-
## 🤖 AI Models & Vai trò
|
|
414
|
-
|
|
415
|
-
### 1. **Gemini 2.5 Flash** (Orchestrator)
|
|
416
|
-
|
|
417
|
-
- **Vai trò**: Central coordinator & plan executor
|
|
418
|
-
- **Nhiệm vụ**:
|
|
419
|
-
- Tool calling & function execution
|
|
420
|
-
- Plan execution với todos display (☐/☒)
|
|
421
|
-
- Workflow decision making
|
|
422
|
-
- Multi-language response (EN/VI)
|
|
423
|
-
- User interaction & confirmation
|
|
424
|
-
|
|
425
|
-
### 2. **gpt-oss:120b-cloud** (BA Analyzer)
|
|
426
143
|
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
- Phân tích yêu cầu người dùng
|
|
430
|
-
- Xác định features, tech stack, data model
|
|
431
|
-
- Phân loại: `create_project` vs `update_project`
|
|
432
|
-
- Đề xuất recommendations & questions
|
|
433
|
-
- Output: **English only** (internal consistency)
|
|
144
|
+
# Switch to Claude agent
|
|
145
|
+
> /mode claude
|
|
434
146
|
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
- **Vai trò**: Feature-driven planner
|
|
438
|
-
- **Nhiệm vụ**:
|
|
439
|
-
- Map coreFeatures → execution steps
|
|
440
|
-
- 1 must-have feature = 1 code_generate step
|
|
441
|
-
- **Conditional test/review steps** based on CLI flags
|
|
442
|
-
- Chọn tools phù hợp (command_run, install_dependencies, code_generate)
|
|
443
|
-
- Ước lượng thời gian (quick/medium/long)
|
|
444
|
-
- Input: userContext + baAnalysis + system context (test/review flags)
|
|
445
|
-
- Output: **English only** (step array với featureName, tool, reasoning)
|
|
446
|
-
|
|
447
|
-
### 4. **qwen3-coder:480b-cloud** (Code Generate Agent) ✨ NEW
|
|
448
|
-
|
|
449
|
-
- **Vai trò**: Self-contained feature executor
|
|
450
|
-
- **Nhiệm vụ**:
|
|
451
|
-
- Nhận feature spec từ planning step
|
|
452
|
-
- Generate production-ready code (NO placeholders)
|
|
453
|
-
- Tự động write files, run commands
|
|
454
|
-
- Integrated tools: file_write, file_read, command_run, file_search
|
|
455
|
-
- Return: `{step, status: 'done'|'error', message, filesCreated}`
|
|
456
|
-
- **Input**:
|
|
457
|
-
- step, featureName, featureDescription, priority
|
|
458
|
-
- technicalStack, userStories, dataModel, apiEndpoints
|
|
459
|
-
- **Output**: Execution result với file list
|
|
460
|
-
|
|
461
|
-
---
|
|
462
|
-
|
|
463
|
-
## 🔧 Danh sách Tools
|
|
464
|
-
|
|
465
|
-
### 📁 File Operations (6 tools)
|
|
466
|
-
|
|
467
|
-
- `file_read` - Đọc nội dung file
|
|
468
|
-
- `file_write` - Ghi/tạo file mới
|
|
469
|
-
- `file_list` - List files trong thư mục
|
|
470
|
-
- `file_search` - Tìm kiếm pattern trong files
|
|
471
|
-
- `file_tree` - Hiển thị cây thư mục
|
|
472
|
-
- `file_delete` - Xóa file
|
|
473
|
-
|
|
474
|
-
### 🔀 Git Operations (5 tools)
|
|
475
|
-
|
|
476
|
-
- `git_status` - Check git status
|
|
477
|
-
- `git_commit` - Commit changes
|
|
478
|
-
- `git_push` - Push to remote
|
|
479
|
-
- `git_pull` - Pull từ remote
|
|
480
|
-
- `git_diff` - Xem git diff
|
|
481
|
-
|
|
482
|
-
### 🔧 Command & Testing (3 tools)
|
|
483
|
-
|
|
484
|
-
- `command_run` - Chạy shell command
|
|
485
|
-
- `install_dependencies` - Auto-detect & install deps
|
|
486
|
-
- `test_run` - Chạy tests
|
|
487
|
-
|
|
488
|
-
### 📝 Document Parsing (1 tool)
|
|
489
|
-
|
|
490
|
-
- `document_parse` - Parse PDF, DOCX, XLSX
|
|
491
|
-
|
|
492
|
-
### 🧠 AI Analysis & Planning (3 tools)
|
|
493
|
-
|
|
494
|
-
- `ba_it_analyze` - Business analysis với gpt-oss:120b
|
|
495
|
-
- `plan_task` - Feature-driven planning với qwen3-coder:480b
|
|
496
|
-
- `code_generate` - ✨ **Self-contained feature executor** với qwen3-coder:480b
|
|
497
|
-
|
|
498
|
-
### 🏗 Project Setup (2 tools)
|
|
499
|
-
|
|
500
|
-
- `project_ask_config` - Interactive project setup
|
|
501
|
-
- `project_build_command` - Generate build commands
|
|
502
|
-
|
|
503
|
-
---
|
|
504
|
-
|
|
505
|
-
## 📊 Decision Logic
|
|
506
|
-
|
|
507
|
-
### Khi nào dùng `ba_it_analyze`?
|
|
508
|
-
|
|
509
|
-
✅ **Dùng khi**:
|
|
510
|
-
|
|
511
|
-
- Tạo dự án MỚI (bắt buộc)
|
|
512
|
-
- Thêm tính năng LỚN (auth, payments, complex systems)
|
|
513
|
-
- Yêu cầu CHUNG CHUNG ("build app", "e-commerce")
|
|
514
|
-
|
|
515
|
-
❌ **Không dùng**:
|
|
516
|
-
|
|
517
|
-
- Câu hỏi đơn giản
|
|
518
|
-
- Phân tích dự án hiện tại (dùng `file_tree` + `file_read`)
|
|
519
|
-
|
|
520
|
-
### Khi nào dùng `plan_task`?
|
|
521
|
-
|
|
522
|
-
✅ **Dùng khi**:
|
|
147
|
+
# Check system information
|
|
148
|
+
> /information
|
|
523
149
|
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
- Refactoring phức tạp
|
|
150
|
+
# View command history
|
|
151
|
+
> /history
|
|
527
152
|
|
|
528
|
-
|
|
153
|
+
# Exit the application
|
|
154
|
+
> /exit
|
|
155
|
+
```
|
|
529
156
|
|
|
530
|
-
|
|
531
|
-
- `baAnalysis` (optional) - Kết quả từ ba_it_analyze
|
|
157
|
+
## 🏗 How It Works
|
|
532
158
|
|
|
533
|
-
###
|
|
159
|
+
### 1. Project Analysis
|
|
534
160
|
|
|
535
|
-
|
|
161
|
+
Galaxy Code can analyze existing projects to understand:
|
|
536
162
|
|
|
537
|
-
-
|
|
538
|
-
-
|
|
539
|
-
-
|
|
163
|
+
- Project structure and architecture
|
|
164
|
+
- Technology stack in use
|
|
165
|
+
- Key features and components
|
|
166
|
+
- Potential improvement areas
|
|
540
167
|
|
|
541
|
-
|
|
168
|
+
### 2. Feature-Driven Planning
|
|
542
169
|
|
|
543
|
-
|
|
544
|
-
- `featureName` - Tên feature từ coreFeatures
|
|
545
|
-
- `featureDescription` - Mô tả chi tiết
|
|
546
|
-
- `technicalStack` - Tech stack từ BA
|
|
547
|
-
- Optional: userStories, dataModel, apiEndpoints
|
|
170
|
+
When creating or adding features, Galaxy Code follows a structured approach:
|
|
548
171
|
|
|
549
|
-
**
|
|
172
|
+
1. **Business Analysis** - Understands requirements and constraints
|
|
173
|
+
2. **Technical Planning** - Creates implementation steps
|
|
174
|
+
3. **Execution** - Generates code and runs necessary commands
|
|
175
|
+
4. **Verification** - Optionally runs tests and code reviews
|
|
550
176
|
|
|
551
|
-
|
|
177
|
+
### 3. Integrated Tool Execution
|
|
552
178
|
|
|
553
|
-
|
|
179
|
+
All file operations, git commands, and system calls are handled through integrated tools that:
|
|
554
180
|
|
|
555
|
-
|
|
181
|
+
- Automatically create and modify files
|
|
182
|
+
- Execute shell commands safely
|
|
183
|
+
- Track progress and report results
|
|
184
|
+
- Handle errors gracefully
|
|
556
185
|
|
|
557
|
-
|
|
558
|
-
____ _ ____ _ ___
|
|
559
|
-
/ ___| __ _| | __ ___ ___ _ / ___| | |_ _|
|
|
560
|
-
| | _ / _` | |/ _` \ \/ / | | || | | | | |
|
|
561
|
-
| |_| | (_| | | (_| |> <| |_| || |___| |___ | |
|
|
562
|
-
\____|\__,_|_|\__,_/_/\_\\__, | \____|_____|___|
|
|
563
|
-
|___/
|
|
564
|
-
```
|
|
186
|
+
## 📋 Prerequisites
|
|
565
187
|
|
|
566
|
-
|
|
188
|
+
Before using Galaxy Code, ensure you have:
|
|
567
189
|
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
-
|
|
190
|
+
1. **Node.js** >= 18.14.1
|
|
191
|
+
2. **AI Provider API Keys** (at least one):
|
|
192
|
+
- **Anthropic Claude**: `ANTHROPIC_API_KEY` for Claude models
|
|
193
|
+
- **Google Gemini**: `GOOGLE_AI_API_KEY` or `GEMINI_API_KEY` for Gemini models
|
|
194
|
+
- **Ollama**: Local installation with required models
|
|
571
195
|
|
|
572
|
-
|
|
196
|
+
### Environment Configuration
|
|
573
197
|
|
|
574
|
-
|
|
198
|
+
Create a `.env` file in your working directory with your API keys:
|
|
575
199
|
|
|
576
|
-
```
|
|
577
|
-
# Required
|
|
578
|
-
|
|
579
|
-
|
|
200
|
+
```env
|
|
201
|
+
# Required (choose at least one)
|
|
202
|
+
ANTHROPIC_API_KEY=your_anthropic_api_key_here
|
|
203
|
+
GOOGLE_AI_API_KEY=your_google_api_key_here
|
|
204
|
+
# or
|
|
205
|
+
GEMINI_API_KEY=your_gemini_api_key_here
|
|
580
206
|
|
|
581
207
|
# Optional
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
---
|
|
586
|
-
|
|
587
|
-
## 🏃 Development
|
|
588
|
-
|
|
589
|
-
### Project Structure
|
|
590
|
-
|
|
591
|
-
```
|
|
592
|
-
terminal/galaxy_cli/
|
|
593
|
-
├── source/
|
|
594
|
-
│ ├── ai/
|
|
595
|
-
│ │ └── orchestrator.ts # Gemini orchestrator
|
|
596
|
-
│ ├── connections/
|
|
597
|
-
│ │ ├── gemini.ts # Gemini connection
|
|
598
|
-
│ │ └── ollama.ts # Ollama connection
|
|
599
|
-
│ ├── prompts/
|
|
600
|
-
│ │ ├── orchestrator.ts # Main workflow prompts
|
|
601
|
-
│ │ ├── ba-it-analyzer.ts # BA analysis prompts
|
|
602
|
-
│ │ └── planning-agent.ts # Planning prompts
|
|
603
|
-
│ ├── tools/
|
|
604
|
-
│ │ ├── ba-it-analyzer.ts # BA analyzer tool
|
|
605
|
-
│ │ ├── planning-agent.ts # Planning agent tool
|
|
606
|
-
│ │ ├── file-operations.ts # File tools
|
|
607
|
-
│ │ ├── git-operations.ts # Git tools
|
|
608
|
-
│ │ └── registry.ts # Tool registry
|
|
609
|
-
│ ├── app.tsx # Main Ink app
|
|
610
|
-
│ └── cli.tsx # CLI entry
|
|
611
|
-
├── dist/ # Compiled output
|
|
612
|
-
├── package.json
|
|
613
|
-
└── tsconfig.json
|
|
614
|
-
```
|
|
615
|
-
|
|
616
|
-
### Build & Test
|
|
617
|
-
|
|
618
|
-
```bash
|
|
619
|
-
# Development với auto-reload
|
|
620
|
-
bun run dev
|
|
621
|
-
|
|
622
|
-
# Build TypeScript
|
|
623
|
-
bun run build
|
|
624
|
-
|
|
625
|
-
# Type checking
|
|
626
|
-
bun run type-check
|
|
627
|
-
|
|
628
|
-
# Format code
|
|
629
|
-
bun run format
|
|
208
|
+
OLLAMA_HOST=http://localhost:11434
|
|
209
|
+
DEBUG=false
|
|
630
210
|
```
|
|
631
211
|
|
|
632
|
-
---
|
|
633
|
-
|
|
634
|
-
## 📈 Roadmap
|
|
635
|
-
|
|
636
|
-
- [ ] **Execution Engine**: Tự động chạy plan steps
|
|
637
|
-
- [ ] **Code Review Agent**: Review code trước khi commit
|
|
638
|
-
- [ ] **Testing Agent**: Tự động generate tests
|
|
639
|
-
- [ ] **Documentation Agent**: Auto-generate docs
|
|
640
|
-
- [ ] **Multi-project support**: Làm việc với nhiều projects
|
|
641
|
-
- [ ] **Plugin system**: Mở rộng tools dễ dàng
|
|
642
|
-
- [ ] **Web UI**: Dashboard quản lý projects
|
|
643
|
-
|
|
644
|
-
---
|
|
645
|
-
|
|
646
|
-
## 🤝 Contributing
|
|
647
|
-
|
|
648
|
-
Contributions are welcome! Please follow these steps:
|
|
649
|
-
|
|
650
|
-
1. Fork the repo
|
|
651
|
-
2. Create feature branch (`git checkout -b feature/amazing-feature`)
|
|
652
|
-
3. Commit changes (`git commit -m 'Add amazing feature'`)
|
|
653
|
-
4. Push to branch (`git push origin feature/amazing-feature`)
|
|
654
|
-
5. Open Pull Request
|
|
655
|
-
|
|
656
|
-
---
|
|
657
|
-
|
|
658
212
|
## 📄 License
|
|
659
213
|
|
|
660
|
-
MIT License - see LICENSE file for details
|
|
661
|
-
|
|
662
|
-
---
|
|
214
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
663
215
|
|
|
664
216
|
## 👨💻 Author
|
|
665
217
|
|
|
666
|
-
**Bùi Trọng Hiếu
|
|
667
|
-
|
|
668
|
-
- **Personal Email:** kevinbui210191@gmail.com
|
|
669
|
-
- **Work Email:** hieubt2@msb.com.vn
|
|
670
|
-
- **GitHub:** [@kevinbui210191](https://github.com/kevinbui210191)
|
|
218
|
+
**Kevin Bui (Bùi Trọng Hiếu)**
|
|
671
219
|
|
|
672
|
-
|
|
220
|
+
- Email: kevinbui210191@gmail.com
|
|
221
|
+
- GitHub: [@kevinbui](https://github.com/kevinbui)
|
|
673
222
|
|
|
674
223
|
## 🙏 Acknowledgments
|
|
675
224
|
|
|
676
|
-
-
|
|
677
|
-
-
|
|
678
|
-
-
|
|
679
|
-
-
|
|
225
|
+
- [Ink](https://github.com/vadimdemedes/ink) - React for interactive command-line apps
|
|
226
|
+
- [Anthropic Claude](https://www.anthropic.com/claude) - Advanced AI models
|
|
227
|
+
- [Google Gemini](https://ai.google.dev/) - AI orchestration
|
|
228
|
+
- [Ollama](https://ollama.com/) - Local AI model serving
|