-
Notifications
You must be signed in to change notification settings - Fork 0
hyp context_en.md
maoxiaoyue edited this page May 14, 2026
·
1 revision
Generate a machine-readable project description (YAML/JSON) so AI can understand your entire project with minimal tokens.
hyp context # YAML to stdout hyp context -f json # JSON format hyp context -o .hyp/manifest.yaml # Save to file hyp context -o manifest.json -f json # JSON to file
| Flag | Description | Default |
|---|---|---|
-o, --output |
Output file path | stdout |
-f, --format |
Output format: yaml or json
|
yaml |
version: "1.0" framework: HypGo generated_at: "2026年04月03日T14:30:00+08:00" server: addr: ":8080" protocol: http2 tls: true routes: - method: POST path: /api/users handler_names: [controllers.CreateUser] summary: "Create user" tags: [users] input_type: CreateUserReq output_type: UserResp responses: 201: "User created" database: driver: postgres has_replicas: true
| Timing | Reason |
|---|---|
| After project creation | Generate initial manifest |
| After adding/modifying Schema routes | Update route info |
Before running hyp ai-rules
|
Include route table in AI config files |
Server.Start() automatically calls autosync.SyncSafe() to write the manifest to .hyp/context.yaml. Use hyp context manually for preview or different formats.
| Scenario | Traditional | HypGo Manifest |
|---|---|---|
| AI understands API structure | Read handler source (~5,000 tokens) | Read manifest (~500 tokens) |
Manifest does NOT contain: passwords, DSN, tokens, API keys. Only route paths, type names, and server config.
v0.8.5+The--llmflag is new in v0.8.5 and is not available in v0.8.1.
# Specify LLM config file (auto-detects config/llm.yaml or .hyp/llm.yaml) hyp context --llm config/llm.yaml # Combined with output options hyp context --llm config/llm.yaml -o .hyp/manifest.yaml
When enabled, Manifest fields like Summary and Tags are automatically filled in by LLM (Ollama / OpenAI / RAG). See manifest_en.md for details.
- hyp ai-rules — Reads manifest and injects into AI config files
- hyp generate — Generated Schema routes appear in manifest
設計文件
套件
- config — 設定
- context — 請求上下文
- router — 路由器
- server — 伺服器
- middleware — 中介層
- websocket — WebSocket
- hidb — 資料庫 ORM
- hidb/cassandra — Cassandra
- logger — 日誌
- json — JSON 處理
- grpc — gRPC
AI 協作工具鏈
- schema — Schema-first 路由
- manifest — 專案 Manifest
- contract — Contract Testing
- errors — Typed Error Catalog
- migrate — Migration Diff
- scaffold — 智慧 Scaffold
- airules — AI Rules
CLI 命令
- hyp 總覽
- hyp new
- hyp api
- hyp run
- hyp restart
- hyp generate
- hyp migrate
- hyp context
- hyp ai-rules
- hyp chkcomment
- hyp impact
- hyp docker
- hyp health
- hyp version
- hyp difflog
Design Docs
Packages
- config — Configuration
- context — Request Context
- router — Router
- server — Server
- middleware — Middleware
- websocket — WebSocket
- hidb — Database ORM
- hidb/cassandra - Cassandra 5.0
- logger — Logger
- json — JSON
- grpc — gRPC
AI Collaboration Toolchain
- schema — Schema-first Routing
- manifest — Project Manifest
- contract — Contract Testing
- errors — Typed Error Catalog
- migrate — Migration Diff
- scaffold — Smart Scaffold
- airules — AI Rules
CLI Commands