LinuxCommandLibrary

webstorm

Launch the WebStorm IDE

TLDR

Open the current directory in WebStorm

$ webstorm
copy

Open a specific directory in WebStorm
$ webstorm [path/to/directory]
copy

Open specific files in the LightEdit mode
$ webstorm -e [path/to/file1 path/to/file2 ...]
copy

Open and wait until done editing a specific file in the LightEdit mode
$ webstorm --wait -e [path/to/file]
copy

Open a file with the cursor at the specific line
$ webstorm --line [line_number] [path/to/file]
copy

Open and compare files (supports up to 3 files)
$ webstorm diff [path/to/file1 path/to/file2 path/to/optional_file3]
copy

Open and perform a three-way merge
$ webstorm merge [path/to/left_file] [path/to/right_file] [path/to/target_file]
copy

SYNOPSIS

The webstorm command is primarily used to launch the JetBrains WebStorm IDE. It can also be used to open specific files or directories as projects, or to perform certain command-line operations.

Syntax:
webstorm [options] [path...]

Common Usage Examples:
webstorm
(Launches the IDE)

webstorm <path/to/project>
(Opens a directory as a project in WebStorm)

webstorm <path/to/file.js>
(Opens a specific file in the IDE)

webstorm --diff <file1> <file2>
(Compares two files using WebStorm's diff viewer)

webstorm --line <line_number> <file>
(Opens a file at a specific line number)

PARAMETERS

--help
    Displays a comprehensive list of available command-line options and their descriptions.

--version
    Shows the WebStorm application version and build number.

--diff <path1> <path2>
    Compares two specified files using WebStorm's powerful built-in diff viewer. Useful for reviewing code changes.

--merge <path1> <path2> <base> <output>
    Invokes WebStorm's merge tool to resolve conflicts between <path1> and <path2>, using <base> as the common ancestor and saving the result to <output>.

[path...]
    One or more paths to files or directories. If a directory path is provided, WebStorm opens it as a project. If file paths are given, the files are opened in the current (or a new) IDE instance.

--line <number> <file>
    Opens the specified <file> and places the cursor at the given <number> line. This option requires a file path to be provided.

--new-window
    Forces WebStorm to open a new IDE window, even if an existing window is already open and could reuse the project.

--wait
    Makes the command-line process wait until the WebStorm IDE instance (launched by this command) is closed. Useful for scripting and integrating with version control commit hooks.

--status
    Prints the status of the running WebStorm instance, indicating if it's active or not.

--no-splash
    Suppresses the display of the splash screen during the WebStorm IDE startup process.

DESCRIPTION

WebStorm is an integrated development environment (IDE) by JetBrains, specifically tailored for JavaScript, TypeScript, HTML, CSS, Node.js, and related web technologies. It provides a comprehensive set of tools for front-end and back-end web development, including intelligent code completion, on-the-fly error detection, powerful navigation, debugging tools, unit testing support, and seamless integration with version control systems like Git. The webstorm command, typically a shell script or symlink located in the installation's bin directory or linked into your system's PATH, is used to launch the graphical IDE. While primarily a GUI application, the command-line interface also offers functionalities like opening specific files or projects, comparing files (--diff), merging changes (--merge), and performing batch code inspections or formatting. It aims to boost developer productivity by offering a rich and intuitive environment for building modern web applications.

CAVEATS

  • The webstorm command is not a standard Linux utility; it requires a prior installation of JetBrains WebStorm IDE.
  • The actual executable might be webstorm.sh or a symlink to it, usually found in the WebStorm installation's bin directory (e.g., ~/WebStorm-*/bin/webstorm.sh) or linked into system PATH during installation.
  • As a full-featured IDE, WebStorm is a resource-intensive application, especially during startup or with large projects.
  • WebStorm is a commercial product; its use typically requires a paid license after a trial period.
  • Command-line options primarily facilitate launching the GUI, opening files/projects, or integrating with external tools (like version control for diff/merge); it's not designed for extensive headless operations (though some advanced features like inspection can run in headless mode via separate mechanisms).

HEADLESS OPERATIONS (INSPECT/FORMAT)

While the main webstorm command is for GUI launch, JetBrains IDEs (including WebStorm) offer command-line tools for specific headless operations like code inspection and formatting. These are often executed via inspect.sh or format.sh scripts located in the IDE's bin directory, allowing for CI/CD integration or batch processing without launching the full GUI.

DESKTOP INTEGRATION

Upon first launch or via a menu option ("Tools" -> "Create Command-Line Launcher" or "Create Desktop Entry"), WebStorm can create a symlink to its executable in a standard PATH location (e.g., /usr/local/bin/webstorm) and/or a .desktop file for easier launching from application menus in Linux desktop environments.

CONFIGURATION AND CACHING

WebStorm stores user-specific configurations, plugins, and caches in dedicated directories, typically under ~/.config/JetBrains/WebStorm<version> and ~/.cache/JetBrains/WebStorm<version> on Linux. Troubleshooting often involves clearing these caches or configuration files.

HISTORY

WebStorm was first released by JetBrains in 2009, emerging from the company's well-established line of integrated development environments like IntelliJ IDEA. It was specifically designed to cater to the rapidly evolving landscape of web development, focusing on technologies such as JavaScript, HTML, and CSS. Over the years, its development has closely followed and often pioneered support for new web standards and frameworks, including Node.js, TypeScript, Angular, React, Vue.js, and various build tools. Its evolution has centered on providing intelligent coding assistance, robust debugging capabilities, and seamless integration with the modern web development ecosystem, establishing itself as a leading professional IDE in the field.

SEE ALSO

code(1), idea(1), subl(1), atom(1), vim(1), emacs(1)

Copied to clipboard