Install the Graphite CLI using either npm or homebrew:
npm installation
1
# Install Graphite from npm.
2
npminstall -g @withgraphite/graphite-cli
3
gt --version
Copied!
brew installation (on MacOS)
1
# Install Graphite from Homebrew.
2
brew install withgraphite/tap/graphite
3
gt --version
Copied!
Initialization
Graphite stores a small JSON configuration file in .git/.graphite_repo_config of your repositiory. On first execution, the CLI will prompt you to provide a minimal amount of info to populate this config.
1
# Initialize Graphite.
2
cd ~/my-project
3
gt repo init
4
​
5
# Authenticate Graphite CLI via the web dashboard (needed to create PRs).
6
# Visit https://app.graphite.dev/activate to obtain your auth token and then
7
# paste it below.
8
gt auth --token <auth_token>
Copied!
Once you've set up the CLI, it's time to authenticate with your GitHub account via the Graphite dashboard.