I have an issue with running gt in my cli with any...
# report-bugs
j
I have an issue with running gt in my cli with any command other than the base
gt
It just fails silently and returns nothing
p
(If applicable) To help us repro, please send the following if you haven't already: - PR links, screenshots, and/or debug output if applicable - Repro steps - Does this happen consistently? Just to you or others on your team also? - Is this a regression? Is the problem new? - If you're having an issue with the CLI, please send us debug logs using
gt feedback --with-debug-context <any message>
j
For more info, it happens every time I try to run a gt command, even
gt auth
. My OS is MacOS Sequoia, the lastest version, with the lastest updated dev command line tools from mac.
Unsure how to troubleshoot this, tried a lot of stuff
p
hey Jason, what's the output if you run
which gt
j
Looks good here, i installed with brew
p
Thanks, and the output for
echo $PATH
?
j
Copy code
/opt/homebrew/opt/libpq/bin:/opt/homebrew/opt/libpq/bin:/Users/jasoncao/.nvm/versions/node/v22.11.0/bin:/Users/jasoncao/Downloads/google-cloud-sdk/bin:/Users/jasoncao/Library/pnpm:/opt/miniconda3/bin:/opt/miniconda3/condabin:/home/jasoncao/miniconda/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/jasoncao/.cargo/bin
If i run
gt
by itself, i can see a lot of basic "get started" stuff and whatnot, but that's the only working command. The rest don't produce any outputs or errors.
p
Thanks, could you run
gt --version
and then
echo $?
to get the return code
j
gt --version
gives me nothing:
it's another silent fail or just empty output
the
echo
gives return code
1
image.png
very strange.
been dealing with this all day
a colleague swapped over to Graphite, i hopped on the train here and it seems to be going nowhere.
It's very strange because JUST running
gt
gives:
Copy code
(base) jasoncao@Jasons-Mac-Studio monorepo % gt
Graphite (gt) simplifies the entire code authoring & reviewing lifecycle
for GitHub. It enables stacking PRs on top of each other to keep you
unblocked & your changes small, focused, and reviewable.

USAGE
  $ gt <command> [flags]

AUTHENTICATING
  Authenticating gt with Graphite enables submitting PRs and stacks:

  1. Open https://app.graphite.dev/settings/cli
  2. Create a new auth token
  3. Paste the generated gt auth --token <token> command into the terminal

TERMS
  stack:     A sequence of pull requests, each building off of its parent.
             ex: main <- PR "add API" <- PR "update frontend" <- PR "docs"
  trunk:     The branch that stacks are merged into.
                         ex: main
  downstack: The PRs below the given PR in a stack, i.e. its ancestors.
  upstack:   The PRs above the given PR in a stack, i.e. its descendants.

CORE COMMANDS
  gt init:            Initializes your Git repo to work with Graphite
  gt create:          Creates a new branch and commit your changes
  gt submit:          Submits the current branch & all downstack
                      branches to Graphite
  gt submit --stack:  Submits your current stack to Graphite
  gt modify:          Amends your current branch with new changes and
                      rebases all PRs above it
  gt restack:         Rebases every PR in a stack to have the latest
                      changes
  gt sync:            Pulls the latest trunk branch, rebases all open
                      PRs/stacks on top of the latest changes, and
                      prompts to delete any stale/old/merged branches
  gt checkout:        Interactively checks out any of your branches
  gt log:             Prints a graphical representation of your current
                      stack
  gt up:              Checks out the branch directly upstack
  gt down:            Checks out the branch directly downstack
  gt demo:            Walks you through examples to learn the Graphite
                      workflow via an interactive tutorial

  Run gt --help --all for a full command reference.
  Pass the --help flag to any command for specific help
  (ex: gt submit --help)

CORE WORKFLOW
  Run gt guide workflow to quickly learn how to:
    - create a new PR
    - stack a PR on top of an existing PR
    - respond to peer feedback from anywhere in your stack
    - sync the latest changes from main
    - merge your stack to your main branch

LEARN MORE
  Learn about custom aliases with gt aliases --help.
  Learn to customize gt with gt config --help.

  More documentation: https://graphite.dev/docs
  Our cheatsheet:     https://graphite.dev/docs/cheatsheet
  Tutorial videos:    https://www.youtube.com/@withgraphite
  Troubleshooting:    https://graphite.dev/docs/troubleshooting

FEEDBACK
        We'd love to hear your feedback! Join our Slack community at:
                https://community.graphite.dev
        or email us at: cli@graphite.dev.
        You can also submit feedback directly via gt feedback, which
        has the ability to attach logs if you're experiencing issues.
