feat(cli): add interactive init env bootstrap#19
Conversation
warren618
left a comment
There was a problem hiding this comment.
Thanks for picking this up @trinhchien — the interactive flow, key validation, and tests all look solid!
A couple of things to address before merging:
1. Provider list should match .env.example
The current PR has 5 providers (OpenRouter, OpenAI, Anthropic, DeepSeek, Ollama), but the project actually supports 11 providers — see agent/.env.example for the full list.
Specifically:
- Remove Anthropic — our backend uses OpenAI-compatible endpoints via LangChain; Anthropic's API is not compatible, so it would not work even if configured
- Add the missing providers: Gemini, Groq, DashScope/Qwen, Zhipu, Moonshot/Kimi, MiniMax, MIMO
Please use agent/.env.example as the source of truth for provider names, env var names, base URLs, and default models.
2. Unused _INIT_ENV_DIR variable
_INIT_ENV_DIR = Path.home() / ".vibe-trading" on line 1407 is no longer used since the path was changed to agent/.env. Please remove it.
Everything else (Rich prompts, _render_env_content, tests) looks great. Just need the provider list aligned and the dead variable cleaned up. Thanks!
|
Addressed the review feedback in the latest push:
|
warren618
left a comment
There was a problem hiding this comment.
LGTM — provider list now matches .env.example, unused variable removed, tests updated. Nice work!
* feat(cli): add interactive init env bootstrap * fix(cli): align init providers with env example --------- Co-authored-by: chientrinh <trinhdachien1598@gmail.com>
Summary
vibe-trading initto guide users through interactive.envsetupagent/.envinstead of~/.vibe-trading/.envTesting
python3 -m py_compile agent/cli.py agent/tests/test_cli_init.py agent/tests/test_llm.py agent/tests/conftest.pycli.cmd_initCloses #14