{"id":15055444,"url":"https://github.com/huhouhua/glctl","last_synced_at":"2026-01-12T00:45:18.243Z","repository":{"id":244375874,"uuid":"815040169","full_name":"huhouhua/glctl","owner":"huhouhua","description":"GitLab CLI tool, designed with a declarative API 🚀🚀","archived":false,"fork":false,"pushed_at":"2025-07-17T21:47:39.000Z","size":590,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-18T02:04:19.641Z","etag":null,"topics":["cli","command-line","declarative","devops","gitlab","gitlab-api","gitlab-cli","gitlab-ctl"],"latest_commit_sha":null,"homepage":"https://github.com/huhouhua/glctl","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/huhouhua.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-06-14T08:16:02.000Z","updated_at":"2025-07-17T21:47:38.000Z","dependencies_parsed_at":"2024-08-25T19:39:22.773Z","dependency_job_id":"0bf9ba2b-6a6e-4d64-a14b-6e13798e500d","html_url":"https://github.com/huhouhua/glctl","commit_stats":null,"previous_names":["huhouhua/gitlab-repo-operator","huhouhua/glctl"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/huhouhua/glctl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huhouhua%2Fglctl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huhouhua%2Fglctl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huhouhua%2Fglctl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huhouhua%2Fglctl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/huhouhua","download_url":"https://codeload.github.com/huhouhua/glctl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huhouhua%2Fglctl/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266614309,"owners_count":23956342,"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","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","command-line","declarative","devops","gitlab","gitlab-api","gitlab-cli","gitlab-ctl"],"created_at":"2024-09-24T21:42:11.759Z","updated_at":"2025-07-23T04:04:01.445Z","avatar_url":"https://github.com/huhouhua.png","language":"Go","readme":"\n\u003cdiv align=\"center\"\u003e\n\t\u003ch1\u003eGitLab CLI\u003c/h1\u003e\n\t\u003cp\u003eglctl is a powerful GitLab command line tool. It provides a declarative API to manage GitLab resources, making it easier for you to perform common GitLab operations from the terminal\u003c/p\u003e\n\u003c/div\u003e\n\n![Workflow ci](https://github.com/huhouhua/glctl/actions/workflows/glctl.yml/badge.svg)\n[![Go Report Card](https://goreportcard.com/badge/github.com/huhouhua/glctl)](https://goreportcard.com/report/github.com/huhouhua/glctl)\n[![release](https://img.shields.io/github/release-pre/huhouhua/glctl.svg)](https://github.com/huhouhua/glctl/releases)\n[![Docker Pulls](https://img.shields.io/docker/pulls/huhouhua/glctl.svg?maxAge=604800)](https://hub.docker.com/r/huhouhua/glctl/)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)\n[![GoDoc](https://godoc.org/github.com/huhouhua/glctl?status.svg)](https://godoc.org/github.com/huhouhua/glctl)\n[![Test Coverage](https://codecov.io/gh/huhouhua/glctl/branch/main/graph/badge.svg)](https://codecov.io/gh/huhouhua/glctl)\n\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"#-installation\"\u003eInstallation\u003c/a\u003e ❘\n\t\u003ca href=\"#-features\"\u003eFeatures\u003c/a\u003e ❘\n\t\u003ca href=\"#-quick-start\"\u003eQuick-Start\u003c/a\u003e ❘\n\t\u003ca href=\"#-examples\"\u003eExamples\u003c/a\u003e ❘\n\t\u003ca href=\"#-license\"\u003eLicense\u003c/a\u003e\n\u003c/p\u003e\n\n```\nUsing environment variables for authorization\n\n* Basic Authentication (if using a username and password)\n    - GITLAB_USERNAME\n    - GITLAB_PASSWORD\n    - GITLAB_URL\n\n* Private Token (if using a private token)\n    - GITLAB_PRIVATE_TOKEN\n    - GITLAB_URL\n\n* OAuth Token (if using an oauth token)\n    - GITLAB_OAUTH_TOKEN\n    - GITLAB_URL\n    \nBasic Commands:\n  get         Display one or many resources\n  edit        Edit a resource on the server\n  delete      Delete resources by file names, stdin, resources and names, or by resources\n  create      Create a resource from a file or from stdin\n\nAuthorization Commands:\n  login       Login to gitlab\n  logout      logout current gitlab\n\nAdvanced Commands:\n  replace     Replace a repository file by file name or stdin.\n\n all formats are accepted. If replacing an existing repository file, the\ncomplete repository file spec must be provided. This can be obtained by\n\n  $ glctl get files PROJECT --path=my.yml --ref=BRANCH --raw\n\nSettings Commands:\n  completion  Output shell completion code for the specified shell (bash, zsh,\nfish, or powershell)\n\nOther Commands:\n  version     Print the client and server version information\n\n```\n\n## 🤘\u0026nbsp; Features\n- Manage GitLab projects, issues, merge requests, and more\n- Authenticate and manage GitLab sessions\n- Create, get, edit, and delete GitLab resources\n- Operate on project branch files\n- Shell completion support\n\n## 🐳\u0026nbsp; Docker Container\n### Release\n```\ndocker pull huhouhua/glctl\ndocker run \\\n  -e GITLAB_URL=https://gitlab.example.com \\\n  -e GITLAB_PRIVATE_TOKEN=305e146a4aa23fb4021a4f162102251e85f651a058a34fb2c27d633617cf8877 \\\n  huhouhua/glctl get projects\n```\n\n🔔 **Note:** Above examples use private token authentication by default. See [environment](#-authentication) for details. To run `glctl` against other compatible servers, start the container this way:\n\n```\ndocker run -it --entrypoint=/bin/sh huhouhua/glctl\n```\n\n### 🦊 GitLab CI\nWhen using the Docker container in GitLab CI, you must [set the entrypoint to an empty string](https://docs.gitlab.com/ee/ci/docker/using_docker_images.html#override-the-entrypoint-of-an-image).\n\n```\ndeploy:\n  image:\n    name: huhouhua/glctl\n    entrypoint: ['']\n  stage: deploy\n  before_script:\n    - export GITLAB_URL=https://gitlab.example.com\n    - export GITLAB_PRIVATE_TOKEN=305e146a4aa23fb4021a4f162102251e85f651a058a34fb2c27d633617cf8877\n  script:\n    - glctl get projects\n```\n\n## 📦\u0026nbsp; Installation\n\n### 📁 From Binary\n\nDownload the appropriate version for your platform from the [releases page](https://github.com/huhouhua/glctl/releases).\n\n### 🛠️ From Source\n- compile glctl and place it in _output/\n```bash\ngit clone https://github.com/huhouhua/glctl.git\ncd glctl\nmake build\n```\n\n## 🚀\u0026nbsp; Quick Start\n\n### 📄\u0026nbsp;Usage\n  ```bash\n  glctl \u003ccommand\u003e \u003csubcommand\u003e [flags]\n  ```\n\n### 🔐 Authentication\n\n- start interactive login\n```bash\nglctl login https://gitlab.example.com\n```\n- start interactive Login by username\n```bash\nglctl login https://gitlab.example.com --username myname\n```\n\n- Login by specifying username and password\n```bash\nglctl login https://gitlab.example.com --username myname --password mypassword\n```\n\n- authenticate with private token and hostname\n```bash\nexport GITLAB_URL=https://gitlab.example.com\nexport GITLAB_PRIVATE_TOKEN=305e146a4aa23fb4021a4f162102251e85f651a058a34fb2c27d633617cf8877\n```\n\n- authenticate with oauth token and hostname\n```bash\nexport GITLAB_URL=https://gitlab.example.com\nexport GITLAB_OAUTH_TOKEN=aefb8b4e0895799aa60cf50eb8bcd9ae1fecf08fb6cc8249238219067e5aa926\n```\n\n- Logging in using environment variables (Not recommended for shared environments)\n```bash\nexport GITLAB_URL=https://gitlab.example.com\nexport GITLAB_USERNAME=myname\nexport GITLAB_PASSWORD=mypassword\n```\n\n## 🥙\u0026nbsp; Examples\n- List your groups\n```bash\nglctl get groups\n```\n\n- List your projects:\n```bash\nglctl get projects\n```\n\n- List branches of group1/project1\n```bash\nglctl get branchs group1/project1\n```\n\n- Create a develop branch from the master branch in the group1/project1 project\n```bash\nglctl create branch develop --project=group1/project1 --ref=master\n```\n\n### 🥪 Available Commands\n\n- `login` - Authenticate with GitLab\n- `logout` - Log out from GitLab\n- `create` - Create new GitLab resources (projects, issues, merge requests, etc.)\n- `get` - Get information about GitLab resources\n- `edit` - Edit existing GitLab resources\n- `delete` - Delete GitLab resources\n- `replace` - Replace existing GitLab resources\n- `version` - Display version information\n- `completion` - Generate shell completion scripts\n\n### 🗒️\u0026nbsp;Logged in user authorization file\nFiles are stored in `$HOME/.glctl.yaml` example:\n```yaml\naccess_token: 305e146a4aa23fb4021a4f162102251e85f651a058a34fb2c27d633617cf8877\ncreated_at: 1.748339041e+09\nhost_url: https://gitlab.example.com\nrefresh_token: aefb8b4e0895799aa60cf50eb8bcd9ae1fecf08fb6cc8249238219067e5aa926\nscope: api\ntoken_type: Bearer\nuser_name: root\n```\n\n## 🧠\u0026nbsp;TODOs\n\n- This cli tool is still in the development stage, and most of the resources are not completed. Everyone contribute is very much needed. 🙋‍♂️\n- Declarative resources are still in the design stage\n\n## 🤝\u0026nbsp;Issues\n\nIf you have an issue: report it on the [issue tracker](https://github.com/huhouhua/glctl/issues)\n\n## 👤\u0026nbsp;Author\n\nKevin Berger (\u003chuhouhuam@outlook.com\u003e)\n\n## 🧑‍💻\u0026nbsp;Contributing\n\nContributions are always welcome. For more information, check out the [contributing guide](CONTRIBUTING.md)\n\n## 📘\u0026nbsp; License\n\nLicensed under the Apache License 2.0. See [LICENSE](LICENSE) for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuhouhua%2Fglctl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhuhouhua%2Fglctl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuhouhua%2Fglctl/lists"}