Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions codex-rs/tui/src/onboarding/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,24 @@ use crate::onboarding::onboarding_screen::StepStateProvider;
use super::onboarding_screen::StepState;

pub(crate) const WSL_INSTRUCTIONS: &str = r"Install WSL2 by opening PowerShell as Administrator and running:

# Install default Linux distribution (Ubuntu is recommended)
wsl --install

Instructions for how to install and run Codex in WSL:
# Restart your computer, then start a shell inside of Windows Subsystem for Linux
wsl

# Install Node.js in WSL via nvm
# Documentation: https://learn.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-wsl
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash

# In a new tab or after exiting and running `wsl` again to install Node.js
nvm install 22

# Install and run Codex in WSL
npm i -g @openai/codex
codex

# Additional details and instructions for how to install and run Codex in WSL:
https://developers.openai.com/codex/windows";

pub(crate) struct WindowsSetupWidget {
Expand Down Expand Up @@ -84,7 +97,7 @@ impl WidgetRef for &WindowsSetupWidget {
let mut lines: Vec<Line> = vec![
Line::from(vec![
"> ".into(),
"For best performance, run Codex in Windows Subsystem for Linux (WSL2)".bold(),
"To use all Codex features, we recommend running Codex in Windows Subsystem for Linux (WSL2)".bold(),
Comment on lines -87 to +99
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My questions as a user here would be:

  • why do I need to do this?
  • given that this says that it might work without using WSL (and has in the past), what do I miss out on if I don't do this?

It's worth making a note here that links to a website doc about why we're choosing WSL over just running in plain old windows. Likely we want a small blurb about the rationale (support for bash, support for better sandboxing etc.)

]),
Line::from(""),
];
Expand Down
Loading