Ghinda iconGhindaAug 19, 2026

You can use Ruby to set the status line in Claude Code

Claude Code writes the session JSON to your script's stdin and displays what it prints back. Thirty lines of Ruby give you the folder, the git branch, and the context window percentage.

You can use Ruby to set the status line in Claude Code

Share this story

Send the public story page.

Useful takeaways from this story.

Claude Code writes the session JSON to your script's stdin and displays what it prints back.

Thirty lines of Ruby give you the folder, the git branch, and the context window percentage.

Building the complete brief

The page is ready to read now. The fuller skim-friendly version will appear here automatically.

The useful part

Claude Code writes the session JSON to your script's stdin and displays what it prints back. Thirty lines of Ruby give you the folder, the git branch, and the context window percentage.

Keep reading in the app

Open the app view to save this story, compare related coverage, and continue from the same source.

Open in app