Skip to content

Claude Code

Claude Code is integrated throughout the terminal workflow as an AI coding assistant.

Dual Account Setup

Two separate Claude Code configurations — personal and work — managed via mise:

Directory Config Dir Account
Work project dirs under ~/dev ~/.claude_work Work
Everything else default (CLAUDE_CONFIG_DIR unset) Personal (OAuth)

How it works: Mise sets CLAUDE_CONFIG_DIR based on the current directory. Each config dir has its own OAuth session, settings, history, and MCP servers.

The mise config in each work directory (these live in the project repos, not in this one):

# <work project>/.mise.toml
[env]
CLAUDE_CONFIG_DIR = "{{env.HOME}}/.claude_work"
ANTHROPIC_API_KEY = "{{env.ANTHROPIC_WORK_API_KEY}}"

ANTHROPIC_WORK_API_KEY is age-encrypted in the private config layer (see Private Layer), so it decrypts everywhere but only becomes ANTHROPIC_API_KEY where a work config opts in. Rotate it with:

mise run secret:set ANTHROPIC_WORK_API_KEY

First-time setup

The first time you run claude in a work directory, it will prompt for OAuth login with your work account.

Overriding the Directory Profile

Inline assignments beat mise's exported env, so these aliases pick a profile from any directory:

Alias Config Dir Auth
ccmain default (CLAUDE_CONFIG_DIR unset) Personal OAuth (API key unset)
ccwork ~/.claude_work ANTHROPIC_WORK_API_KEY
ccent ~/.claude_work Work OAuth (API key unset)

Tmux Integration

Keybinding Action
++prefix+g++ Open Claude in a popup (pick directory with fzf)
++prefix+d++ Full dev layout (nvim + claude + shell)
++prefix+shift+c++ Split current pane and open Claude

Dev Layout

+-------------------+----------+
|                   |  claude  |
|      nvim         +----------+
|                   |  shell   |
+-------------------+----------+

Claude Layout

+-------------------+----------+
|                   |          |
|      shell        |  claude  |
|                   |          |
+-------------------+----------+

Settings

Personal (~/.claude/settings.json)

{
  "enableAllProjectMcpServers": true,
  "enabledMcpjsonServers": ["supabase", "github"],
  "statusLine": {
    "type": "command",
    "command": "wt list statusline --format=claude-code"
  },
  "enabledPlugins": {
    "code-documentation@claude-code-workflows": true,
    "cloud-infrastructure@claude-code-workflows": true,
    "gopls-lsp@claude-plugins-official": true,
    "frontend-design@claude-plugins-official": true,
    "worktrunk@worktrunk": true
  }
}

MCP Servers

GitHub MCP server runs in Docker:

{
  "mcpServers": {
    "github": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN",
               "ghcr.io/github/github-mcp-server"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_ACCESS_TOKEN}"
      }
    }
  }
}

Plugins

Plugin Purpose
code-documentation Documentation generation workflows
cloud-infrastructure Cloud/infra tooling and patterns
gopls-lsp Go language server integration
frontend-design Frontend design tools
worktrunk Git worktree management

Worktrunk Integration

The status line shows current worktree info:

wt list statusline --format=claude-code

Worktrunk also uses Claude Haiku for auto-generating commit messages.

cyolo — Autonomous Agent in a Fresh Worktree

Creates a Worktrunk worktree and launches Claude in it with --dangerously-skip-permissions --remote-control, in a new tmux window of the current session:

cyolo                            # auto-named worktree (yolo-<MMDD-HHMMSS>)
cyolo my-feature                 # named worktree
cyolo my-feature "Fix the bug"   # named worktree + initial prompt

Under the hood it runs wt switch --create <name> -x claude via tmux new-window, so the window is named after the worktree and Worktrunk hooks run as usual. Outside tmux it runs inline in the current terminal.