Introduction
A few days ago, Anthropic released an update for Claude Code that adds an interesting feature: a new command named /statusline
, which will create a script to fetch and show useful information in the app’s status bar and automatically add the configuration for it.
You can either let Claude generate the script for you, or provide your own.
Installation
To install my script, you need to download the bash script from this location save it in ~/.claude/statusline-script.sh
, make it executable with
|
|
and add this configuration in ~/.claude/settings.json
|
|
Features
As you can see from the above screenshot, the script will display the following information:
|
|
- 📁 current folder
- 🦫 language version (in this case it’s a Go app but for Python it will show
💼 (my-app) | 🐍 3.12.9
) - 🌿 git branch name
- 🤖 current model
- 💸 cost of the current session
- 💰 total cost for the day
- ⏱️ time left for the current session
The app uses ccusage
to fetch costs.
Conclusion
In the last few days there has been an explosion of scripts and small apps which can provide a status line for Claude Code. I decided to give it a try and do my custom one. I hope it can be useful for other people too 😉