Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

hyp new.md

maoxiaoyue edited this page Apr 14, 2026 · 1 revision

hyp new — 建立新專案

建立新的 HypGo 專案。支援三種專案類型。

用法

hyp new <name> # 全棧 Web 專案(預設)
hyp new web <name> # 同上(明確指定)
hyp new cli <name> # CLI 工具專案(Cobra)
hyp new desktop <name> # 桌面應用專案(Fyne GUI)

Web 專案

hyp new myapp

生成結構:

myapp/
├── app/
│ ├── controllers/home.go
│ ├── models/
│ └── services/
├── config/config.yaml
├── static/css/ js/ images/
├── templates/welcome.html
├── main.go
└── go.mod

CLI 專案

v0.8.5+ CLI、Desktop、gRPC 專案類型為 v0.8.5 新增功能,v0.8.1 僅支援 Web 專案。

hyp new cli mytool

生成結構:

mytool/
├── app/
│ ├── commands/root.go
│ ├── models/
│ ├── services/
│ └── config/config.yaml
├── main.go
└── go.mod

後續:hyp generate command process

Desktop 專案

v0.8.5+ Desktop(Fyne GUI)專案為 v0.8.5 新增功能。

hyp new desktop myapp

生成結構:

myapp/
├── app/
│ ├── views/main_view.go
│ ├── models/
│ ├── services/
│ └── config/config.yaml
├── main.go
└── go.mod

後續:hyp generate view settings

注意:Fyne 需要 C 編譯器(gcc)。

建立後的必要步驟

cd myapp && go mod tidy
hyp ai-rules # 必要:生成 AI 工具配置檔

相關命令

HypGo

繁體中文 | English


中文文件

設計文件

套件

AI 協作工具鏈

CLI 命令


English Docs

Design Docs

Packages

AI Collaboration Toolchain

CLI Commands

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /