graphql-engine/cli
Mohd Bilal a2fb3de1ce cli: refactor migrate/migrate.go to use internal/errors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7005
GitOrigin-RevId: ee70ef351ed1915adef5b865773a2210c7dd1073
2022-12-12 12:48:49 +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: expose hasura migrate delete command as an API 2022-12-07 03:02:14 +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 cli: refactor internal/metadatautil package to use internal/errors 2022-11-15 09:00:12 +00:00
migrate cli: refactor migrate/migrate.go to use internal/errors 2022-12-12 12:48:49 +00:00
pkg cli: expose hasura migrate delete command as an API 2022-12-07 03:02:14 +00:00
plugins cli: remove os.IsNotExist and os.IsExist error checks 2022-11-28 08:45:42 +00:00
seed cli: refactor seed package to use internal/errors 2022-10-26 06:02:09 +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: remove os.IsNotExist and os.IsExist error checks 2022-11-28 08:45:42 +00:00
version cli: refactor version package to use internal/errors 2022-10-28 10:00:12 +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_test.go cli: refactor cli to use internal/errors 2022-11-03 08:09:07 +00:00
cli.go cli: remove os.IsNotExist and os.IsExist error checks 2022-11-28 08:45:42 +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 cli: fix install script failing when specifying a version 2022-02-25 13:52:48 +00:00
global_config.go cli: remove os.IsNotExist and os.IsExist error checks 2022-11-28 08:45:42 +00:00
go.mod CLI: Upgrade Dockertest to try and fix the build on CI. 2022-10-04 12:06:32 +00:00
go.sum CLI: Upgrade Dockertest to try and fix the build on CI. 2022-10-04 12:06:32 +00:00
logger_hook.go cli: add migrate and metadata packages 2021-06-18 06:25:14 +00:00
Makefile ci: add action to release cli-ext binaries 2022-06-07 22:25:41 +00:00
README.md tag release v2.2.0 2022-02-02 12:49:55 +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.2.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.