hypergraph
is a command-line interface (CLI) tool designed to facilitate various tasks related to project management and deployment using the Hypergraph platform. Below is a comprehensive guide outlining available commands and their options.
Using npm:
npm install @hgraph/cli -g
hypergraph <auth|build|checkout|collaborator|config|create|deploy|gcloud|generate|project|save> [--help] [--doc]
auth
: Commands for managing authentication and access.build
: Build a project.checkout
: Checkout a project.collaborator
: Administer project collaborators and permissions.config
: View or update configuration.create
: Create a package and other resources.deploy
: Deploy a project.gcloud
: Configure and install tools for Google Cloud.generate
: Generate project models and resolvers using AI.project
: Manage your projects.save
: Save a source file to a given project.
Commands for managing authentication and access.
Access your Hypergraph account by logging in.
hypergraph auth login [--provider=<GOOGLE|GITHUB>]
Options:
--provider=<GOOGLE|GITHUB>
: Authenticate using Google or Github credentials.
Sign out of your account.
hypergraph auth logout
Display information of the currently logged-in user.
hypergraph auth user
Build a project.
hypergraph build --environment=<string> [--api=<string>] [--db-port=<number>] [--clean]
Options:
--environment=<string>
(Required): Specify the project environment.--api=<string>
: List all API services in the format "name:port" for local exposure.--db-port=<number>
: Expose the database through a specified port, if defined.--clean
: Perform a clean build by removing previous environments, cache, and config.
Checkout a project.
hypergraph checkout [--project-id=<string>] [--skip-cache]
Options:
--project-id=<string>
: Specify the ID of the project to checkout.--skip-cache
: Disable cache (enabled by default).
Administer project collaborators and permissions.
Add a collaborator to the project.
hypergraph collaborator add [--project-id=<string>]
Options:
--project-id=<string>
: Specify the ID of the project.
Display contributors within a project.
hypergraph collaborator list [--project-id=<string>]
Options:
--project-id=<string>
: Project ID.
Remove a collaborator from the project.
hypergraph collaborator remove [--project-id=<string>]
Options:
--project-id=<string>
: Project ID.
View or update configuration.
View or update remote server URL.
hypergraph config remote [url]
Arguments:
url
: Server URL.
Create a package and other resources.
Create a package.
hypergraph create package [name]
Arguments:
name
: Name of the package.
Deploy a project.
hypergraph deploy --environment=<string> [--create] [--clean]
Options:
--environment=<string>
(Required): Specify the deployment environment.--create
: Create missing resources like cluster, container registry, and certificates as needed.--clean
: Perform a clean build by removing previous environments, cache, and config.
Configure and install tools for Google Cloud.
Configure the Google Cloud environment.
hypergraph gcloud setup --environment=<string>
Options:
--environment=<string>
(Required): Select the target environment.
Install all required libraries for Google Cloud.
hypergraph gcloud install --environment=<string>
Options:
--environment=<string>
(Required): Specify the target environment.
Generate project models and resolvers using AI.
hypergraph generate [--project-id=<string>]
Options:
--project-id=<string>
: Specify the ID of the project.
Manage your projects.
Create a project.
hypergraph project create [project-name]
Arguments:
project-name
: Name of the project.
List all projects.
hypergraph project list
Remove a project.
hypergraph project remove [--project-id=<string>]
Options:
--project-id=<string>
: ID of the project to be removed.
Save a source file to a given project.
hypergraph save <source-file> [--project-id=<string>]
Arguments:
source-file
: Source file(s) to upload. You may use glob patterns.
Options:
--project-id=<string>
: Project ID in Hypergraph.