Skip to content

Cursor / VSCode へインストール済みのプラグインを CLI で表示する

CursorVSCode にインストールしたプラグインの一覧はエディタの GUI から確認出来ますが、履歴を残しておきたい場合は CLI から確認出来ると便利です。 今回は「インストール済みプラグインを CLI から一覧表示する方法」をメモしておきます。

検証環境

以下の環境でテストしました。

1
2
3
4
$ sw_vers
ProductName:        macOS
ProductVersion:     14.2.1
BuildVersion:       23C71
1
2
3
4
$ code --version
1.85.1
0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2
arm64
1
2
3
4
$ cursor --version
0.21.1
1a7903c409e3e915db28f4c124497660066e85a0
arm64

CLI からインストール済みプラグインの一覧を表示する

CLI からインストール済みプラグイン一覧を表示するには --list-extensions オプションを指定します。

VSCode

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
$ code --list-extensions
bierner.markdown-preview-github-styles
charliermarsh.ruff
DavidAnson.vscode-markdownlint
GitHub.github-vscode-theme
hediet.vscode-drawio
MS-CEINTL.vscode-language-pack-ja
ms-python.python
ms-python.vscode-pylance
ms-vscode-remote.remote-containers
ms-vscode-remote.remote-ssh
ms-vscode-remote.remote-ssh-edit
ms-vscode-remote.remote-wsl
ms-vscode-remote.vscode-remote-extensionpack
ms-vscode.remote-explorer
ms-vscode.remote-server
oderwat.indent-rainbow
PKief.material-icon-theme
redhat.vscode-xml
redhat.vscode-yaml
streetsidesoftware.code-spell-checker
tomoki1207.vscode-input-sequence

Cursor

1
2
$ cursor --list-extensions
FaroSystemAppender constructor

参考

VSCode のヘルプ

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
$ code --help
Visual Studio Code 1.85.1

Usage: code [options][paths...]

To read from stdin, append '-' (e.g. 'ps aux | grep code | code -')

Options
  -d --diff <file> <file>                    Compare two files with each other.
  -m --merge <path1> <path2> <base> <result> Perform a three-way merge by providing paths for two modified
                                             versions of a file, the common origin of both modified
                                             versions and the output file to save merge results.
  -a --add <folder>                          Add folder(s) to the last active window.
  -g --goto <file:line[:character]>          Open a file at the path on the specified line and character
                                             position.
  -n --new-window                            Force to open a new window.
  -r --reuse-window                          Force to open a file or folder in an already opened window.
  -w --wait                                  Wait for the files to be closed before returning.
  --locale <locale>                          The locale to use (e.g. en-US or zh-TW).
  --user-data-dir <dir>                      Specifies the directory that user data is kept in. Can be
                                             used to open multiple distinct instances of Code.
  --profile <profileName>                    Opens the provided folder or workspace with the given profile
                                             and associates the profile with the workspace. If the
                                             profile does not exist, a new empty one is created.
  -h --help                                  Print usage.

Extensions Management
  --extensions-dir <dir>              Set the root path for extensions.
  --list-extensions                   List the installed extensions.
  --show-versions                     Show versions of installed extensions, when using
                                      --list-extensions.
  --category <category>               Filters installed extensions by provided category, when using
                                      --list-extensions.
  --install-extension <ext-id | path> Installs or updates an extension. The argument is either an
                                      extension id or a path to a VSIX. The identifier of an extension is
                                      '${publisher}.${name}'. Use '--force' argument to update to latest
                                      version. To install a specific version provide '@${version}'. For
                                      example: 'vscode.csharp@1.2.3'.
  --pre-release                       Installs the pre-release version of the extension, when using
                                      --install-extension
  --uninstall-extension <ext-id>      Uninstalls an extension.
  --enable-proposed-api <ext-id>      Enables proposed API features for extensions. Can receive one or
                                      more extension IDs to enable individually.

Troubleshooting
  -v --version                    Print version.
  --verbose                       Print verbose output (implies --wait).
  --log <level>                   Log level to use. Default is 'info'. Allowed values are 'critical',
                                  'error', 'warn', 'info', 'debug', 'trace', 'off'. You can also
                                  configure the log level of an extension by passing extension id and log
                                  level in the following format: '${publisher}.${name}:${logLevel}'. For
                                  example: 'vscode.csharp:trace'. Can receive one or more such entries.
  -s --status                     Print process usage and diagnostics information.
  --prof-startup                  Run CPU profiler during startup.
  --disable-extensions            Disable all installed extensions. This option is not persisted and is
                                  effective only when the command opens a new window.
  --disable-extension <ext-id>    Disable the provided extension. This option is not persisted and is
                                  effective only when the command opens a new window.
  --sync <on | off>               Turn sync on or off.
  --inspect-extensions <port>     Allow debugging and profiling of extensions. Check the developer tools
                                  for the connection URI.
  --inspect-brk-extensions <port> Allow debugging and profiling of extensions with the extension host
                                  being paused after start. Check the developer tools for the connection
                                  URI.
  --disable-gpu                   Disable GPU hardware acceleration.
  --disable-chromium-sandbox      Use this option only when there is requirement to launch the application
                                  as sudo user on Linux or when running as an elevated user in an
                                  applocker environment on Windows.
  --telemetry                     Shows all telemetry events which VS code collects.

