Illustrated walkthrough

Claude Code Statusline: Set Up the Status Line with /statusline

A screen-recorded walkthrough of turning on Claude Code's status line with the /statusline command — from PowerShell to the configured bar showing your user, directory, branch, model and context usage.

Claude Code terminal confirming Your status line is configured with a sample harddik | ~/Dvs/project | main | Claude Opus 4.6 | ctx:42% status line and an explanation of the username, directory, branch, model and context window segments
The "Your status line is configured!" confirmation from the recording — a sample line (harddik | ~/Dvs/project | main | Claude Opus 4.6 | ctx:42%) plus a legend for each segment, as recorded in March 2026.

5 min read · 13 illustrated steps

The short version

Start claude, type /statusline and answer the setup question. On Windows the agent can't find a shell config, so option 3 — a fresh default — is the fastest path: it generates ~/.claude/statusline-command.sh, updates ~/.claude/settings.json and shows your username, current directory, Git branch, model and context window usage in a bar at the bottom of the terminal. Approve the diff when asked, and whenever you want to change the bar later, just ask Claude to update the status line.

About the source video

Every frame on this page comes from ProgrammingKnowledge2's screen recording - a Claude Code v2.1.83 session (Opus 4.6 · 1M context · Claude Max) in D:\Dev on Windows, recorded in March 2026.

Frames are used with attribution and each step links back to the exact second in the video. The narration is not quoted - the text above was written from the screen contents and cross-checked against code.claude.com/docs.

Open Claude Code in your terminal

Everything happens inside one PowerShell window — no editor or dashboard needed.

  1. 1

    Launch the CLI

    Open Windows PowerShell (any terminal works — the recording uses PowerShell on Windows), cd into your project folder and type claude. Press Enter and the CLI starts in that directory.

    Windows PowerShell window with the claude command typed at the PS D:\Dev> prompt to launch the Claude Code CLI
    The claude launch command typed at the PowerShell prompt in D:\Dev.Watch at 0:18
  2. 2

    The welcome box

    Claude Code greets you with a welcome box showing the version (v2.1.83 in the recording), your plan and the model in use — Opus 4.6 with the 1M context window on a Claude Max account. Everything that follows happens inside this terminal session.

    Claude Code v2.1.83 welcome box in a Windows terminal showing Welcome back DRIS!, the Opus 4.6 1M context window model line and the Claude Max plan for the D:\Dev project
    Claude Code v2.1.83 starting in D:\Dev on a Claude Max plan.Watch at 0:22

Run the /statusline command

One slash command hands the job to a dedicated setup agent.

  1. 3

    Type the slash command

    In the input box, type /statusline. The autocomplete menu shows two related commands: /statusline — "Set up Claude Code's status line UI" — and /status, which prints version, model, account, API connectivity and tool statuses on demand. Submit /statusline.

    Claude Code slash command autocomplete menu listing /statusline to set up the status line UI next to /status which shows version, model, account, API connectivity and tool statuses
    The /statusline autocomplete entry, right above /status in the command menu.Watch at 0:32
  2. 4

    The agent takes over

    Submitting /statusline doesn't just flip a setting — it spawns a small setup agent (statusline-setup, "Configure statusline from PS1") that works out the right configuration for your shell and platform. You'll see it start with an Initializing spinner.

    Claude Code terminal right after /statusline is submitted with the statusline-setup Configure statusline from PS1 tool call highlighted and an Initializing spinner below it
    The statusline-setup agent spinning up right after the command is submitted.Watch at 0:42

Answer the setup question

Windows has no shell config to convert — the fresh default is the fastest route.

  1. 5

    It checks for an existing PS1

    The agent first looks for your shell's prompt definition, reading files like C:\Users\<you>\.bashrc and .bash_profile to see whether there's a PS1 it can convert. On this Windows machine there isn't one.

    statusline-setup tool output in Claude Code showing Read calls on C:\Users\drisa\.bashrc and .bash_profile while it searches for an existing PS1 prompt definition
    Read calls on .bashrc and .bash_profile while the agent hunts for a PS1.Watch at 0:52
  2. 6

    Three ways forward

    On Windows the agent reports it "couldn't find standard shell config files" and offers three choices: 1. paste your PS1 and it will convert it; 2. point to a config file in a custom location such as WSL or Git Bash; or 3. set up a fresh statusline — "a sensible default showing user, directory, model, and context usage."

    Claude Code reply on Windows saying the agent couldn't find standard shell config files with three numbered options to paste a PS1, point to a WSL or Git Bash config, or set up a fresh statusline showing user, directory, model and context usage
    The agent's question after finding no shell config on Windows — three numbered options.Watch at 1:02
  3. 7

    Pick the fresh setup

    The creator types 3. The fresh-default route needs nothing from your existing shell prompt, which makes it the quickest path on Windows — and it works the same way on macOS and Linux if you don't want to translate a PS1.

    Claude Code input box with the answer 3 typed beneath the three statusline setup options to request the fresh default statusline
    Answering 3 to request the fresh default statusline.Watch at 1:24
  4. 8

    Generating the default

    With the answer in, the statusline-setup agent re-labels its task "Setup fresh default statusline" and starts configuring — reading your current ~/.claude/settings.json before touching anything.

    Claude Code statusline-setup tool switching to Setup fresh default statusline with Initializing and Configuring spinners after option 3 is confirmed
    Setup fresh default statusline running after option 3 is confirmed.Watch at 1:48

Review and approve the generated script

Before it touches your settings, Claude shows you the exact diff.

  1. 9

    Approve the diff

    Claude shows you exactly what it wants to write: a small bash script that pipes the status JSON through jq to pull the context-window percentage, git branch and model name, then printfs them into one line. The dialog asks "Do you want to make this edit to statusline-command.sh?" — the creator picks option 2, "Yes, and allow Claude to edit its own settings for this session", so future tweaks don't need re-approval.

    Green added-lines diff of the generated statusline-command.sh bash script in Claude Code above the Do you want to make this edit approval dialog with Yes, Yes and allow further edits, and No choices
    The generated statusline-command.sh diff with its approval dialog.Watch at 2:10
  2. 10

    Files it writes

    Once approved, the tool's action list shows the two touchpoints: it creates ~/.claude/statusline-command.sh (the script that renders the line) and updates ~/.claude/settings.json (the config entry that tells Claude Code to run it).

    statusline-setup tool in Claude Code listing Create C:\Users\drisa\.claude\statusline-command.sh and Update settings.json actions after the edit was approved
    Create statusline-command.sh and Update settings.json in the tool's action list.Watch at 2:22

See it configured

The bar goes live at the bottom of the same terminal, with two paths to remember for later customization.

  1. 11

    Done in 49 seconds

    The run wraps up as "Done (5 tool uses · 6.4k tokens · 49s)". Watch the bottom edge of the terminal: the new bar is already live there — harddik | d:/Dev — before the agent even finishes narrating.

    Claude Code showing the statusline-setup result Done (5 tool uses, 6.4k tokens, 49s) with a Refining spinner while the new harddik | D:/Dev status line already renders at the bottom of the terminal
    The finished tool call with the real status line already rendering at the bottom.Watch at 2:48
  2. 12

    What each segment means

    The confirmation spells out the format with a sample — harddik | ~/Dvs/project | main | Claude Opus 4.6 | ctx:42% — and a legend: your username, the current directory (shortened), the Git branch when you're in a repo, the active model, and context window usage.

    Claude Code confirmation reading Your status line is configured with a sample harddik | ~/Dvs/project | main | Claude Opus 4.6 | ctx:42% line and a five-item legend explaining the username, directory, branch, model and context segments
    "Your status line is configured!" — the sample line and its five-segment legend.Watch at 3:06
  3. 13

    Where the config lives

    Two paths to remember: the config is in ~/.claude/settings.json, and the script is at ~/.claude/statusline-command.sh. To change what the bar shows later, just ask Claude to update the status line — no manual editing required.

    Claude Code session summary stating the config lives in ~/.claude/settings.json with the script at ~/.claude/statusline-command.sh, above the rendered harddik | d:/Dev status line at the bottom of the terminal
    The final summary naming both file paths, with the live bar at the bottom.Watch at 3:12

Frequently asked questions