Skip to content

feat: add sqlcmd open vscode and sqlcmd open ssms commands#688

Open
dlevy-msft-sql wants to merge 1 commit intomicrosoft:mainfrom
dlevy-msft-sql:pr-685
Open

feat: add sqlcmd open vscode and sqlcmd open ssms commands#688
dlevy-msft-sql wants to merge 1 commit intomicrosoft:mainfrom
dlevy-msft-sql:pr-685

Conversation

@dlevy-msft-sql
Copy link
Contributor

@dlevy-msft-sql dlevy-msft-sql commented Feb 1, 2026

Summary

Adds sqlcmd open vscode and sqlcmd open ssms commands to replace deprecated Azure Data Studio integration.

Both use clipboard-based password sharing (VS Code uses sandboxed credential storage; SSMS 18+ removed -P flag).

Commands

sqlcmd open vscode

  • Creates connection profile in VS Code's mssql.connections
  • Copies password to clipboard
  • Optional --install-extension flag

sqlcmd open ssms (Windows only)

  • Launches SSMS with -S and -U pre-filled, -C for self-signed certs
  • Copies password to clipboard
  • Exits with helpful error on macOS/Linux

Usage

sqlcmd create mssql --accept-eula
sqlcmd open vscode              # Opens VS Code, password in clipboard
sqlcmd open ssms                # Windows: opens SSMS, password in clipboard

Supersedes #685. Fixes #584.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for opening Visual Studio Code and SQL Server Management Studio (SSMS) to work with SQL Server connections managed by sqlcmd, addressing the deprecation of Azure Data Studio. The implementation uses clipboard-based password sharing since both tools use sandboxed credential storage.

Changes:

  • Adds sqlcmd open vscode command that creates connection profiles in VS Code settings and auto-installs the MSSQL extension
  • Adds sqlcmd open ssms command (Windows-only) that launches SSMS with pre-configured connection parameters
  • Implements cross-platform clipboard support for secure password sharing
  • Includes comprehensive tests and documentation updates

Reviewed changes

Copilot reviewed 30 out of 31 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
cmd/modern/root/open.go Updates open command to include VSCode and SSMS subcommands
cmd/modern/root/open/vscode.go Main VSCode command implementation with settings file manipulation
cmd/modern/root/open/vscode_*.go Platform-specific VSCode implementations
cmd/modern/root/open/ssms.go Main SSMS command implementation
cmd/modern/root/open/ssms_*.go Platform-specific SSMS implementations (Fatal on non-Windows)
cmd/modern/root/open/clipboard.go Helper function for clipboard-based password sharing
cmd/modern/root/open/*_test.go Comprehensive test coverage for new commands
internal/tools/tool/vscode*.go VSCode tool detection and configuration
internal/tools/tool/ssms*.go SSMS tool detection and configuration
internal/pal/clipboard*.go Cross-platform clipboard implementation using native APIs
internal/tools/tools.go Registers VSCode and SSMS tools
README.md Adds clear documentation with usage examples
.gitignore Adds /modern build artifact

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 30 out of 31 changed files in this pull request and generated 9 comments.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 30 out of 31 changed files in this pull request and generated 1 comment.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 30 out of 31 changed files in this pull request and generated 1 comment.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 32 out of 33 changed files in this pull request and generated 3 comments.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 33 out of 34 changed files in this pull request and generated 1 comment.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 33 out of 34 changed files in this pull request and generated 2 comments.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 33 out of 34 changed files in this pull request and generated 4 comments.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 33 out of 34 changed files in this pull request and generated no new comments.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 33 out of 34 changed files in this pull request and generated 1 comment.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 33 out of 34 changed files in this pull request and generated 1 comment.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 33 out of 34 changed files in this pull request and generated no new comments.

@dlevy-msft-sql dlevy-msft-sql force-pushed the pr-685 branch 3 times, most recently from 74dc09d to b64f990 Compare February 5, 2026 19:40
@dlevy-msft-sql dlevy-msft-sql changed the title Add sqlcmd open vscode and sqlcmd open ssms commands feat: add sqlcmd open vscode and sqlcmd open ssms commands Feb 5, 2026
@dlevy-msft-sql dlevy-msft-sql force-pushed the pr-685 branch 2 times, most recently from c274879 to dd1141d Compare February 6, 2026 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Size: S Small issue (less than one week effort) SSMS vscode-mssql-ext

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove ADS and add support for VSCode + MSSQL

1 participant