Skip to content

Conversation

@codegen-sh
Copy link

@codegen-sh codegen-sh bot commented Mar 22, 2025

This PR adds a PowerShell script to initialize a Codegen project in a Windows folder through WSL2, combining the steps of creating a directory in WSL2 and running codegen init in a single command.

Features

  • Initializes a Codegen project in WSL2 from Windows
  • Verifies that both Windows and WSL2 paths are accessible
  • Creates the destination directory in WSL2 if it doesn't exist
  • Optional integration with the Windows to WSL2 sync tool from PR Add Windows to WSL2 one-way sync tool #1
  • Detailed logging of all operations

Files Added

  1. wsl-codegen-init.ps1 - The main script that initializes Codegen in WSL2
  2. wsl-codegen-init-readme.md - Documentation with usage instructions

Usage

The script can be run with the following command:

.\wsl-codegen-init.ps1 -WindowsPath "C:\Users\L\Desktop\WORKSPACE" -WslPath "/home/l/Workspace"

To also set up continuous sync (requires the sync script from PR #1):

.\wsl-codegen-init.ps1 -WindowsPath "C:\Users\L\Desktop\WORKSPACE" -WslPath "/home/l/Workspace" -SetupSync

This addresses the user's request to merge the commands for initializing a codebase in a Windows folder through WSL2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants