{"id":21917358,"url":"https://github.com/blukai/dgraph-admin","last_synced_at":"2025-03-22T09:46:30.440Z","repository":{"id":98220944,"uuid":"370054683","full_name":"blukai/dgraph-admin","owner":"blukai","description":"a simple tool for managing dgraph","archived":false,"fork":false,"pushed_at":"2021-05-23T15:11:19.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-16T18:12:39.813Z","etag":null,"topics":["dgraph","dgraph-cli"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blukai.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-23T13:03:14.000Z","updated_at":"2023-03-08T16:32:25.000Z","dependencies_parsed_at":"2023-05-31T08:45:52.794Z","dependency_job_id":null,"html_url":"https://github.com/blukai/dgraph-admin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blukai%2Fdgraph-admin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blukai%2Fdgraph-admin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blukai%2Fdgraph-admin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blukai%2Fdgraph-admin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blukai","download_url":"https://codeload.github.com/blukai/dgraph-admin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244937740,"owners_count":20535124,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dgraph","dgraph-cli"],"created_at":"2024-11-28T19:30:48.407Z","updated_at":"2025-03-22T09:46:30.423Z","avatar_url":"https://github.com/blukai.png","language":"Rust","readme":"# dgraph-admin\n\n```\n$ dgraph-admin help\nUsage: dgraph-admin [--url \u003curl\u003e] [--auth \u003cauth\u003e] \u003ccommand\u003e [\u003cargs\u003e]\n\ndgraph-admin is a simple tool for managing dgraph.\n\nOptions:\n  --url             dgraph url\n  --auth            auth header to include with the request\n\nCommands:\n  update-schema     add or modify schema\n  get-schema        get the current schema\n  drop-all          drop all data and schema\n  drop-data         drop all data only (keep schema)\n  get-health        get status of nodes\n```\n\n## usage\n\ndgraph-admin can be used to manage dgraph that is running locally as well as in dgraph cloud\n\n### locally\n\nif dgraph is available on default url (localhost:8080) and token is not set:\n\n```\n$ dgraph-admin get-health\n```\n\nif token was provided in dgraph's `--security` flag (see [dgraph cli ref](https://dgraph.io/docs/deploy/cli-command-reference/#dgraph-core-commands)):\n\n```\n$ dgraph-admin --auth X-Dgraph-AuthToken:token get-health\n```\n\n### with dgraph cloud\n\nto be able to use it with dgraph cloud you will need to create an admin api key (see [authentication](https://dgraph.io/docs/cloud/admin/authentication/))\n\n```\n$ dgraph-admin --url https://something.cloud.dgraph.io --auth Dg-Auth:key get-health\n```\n\n## installation\n\nyou will need [rust and cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html)\n\n```\n$ git clone https://github.com/blukai/dgraph-admin.git\n$ cd dgraph-admin\n$ cargo install --path .\n```\n\n## a piece of motivation\n\nduring development (other project) i found an often need to modify schema or drop all data.\nwhile it is possible without this tool, it is not as convenient, easy and fast.\n\nalso i wanted to write something useful in rust xd.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblukai%2Fdgraph-admin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblukai%2Fdgraph-admin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblukai%2Fdgraph-admin/lists"}