feat(claude-code): manage claude shell config declaratively#7
Conversation
Validation: not run
Validation: not run
Add keybinding that sends backslash-newline sequence (\\n) to create soft newlines in bash, allowing multi-line commands without immediate execution. Pressing shift+enter now behaves like typing \ followed by enter in the terminal.
Add granular control over validation steps: - --skip-fmt: Skip nix fmt formatting - --skip-hooks: Skip pre-commit hooks - --skip-check: Skip nix flake check - --skip-all: Skip all validation steps This allows faster iteration during development when validation has already been performed or when making minor changes.
…PI MVP Major simplifications and implementation for Cloudflare Workers-based documentation system: ## Architecture Simplification (60% complexity reduction) - Removed: Durable Objects, GraphQL, Browser rendering, WebSockets, Vectorize - Kept only: D1 Database, KV Cache, R2 Storage, basic Analytics - Deferred semantic search (Vectorize) to Phase 2 ## Implementation Progress (40% complete) - ✅ Simplified wrangler.jsonc configuration with setup script - ✅ Complete D1 database schema with FTS5 search - ✅ Core API handlers (list, get, search, batch update, stats) - ✅ Proper TypeScript types and interfaces - ✅ Database migrations with runner script - ❌ Module extraction from Nix (pending) - ❌ Frontend implementation (pending) - ❌ Test suite (pending) ## Cost Optimization - Original estimate: $5.25/month (incorrect) - Previous analysis: $1,237/month (overestimated) - Corrected estimate: <$100/month for 100M requests - MVP likely runs on free tier (<$1/month) ## Files Added - Implementation plan and critical review documentation - Complete Worker implementation (13 files, 1,520 lines) - Database migrations and setup scripts - README and progress tracking ## Next Steps 1. Run setup script to create Cloudflare resources 2. Implement Nix module extraction 3. Build minimal frontend 4. Set up CI/CD pipeline Realistic timeline: 30 days to production (not 18 days as originally estimated)
- Enhanced type extraction to handle complex nested types (attrsOf, listOf, submodule) - Added comprehensive test suite with 20 test cases for module extraction - Improved extraction script with proper module evaluation via lib.evalModules - Added support for extracting module metadata, examples, and usage analysis - Fixed handling of option types including enums, either types, and function types - Added batch extraction performance testing - Created upload script for syncing to Cloudflare Workers API - Improved error handling and validation throughout extraction pipeline Tests cover: - Basic and complex type extraction - Submodule and nested submodule handling - Option attributes (readOnly, internal, apply functions) - Module imports and declarations - Batch extraction performance (<1s for 100 modules)
Add keybinding that sends backslash-newline sequence (\\n) to create soft newlines in bash, allowing multi-line commands without immediate execution. Pressing shift+enter now behaves like typing \ followed by enter in the terminal.
Add granular control over validation steps: - --skip-fmt: Skip the 'nix fmt' formatting step - --skip-hooks: Skip the pre-commit hooks validation - --skip-check: Skip the 'nix flake check' validation step - --skip-all: Skip all validation steps (fmt, hooks, check) This allows faster iteration during development when validation has already been performed or when making minor changes.
Add home-manager module to manage ~/.claude/settings.json file. Includes configuration for: - Model selection (opus) - Thinking mode (alwaysThinkingEnabled) - Git co-authoring attribution - Status line context display - Transcript retention period 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…ttings - Migrate settings from external symlink to native Nix configuration - Add all MCP servers (Cloudflare suite, DeepWiki, time, sequential-thinking) - Remove Brave search and memory MCP servers - Simplify context7 to only work with SOPS API key - Add defaultModel variable for centralized model configuration - Add new environment variables: - CLAUDE_CODE_DISABLE_TERMINAL_TITLE - CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL - DISABLE_BUG_COMMAND - USE_BUILTIN_RIPGREP - Improve variable naming (context7ApiKey, context7mcp, defaultModel) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…tation API MVP" This reverts commit f7168db.
This reverts commit 54cd772.
|
Claude finished @Bad3r's task —— View job PR Review: Claude Code Home Manager ModuleComprehensive review completed. This is a well-architected implementation that follows repository best practices and security guidelines. Todo List
Review Findings✅ Code Quality & Best PracticesExcellent Architecture:
Minor Issues:
✅ Security ImplementationStrong Security Design:
Security Environment Variables (lines 134-144, 225-244): DISABLE_AUTOUPDATER = "1";
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC = "1";
DISABLE_TELEMETRY = "1";
DISABLE_ERROR_REPORTING = "1";✅ Performance ConsiderationsOptimized Settings:
✅ Supporting Changes ReviewBuild Script Enhancements (
Kitty Terminal Integration (
|
|
@chatgpt-codex-connector[bot] review PR |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. |
Remove the repeated claude-code entry so we only import the app once. Validation: not run (not requested)
|
Claude finished @Bad3r's task —— View job PR Review: Claude Code Home Manager ModuleComprehensive review completed. This is a well-architected implementation that follows repository best practices and security guidelines. Todo List
Review Findings✅ Code Quality & Best PracticesExcellent Architecture:
✅ Security ImplementationStrong Security Design:
Security Environment Variables (lines 134-144, 225-244): DISABLE_AUTOUPDATER = "1";
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC = "1";
DISABLE_TELEMETRY = "1";
DISABLE_ERROR_REPORTING = "1";✅ Performance ConsiderationsOptimized Settings:
✅ Supporting Changes ReviewBuild Script Enhancements (
Kitty Terminal Integration (
|
|
Claude finished @Bad3r's task —— View job PR Review: Claude Code Home Manager ModuleComprehensive review completed. This is a well-architected implementation that follows repository best practices and security guidelines. Todo List
Review Findings✅ Code Quality & Best PracticesExcellent Architecture:
✅ Security ImplementationStrong Security Design:
Security Environment Variables (lines 136-144, 228-244): DISABLE_AUTOUPDATER = "1";
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC = "1";
DISABLE_TELEMETRY = "1";
DISABLE_ERROR_REPORTING = "1";✅ Performance ConsiderationsOptimized Settings:
✅ Supporting Changes ReviewBuild Script Enhancements (
Kitty Terminal Integration (
|
Summary
This PR manages Claude Code shell configuration declaratively via Home Manager, including MCP server setup, environment variables, and tool permissions.
Components
Claude Code Home Manager Module
modules/hm-apps/claude-code.nix: Declarative Claude Code configurationSupporting Changes
build.sh): Added flags to skip validation stepsmodules/terminal/kitty.nix): Added shift+enter keybinding for bash line continuationFeatures
Configuration Example
The module provides comprehensive settings for Claude Code:
Integration
flake.homeManagerModules.apps."claude-code"Testing
To test locally:
Related Changes
This PR now focuses solely on Claude Code Home Manager configuration and supporting tool enhancements.