The @eclipse-glsp/cli package provides helpful scripts and commands for extension and application development.
It contributes glsp, a command line tool that offers all of these commands.
Install @eclipse-glsp/cli as a dev dependency in your application.
pnpm add --save-dev @eclipse-glsp/cliUsage: glsp [options] [command]
Options:
-V, --version output the version number
-h, --help display help for command
Commands:
checkHeaders [options] <rootDir> Validates the copyright year range (end year) of license header files
updateNext|u [options] [rootDir] Updates all pinned `next` dependencies in a GLSP project to the currently published 'next' versions
generateIndex [options] <rootDir...> Generate index files in a given source directory.
releng Commands for GLSP release engineering (Linux only, intended for CI/Maintainer use).
repo Multi-repository management for GLSP projects
help [command] display help for commandThe checkHeaders command validates the copyright year (range) of license headers.
It checks for each file (matching the include pattern) whether the defined copyright range is in line with the first and last modification date in the git repository.
It prints the violations it finds to the console and can fix them automatically.
Restrict the check to pending changes or the last commit, for example to validate a commit before opening a PR.
$ glsp checkHeaders -h
Usage: glsp checkHeaders [options] <rootDir>
Validates the copyright year range (end year) of license header files
Arguments:
rootDir The starting directory for the check
Options:
-t, --type <type> The scope of the check. In addition to a full recursive check, is also possible to only
consider pending changes or the last commit (choices: "full", "changes", "lastCommit",
default: "full")
-f, --fileExtensions <extensions...> File extensions that should be checked (default: ["ts","tsx"])
-e, --exclude <exclude...> File patterns that should be excluded from the check. New exclude patterns are added to
the default patterns (default: [**/@(node_modules|lib|dist|bundle)/**])
--no-exclude-defaults Disables the default excludes patterns. Only explicitly passed exclude patterns (-e,
--exclude) are considered
-j, --json Also persist validation results as json file (default: false)
-a, --autoFix Auto apply & commit fixes without prompting the user (default: false)
-h, --help display help for commandThe updateNext command updates the cross-repo GLSP nightly dependencies of a downstream repository
(e.g. the Theia or VS Code integration). Since GLSP nightlies are published as consistent exact-pinned
sets, downstream repositories pin them explicitly too: every @eclipse-glsp/* / @eclipse-glsp-examples/*
dependency with an exact next version (e.g. 2.9.0-next.3) is rewritten in the package.json files to
the version currently published under the next dist-tag, followed by a pnpm install to reconcile the
lockfile. Every nightly bump is therefore an explicit, reviewable manifest diff. Legacy literal next
(dist-tag) ranges are migrated to exact pins on the first run; exact next versions of non-GLSP packages
are left alone.
$ glsp updateNext -h
Usage: glsp updateNext|u [options] [rootDir]
Updates all pinned `next` dependencies in a GLSP project to the currently published 'next' versions
Arguments:
rootDir The repository root (default: "<cwd>")
Options:
-v, --verbose Enable verbose (debug) log output (default: false)
-h, --help display help for commandUse this command to create an index file of all sources in a given directory and its sub-directories.
$ glsp generateIndex -h
Usage: glsp generateIndex [options] <rootDir...>
Generate index files in a given source directory.
Arguments:
rootDir The source directory for index generation.
Options:
-s, --singleIndex Generate a single index file in the source directory instead of indices in each
sub-directory (default: false)
-f, --forceOverwrite Overwrite existing index files and remove them if there are no entries (default: false)
-m, --match [match patterns...] File patterns to consider during indexing (default: ["**/*.ts","**/*.tsx"])
-i, --ignore [ignore patterns...] File patterns to ignore during indexing (default:
["**/*.spec.ts","**/*.spec.tsx","**/*.d.ts"])
--style <importStyle> Import Style (choices: "commonjs", "esm", default: "commonjs")
--ignoreFile <ignoreFile> The file that is used to specify patterns that should be ignored during indexing (default:
".indexignore")
-v, --verbose Generate verbose output during generation (default: false)
-h, --help display help for commandCommands for GLSP release engineering. These commands are intended for CI usage and direct usage by Eclipse GLSP committers. They are not general-purpose commands. Subcommands might rely on tools and CLI commands that are only available in Linux environments.
$ glsp releng -h
Usage: glsp releng [options] [command]
Commands for GLSP release engineering (Linux only, intended for CI/Maintainer use).
Options:
-h, --help display help for command
Commands:
version [options] <versionType> [customVersion] Set the version of all packages in a GLSP repository
prepare [options] <versionType> [customVersion] Prepare a new release for a GLSP component (version bump, changelog, PR
creation ...)
publish [options] <distTag> Publish all workspace packages of a GLSP repository
tag [options] <version> Push the signed release tag v<version> on the merge commit of the
release PR, which starts publishing, and create the GitHub release
help [command] display help for commandCommand to bump the version of all packages in a GLSP repository.
This bumps the version of all workspace packages (the root package.json version is the source of truth).
It also bumps external GLSP dependencies and preserves workspace: ranges.
The glsp repository type ("glsp-core", "glsp-theia-integration" etc.) is auto detected from the given repository path.
If the command is invoked in a non-GLSP repository it will fail.
$ glsp releng version -h
Usage: glsp releng version [options] <versionType> [customVersion]
Set the version of all packages in a GLSP repository
Arguments:
versionType The version type (choices: "major", "minor", "patch", "custom", "next")
customVersion Custom version number. Will be ignored if the release type is not "custom"
Options:
-v, --verbose Enable verbose (debug) log output (default: false)
-r, --repoDir <repoDir> Path to the component repository (default:
"<cwd>")
-h, --help display help for commandPrepares a new release for a GLSP repository. This includes bumping the version, updating the changelog, committing and pushing the changes and opening a PR for the release.
The glsp repository type ("glsp-core", "glsp-theia-integration" etc.) is auto detected from the given repository path. If the command is invoked in a non-GLSP repository it will fail.
$ glsp releng prepare -h
Usage: glsp releng prepare [options] <versionType> [customVersion]
Prepare a new release for a GLSP component (version bump, changelog, PR creation ...)
Arguments:
versionType The version type (choices: "major", "minor", "patch", "custom", "next")
customVersion Custom version number. Will be ignored if the release type is not "custom"
Options:
-v, --verbose Enable verbose (debug) log output (default: false)
-r, --repoDir <repoDir> Path to the component repository (default:
"<cwd>")
--no-push Do not push changes to remote git repository
-d, --draft Create a draft pull request (only if push is enabled) (default: false)
--no-check Skip initial checks for existing dependency versions
-h, --help display help for commandTags a release after its release PR (from release-v<version>, opened by prepare) is merged.
It signs the tag v<version> on the merge commit and pushes it, which starts the publishing workflows, then creates
the GitHub release with the version's changelog section as notes.
The publishing workflows only accept a tag that GitHub shows as verified, so a pushed tag that is not verified is
deleted again; add your signing key to your GitHub account as a signing key.
An existing tag on the right commit and an existing GitHub release are skipped, so the command can be rerun.
The repository is derived from the origin remote, so it works the same on a fork.
$ glsp releng tag -h
Usage: glsp releng tag [options] <version>
Push the signed release tag v<version> on the merge commit of the release PR, which starts publishing, and create the GitHub release
Arguments:
version The released version, e.g. 2.9.0
Options:
-v, --verbose Enable verbose (debug) log output (default: false)
-r, --repoDir <repoDir> Path to the component repository (default: "<cwd>")
-d, --draft Create the GitHub release as a draft (default: false)
--dry-run Sign the tag locally and print the release notes; push and create nothing (default: false)
-h, --help display help for commandPublishes the (public) workspace packages of a GLSP repository via pnpm publish -r (replaces lerna publish).
next: applies a canary version (<root-version>.<commit-count>, e.g.2.8.0-next.42, counted since the last release tagv*or from the root commit if none exists) and publishes under thenextdist-tag. Requires the full git history (fetch-depth: 0in CI) to derive the commit count.latest: publishes the current package versions under thelatestdist-tag. Packages whose version already exists on the registry are skipped.
next publishing is affected-only per package. Changes are detected from the last commit
(HEAD^..HEAD, matching the previous per-repo publish workflows; override the baseline with
--since <ref>). The glsp-core publish workflow passes the commit of its last successful next
publish as --since. A package is published when files in its directory changed, or when a package it
(transitively) depends on via a workspace: range is published (e.g. a protocol change also
publishes sprotty, client, server and the examples, so the newest nightlies always form a
consistent set — while a client-only change publishes just client and its dependents).
Published packages carry exact-pinned internal dependencies: packages in the affected groups get the
canary version, while packages outside them are locally pinned to their currently published next
version (resolved via npm view), so every workspace: pin of a published package resolves to a
version that exists on npm. Because a dependency change always republishes all dependents, the pinned
version is the same one the other nightlies already reference — the newest nightly of every package
always forms one consistent, reproducible set. If an unaffected package has no published next version
yet (e.g. a brand-new package), a full publish is performed instead. A change to the root
tsconfig.json affects the compiled output of all packages and therefore also forces a full publish,
as does a missing/invalid baseline or the --full flag. If no group is affected (e.g. docs- or CI-only
changes), the command succeeds without publishing anything. Canary versions that already exist on the
registry are skipped: the commit count only grows, so they can only stem from an earlier run over the
same commit — this makes re-runs (e.g. to heal a partially failed publish) idempotent.
pnpm publish -r does the publishing, so it rewrites workspace: dependency ranges to exact
versions; npm provenance/trusted publishing (NPM_CONFIG_PROVENANCE) is preserved.
$ glsp releng publish -h
Usage: glsp releng publish [options] <distTag>
Publish the affected workspace packages of a GLSP repository via `pnpm publish`
Arguments:
distTag The npm dist-tag to publish under (choices: "next", "latest")
Options:
-v, --verbose Enable verbose (debug) log output (default: false)
-r, --repoDir <repoDir> Path to the component repository (default: "<cwd>")
--dry-run Derive versions and run `pnpm publish` in dry-run mode without applying changes (default: false)
--registry <url> Publish to a custom npm registry (e.g. a local verdaccio for testing)
--since <ref> Baseline for affected-only 'next' publishing (default: HEAD^, i.e. the changes of the last commit)
--full Publish all packages, ignoring the affected-only baseline ('next' only) (default: false)
-h, --help display help for commandMulti-repository workspace management for GLSP development.
All repositories are expected to live as siblings in a shared workspace directory (e.g. ~/glsp/glsp-core, ~/glsp/glsp-theia-integration, etc.).
The CLI discovers repositories by scanning the workspace directory for known GLSP repo names.
It finds the workspace directory by walking up from the current directory. Override it with --dir.
The clone protocol is detected automatically. If the GitHub CLI (gh) is installed and authenticated, the CLI uses gh, otherwise https.
This can be overridden per command via --protocol.
$ glsp repo -h
Usage: glsp repo [options] [command]
Multi-repository management for GLSP projects
Options:
-h, --help display help for command
Commands:
clone [options] [repos...] Clone GLSP repositories
fork [options] <user> Add fork remotes to already-cloned repositories
build [options] Build repositories (dependency-ordered)
link [options] Interlink repositories via pnpm-workspace.yaml link overrides
unlink [options] Remove the pnpm link overrides between repositories
pwd [options] Print resolved paths for all discovered repositories
log [options] Print the last commit for all discovered repositories
workspace Manage VS Code workspace files for GLSP projects
glsp-core|core Operations on the glsp-core repository
glsp-theia-integration|theia Operations on the glsp-theia-integration repository
glsp-vscode-integration|vscode Operations on the glsp-vscode-integration repository
glsp-eclipse-integration|eclipse Operations on the glsp-eclipse-integration repository
glsp-server|server-java Operations on the glsp-server repository
help [command] display help for commandClones GLSP repositories into the workspace directory.
Repositories can be specified as positional arguments, via --preset, or interactively with --interactive.
$ glsp repo clone -h
Usage: glsp repo clone [options] [repos...]
Clone GLSP repositories
Arguments:
repos Repositories to clone (can combine with --preset)
Options:
-d, --dir <path> Target directory for repo clones
-p, --protocol <protocol> Git clone protocol (default: gh|https) (choices: "ssh", "https", "gh")
-b, --branch <name> Branch or tag to check out after cloning
--fork <user> Clone from a fork and set up dual-remote (origin=fork, upstream=eclipse-glsp)
--override <mode> How to handle an existing target directory (choices: "rename", "remove")
--preset <name> Clone repos from a preset (choices: "core", "theia", "vscode",
"eclipse", "playwright", "all")
-i, --interactive Guided setup: choose preset, protocol, and fork interactively (default: false)
--no-fail-fast Continue cloning after a failure
-v, --verbose Verbose output (default: false)
-h, --help display help for commandAdds fork remotes to already-cloned repositories. For each repo, restructures the git remotes so that
origin points to your fork and upstream points to eclipse-glsp. If the fork doesn't exist on GitHub
and the gh CLI is available, it will create one.
$ glsp repo fork -h
Usage: glsp repo fork [options] <user>
Add fork remotes to already-cloned repositories
Arguments:
user GitHub username for the fork
Options:
-d, --dir <path> Target directory where repos are cloned
-p, --protocol <protocol> Git clone protocol (default: gh|https) (choices: "ssh", "https", "gh")
-r, --repo <name...> Fork only these repos
--preset <name> Fork repos from a preset (choices: "core", "theia", "vscode",
"eclipse", "playwright", "all")
-v, --verbose Verbose output (default: false)
-h, --help display help for commandBuilds repositories in dependency order. Understands the GLSP dependency graph and builds prerequisites first.
$ glsp repo build -h
Usage: glsp repo build [options]
Build repositories (dependency-ordered)
Options:
-d, --dir <path> Target directory where repos are cloned
-r, --repo <name...> Build only these repos
--preset <name> Build repos from a preset (choices: "core", "theia", "vscode",
"eclipse", "playwright", "all")
--electron Build Theia electron variant instead of browser (default: false)
--no-java Skip repositories that require Java/Maven
--no-fail-fast Continue building after a failure
-v, --verbose Verbose output (default: false)
-h, --help display help for commandLinks (or unlinks) repositories for cross-repo development by injecting link: overrides into each
consumer's pnpm-workspace.yaml and reinstalling. Repositories are processed in dependency order, and
singleton dependencies (sprotty, sprotty-protocol, vscode-jsonrpc, inversify) are shared from glsp-core
to avoid duplicate instances. After linking a repo the CLI builds it, so the link: overrides resolve to
compiled lib/ output rather than empty source directories (pass --no-build to skip); only the npm/pnpm
side is built, so the glsp-eclipse-integration Maven server is left to a separate build. unlink removes
those overrides again and reinstalls.
For glsp-eclipse-integration, whose linkable pnpm workspace lives in a client/ subdirectory, the
overrides are injected into client/pnpm-workspace.yaml.
$ glsp repo link -h
Usage: glsp repo link [options]
Interlink repositories via pnpm-workspace.yaml link overrides
Options:
-d, --dir <path> Target directory where repos are cloned
-r, --repo <name...> Link only these repos
--preset <name> Link repos from a preset (choices: "core", "theia", "vscode",
"eclipse", "playwright", "all")
--no-build Skip building the linked repos (links resolve to existing compiled output)
--electron Build the Theia electron variant instead of browser (default: false)
--no-fail-fast Continue after a failure
-v, --verbose Verbose output (default: false)
-h, --help display help for command$ glsp repo pwd -h
Usage: glsp repo pwd [options]
Print resolved paths for all discovered repositories
Options:
-d, --dir <path> Target directory where repos are cloned
--raw Print repo<tab>path per line, no color (default: false)
-v, --verbose Verbose output (default: false)
-h, --help display help for command$ glsp repo log -h
Usage: glsp repo log [options]
Print the last commit for all discovered repositories
Options:
-d, --dir <path> Target directory where repos are cloned
-r, --repo <name...> Log only these repos
--preset <name> Log repos from a preset (choices: "core", "theia", "vscode",
"eclipse", "playwright", "all")
-v, --verbose Verbose output (default: false)
-h, --help display help for commandManage VS Code multi-root workspace files.
$ glsp repo workspace init -h
Usage: glsp repo workspace init [options]
Generate a VS Code multi-root workspace file
Options:
-d, --dir <path> Target directory where repos are cloned
-o, --output <path> Output path for the workspace file
-r, --repo <name...> Include only these repos
--preset <name> Include repos from a preset (choices: "core", "theia", "vscode",
"eclipse", "playwright", "all")
-v, --verbose Verbose output (default: false)
-h, --help display help for command$ glsp repo workspace open -h
Usage: glsp repo workspace open [options]
Open the VS Code workspace file
Options:
-d, --dir <path> Target directory where repos are cloned
-v, --verbose Verbose output (default: false)
-h, --help display help for commandEach repository has a set of scoped subcommands accessible via glsp repo <name> or its short alias.
Short aliases: core, theia, vscode, eclipse, server-java.
All repos support clone, switch, build, pwd, and log subcommands.
Some repos have additional repo-specific commands:
| Repo | Extra commands |
|---|---|
glsp-core |
client, server |
glsp-server |
start |
glsp-theia-integration |
start, open |
glsp-vscode-integration |
vsix-path, package |
glsp-core bundles several components in one repository, so it groups them instead of offering a single start.
glsp repo core client start runs the standalone example, glsp repo core server start the node GLSP
server, and glsp repo core server node-bundle / browser-bundle print the built server bundle paths.
$ glsp repo core -h
Usage: glsp repo glsp-core|core [options] [command]
Operations on the glsp-core repository
Commands:
clone [options] Clone the glsp-core repository
switch [options] Switch branch or checkout a PR in glsp-core
build [options] Build the glsp-core repository
pwd [options] Print the resolved path for glsp-core
log [options] Print the last commit for glsp-core
run [options] Run an arbitrary package.json script in glsp-core
client Operations on the GLSP client and its standalone example
server Operations on the node GLSP server and its workflow example
help [command] display help for command$ glsp repo core server -h
Usage: glsp repo glsp-core|core server [options] [command]
Operations on the node GLSP server and its workflow example
Commands:
start [options] Start the workflow example node GLSP server
node-bundle [options] Print the absolute path to the Node.js server bundle
browser-bundle [options] Print the absolute path to the browser (Web Worker) server bundle
help [command] display help for command$ glsp repo vscode -h
Usage: glsp repo glsp-vscode-integration|vscode [options] [command]
Operations on the glsp-vscode-integration repository
Commands:
clone [options] Clone the glsp-vscode-integration repository
switch [options] Switch branch or checkout a PR in glsp-vscode-integration
build [options] Build the glsp-vscode-integration repository
pwd [options] Print the resolved path for glsp-vscode-integration
log [options] Print the last commit for glsp-vscode-integration
vsix-path [options] Print the path to the workflow VSIX file
package [options] Package the workflow VS Code extension as a VSIX
help [command] display help for command$ glsp repo theia -h
Usage: glsp repo glsp-theia-integration|theia [options] [command]
Operations on the glsp-theia-integration repository
Commands:
clone [options] Clone the glsp-theia-integration repository
switch [options] Switch branch or checkout a PR in glsp-theia-integration
build [options] Build the glsp-theia-integration repository
pwd [options] Print the resolved path for glsp-theia-integration
log [options] Print the last commit for glsp-theia-integration
start [options] Start the Theia application for glsp-theia-integration
open [options] Open the Theia application in the browser for glsp-theia-integration
help [command] display help for commandFor more information, please visit the Eclipse GLSP Umbrella repository and the Eclipse GLSP Website. If you have questions, please raise them in the discussions and have a look at our communication and support options.