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 context_en.md

maoxiaoyue edited this page May 14, 2026 · 1 revision

hyp context — Generate Project Manifest

Generate a machine-readable project description (YAML/JSON) so AI can understand your entire project with minimal tokens.

Usage

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

Flags

Flag Description Default
-o, --output Output file path stdout
-f, --format Output format: yaml or json yaml

Output Content

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

When to Run

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

AutoSync

Server.Start() automatically calls autosync.SyncSafe() to write the manifest to .hyp/context.yaml. Use hyp context manually for preview or different formats.

Token Efficiency

Scenario Traditional HypGo Manifest
AI understands API structure Read handler source (~5,000 tokens) Read manifest (~500 tokens)

Security

Manifest does NOT contain: passwords, DSN, tokens, API keys. Only route paths, type names, and server config.

LLM Smart Enrichment (--llm)

v0.8.5+ The --llm flag 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.

Related Commands

  • hyp ai-rules — Reads manifest and injects into AI config files
  • hyp generate — Generated Schema routes appear in manifest

Detailed Documentation

HypGo

繁體中文 | English


中文文件

設計文件

套件

AI 協作工具鏈

CLI 命令


English Docs

Design Docs

Packages

AI Collaboration Toolchain

CLI Commands

Clone this wiki locally

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