Title: Fresh install has no settings.json: first run fails with "API key not found" and forces manual file creation · Issue #202 · lessweb/deepcode-cli · GitHub
Open Graph Title: Fresh install has no settings.json: first run fails with "API key not found" and forces manual file creation · Issue #202 · lessweb/deepcode-cli
X Title: Fresh install has no settings.json: first run fails with "API key not found" and forces manual file creation · Issue #202 · lessweb/deepcode-cli
Description: 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. Pleas...
Open Graph Description: 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 therefor...
X Description: 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 therefor...
Opengraph URL: https://github.com/lessweb/deepcode-cli/issues/202
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Fresh install has no settings.json: first run fails with \"API key not found\" and forces manual file creation","articleBody":"## Summary\n\nOn 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:\n\n```\n✦ API key not found. Please configure ~/.deepcode/settings.json or ./.deepcode/settings.json.\n```\n\nThe 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`).\n\n## Steps to reproduce\n\n1. `npm i -g @vegamo/deepcode-cli` on a machine with no prior config.\n2. Run `deepcode` and send any prompt.\n3. Observe the `API key not found` error.\n4. `ls ~/.deepcode/` — there is no `settings.json` to edit.\n\n## Expected\n\nFirst 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.\n\n## Environment\n\n- Package: `@vegamo/deepcode-cli`\n- Version: 0.1.31 (also reproduces on current `main` / 0.1.33)\n- OS: macOS (darwin)\n\n## Notes\n\nRoot 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.\n\nI have a fix ready (auto-scaffold a template on first run, never overwriting an existing file) and will open a PR referencing this issue.","author":{"url":"https://github.com/kuishou68","@type":"Person","name":"kuishou68"},"datePublished":"2026-06-26T11:32:08.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/202/deepcode-cli/issues/202"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:947c4651-64cb-e879-40d8-64d975d708a4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B730:A3B49:6AEE9D:917D42:6A4D4231 |
| html-safe-nonce | 44819423eb835305d7694c13a66be8540b0a61e0b256aea5946a88ce3fb624e1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNzMwOkEzQjQ5OjZBRUU5RDo5MTdENDI6NkE0RDQyMzEiLCJ2aXNpdG9yX2lkIjoiODEyNjk1MzYzNzcxODg2ODUyOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f1d2bc5a5b3f212bf333f65ffa1214bbc2f6a0d32527b4da802c52ee6b46bad0 |
| hovercard-subject-tag | issue:4751648678 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/lessweb/deepcode-cli/202/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0a839d0d42e64b7f06d6b73b6534b356e448cf081c3207cb04fa4dfeac81e1a4/lessweb/deepcode-cli/issues/202 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0a839d0d42e64b7f06d6b73b6534b356e448cf081c3207cb04fa4dfeac81e1a4/lessweb/deepcode-cli/issues/202 |
| og:image:alt | 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 therefor... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kuishou68 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 92571a8944142227b7e19cd10918b1ddd06e5066c1ad5bc7e4769cf6140a87e6 |
| turbo-cache-control | no-preview |
| go-import | github.com/lessweb/deepcode-cli git https://github.com/lessweb/deepcode-cli.git |
| octolytics-dimension-user_id | 118287711 |
| octolytics-dimension-user_login | lessweb |
| octolytics-dimension-repository_id | 1223512305 |
| octolytics-dimension-repository_nwo | lessweb/deepcode-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1223512305 |
| octolytics-dimension-repository_network_root_nwo | lessweb/deepcode-cli |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 56fc8347865a14e2ec811533d68f929cf4e0ec19 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width