@kadenbarlow/giraffe
v0.2.2
Published
A terminal based GraphQL client
Maintainers
Readme
giraffe
A terminal based, keyboard driven GraphQL client
Giraffe is a TUI graphql client. Inspired by mainly by Posting, but also by Postman or Insomnia.

Key features include:
- Auto format query and variables ( !!
- Code generation b ' ' -_
- Collections stored locally in JSON files | d-= "
- JSON configuration file b |
- Jump mode navigation | d
- Open query, variables, headers, response etc. in $EDITOR o |
- Query and mutation generation with variables / o
- Request history / o d
- Syntax highlighting / O o o \
Installation
Giraffe can be installed using npm or brew and currently has only been tested on MacOS.
npm install --global @kadenbarlow/giraffe
brew install kadenbarlow/tap/giraffePublishing
Run the full publish flow with:
HOMEBREW_TAP_REPO_PATH=../homebrew-tap npm run releaseThis will:
- build and publish the npm package
- build the SEA binary
- open your editor so you can write the GitHub release title and notes
- create the GitHub release for
v<package.json version> - package and upload
dist/giraffe-darwin-arm64.tar.gzto the release withgh release upload --clobber - update
Formula/giraffe.rbin your tap repo
The release editor format is:
- first line: release title
- remaining lines: release notes
You can still run the steps separately:
npm run release:npm
HOMEBREW_TAP_REPO_PATH=../homebrew-tap npm run release:homebrewrelease:homebrew builds the SEA binary, opens your editor for GitHub release notes, creates the GitHub release, packages the current platform tarball, uploads it with gh release upload --clobber, and updates Formula/giraffe.rb in your tap repo for just that architecture.
Right now the Homebrew formula only supports the architecture you publish from, for example arm64 on Apple Silicon.
Configuration
Giraffe will look for a configuration file at the following paths in order of precedence:
${process.env.HOME}/.config/giraffe/giraffe.json${process.env.HOME}/.giraffe.json
The configuration file support the following options:
{
collections: {
folderPath: `${process.env.HOME}/.config/giraffe/collections`,
},
theme: {
// User interface colors
accent: "#FAB387",
background: "#0F111A",
error: "#F38BA8",
info: "#FFFFFF",
primary: "#5E81AC",
secondary: "#8FBCBB",
success: "#A6E3A1",
warning: "#FAB387",
boxBorder: "#FAB387",
keyboardShortcut: "#FAB387",
keyboardShortcutText: "#FFFFFF",
tab: "#FFFFFF",
tabKey: "#FAB387",
urlLabel: "#FFFFFF",
urlInputBackground: "#1d2133",
// Syntax highlighting colors
attribute: "#5E81AC",
keyword: "#FAB387",
kwarg: "#89dceb",
number: "#89b4fa",
string: "#A6E3A1",
type: "#cba6f7",
variable: "#89b4fa",
},
}