Skip to content

Commit be2e01f

Browse files
fix(tui): Update WSL instructions (openai#5307)
## Summary Clearer and more complete WSL instructions in our shell message. ## Testing - [x] Tested locally --------- Co-authored-by: Josh McKinney <[email protected]>
1 parent a1b8a4e commit be2e01f

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

codex-rs/tui/src/onboarding/windows.rs

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,25 @@ use crate::onboarding::onboarding_screen::StepStateProvider;
1919

2020
use super::onboarding_screen::StepState;
2121

22-
pub(crate) const WSL_INSTRUCTIONS: &str = r"Install WSL2 by opening PowerShell as Administrator and running:
23-
22+
pub(crate) const WSL_INSTRUCTIONS: &str = r#"Install WSL2 by opening PowerShell as Administrator and running:
23+
# Install WSL using the default Linux distribution (Ubuntu).
24+
# See https://learn.microsoft.com/en-us/windows/wsl/install for more info
2425
wsl --install
2526
26-
Instructions for how to install and run Codex in WSL:
27+
# Restart your computer, then start a shell inside of Windows Subsystem for Linux
28+
wsl
29+
30+
# Install Node.js in WSL via nvm
31+
# Documentation: https://learn.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-wsl
32+
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash && export NVM_DIR="$HOME/.nvm" && \. "$NVM_DIR/nvm.sh"
33+
nvm install 22
34+
35+
# Install and run Codex in WSL
36+
npm install --global @openai/codex
37+
codex
2738
28-
https://developers.openai.com/codex/windows";
39+
# Additional details and instructions for how to install and run Codex in WSL:
40+
https://developers.openai.com/codex/windows"#;
2941

3042
pub(crate) struct WindowsSetupWidget {
3143
pub codex_home: PathBuf,
@@ -84,8 +96,10 @@ impl WidgetRef for &WindowsSetupWidget {
8496
let mut lines: Vec<Line> = vec![
8597
Line::from(vec![
8698
"> ".into(),
87-
"For best performance, run Codex in Windows Subsystem for Linux (WSL2)".bold(),
99+
"To use all Codex features, we recommend running Codex in Windows Subsystem for Linux (WSL2)".bold(),
88100
]),
101+
Line::from(vec![" ".into(), "WSL allows Codex to run Agent mode in a sandboxed environment with better data protections in place.".into()]),
102+
Line::from(vec![" ".into(), "Learn more: https://developers.openai.com/codex/windows".into()]),
89103
Line::from(""),
90104
];
91105

0 commit comments

Comments
 (0)