Summary
On a fresh install, deepcode never creates ~/.deepcode/settings.json. The directory is created (it holds machine-id, projects/, etc.), but there is no settings file. The first task therefore fails with:
✦ API key not found. Please configure ~/.deepcode/settings.json or ./.deepcode/settings.json.
The error tells the user to "configure" the file, but the file does not exist and the user has to create it from scratch while guessing the schema (env.API_KEY, env.BASE_URL, env.MODEL).
Steps to reproduce
npm i -g @vegamo/deepcode-cli on a machine with no prior config.
- Run
deepcode and send any prompt.
- Observe the
API key not found error.
ls ~/.deepcode/ — there is no settings.json to edit.
Expected
First run should produce a ready-to-edit ~/.deepcode/settings.json template (empty API_KEY, default BASE_URL/MODEL) so the user only has to paste their key, rather than authoring the file and its schema by hand.
Environment
- Package:
@vegamo/deepcode-cli
- Version: 0.1.31 (also reproduces on current
main / 0.1.33)
- OS: macOS (darwin)
Notes
Root cause is in packages/core/src/settings.ts: settings are only ever read on startup (readSettings() returns null when the file is missing) and only written lazily when something like a model selection changes. Nothing scaffolds the file on first run.
I have a fix ready (auto-scaffold a template on first run, never overwriting an existing file) and will open a PR referencing this issue.
Summary
On a fresh install, deepcode never creates
~/.deepcode/settings.json. The directory is created (it holdsmachine-id,projects/, etc.), but there is no settings file. The first task therefore fails with:The error tells the user to "configure" the file, but the file does not exist and the user has to create it from scratch while guessing the schema (
env.API_KEY,env.BASE_URL,env.MODEL).Steps to reproduce
npm i -g @vegamo/deepcode-clion a machine with no prior config.deepcodeand send any prompt.API key not founderror.ls ~/.deepcode/— there is nosettings.jsonto edit.Expected
First run should produce a ready-to-edit
~/.deepcode/settings.jsontemplate (emptyAPI_KEY, defaultBASE_URL/MODEL) so the user only has to paste their key, rather than authoring the file and its schema by hand.Environment
@vegamo/deepcode-climain/ 0.1.33)Notes
Root cause is in
packages/core/src/settings.ts: settings are only ever read on startup (readSettings()returnsnullwhen the file is missing) and only written lazily when something like a model selection changes. Nothing scaffolds the file on first run.I have a fix ready (auto-scaffold a template on first run, never overwriting an existing file) and will open a PR referencing this issue.