graphql-engine/cli
Rikin Kachhia b1c2998fc4 ci: update latest stable release as v2.39.0
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10809
GitOrigin-RevId: 09df4c35cffae8f1b11c16c5293805079141d85c
2024-05-13 11:46:22 +00:00
..
build cli: upgrade go-git to v5.4.2 and go version to 1.18 2024-03-25 11:25:31 +00:00
cmd/hasura cli: update go.mod 2021-06-16 11:45:07 +00:00
commands CLI: Fix help message on metadata export 2023-08-24 08:54:40 +00:00
integration_test server: migrate to aeson-2 in preparation for ghc 9.2 upgrade 2022-06-08 15:32:27 +00:00
internal Add Batch Limits to API limits config 2023-12-15 02:05:52 +00:00
migrate cli: introduce BigQuery source 2023-02-13 08:31:42 +00:00
pkg Export metadata export api 2023-10-25 20:56:12 +00:00
plugins cli: fix missing usages of errors package 2023-01-16 09:42:31 +00:00
seed cli: fix missing usages of errors package 2023-01-16 09:42:31 +00:00
telemetry cli: send error to telemetry 2021-09-08 08:56:54 +00:00
update cli: refactor update package to use internal/errors 2022-11-02 07:20:53 +00:00
util cli: upgrade go-git to v5.4.2 and go version to 1.18 2024-03-25 11:25:31 +00:00
version CI: Use "12345" for the server version instead of generating one. 2023-04-28 18:19:40 +00:00
.gitignore cli: show only differences in metadata on metadata diff 2021-06-17 10:16:17 +00:00
.golangci.yaml cli: upgrade go-git to v5.4.2 and go version to 1.18 2024-03-25 11:25:31 +00:00
.realize.yaml cli: update go-binddata, fix realize (close #3588) (#3687) 2020-01-13 15:24:41 +05:30
cli_test.go cli: refactor cli to use internal/errors 2022-11-03 08:09:07 +00:00
cli.go cli: support ee-lite in CLI console 2023-01-30 09:28:28 +00:00
CONTRIBUTING.md Use docker compose, not docker-compose. 2022-08-02 10:30:57 +00:00
directory.go cli: remove os.IsNotExist and os.IsExist error checks 2022-11-28 08:45:42 +00:00
get.sh ci: update latest stable release as v2.39.0 2024-05-13 11:46:22 +00:00
global_config.go cli: fix missing usages of errors package 2023-01-16 09:42:31 +00:00
go.mod cli: update go-git to v5.11 2024-03-26 09:24:24 +00:00
go.sum cli: update go-git to v5.11 2024-03-26 09:24:24 +00:00
logger_hook.go cli: add migrate and metadata packages 2021-06-18 06:25:14 +00:00
Makefile cli: use go install instead of go get 2024-03-25 09:01:45 +00:00
README.md ci: update latest stable release as v2.39.0 2024-05-13 11:46:22 +00:00

Hasura GraphQL Engine CLI

GoDoc

Installation

Download GraphQL Engine CLI bundled with Hasura CLI

  • Linux/macOS

    curl -L https://github.com/hasura/graphql-engine/raw/stable/cli/get.sh | bash
    

    This will install the Hasura CLI in /usr/local/bin. You might have to provide your sudo password depending on the permissions of your /usr/local/bin location.

    If youd prefer to install to a different location other than /usr/local/bin, set the INSTALL_PATH variable accordingly:

    curl -L https://github.com/hasura/graphql-engine/raw/stable/cli/get.sh | INSTALL_PATH=$HOME/bin bash
    

    You can also install a specific version of the CLI by providing the VERSION variable:

    curl -L https://github.com/hasura/graphql-engine/raw/stable/cli/get.sh | VERSION=v2.39.0 bash
    
  • Windows

    Download the binary cli-hasura-windows-amd64.exe available under Assets of the latest release from the GitHub release page: https://github.com/hasura/graphql-engine/releases

Download using go get

go get github.com/hasura/graphql-engine/cli/cmd/hasura

Build from source

git clone https://github.com/hasura/graphql-engine
cd graphql-engine/cli
make deps
make build-cli-ext copy-cli-ext
make build
# binaries will be in _output directory

Usage

hasura init --directory <my-project> --endpoint <graphql-endpoint> --admin-secret <admin-secret>
cd <my-project>
hasura console

Contributing

Checkout the contributing guide.