claudecodeui icon indicating copy to clipboard operation
claudecodeui copied to clipboard

Feature Request: Add support for persistent settings via .claude/settings.json files

Open kosukesaigusa opened this issue 5 months ago • 3 comments

Problem

Currently, all settings in claudecodeui are stored in localStorage, which means:

  • Settings are lost when clearing browser data
  • Settings cannot be shared across devices or team members
  • No integration with Claude CLI's existing settings files
  • Different settings for different projects require manual switching

Proposed Solution

Add support for hierarchical settings files that:

  1. Read from ~/.claude/settings.json (global settings)
  2. Allow project-specific overrides via {project}/.claude/settings.json
  3. Automatically convert Claude CLI format to claudecodeui format
  4. Maintain backwards compatibility with existing localStorage settings

Benefits

  • Persistent Configuration: Settings survive browser data clearing
  • Claude CLI Compatibility: Users can reuse their existing Claude CLI settings
  • Team Collaboration: Settings can be committed to version control
  • Project Flexibility: Different settings per project without manual switching

Implementation Plan

  • [x] Create settings loading/saving functions
  • [x] Implement Claude CLI format conversion
  • [x] Add API endpoints for settings management
  • [x] Update UI to show current settings source
  • [x] Add visual indicators for allowed/disallowed tools

Related

I've implemented this feature in PR #108

kosukesaigusa avatar Jul 22 '25 05:07 kosukesaigusa

I've created PR #108 that implements this feature. The PR includes:

  • Full implementation with Claude CLI format compatibility
  • Hierarchical settings support (project > global > defaults)
  • Enhanced UI showing currently applied rules
  • Comprehensive documentation and error handling

Please let me know if you'd like any changes or have questions about the implementation approach.

kosukesaigusa avatar Jul 22 '25 05:07 kosukesaigusa

I just installed claude code UI and realized it doesn't fetch our global settings (at least not in the chat).

So thank you for this PR - I hope it will get merge

orakemu avatar Jul 23 '25 05:07 orakemu

I just installed this app now for the first time, and I was really confused to not see my global permissions already pre-set.

Having to manually allow the tools in Claude Code UI is bad

PaulRBerg avatar Aug 16 '25 09:08 PaulRBerg