CodeWorkspaceTool 1.0.0-alpha.1

This is a prerelease version of CodeWorkspaceTool.
dotnet tool install --global CodeWorkspaceTool --version 1.0.0-alpha.1
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local CodeWorkspaceTool --version 1.0.0-alpha.1
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=CodeWorkspaceTool&version=1.0.0-alpha.1&prerelease
                    
nuke :add-package CodeWorkspaceTool --version 1.0.0-alpha.1
                    

CodeWorkspaceTool

A .NET tool for creating and managing VS Code multi-root workspace files (*.code-workspace) from the command line — the same way dotnet sln manages a .sln file's project references.

Built with Spectre.Console.Cli.

Install

dotnet tool install --global CodeWorkspaceTool

This installs the codews command.

Usage

Every command that operates on an existing workspace file will auto-discover the single *.code-workspace file in the current directory. If there isn't exactly one, pass -w/--workspace <FILE> explicitly.

Create a workspace

codews init [NAME] [-o|--output <DIRECTORY>] [--force]

Creates NAME.code-workspace (defaults to the output directory's name) with an empty folder list. --force overwrites an existing file.

Manage folders

codews folder add <PATH>... [--name <LABEL>] [-w|--workspace <FILE>]
codews folder remove <PATH>... [-w|--workspace <FILE>]
codews folder list [--format table|json] [-w|--workspace <FILE>]

--name is only valid when adding a single folder. Adding a folder already in the workspace is a no-op; removing one that isn't present is an error.

codews extension add <ID>... [--unwanted] [-w|--workspace <FILE>]
codews extension remove <ID>... [--unwanted] [-w|--workspace <FILE>]
codews extension list [--format table|json] [-w|--workspace <FILE>]

--unwanted targets extensions.unwantedRecommendations instead of extensions.recommendations.

Manage settings

codews settings set <KEY> <VALUE> [--type auto|string|bool|int|number|json] [-w|--workspace <FILE>]
codews settings unset <KEY> [-w|--workspace <FILE>]
codews settings list [--format table|json] [-w|--workspace <FILE>]

By default (--type auto), the value's type is inferred from its text (true/false → bool, numeric text → int/number, {...}/[...] → JSON, otherwise a string). Use --type to force a specific interpretation, e.g.:

codews settings set editor.formatOnSave true
codews settings set "[python].editor.rulers" "[80,120]" --type json

Design notes

  • Sections the tool doesn't manage (launch, tasks, arbitrary top-level keys) are read and written back untouched.
  • The workspace file is rewritten as plain, reformatted JSON on every save — comments and custom formatting in a hand-edited file are not preserved.

Source

https://github.com/Kralizek/VisualStudioCodeWorkspace

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
1.0.0-alpha.1 73 7/9/2026