Subcommands
  tunnel       Make the current machine accessible from vscode.dev or other machines through a secure
               tunnel
  serve-web    Run a server that displays the editor UI in browsers.

Cursor のヘルプ

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
$ cursor --help
Cursor 0.21.1

Usage: cursor [options][paths...]

To read from stdin, append '-' (e.g. 'ps aux | grep code | cursor -')

Options
  -d --diff <file> <file>                    Compare two files with each other.
  -m --merge <path1> <path2> <base> <result> Perform a three-way merge by providing paths for two modified
                                             versions of a file, the common origin of both modified
                                             versions and the output file to save merge results.
  -a --add <folder>                          Add folder(s) to the last active window.
  -g --goto <file:line[:character]>          Open a file at the path on the specified line and character
                                             position.
  -n --new-window                            Force to open a new window.
  -r --reuse-window                          Force to open a file or folder in an already opened window.
  -w --wait                                  Wait for the files to be closed before returning.
  --locale <locale>                          The locale to use (e.g. en-US or zh-TW).
  --user-data-dir <dir>                      Specifies the directory that user data is kept in. Can be
                                             used to open multiple distinct instances of Code.
  --profile <profileName>                    Opens the provided folder or workspace with the given profile
                                             and associates the profile with the workspace. If the
                                             profile does not exist, a new empty one is created.
  -h --help                                  Print usage.

Extensions Management
  --extensions-dir <dir>              Set the root path for extensions.
  --list-extensions                   List the installed extensions.
  --show-versions                     Show versions of installed extensions, when using
                                      --list-extensions.
  --category <category>               Filters installed extensions by provided category, when using
                                      --list-extensions.
  --install-extension <ext-id | path> Installs or updates an extension. The argument is either an
                                      extension id or a path to a VSIX. The identifier of an extension is
                                      '${publisher}.${name}'. Use '--force' argument to update to latest
                                      version. To install a specific version provide '@${version}'. For
                                      example: 'vscode.csharp@1.2.3'.
  --pre-release                       Installs the pre-release version of the extension, when using
                                      --install-extension
  --uninstall-extension <ext-id>      Uninstalls an extension.
  --enable-proposed-api <ext-id>      Enables proposed API features for extensions. Can receive one or
                                      more extension IDs to enable individually.

Troubleshooting
  -v --version                    Print version.
  --verbose                       Print verbose output (implies --wait).
  --log <level>                   Log level to use. Default is 'info'. Allowed values are 'critical',
                                  'error', 'warn', 'info', 'debug', 'trace', 'off'. You can also
                                  configure the log level of an extension by passing extension id and log
                                  level in the following format: '${publisher}.${name}:${logLevel}'. For
                                  example: 'vscode.csharp:trace'. Can receive one or more such entries.
  -s --status                     Print process usage and diagnostics information.
  --prof-startup                  Run CPU profiler during startup.
  --disable-extensions            Disable all installed extensions. This option is not persisted and is
                                  effective only when the command opens a new window.
  --disable-extension <ext-id>    Disable the provided extension. This option is not persisted and is
                                  effective only when the command opens a new window.
  --sync <on | off>               Turn sync on or off.
  --inspect-extensions <port>     Allow debugging and profiling of extensions. Check the developer tools
                                  for the connection URI.
  --inspect-brk-extensions <port> Allow debugging and profiling of extensions with the extension host
                                  being paused after start. Check the developer tools for the connection
                                  URI.
  --disable-gpu                   Disable GPU hardware acceleration.
  --disable-chromium-sandbox      Use this option only when there is requirement to launch the application
                                  as sudo user on Linux or when running as an elevated user in an
                                  applocker environment on Windows.
  --telemetry                     Shows all telemetry events which VS code collects.

Subcommands
  tunnel       Make the current machine accessible from vscode.dev or other machines through a secure
               tunnel
  serve-web    Run a server that displays the editor UI in browsers.