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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@simplysf/simply-gitlab-core

v0.5.1

Published

Configuration, authentication, HTTP client, and shared logic for working with GitLab

Readme

@simplysf/simply-gitlab-core

Configuration, authentication, the HTTP client, and the shared logic that @simplysf/simply-gitlab (the CLI) and @simplysf/simply-gitlab-mcp (the MCP server) are both built on.

Everything a command does between parsing its input and rendering its result lives here, so the CLI and the MCP server cannot disagree about what a rule means. Nothing in this package touches a terminal or a process: no oclif, no child processes, no process.argv, nothing written to stdout or stderr. process.env is read only through an injectable env parameter.

You want this package directly if you are building something else against GitLab in TypeScript. If you want a CLI or an MCP server, install one of those instead.

npm install @simplysf/simply-gitlab-core

Usage

import { GitLabClient, resolveGitLabConfig } from '@simplysf/simply-gitlab-core';

// Reads GITLAB_URL (default https://gitlab.com) and GITLAB_TOKEN, and throws a ConfigError
// naming what is missing.
const client = new GitLabClient(resolveGitLabConfig());

// A project is named by numeric id or by full path; the path is encoded for you.
const project = await client.getProject('group/subgroup/project');

// Lists follow pages up to your limit and tell you whether they got everything.
const { items, total, complete } = await client.listMergeRequests('group/project', { state: 'opened' }, 50);
if (!complete) console.warn(`showing ${items.length} of ${total ?? 'many'}`);

What is in here

Configuration and auth — resolveGitLabConfig, buildAuthHeaders, loadEnvFile.

Transport — HttpTransport, with retries on 429 and 5xx, a capped Retry-After, a 30s deadline covering the response body, GitLab's bracketed array query parameters, a non-JSON mode for job traces, and its offset-pagination headers.

The client — GitLabClient, which owns project-path encoding and page walking, and returns { items, total?, pages, complete } from every list.

Errors — ConfigError (exit 2), AuthError (3), NetworkError (1), HttpError (1), all extending CliError.

Safety — assertWritesAllowed/isReadOnly for GITLAB_READ_ONLY; redactSecrets and sanitiseDeep to keep a token out of any message or response body; stripControl and stripControlOneLine for text the instance chose.

Operations — assertIid, buildMergeRequestCreateBody, buildMergeRequestUpdateBody, buildCommitBody, parseCommitActions, buildFileWrite, decodeFileContent, maskVariables, tailLog, searchColumns, and for creating a project — blank or from a template — buildProjectCreateBody, prepareProjectCreate, resolveNamespaceId, resolveGroupId, resolveProjectId.

Rendering — formatTable, formatKeyValue, and the column sets each list command uses.

Testing — @simplysf/simply-gitlab-core/testing exports startTestServer and respondJson, a tiny local HTTP server that records every request. Both other packages test against it.

Stability

Every export from src/index.ts is semver-covered: adding one is a minor or patch change, removing or renaming one is breaking. test/index.test.ts pins the list, so a removal fails a test rather than shipping quietly in a patch.

Guides

User-facing documentation for the CLI and MCP server built on this package: https://simplysf.github.io/simply-cli/gitlab/

Documentation

License

Apache-2.0.