Skip to content

Hasura Commander is a CLI tool that automates Hasura metadata setup from YAML files—tracking tables, relationships, and permissions—so you can manage Hasura with code instead of the console.

License

Notifications You must be signed in to change notification settings

erinoggz/Hasura_Commander

Repository files navigation

🚀 Hasura Commander

A developer utility for automating Hasura metadata configuration. This tool drops and resets sources, tracks tables and relationships, sets permissions, and configures webhooks — all via code.

📌 Overview

Hasura Commander is designed to simplify and standardize the setup of Hasura GraphQL instances across environments. Rather than manually configuring metadata in the Hasura Console, this tool enables you to manage your metadata using version-controlled YAML and run it through a simple script.

✅ Features

  • Drop and set data sources
  • Track tables and define relationships
  • Configure environment-based webhooks
  • Set permissions programmatically
  • Load and apply YAML-based metadata
  • Designed for CI/CD and team workflows

🧰 Prerequisites

  • Node.js and TypeScript installed
  • Hasura URL and Admin Secret for authentication
  • metadata.yml file present in the root directory
    A sample file is available in the utils/ folder

⚙️ Setup Instructions

  1. Clone the repository
    git clone https://github.com/erinoggz/Hasura_Commander.git
    cd Hasura_Commander
    
    

Usage

To run the script, use the following command:

npx ts-node app.ts -e <HASURA_URL> -s <HASURA_ADMIN_SECRET> -f utils/metadata.yml

🤝 Contributions

Pull requests, issues, and discussions are welcome.
If you have ideas for improving Hasura metadata automation or CI-friendly enhancements, feel free to contribute!

📄 License

This project is licensed under the MIT License.

About

Hasura Commander is a CLI tool that automates Hasura metadata setup from YAML files—tracking tables, relationships, and permissions—so you can manage Hasura with code instead of the console.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •