The easiest way to get started with Gremlin is to install the Gremlin Console. The Gremlin Console is a REPL that allows immediate feedback on the results of Gremlin traversals.
As a prerequisite, Java 8 is required for the Gremlin Console to run. Ensure that it is installed prior to moving forward with the following steps.
Download the console, unpackage it and start it:
$ unzip apache-gremlin-console-x.y.z-bin.zip
$ cd apache-gremlin-console-x.y.z
$ bin/gremlin.sh
\,,,/
(o o)
-----oOOo-(3)-oOOo-----
plugin activated: tinkerpop.server
plugin activated: tinkerpop.utilities
plugin activated: tinkerpop.tinkergraph
gremlin>
If on Windows, there is an included gremlin.bat
file that can be used to start the console.
To learn more about Gremlin Console, please read TinkerPop's tutorial which discusses it's usage in greater detail.