@vibest/claude-code-statusline 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -220,6 +220,19 @@ function contextWidget(data) {
220
220
  function separator() {
221
221
  return gray(" \u2223 ");
222
222
  }
223
+ function sshWidget() {
224
+ const isSSH = process.env.SSH_CONNECTION || process.env.SSH_CLIENT || process.env.SSH_TTY;
225
+ if (!isSSH) {
226
+ return "";
227
+ }
228
+ try {
229
+ const hostname = __require("os").hostname();
230
+ const shortHostname = hostname.split(".")[0];
231
+ return yellow(`SSH(${shortHostname})`);
232
+ } catch {
233
+ return yellow("SSH");
234
+ }
235
+ }
223
236
 
224
237
  // src/cli.ts
225
238
  var args = process.argv.slice(2);
@@ -262,7 +275,13 @@ try {
262
275
  line1Parts.push(changes);
263
276
  }
264
277
  const line1 = line1Parts.join(separator());
265
- const line2 = projectGitWidget(data);
278
+ const ssh = sshWidget();
279
+ let line2 = "";
280
+ if (ssh) {
281
+ line2 = ssh + " " + projectGitWidget(data);
282
+ } else {
283
+ line2 = projectGitWidget(data);
284
+ }
266
285
  console.log(line1 + `
267
286
  ` + line2);
268
287
  } catch {
package/dist/widgets.d.ts CHANGED
@@ -59,3 +59,8 @@ export declare function separator(): string;
59
59
  * Powerline separator (right arrow)
60
60
  */
61
61
  export declare function powerlineSeparator(): string;
62
+ /**
63
+ * SSH connection indicator with hostname
64
+ * Shows "SSH(hostname)" when connected via SSH, empty otherwise
65
+ */
66
+ export declare function sshWidget(): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibest/claude-code-statusline",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "A customizable statusline for Claude Code CLI",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",