Skip to content

Feature request: import a VS Code multi-root workspace (.code-workspace) into bb #2181

Description

@HatriGt

🧩 Summary

Add first-class support for importing a VS Code multi-root workspace (.code-workspace) into bb — mapping its folders entries onto bb projects/sources — so users who organize their work as a VS Code workspace can bring everything into bb in one step instead of hand-creating a project per folder.


📖 Background

Today bb's model is:

Project = one repository/directory

A VS Code .code-workspace is a JSON file that lists one or more root folders (frequently several independent repos) alongside editor settings:

{
  "folders": [
    { "path": "services/api" },
    { "path": "services/web" },
    { "path": "../shared-libs" }
  ],
  "settings": { /* ... */ }
}

There is currently no way to:

  • point bb at a .code-workspace file, or
  • represent a multi-root workspace as a group of related projects.

Note: I confirmed there is no existing issue or PR for this. Every "workspace" reference in the repo today concerns bb's own environment/checkout concept (the workspaces label), not VS Code workspaces.


🎯 Use case

I keep a multi-root .code-workspace containing several repos I work on together. To use them in bb today I have to manually run bb project create once per folder and keep them in sync by hand. I'd like bb to read the .code-workspace and set this up automatically.


💡 Proposed behavior

Given a path to a .code-workspace, bb parses each folders[].path (resolving relative paths against the workspace file's location) and applies one of two strategies:

Strategy Behavior
per-folder (recommended) Create one bb project per folder
single Create a single project rooted at the primary folder, with the rest added via bb project source add

Suggested CLI surface

bb project import --from-code-workspace /path/to/my.code-workspace \
  [--strategy per-folder|single] \
  [--machine <id-or-name>]

Suggested desktop surface

  • An "Import VS Code workspace…" action in the project-creation flow.

❓ Open questions

  • Default strategy: per-folder projects vs. single project + multiple sources — or leave it as the --strategy flag above?
  • Should bb map any .code-workspace settings (e.g. ignored paths) onto project config, or use folders only?
  • Naming: derive project name(s) from the workspace filename and/or the individual folder names?

🔀 Alternatives considered

Manually creating one project per folder — works, but it's tedious and drifts out of sync whenever the workspace's folder list changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    clibb CLIworkspacesWorktrees, environments, git, shells

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions