P

Project Info Statusline Setup

Boost productivity using this display, comprehensive, project, information. Includes structured workflows, validation checks, and reusable patterns for statusline.

SettingClipticsstatuslinev1.0.0MIT
0 views0 copies

Project Info Statusline Setup

Comprehensive project information statusline displaying model name, working directory, Node.js version, and Claude Code version.

When to Use This Setting

Apply this setting when you need to:

  • Display full development context including runtime versions and tool versions in a single statusline
  • Work across multiple projects where knowing the Node.js version and Claude Code version prevents compatibility issues
  • Provide complete session context during pair programming, screen sharing, or debugging sessions Consider alternatives when:
  • You already know your runtime versions and prefer a more compact statusline with less information
  • Your projects do not use Node.js and the version display would always show N/A

Quick Start

Configuration

name: project-info-statusline-setup type: setting category: statusline

Example Application

claude setting:apply project-info-statusline-setup

Example Output

Setting applied. Changes:
- statusLine.type: command
- statusLine.command: bash project-info inline
- display_fields: model, directory, node_version, claude_version
- node_detection: node --version with N/A fallback
- version_source: session input JSON

Core Concepts

Project Info Overview

AspectDetails
Model DisplayShows the active Claude model display name extracted from session input JSON
DirectoryDisplays the basename of the current working directory for project context
Node.js VersionRuns node --version with a fallback to N/A if Node.js is not installed
Claude VersionReads the version field from the session input JSON provided by Claude Code
DependenciesRequires jq for JSON parsing; node command is optional with graceful fallback

Project Info Architecture

+-------------------+     +---------------------+     +------------------+
| Session Input     |---->| JSON Field Extract  |---->| Node Version     |
| model, version    |     | model.display_name  |     | node --version   |
| workspace.dir     |     | version string      |     | or N/A fallback  |
+-------------------+     +---------------------+     +------------------+
                                   |                          |
                                   v                          v
                          +---------------------+    +------------------+
                          | Directory Basename  |    | Status Assembler |
                          | ${DIR##*/}          |--->| model+dir+node+  |
                          +---------------------+    | claude version   |
                                                     +------------------+

Configuration

ParameterTypeDefaultDescription
show_modelbooleantrueInclude the Claude model display name in the statusline
show_directorybooleantrueShow the basename of the current working directory
show_node_versionbooleantrueDisplay the installed Node.js version or N/A fallback
show_claude_versionbooleantrueInclude the Claude Code version from session metadata
node_commandstring"node"Command to invoke for Node.js version detection

Best Practices

  1. Use with nvm or fnm version managers - If you use Node version managers, the statusline will show whichever Node version is active in the current shell. This helps catch version mismatches when switching between projects that require different Node versions.
  2. Add additional runtime versions - Extend the script to include Python version, Go version, or any other runtime your projects depend on. Each additional version adds only one shell command to the statusline script.
  3. Truncate long directory names - If your project directories have long names, the statusline can overflow. Add a character limit to the directory display that truncates with an ellipsis beyond 20 characters.
  4. Pin the statusline for documentation - When writing setup documentation, the project info statusline provides a snapshot of your exact development environment. Use it as a reference for reproducing your setup.
  5. Monitor version drift across team members - Share the project info statusline configuration with your team so everyone displays the same fields. During standup calls, a quick statusline check reveals if anyone is running outdated Node or Claude versions.

Common Issues

  1. Node version shows N/A - Node.js is not installed or not available on the current PATH. Install Node.js or ensure your version manager has activated the correct Node version for this shell session.
  2. Claude version shows null - The session input JSON may not include the version field in older Claude Code releases. Update Claude Code to the latest version where this field is guaranteed to be present.
  3. Directory shows full path instead of basename - The parameter expansion should strip the path prefix. Verify the jq extraction is returning the complete path and that the bash expansion is applied after the jq output.
Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates