Skip to content

feat: auto-update shell profile on login#22

Merged
emilioacc merged 1 commit intomainfrom
emilio/improve-login-flow
Jan 27, 2026
Merged

feat: auto-update shell profile on login#22
emilioacc merged 1 commit intomainfrom
emilio/improve-login-flow

Conversation

@emilioacc
Copy link
Copy Markdown
Contributor

Summary

  • Auto-updates user's shell profile (~/.zshrc, ~/.bashrc, etc.) after login so new terminals automatically have ATXP configured
  • CLI now reads connection from ~/.atxp/config file directly, so it works even without the env var set
  • Improves login UX by eliminating manual shell profile editing

Test plan

  • Run npx atxp login from a fresh state (no config, no shell profile entry)
  • Verify ~/.zshrc gets the source line added
  • Open a new terminal and run npx atxp search "test" - should work without re-login
  • Run npx atxp login again - should show "You're all set!" (no duplicate entries)

🤖 Generated with Claude Code

- Add config.ts with centralized config handling:
  - getConnection() checks env var first, falls back to ~/.atxp/config
  - saveConnection() writes connection string to config file
  - getShellProfile() detects user's shell profile path
  - updateShellProfile() adds source line to shell profile

- Update call-tool.ts to use getConnection() so CLI works even
  without ATXP_CONNECTION env var set (reads from config file)

- Update login.ts to auto-update shell profile after saving config,
  eliminating the need for users to manually edit their shell profile

This improves the login UX - users no longer need to manually update
their ~/.zshrc or ~/.bashrc after running `npx atxp login`.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@emilioacc emilioacc merged commit 2eaa418 into main Jan 27, 2026
1 check passed
@emilioacc emilioacc deleted the emilio/improve-login-flow branch January 27, 2026 15:52
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