Repository navigation
Expand file tree
/
Copy pathenv.ts
More file actions
67 lines (58 loc) · 1.38 KB
/
Copy pathenv.ts
File metadata and controls
67 lines (58 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/**
* CLI-specific environment variable types.
*
* Extends base types from common with CLI-specific vars for:
* - Terminal/IDE detection
* - Editor preferences
* - Binary build configuration
*/
/**
* Base runtime environment variables.
* These are OS-level env vars common across all packages.
*/
export type BaseEnv = {
// Shell detection
SHELL?: string
COMSPEC?: string // Windows command processor
// Home directory
HOME?: string
USERPROFILE?: string // Windows home
APPDATA?: string // Windows app data
XDG_CONFIG_HOME?: string // Linux config home
// Terminal detection
TERM?: string
TERM_PROGRAM?: string
TERM_BACKGROUND?: string
COLORFGBG?: string
// Node/runtime
NODE_ENV?: string
NODE_PATH?: string
PATH?: string
}
/**
* CLI-specific env vars for terminal/IDE detection and editor preferences.
*/
export type CliEnv = BaseEnv & {
// Terminal detection (for tmux/screen passthrough)
TERM?: string
TMUX?: string
STY?: string
// SSH/remote session detection
SSH_CLIENT?: string
SSH_TTY?: string
SSH_CONNECTION?: string
// Terminal-specific
KITTY_WINDOW_ID?: string
SIXEL_SUPPORT?: string
ZED_NODE_ENV?: string
ZED_TERM?: string
ZED_SHELL?: string
COLORTERM?: string
// Editor preferences
VISUAL?: string
EDITOR?: string
}
/**
* Function type for getting CLI env values.
*/
export type GetCliEnvFn = () => CliEnv