graphql-engine/cli
hasura-bot f530b3ac6f cli: fix regression with --address flag of hasura console command
GITHUB_PR_NUMBER: 8039
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/8039
closes https://github.com/hasura/graphql-engine/issues/8005

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3381
Co-authored-by: Shoki Hata <37888628+sho-hata@users.noreply.github.com>
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 6ca7c091ebf7c240e97b65fbfc1713cccb5a5b82
2022-01-20 06:41:05 +00:00
..
build ci: add tests for cli-migrations image (#4396) 2020-04-15 07:26:00 +05:30
cmd/hasura cli: update go.mod 2021-06-16 11:45:07 +00:00
commands cli: fix regression with --address flag of hasura console command 2022-01-20 06:41:05 +00:00
integration_test cli: fix regression with --address flag of hasura console command 2022-01-20 06:41:05 +00:00
internal cli: misc changes 2022-01-12 13:25:22 +00:00
migrate cli: wrap errors 2021-12-15 17:55:44 +00:00
pkg cli: misc changes 2022-01-12 13:25:22 +00:00
plugins cli: fix lint errors 2021-10-13 14:39:15 +00:00
seed cli: fix lint errors 2021-10-13 14:39:15 +00:00
telemetry cli: send error to telemetry 2021-09-08 08:56:54 +00:00
update cli: fix lint errors 2021-10-13 14:39:15 +00:00
util cli: stop using healthz endpoint 2022-01-14 04:17:41 +00:00
version cli: throw user friendly errors when server is unreachable 2021-09-27 14:53:44 +00:00
.gitignore cli: show only differences in metadata on metadata diff 2021-06-17 10:16:17 +00:00
.realize.yaml cli: update go-binddata, fix realize (close #3588) (#3687) 2020-01-13 15:24:41 +05:30
cli.go cli: stop using healthz endpoint 2022-01-14 04:17:41 +00:00
CONTRIBUTING.md improve cli contributing.md 2021-12-29 02:19:27 +00:00
directory.go cli: use absolute path of project directory 2021-07-16 12:59:04 +00:00
get.sh tag release v2.1.1 2021-12-17 12:38:06 +00:00
global_config.go cli: fix lint errors 2021-10-13 14:39:15 +00:00
go.mod cli: enhance metadata diff command 2021-12-09 17:26:53 +00:00
go.sum cli: enhance metadata diff command 2021-12-09 17:26:53 +00:00
logger_hook.go cli: add migrate and metadata packages 2021-06-18 06:25:14 +00:00
Makefile cli: codesign the cli binaries 2021-12-02 10:21:30 +00:00
README.md Update README.md 2022-01-10 06:21:05 +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.1.1 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.