npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@kickass-dev/gitlab-cli

v1.3.0

Published

Simple cli tool for using gitlab api

Downloads

29

Readme

Gitlab CLI

npm

Simple cli tool for using gitlab api through command line.

Setup

npm install -g @kickass-dev/gitlab-cli

Configure CLI

gitlab-cli init YOUR_GITLAB_ACCESS_TOKEN https://gitlab.com

You can check Creating a personal access token for information on how to generate your GitLab access token.

You can find your Project ID inside your GitLab repository: Where is my Project ID

This will create configuration file at ~/.gitlabcli/config and use it for all other commands.

Configuration can be overwritten by calling init command again.

Usage

Create variable

gitlab-cli variable-create PROJECT_ID HOMEPAGE_URL https://kickass.website

Instead of value you can also provide relative file path. In that case contents of the file will be used as variable value.

gitlab-cli variable-create PROJECT_ID HOMEPAGE_URL ../path/to/my/env/file

Get variable

With this you can easily pull for example .env that you store inside your gitlab project for local development:

gitlab-cli variable-get PROJECT_ID ENV_FILE > .env

or value by value:

gitlab-cli variable-get PROJECT_ID HOMEPAGE_URL >> .env
gitlab-cli variable-get PROJECT_ID API_BASE >> .env

Create pipeline

> gitlab-cli pipeline-create 646 feature/cache
Pipeline #21807 created and running...

Cancel or retry pipeline

gitlab-cli pipeline-update 646 21807 retry
gitlab-cli pipeline-update 646 21807 cancel

List runners for project

> gitlab-cli runner-list 646
33 frontend ONLINE 255.255.32.197
738 macosrunner ONLINE 255.255.14.247
1655 azure-runner ONLINE 255.255.154.234
1798 k6-runner PAUSED 255.255.255.152

Enable or disable runner for project

gitlab-cli runner-enable 646 33
gitlab-cli runner-disable 646 33

List issues for project

> gitlab-cli issue-list 646
108473084 OPENED 2022-05-12T19:50:29.097Z https://gitlab.com/capJavert/test/-/issues/13
108470014 OPENED 2022-05-12T18:47:53.820Z https://gitlab.com/capJavert/test/-/issues/12
108469767 OPENED 2022-05-12T18:41:40.416Z https://gitlab.com/capJavert/test/-/issues/11
108469728 CLOSED 2022-05-12T18:40:29.520Z https://gitlab.com/capJavert/test/-/issues/10

You can find other commands with examples and usages in the Help section below.*

Help

Get full list of commands:

gitlab-cli --help

Get help for specific command:

gitlab-cli [command] --help

Options:

--help Show help [boolean]
--version Show version number [boolean]

FAQ

  • How do I create a variable with multiline content?

Just wrap variable value in quotation marks like:

gitlab-cli variable-update 646 EDITOR_CONFIG "root = true

[*]
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4"

or load your variable value from file by providing file path instead of value.

  • I wish to output original (JSON) response from Gitlab API, how can I do that?

Every command supports global --raw option, use it like:

gitlab-cli pipeline-list 646 --raw

This will output original JSON string received from Gitlab API. You can use it to parse it by yourself or pipe to some other command for processing (for example inside CI/CD job).

Support

Currently supported

  • [x] Variables
  • [x] Pipelines
  • [x] Runners
  • [x] Issues (partial)

Next

  • [ ] Releases

There are plans to support other resources available on API Docs | GitLab