but this is the only working command.
p
yeah very strange. Could you run these just to double-check there isn't another
gt
aliased:
which -a gt
and
type gt
j
image.png
image.png
all looks good
i've been in here for like 3 hours now lol, i've both upgraded my OS and my Command LIne tools and reinstalled brew as well, it's refusing to even tell me why it fails
any chance we can hop on a call? I'm game for the idea of stacking PRs and I'm already reviewing my colleague's PRs on Graphite, I just can't use the cli sad panda
p
yeah, the only clue so far is the
echo $?
giving an exit code 1, indicative of a generic error/failure
j
yep, but no error messages i could find anywhere
I've also tried using the npm package, also no luck
I've even tried the binary directly lol
p
Can try see if it's writing any output to stderr:
gt --version 2> error.log | less error.log
j
image.png
nothing
is there a possibility we are on a bad version?
p
if you installed via
brew install withgraphite/tap/graphite
you should be on the latest stable version
1.6.6
you can try
brew reinstall withgraphite/tap/graphite
j
iv'e tried this like at least 5-6 times, but i'm happy to do it again.
But yes, to clarify, i did use that exact command
p
Our docs here mention fully resetting your tap and reinstalling:
brew uninstall graphite && brew untap withgraphite/tap && brew install withgraphite/tap/graphite
j
Copy code
brew reinstall withgraphite/tap/graphite
==> Fetching withgraphite/tap/graphite
==> Downloading https://github.com/withgraphite/homebrew-tap/releases/download/v1.6.6/gt-macos-arm64
Already downloaded: /Users/jasoncao/Library/Caches/Homebrew/downloads/d6da34647dfb633f0eaeba4eab7b0186aa6515ecec56350343661164fe72fc9d--gt-macos-arm64
==> Reinstalling withgraphite/tap/graphite 
🍺  /opt/homebrew/Cellar/graphite/1.6.6: 4 files, 56.7MB, built in 0 seconds
==> Running `brew cleanup graphite`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
Copy code
(base) jasoncao@Jasons-Mac-Studio monorepo % brew uninstall graphite && brew untap withgraphite/tap && brew install withgraphite/tap/graphite
Uninstalling /opt/homebrew/Cellar/graphite/1.6.6... (4 files, 56.7MB)
Untapping withgraphite/tap...
Untapped 3 formulae (36 files, 36.1MB).
==> Tapping withgraphite/tap
Cloning into '/opt/homebrew/Library/Taps/withgraphite/homebrew-tap'...
remote: Enumerating objects: 3248, done.
remote: Counting objects: 100% (143/143), done.
remote: Compressing objects: 100% (68/68), done.
remote: Total 3248 (delta 100), reused 112 (delta 75), pack-reused 3105 (from 2)
Receiving objects: 100% (3248/3248), 33.83 MiB | 28.68 MiB/s, done.
Resolving deltas: 100% (1242/1242), done.
Tapped 3 formulae (35 files, 36.1MB).
==> Fetching withgraphite/tap/graphite
==> Downloading https://github.com/withgraphite/homebrew-tap/releases/download/v1.6.6/gt-macos-arm64
Already downloaded: /Users/jasoncao/Library/Caches/Homebrew/downloads/d6da34647dfb633f0eaeba4eab7b0186aa6515ecec56350343661164fe72fc9d--gt-macos-arm64
==> Installing graphite from withgraphite/tap
🍺  /opt/homebrew/Cellar/graphite/1.6.6: 4 files, 56.7MB, built in 0 seconds
==> Running `brew cleanup graphite`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
tried both
same result, nothing has changed
Can i revert to an older version possibly?
p
I don't think it's the version or the installation then, but something else local to your system that has an issue with executing the executable. (We haven't had any similar reports of this and
1.6.6
has been out for a while. I've been able to install it in my own MacOS instance.)
What is the output of
file "$(which gt)"
j
image.png
p
Yeah that's what I get, and it's working on an M1 Max and M4 silicon running Sequoia 15.5
Are you using the built-in MacOS Terminal? Any customizations?
j
I tried both cursor's and the actual zsh terminal, no customizations. I'm happy to share more private .zshrc config in dms as well.
p
sure
Thanks, doesn't seem like anything in there would. For a test, you can open a new terminal window and run
zsh -df
to disable the customizations etc. and then try
gt --version && echo $?
in there
j
same exact response
this is so weird
for the record i also double checked brew just in case with another command line homebrew package, and that one works 100% perfectly
through CLI
but graphite does not
is there possibly a place you guys are storing configs that aren't being wiped when I uninstall?
p
User configuration is stored in
~/.config/graphite
, unless you have
$XDG_CONFIG_HOME
set.
j
i don't even have that directory unfortunately, and i never set anything with
XDG_CONFIG_HOME
this is also a very clean installation of macos
not much there
What should be my next steps here?
p
Could you try run
gt feedback --with-debug-context "debug logs for no stdout CLI" && echo $?
j
image.png
just to clarify,
gt
as a standalone command works just fine, but nothing else does.
p
gotcha, I'm going to run this by the engineering team
j
thanks boss 🫡
p
hey Jason, could you please run this to see if
gt
has been logging anything. You can attach the
logs.json
file it generates here.
cat ~/.local/share/graphite/debug/* > logs.json
Could you also please share a screenshot of your
About This Mac
info accessed here: