Skip to content

refactor(settings): decouple standalone CLI onto its own ~/.anton/.env - #313

Draft
pnewsam wants to merge 1 commit into
stagingfrom
paul/eng-1295-decouple-anton-cli-env
Draft

refactor(settings): decouple standalone CLI onto its own ~/.anton/.env#313
pnewsam wants to merge 1 commit into
stagingfrom
paul/eng-1295-decouple-anton-cli-env

Conversation

@pnewsam

@pnewsam pnewsam commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

What

The standalone anton CLI now owns its own ~/.anton/.env and no longer reads the Cowork desktop's ~/.cowork/.env mirror.

  • Drop ~/.cowork/.env from the env-file chain in _build_env_files (config/settings.py). ~/.anton/.env is authoritative for the standalone CLI; anton's own onboarding already writes it.
  • Remove the now-vestigial desktop_first_run path and its _desktop_greeting / _GREETING_EXAMPLES helpers (cli.py, chat.py). With the mirror gone, a desktop-configured machine has no inherited key and falls through to anton's own _onboard() instead of the greeting.

Why

Part of retiring the DB→.env export (ENG-1295). The mirror only shadowed config the CLI already owns and was the last file-based settings path behind the desync bug class. Decoupling lets the export be deleted server-side and removes the whole class for the standalone CLI.

When anton runs embedded in cowork-server, the harness builds settings with the DB overlay and no .env base (AntonSettings(_env_file=None)), so this chain applies only to the standalone CLI.

Tradeoff

Drops "configure once in the desktop, standalone CLI inherits the credentials." A desktop-configured user who runs anton in a terminal onboards the CLI once. Accepted: the inheritance was convenience, not correctness.

Testing

uv run pytest settings/chat/onboarding slice: 125 passed, 4 skipped. py_compile clean.

Draft — pairs with the cowork-server decoupling PR; ship this first so standalone users migrate cleanly. Tracked in ENG-1295.

🤖 Generated with Claude Code

Drop ~/.cowork/.env from the CLI env-file chain so the standalone `anton`
CLI owns its own ~/.anton/.env instead of reading the Cowork desktop's
mirror (ENG-1295). Remove the now-vestigial desktop_first_run path and its
_desktop_greeting/_GREETING_EXAMPLES helpers — a desktop-configured machine
now falls through to anton's own onboarding rather than inheriting creds.

Part of retiring the DB->.env export (ENG-1295); pairs with the cowork-server
decoupling PR.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant