# Frictionless Claude Code — my exact setup (Kit 1)

A few shell shortcuts so Claude Code launches in one keystroke, stops re-asking for
permissions, and (optionally) color-codes your terminals so you never mix up two
sessions. Works on macOS, Windows, and Linux.

## Prerequisite
You need Claude Code installed first. If you don't have it yet:

```bash
npm install -g @anthropic-ai/claude-code
```

Then run `claude` once to sign in.

## How to use it (any OS)
Two ways — both end with Claude installing it for you:

- **Quick:** hit Copy, open Claude Code, paste this in, and say the line below.
- **Most reliable** (long files can truncate when pasted into a terminal): hit
  Download, then tell Claude: *"read ~/Downloads/claude-code-quickstart.md and set
  it up for my OS and shell."*

Either way, say:

> "I'm on [Mac / Windows / Linux] using [zsh / bash / PowerShell]. Install the right
> version of this in my shell config, adapt the syntax if needed, then reload and
> explain what each line does."

Claude figures out your setup, picks the matching block below, drops it in the
correct file (`~/.zshrc`, `~/.bashrc`, or your PowerShell `$PROFILE`), and reloads.

Heads up — what `--dangerously-skip-permissions` does: it stops Claude Code from
asking you to approve each file edit and command. Big speed-up, but it removes a
safety rail. It only affects YOUR machine — it doesn't expose anything to the
internet — so use it on projects you trust. Want a softer option? Skip the alias and
just cycle permission modes inside Claude with Shift+Tab.

---

## macOS / Linux / WSL / Git Bash (zsh or bash)
macOS defaults to **zsh** (`~/.zshrc`); most Linux uses **bash** (`~/.bashrc`).
Not sure which you're on? Run `echo $SHELL`.

```bash
# Launch Claude Code with the permission prompts pre-skipped
alias cb='claude --dangerously-skip-permissions'             # cb  = launch
alias cbr='claude --dangerously-skip-permissions --resume'   # cbr = launch + pick a session to resume
alias cdx='codex --dangerously-bypass-approvals-and-sandbox' # cdx = same idea for Codex (optional)
```

Reload with `source ~/.zshrc` (or `source ~/.bashrc`).

## Windows (PowerShell — the native default)
Claude Code runs natively on Windows now. PowerShell aliases can't take arguments,
so these are tiny functions instead. Add them to your `$PROFILE`:

```powershell
function cb  { claude --dangerously-skip-permissions @args }           # cb  = launch
function cbr { claude --dangerously-skip-permissions --resume @args }   # cbr = launch + resume picker
function cdx { codex --dangerously-bypass-approvals-and-sandbox @args } # cdx = Codex (optional)
```

First time? Create the profile, paste the functions, reload:

```powershell
if (!(Test-Path $PROFILE)) { New-Item -Path $PROFILE -Force }   # create profile if missing
notepad $PROFILE                                                # paste the functions above, save
. $PROFILE                                                      # reload this session
```

## Skip the one-time "enable bypass mode?" warning
The first launch with these aliases shows a one-time "you're turning on
bypass-permissions mode — sure?" warning. To skip it, add this to
`~/.claude/settings.json`:

```json
{ "skipDangerousModePermissionPrompt": true }
```

(Unofficial but stable. It silences ONLY that one-time warning — not the per-action
prompts you already turned off with `cb`, and not the folder-trust check below.
Trusted machines only.)

## About the "Do you trust this folder?" prompt
That one is a separate security gate, and it **can't be turned off globally** — by
design (it's what stops a sketchy repo from trusting itself). The good news: it shows
up only ONCE per project and is remembered after, **as long as the folder is a git
repo**. So `cd` into your project, run `git init` if it isn't one yet, click "yes, I
trust" once, and you won't be asked again for that project. (`cb` does not skip this —
nothing does.)

---

## Bonus: color-code your terminals
Give each orchestrator and its worker the SAME color, so you can tell at a glance
which two windows are one team — even with several pairs running at once. This uses
terminal escape codes — works in **iTerm2**, **Windows Terminal**, and most **Linux**
terminals. (macOS Terminal.app ignores them harmlessly — switch to iTerm2 for color,
or use the Terminal.app fallback below.)

bash / zsh:

```bash
_tc() {
  printf '\033]11;%s\007' "$1"                 # background color
  printf '\033]10;%s\007' "$2"                 # text / foreground
  printf '\033]12;%s\007' "$2"                 # cursor
  [ -n "$3" ] && printf '\033]0;%s\007' "$3"   # tab title (optional)
}
ccr() { _tc "#3a0d18" "#ffffff" "$1"; }   # wine
ccn() { _tc "#0a1a3a" "#ffffff" "$1"; }   # navy
ccg() { _tc "#0d2a18" "#ffffff" "$1"; }   # forest green
ccx() { printf '\033]111\007\033]110\007\033]112\007'; }  # reset to default
```

Use it: `ccr` paints the window wine. Pass a name to also title the tab —
`ccr projectA` titles it "projectA". Run the SAME color and name in both windows of
a pair.

### Which terminal are you on?
- **iTerm2** (most Mac devs), **Windows Terminal**, or **Linux** → the block above works as-is.
- **Apple's Terminal.app** → it ignores those escape codes, so use saved **Profiles**
  instead. One-time: open Terminal, go to Settings, Profiles, and create a couple
  (name them e.g. "Wine" and "Navy" and set their background colors). Then use this
  in place of the color functions:

```bash
# macOS Terminal.app: switch the current window to a saved Profile by name
_tcmac() { osascript -e "tell application \"Terminal\" to set current settings of front window to settings set \"$1\""; }
ccr() { _tcmac Wine; }   # needs a Terminal Profile named "Wine"
ccn() { _tcmac Navy; }   # ...and one named "Navy"
```

- **Windows PowerShell** → ask Claude for the equivalent color functions for your terminal.

Not sure which you have? Paste this to Claude and it reads your `$TERM_PROGRAM` and
sets up the right one for you.

## The workflow it unlocks
Color each orchestrator/worker PAIR the same, so the two windows that belong together
are obvious — even with several pairs going at once.
- Pair 1: run `ccr projectA` (wine) in the orchestrator window and `ccr projectA` in its worker window, then `cb` in each. Both wine, both titled — one unit.
- Pair 2: both windows `ccn projectB` (navy).
- Pair 3: both windows `ccg projectC` (green).

Three orchestrator/worker pairs, three colors, nothing blurs together. Coming back
later? `cbr` lets you pick the session to resume (just want the latest? `claude --continue`).

Two keystrokes per window, zero permission prompts, every pair color-matched.

That's Kit 1. More of the setup to come.

-- Cliff (connectwithcliff.com)
