Skip to content

feat(desktop): add fish shell support for Claude Code env export - #8451

Open
dfjay wants to merge 1 commit into
janhq:mainfrom
dfjay:feat/claude-code-fish-shell-env
Open

feat(desktop): add fish shell support for Claude Code env export#8451
dfjay wants to merge 1 commit into
janhq:mainfrom
dfjay:feat/claude-code-fish-shell-env

Conversation

@dfjay

@dfjay dfjay commented Jul 18, 2026

Copy link
Copy Markdown

Describe Your Changes

Jan's Claude Code integration wrote the ANTHROPIC_* env vars to ~/.zshenv with export syntax for any shell that wasn't bash. fish never sources ~/.zshenv and doesn't understand export, so fish users enabling the integration got no effect at all — it silently did nothing.

  • Detect fish via $SHELL and write to ~/.config/fish/conf.d/jan-claude-code.fish using fish syntax (set -gx). conf.d is auto-sourced before config.fish on every fish session, matching the "always sourced" behaviour Jan relies on for zsh's ~/.zshenv.
  • Cleanup/Reset now strips both export and set -gx ANTHROPIC_ lines, so switching shells or resetting works.
  • Create the conf.d directory before writing; extract shared logic into env_file_for_shell / format_env_line / is_jan_env_line with unit tests.

Fixes Issues

  • Closes #
  • Closes #

Self Checklist

  • Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed

@dfjay
dfjay force-pushed the feat/claude-code-fish-shell-env branch from ee5e12a to 0a4d3ca Compare July 21, 2026 08:27
fish never sources ~/.zshenv and doesn't understand `export`, so the
Claude Code integration silently did nothing for fish users. Detect
fish via $SHELL and write `set -gx` vars to conf.d/jan-claude-code.fish;
Reset now strips both syntaxes.

Assisted-by: Claude Code
@dfjay
dfjay force-pushed the feat/claude-code-fish-shell-env branch from 0a4d3ca to 9dafbcb Compare July 21, 2026 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant