DataGrip 2019.3 Help

Open files from the command line

Open an arbitrary file or folder in DataGrip from the command line, optionally specifying where to put the caret after opening.

Syntax
datagrip.bat [--line <number>] [--column <number>] <path ...>
Examples

Open a project:

datagrip.bat C:\MyProject

Open a specific file on line number 42 column 7:

datagrip.bat --line 42 --column 7 C:\MyProject\scripts\numbers.js
Syntax
datagrip --line <number> <path>
Examples

Open a project:

datagrip ~/MyProject

Open a specific file on line number 42 column 7:

datagrip --line 42 --column 7 ~/MyProject/scripts/numbers.js
Syntax
datagrip.sh --line <number> <path>
Examples

Open a project:

datagrip.sh ~/MyProject

Open a specific file on line number 42 column 7:

datagrip.sh --line 42 --column 7 ~/MyProject/scripts/numbers.js

When you specify the path to a file or directory in an existing project, DataGrip opens this project. If the file does not belong to a project, DataGrip creates a temporary project for it. If you open a directory that is not a part of a project, DataGrip adds the .idea directory to it, making it a project.

Last modified: 23 March 2020