Title
Show workspace current folder + git branch in Hermes status
Summary
Enhance the Hermes CLI status experience by displaying the user’s current workspace context (current folder + git branch when available) in:
- the TUI footer/status bar
- the
hermes status command output
This helps users quickly confirm where they are working and which branch they’re on, without opening a separate shell command.
Motivation / Problem
Today, the Hermes status UI primarily focuses on model/provider/session metrics. When working across multiple repos/workspaces, it’s easy to lose track of the current directory and active git branch.
Proposed Change
- TUI status bar (footer)
- Add
workspace_short: a compact representation of the current folder.
- Add
git_branch: a short git branch name when the current folder is inside a git repo.
- Make the status bar width-aware so workspace/branch labels don’t wrap or create duplicate rows on narrow terminals.
- Avoid excessive git calls by caching the branch lookup briefly.
hermes status command
- Print two additional environment lines:
Current Folder: <resolved path>
Git Branch: <branch> or (not a git repo) when lookup fails.
- Tests
- Add/extend unit tests to cover snapshot fields (
workspace_short, git_branch) and width-aware status bar rendering.
Acceptance Criteria
- Running
hermes status includes “Current Folder” and “Git Branch” lines.
- When executed inside a git repo, “Git Branch” displays the current branch.
- When executed outside a git repo, “Git Branch” shows
(not a git repo).
- The TUI footer/status bar remains single-line and readable on narrow terminal widths.
Notes / Implementation Details
- Workspace and git branch are derived from
TERMINAL_CWD when set, otherwise from the current process working directory.
- Git branch resolution is best-effort and should never break status rendering if git is unavailable.
Labels (optional)
Links
Title
Show workspace current folder + git branch in Hermes status
Summary
Enhance the Hermes CLI status experience by displaying the user’s current workspace context (current folder + git branch when available) in:
hermes statuscommand outputThis helps users quickly confirm where they are working and which branch they’re on, without opening a separate shell command.
Motivation / Problem
Today, the Hermes status UI primarily focuses on model/provider/session metrics. When working across multiple repos/workspaces, it’s easy to lose track of the current directory and active git branch.
Proposed Change
workspace_short: a compact representation of the current folder.git_branch: a short git branch name when the current folder is inside a git repo.hermes statuscommandCurrent Folder: <resolved path>Git Branch: <branch>or(not a git repo)when lookup fails.workspace_short,git_branch) and width-aware status bar rendering.Acceptance Criteria
hermes statusincludes “Current Folder” and “Git Branch” lines.(not a git repo).Notes / Implementation Details
TERMINAL_CWDwhen set, otherwise from the current process working directory.Labels (optional)
Links