{"id":22580297,"url":"https://github.com/ondrowan/dgraph-cli","last_synced_at":"2025-06-17T09:35:14.768Z","repository":{"id":151165554,"uuid":"192087612","full_name":"ondrowan/dgraph-cli","owner":"ondrowan","description":"CLI tool for managing Dgraph database","archived":false,"fork":false,"pushed_at":"2020-03-02T20:49:00.000Z","size":37,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-01T05:10:41.099Z","etag":null,"topics":["cli","dgraph","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ondrowan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null}},"created_at":"2019-06-15T14:24:40.000Z","updated_at":"2020-07-08T07:27:02.000Z","dependencies_parsed_at":"2023-07-04T07:17:26.372Z","dependency_job_id":null,"html_url":"https://github.com/ondrowan/dgraph-cli","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ondrowan/dgraph-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ondrowan%2Fdgraph-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ondrowan%2Fdgraph-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ondrowan%2Fdgraph-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ondrowan%2Fdgraph-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ondrowan","download_url":"https://codeload.github.com/ondrowan/dgraph-cli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ondrowan%2Fdgraph-cli/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260329142,"owners_count":22992836,"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":["cli","dgraph","rust"],"created_at":"2024-12-08T05:15:21.825Z","updated_at":"2025-06-17T09:35:14.745Z","avatar_url":"https://github.com/ondrowan.png","language":"Rust","readme":"# Dgraph CLI\n\nDgraph CLI is a tool for communication with [Dgraph database](https://dgraph.io/).\nIt supports both insecure and secure connection. API will most likely change in\nfuture releases.\n\n## Installation\n\nFor now, the only option is to compile it by hand:\n\n```bash\n$ cargo build --release\n```\n\nMore options will be available once we hit 0.1.0.\n\n## Usage\n\n### Secure connection\n\nIf you want to connect to TLS secured server, you have to provide paths to all\nrequired certificates:\n\n```bash\n$ dgraph-cli --url secure-dgraph-server:1443 --root_ca root_ca.crt --cert cert.crt --private_key private.key schema\n```\n\n### List schema\n\n```bash\n$ dgraph-cli schema\n\nPredicate                          Type      Index   Reverse   Tokenizers       List    Count   Upsert   Lang\n-----------------------------------------------------------------------------------------------------------------\n_predicate_                        string    false   false                      true    false   false    false\ndgraph.group.acl                   string    false   false                      false   false   false    false\ndgraph.password                    password  false   false                      false   false   false    false\ndgraph.user.group                  uid       false   true                       false   false   false    false\ndgraph.xid                         string    true    false     exact            false   false   false    false\nname                               string    false   false                      false   false   false    false\n```\n\nIf you don't need all columns, filter them using `--fields` flag:\n\n```bash\n$ dgraph-cli schema --fields predicate type\n\nPredicate                          Type\n---------------------------------------------\n_predicate_                        string\ndgraph.group.acl                   string\ndgraph.password                    password\ndgraph.user.group                  uid\ndgraph.xid                         string\nname                               string\n```\n\n### Alter predicates\n\n```bash\n$ dgraph-cli alter \"name: int .\"\n```\n\n### Query\n\n```bash\n$ dgraph-cli query \"{ q(func: uid(0x1)) { uid } }\"\n\n{\n  \"q\": [\n    {\n      \"uid\": \"0x1\"\n    }\n  ]\n}\n\nLatency:\n\nProcessing: 0.2359ms\nParsing: 0.0383ms\nEncoding: 3.226ms\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fondrowan%2Fdgraph-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fondrowan%2Fdgraph-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fondrowan%2Fdgraph-cli/lists"}