Giter Club home page Giter Club logo

jetbrains-launcher's Introduction

JetBrains Launcher

A command-line launcher to open your projects in a JetBrains IDE, but with a twist: it stores the IDE config (.idea) in a separate directory!

Why is this beneficial?

Storing .idea in a separate directory has several advantages:

  1. Version control friendly: It's easier to manage your version control system (like Git) as you don't have to worry about excluding IDE-specific files. Also, your IDE will not break if a team member pushes its .idea content (it happens).
  2. Cleaner project directory: Your project directory remain clean and IDE agnostic.
  3. Support multiple IDEs: You can open your project with different JetBrains IDEs without having to worry about configuration conflicts (e.g. when using both IntelliJ IDEA and CLion, or PyCharm and CLion).

Installation

Supported platforms:

To install or update jetbrains-launcher, you should download jetbrains-launcher.sh, rename it to the name of the JetBrains IDE you want to use (e.g. idea or idea.sh), and put it in your PATH.

One-liners to do this are available below:

idea (IntelliJ IDEA logo IntelliJ IDEA, ultimate or community - click to expand)
  • 🐧 Linux, 🪟 Windows (using Bash)
    Download the launcher to ~/.local/bin/idea (make sure ~/.local/bin is in your PATH):

    curl -fsSL https://github.com/nathan818fr/jetbrains-launcher/raw/main/jetbrains-launcher.sh | install -vDT /dev/stdin ~/.local/bin/idea
  • 🍏 macOS (see requirements above)
    Download the launcher to ~/.local/bin/idea (make sure ~/.local/bin is in your PATH):

    mkdir -p ~/.local/bin && curl -fsSL https://github.com/nathan818fr/jetbrains-launcher/raw/main/jetbrains-launcher.sh -o ~/.local/bin/idea && chmod +x ~/.local/bin/idea
pycharm (PyCharm logo PyCharm, professional or community - click to expand)
  • 🐧 Linux, 🪟 Windows (using Bash)
    Download the launcher to ~/.local/bin/pycharm (make sure ~/.local/bin is in your PATH):

    curl -fsSL https://github.com/nathan818fr/jetbrains-launcher/raw/main/jetbrains-launcher.sh | install -vDT /dev/stdin ~/.local/bin/pycharm
  • 🍏 macOS (see requirements above)
    Download the launcher to ~/.local/bin/pycharm (make sure ~/.local/bin is in your PATH):

    mkdir -p ~/.local/bin && curl -fsSL https://github.com/nathan818fr/jetbrains-launcher/raw/main/jetbrains-launcher.sh -o ~/.local/bin/pycharm && chmod +x ~/.local/bin/pycharm
webstorm (WebStorm logo WebStorm - click to expand)
  • 🐧 Linux, 🪟 Windows (using Bash)
    Download the launcher to ~/.local/bin/webstorm (make sure ~/.local/bin is in your PATH):

    curl -fsSL https://github.com/nathan818fr/jetbrains-launcher/raw/main/jetbrains-launcher.sh | install -vDT /dev/stdin ~/.local/bin/webstorm
  • 🍏 macOS (see requirements above)
    Download the launcher to ~/.local/bin/webstorm (make sure ~/.local/bin is in your PATH):

    mkdir -p ~/.local/bin && curl -fsSL https://github.com/nathan818fr/jetbrains-launcher/raw/main/jetbrains-launcher.sh -o ~/.local/bin/webstorm && chmod +x ~/.local/bin/webstorm
phpstorm (PhpStorm logo PhpStorm - click to expand)
  • 🐧 Linux, 🪟 Windows (using Bash)
    Download the launcher to ~/.local/bin/phpstorm (make sure ~/.local/bin is in your PATH):

    curl -fsSL https://github.com/nathan818fr/jetbrains-launcher/raw/main/jetbrains-launcher.sh | install -vDT /dev/stdin ~/.local/bin/phpstorm
  • 🍏 macOS (see requirements above)
    Download the launcher to ~/.local/bin/phpstorm (make sure ~/.local/bin is in your PATH):

    mkdir -p ~/.local/bin && curl -fsSL https://github.com/nathan818fr/jetbrains-launcher/raw/main/jetbrains-launcher.sh -o ~/.local/bin/phpstorm && chmod +x ~/.local/bin/phpstorm
clion (CLion logo CLion - click to expand)
  • 🐧 Linux, 🪟 Windows (using Bash)
    Download the launcher to ~/.local/bin/clion (make sure ~/.local/bin is in your PATH):

    curl -fsSL https://github.com/nathan818fr/jetbrains-launcher/raw/main/jetbrains-launcher.sh | install -vDT /dev/stdin ~/.local/bin/clion
  • 🍏 macOS (see requirements above)
    Download the launcher to ~/.local/bin/clion (make sure ~/.local/bin is in your PATH):

    mkdir -p ~/.local/bin && curl -fsSL https://github.com/nathan818fr/jetbrains-launcher/raw/main/jetbrains-launcher.sh -o ~/.local/bin/clion && chmod +x ~/.local/bin/clion
rubymine (RubyMine logo RubyMine - click to expand)
  • 🐧 Linux, 🪟 Windows (using Bash)
    Download the launcher to ~/.local/bin/rubymine (make sure ~/.local/bin is in your PATH):

    curl -fsSL https://github.com/nathan818fr/jetbrains-launcher/raw/main/jetbrains-launcher.sh | install -vDT /dev/stdin ~/.local/bin/rubymine
  • 🍏 macOS (see requirements above)
    Download the launcher to ~/.local/bin/rubymine (make sure ~/.local/bin is in your PATH):

    mkdir -p ~/.local/bin && curl -fsSL https://github.com/nathan818fr/jetbrains-launcher/raw/main/jetbrains-launcher.sh -o ~/.local/bin/rubymine && chmod +x ~/.local/bin/rubymine
rustrover (RustRover logo RustRover - click to expand)
  • 🐧 Linux, 🪟 Windows (using Bash)
    Download the launcher to ~/.local/bin/rustrover (make sure ~/.local/bin is in your PATH):

    curl -fsSL https://github.com/nathan818fr/jetbrains-launcher/raw/main/jetbrains-launcher.sh | install -vDT /dev/stdin ~/.local/bin/rustrover
  • 🍏 macOS (see requirements above)
    Download the launcher to ~/.local/bin/rustrover (make sure ~/.local/bin is in your PATH):

    mkdir -p ~/.local/bin && curl -fsSL https://github.com/nathan818fr/jetbrains-launcher/raw/main/jetbrains-launcher.sh -o ~/.local/bin/rustrover && chmod +x ~/.local/bin/rustrover
goland (GoLand logo GoLand - click to expand)
  • 🐧 Linux, 🪟 Windows (using Bash)
    Download the launcher to ~/.local/bin/goland (make sure ~/.local/bin is in your PATH):

    curl -fsSL https://github.com/nathan818fr/jetbrains-launcher/raw/main/jetbrains-launcher.sh | install -vDT /dev/stdin ~/.local/bin/goland
  • 🍏 macOS (see requirements above)
    Download the launcher to ~/.local/bin/goland (make sure ~/.local/bin is in your PATH):

    mkdir -p ~/.local/bin && curl -fsSL https://github.com/nathan818fr/jetbrains-launcher/raw/main/jetbrains-launcher.sh -o ~/.local/bin/goland && chmod +x ~/.local/bin/goland
datagrip (DataGrip logo DataGrip - click to expand)
  • 🐧 Linux, 🪟 Windows (using Bash)
    Download the launcher to ~/.local/bin/datagrip (make sure ~/.local/bin is in your PATH):

    curl -fsSL https://github.com/nathan818fr/jetbrains-launcher/raw/main/jetbrains-launcher.sh | install -vDT /dev/stdin ~/.local/bin/datagrip
  • 🍏 macOS (see requirements above)
    Download the launcher to ~/.local/bin/datagrip (make sure ~/.local/bin is in your PATH):

    mkdir -p ~/.local/bin && curl -fsSL https://github.com/nathan818fr/jetbrains-launcher/raw/main/jetbrains-launcher.sh -o ~/.local/bin/datagrip && chmod +x ~/.local/bin/datagrip
