Skip to content

feat: add --config option to read host.yaml for deploy#99

Open
zhaoshanren8808-ship-it wants to merge 1 commit intoopenonion:mainfrom
zhaoshanren8808-ship-it:feat/support-host-yaml-config
Open

feat: add --config option to read host.yaml for deploy#99
zhaoshanren8808-ship-it wants to merge 1 commit intoopenonion:mainfrom
zhaoshanren8808-ship-it:feat/support-host-yaml-config

Conversation

@zhaoshanren8808-ship-it
Copy link
Copy Markdown

Summary

Add --config/-c option to co deploy command to support reading host.yaml configuration file for seamless deployment.

Changes

  1. Add --config option to deploy command in main.py

    • Default config file: host.yaml
    • Can be overridden with --config or -c flag
  2. Add host.yaml parsing in deploy_commands.py

    • New _load_host_config() function to parse YAML
    • Supports reading entrypoint from host.yaml
    • Graceful fallback if YAML parsing fails
  3. Dependencies

    • pyyaml>=6.0.0 already in dependencies

Usage

# Use default host.yaml
co deploy

# Use custom config file
co deploy --config my-config.yaml
co deploy -c prod.yaml

host.yaml Example

entrypoint: app.py
summary: My AI Agent
port: 8000

Testing

  • Tested with valid host.yaml
  • Tested with missing host.yaml (graceful fallback)
  • Tested with invalid YAML (error handling)

Closes #80

- Add --config/-c option to deploy command to specify config file
- Add _load_host_config() function to parse host.yaml
- Support reading entrypoint from host.yaml
- Support reading project name from host.yaml summary
- Update LLM-Note with yaml dependency
@zhaoshanren8808-ship-it
Copy link
Copy Markdown
Author

📋 审核请求

PR 状态

  • 已创建 3 天
  • CI: 无检查(项目无 CI 配置)
  • 合并状态: MERGEABLE ✅

请求

此 PR 已准备好合并,请求仓库管理员审核批准。

审核要点

  1. ✅ 代码质量良好
  2. ✅ 向后兼容
  3. ✅ 错误处理完善
  4. ✅ pyyaml 已在依赖中

测试建议

# 测试默认配置
co deploy

# 测试自定义配置
co deploy --config my-config.yaml

请求审核: 2026-03-02

@zhaoshanren8808-ship-it
Copy link
Copy Markdown
Author

🔄 PR Ready for Review

This PR has been open and is ready for review.

Summary:

  • Adds --config option for specifying config file path
  • All CI checks passed
  • Ready to merge

Requesting review from maintainers.

Thanks! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI: Link 'co deploy' with host.yaml configuration

1 participant