{"id":13877830,"url":"https://github.com/eerimoq/gqt","last_synced_at":"2025-04-12T14:55:19.633Z","repository":{"id":37205077,"uuid":"497537951","full_name":"eerimoq/gqt","owner":"eerimoq","description":"Build and execute GraphQL queries in the terminal.","archived":false,"fork":false,"pushed_at":"2024-08-29T20:36:05.000Z","size":21556,"stargazers_count":469,"open_issues_count":0,"forks_count":9,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-03T17:10:04.640Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/eerimoq.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"github":"eerimoq"}},"created_at":"2022-05-29T08:57:47.000Z","updated_at":"2025-03-28T00:21:14.000Z","dependencies_parsed_at":"2024-01-09T15:01:57.063Z","dependency_job_id":"142f4c81-992a-436a-8a0d-37759220e83f","html_url":"https://github.com/eerimoq/gqt","commit_stats":null,"previous_names":[],"tags_count":131,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eerimoq%2Fgqt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eerimoq%2Fgqt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eerimoq%2Fgqt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eerimoq%2Fgqt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eerimoq","download_url":"https://codeload.github.com/eerimoq/gqt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248586244,"owners_count":21128995,"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":[],"created_at":"2024-08-06T08:01:27.589Z","updated_at":"2025-04-12T14:55:19.606Z","avatar_url":"https://github.com/eerimoq.png","language":"Python","funding_links":["https://github.com/sponsors/eerimoq"],"categories":["Python","Tools"],"sub_categories":["Tools - Editors \u0026 IDEs \u0026 Explorers"],"readme":"GraphQL client in the terminal\n==============================\n\nBuild and execute GraphQL queries in the terminal.\n\nThis project is inspired by https://graphiql-online.com.\n\n.. image:: https://github.com/eerimoq/gqt/raw/main/docs/assets/showcase.gif\n\nInstallation\n------------\n\n.. code-block::\n\n   pip3 install gqt\n\nIt's recommended to install `bat`_ for pretty output.\n\nControls\n--------\n\n- Press ``h`` or ``?`` for help.\n\nExamples\n--------\n\nSet default GraphQL endpoint:\n\n.. code-block::\n\n   export GQT_ENDPOINT=https://mys-lang.org/graphql\n\nInteractively create a query and execute it:\n\n.. code-block::\n\n   gqt\n\n.. code-block:: json\n\n   {\n       \"statistics\": {\n           \"numberOfGraphqlRequests\": 3\n       }\n   }\n\nRepeat last query:\n\n.. code-block::\n\n   gqt -r\n\n.. code-block:: json\n\n   {\n       \"statistics\": {\n           \"numberOfGraphqlRequests\": 4\n       }\n   }\n\nPrint the query (and variables) instead of executing it:\n\n.. code-block::\n\n   gqt -q\n\n.. code-block:: graphql\n\n   Query:\n   query Query {\n     statistics {\n       numberOfGraphqlRequests\n     }\n   }\n\n   Variables:\n   {}\n\nYAML output:\n\n.. code-block::\n\n   gqt -y\n\n.. code-block:: yaml\n\n   statistics:\n     numberOfGraphqlRequests: 8\n\nName queries:\n\n.. code-block::\n\n   gqt -n stats -y\n\n.. code-block:: yaml\n\n   statistics:\n     numberOfGraphqlRequests: 8\n\n.. code-block::\n\n   gqt -n time -y\n\n.. code-block:: yaml\n\n   standardLibrary:\n     package:\n       latestRelease:\n         version: 0.20.0\n\n.. code-block::\n\n   gqt -n stats -y -r\n\n.. code-block:: yaml\n\n   statistics:\n     numberOfGraphqlRequests: 9\n\n.. code-block::\n\n   gqt -n time -y -r\n\n.. code-block:: yaml\n\n   standardLibrary:\n     package:\n       latestRelease:\n         version: 0.20.0\n\nList queries:\n\n.. code-block::\n\n   gqt -l\n\n.. code-block::\n\n   Endpoint                      Query name\n   ----------------------------  ------------\n   https://mys-lang.org/graphql  \u003cdefault\u003e\n   https://mys-lang.org/graphql  time\n   https://mys-lang.org/graphql  stats\n\nMake arguments variables by pressing ``v`` and give them as ``-v\n\u003cname\u003e=\u003cvalue\u003e`` on the command line:\n\n.. code-block::\n\n   gqt -v name=time -y\n\n.. code-block:: yaml\n\n   standardLibrary:\n     package:\n       latestRelease:\n         version: 0.20.0\n\n.. code-block::\n\n   gqt -r -q\n\n.. code-block:: graphql\n\n   query Query($name: String!) {\n     standardLibrary {\n       package(name: $name) {\n         latestRelease {\n           version\n         }\n       }\n     }\n   }\n\nPrint the schema:\n\n.. code-block::\n\n   gqt --print-schema\n\n.. code-block:: graphql\n\n   type Query {\n     standardLibrary: StandardLibrary!\n     statistics: Statistics!\n     activities: [Activity!]!\n   }\n\n   type StandardLibrary {\n     package(name: String!): Package!\n     packages: [Package!]\n     numberOfPackages: Int\n     numberOfDownloads: Int\n   }\n   ...\n\nEnpoint option and bearer token in HTTP auth header:\n\n.. code-block::\n\n   gqt -e https://api.github.com/graphql -H \"Authorization: bearer ghp_\u003cvalue\u003e\"\n\nIdeas\n-----\n\n- Press ``c`` for compact view, hiding fields that are not selected.\n\n- Search:\n\n  Press ``/`` to search for visible fields. Press ``\u003cUp\u003e`` and\n  ``\u003cDown\u003e`` to move to the previous and next search hit. Highlight\n  all hits. Press ``\u003cEnter\u003e`` to end the search and move the cursor to\n  the current hit. Press ``\u003cEsc\u003e`` to abort the search and restore the\n  cursor to its pre-search position. Show number of hits.\n\n  .. code-block::\n\n     ╭─ Query\n     │ ▼ search\n     │   ▶ Book\n     │     ■ title\n     │   ▶ Author\n     │     ■ name\n     │ ▶ film\n     │ ▶ films\n\n     /fil                                                1 of 2 matches\n\n- Alias?\n\n  - Press ``a`` to create an alias.\n\n  - Press ``d`` to delete an alias.\n\n  ``smallPicture`` and ``mediumPicture`` are aliases of ``picture``.\n\n  .. code-block::\n\n     ╭─ Query\n     │ ▶ Book\n     │   ▶ picture\n     │   ▼ smallPicture: picture\n     │     ■ width: 320\n     │     ■ height: 240\n     │   ▼ mediumPicture: picture\n     │     ■ width: 800\n     │     ■ height: 600\n\n- Optionally give schema path on command line. For endpoints that does\n  not support schema introspection.\n\n.. _bat: https://github.com/sharkdp/bat\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feerimoq%2Fgqt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feerimoq%2Fgqt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feerimoq%2Fgqt/lists"}