dataspell (DataSpell logo DataSpell - click to expand)
  • 🐧 Linux, 🪟 Windows (using Bash)
    Download the launcher to ~/.local/bin/dataspell (make sure ~/.local/bin is in your PATH):

    curl -fsSL https://github.com/nathan818fr/jetbrains-launcher/raw/main/jetbrains-launcher.sh | install -vDT /dev/stdin ~/.local/bin/dataspell
  • 🍏 macOS (see requirements above)
    Download the launcher to ~/.local/bin/dataspell (make sure ~/.local/bin is in your PATH):

    mkdir -p ~/.local/bin && curl -fsSL https://github.com/nathan818fr/jetbrains-launcher/raw/main/jetbrains-launcher.sh -o ~/.local/bin/dataspell && chmod +x ~/.local/bin/dataspell

Usage

Use this launcher to open your projects from the command line rather than from the JetBrains IDEs interfaces. e.g.:

# Open ~/projects/my-project with IntelliJ IDEA:
idea ~/projects/my-project

# Open the current directory with IntelliJ IDEA:
idea .

👉️ If a project has been opened once with this launcher, you can re-open it from the "Recent Projects" interface (or you can use this launcher again).

⚠️ But you should NOT open it from "File > Open...".


Usage: command [options] <project-path>

Options:

  • -h, --help – Show help message and exit.
    Use this to see all options and environment variables (this readme only summarizes the most useful ones).
  • --reset – Reset existing project configuration (if any) before starting the IDE.
    This deletes the .idea directory created by this launcher, not the one that may already exist in your project directory.
  • --no-detach – Start the IDE in foreground instead of detaching it.

Configuration

Script naming

The launcher script should be named after the JetBrains IDE you want to use.
This check is case-insensitive and allows partial matches (e.g. Idea and open-idea-ide are valid names for IntelliJ IDEA).

Supported names (click to expand)

It's case-insensitive. * is a wildcard that matches none or any character(s).

  • *idea* or *intellij* for IntelliJ IDEA
  • *pycharm* for PyCharm
  • *webstorm* for WebStorm
  • *phpstorm* for PhpStorm
  • *clion*nova* for CLion Nova
  • *clion* for CLion
  • *rubymine* for RubyMine
  • *rustrover* for RustRover
  • *goland* for GoLand
  • *datagrip* for DataGrip
  • *dataspell* for DataSpell

If this behavior is not suitable for you, you can override it by setting the JETBRAINS_LAUNCHER_IDE_OVERRIDE environment variable.
e.g., adding an alias to your shell configuration:

alias java_ide='JETBRAINS_LAUNCHER_IDE_OVERRIDE=idea /path/to/jetbrains-launcher.sh'
# now you can use: java_ide ~/projects/my-project

Projects configuration directory

By default, this launcher stores the IDE projects' configurations under ~/.local/share/JetBrainsProjects.
You can change this by setting the JETBRAINS_PROJECTS_DIR environment variable.

👨‍🏫 If you open the project /home/me/my-project in IntelliJ IDEA with this launcher, the IDE configuration will be stored in ${JETBRAINS_PROJECTS_DIR}/idea/home/me/my-project.

Contributing

If you encounter a bug or have a feature request, please open an issue to let me know. 😄

If you are a developer and want to contribute to this project, consider opening an issue to discuss your idea before submitting a pull request.

jetbrains-launcher's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

jetbrains-launcher's Issues

Saves to wrong path?

Project is saved in JETBRAINS_PROJECTS_DIR but relative to the JETBRAINS_APPS_DIR. :(

export JETBRAINS_APPS_DIR=/Applications
export JETBRAINS_PROJECTS_DIR=/Users/jochen/pycharm_project_files

it creates /Applications/pycharm/Users/jochen/git/...../.idea

under macos

fix didn't work

(hiya, I couldn't reopen the issue, so just filing a new one ;)

The fix didn't work :(

~ > echo $JETBRAINS_APPS_DIR
/Applications
~ > echo $JETBRAINS_PROJECTS_DIR
/Users/jochen/pycharm_project_files
~ > pycharm_proj newproject
Project directory: /Users/jochen/newproject
Configuration directory: /Applications/pycharm/Users/jochen/pycharm/Users/jochen/newproject

Looks like jetbrains_projects_dir gets overwritten? also, why have the ide_id in there?
conf_dir="${jetbrains_projects_dir}/${ide_id}/$(appendable_path "$project_dir")"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.