# @simple-libs/hosted-git-info

> A small library to parse hosted git info.

Latest version **2.0.0** (published 2026-06-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install @simple-libs/hosted-git-info
pnpm add @simple-libs/hosted-git-info
yarn add @simple-libs/hosted-git-info
bun add @simple-libs/hosted-git-info
```

## Health

**Score 60/100 (C)** — status: active.

Positive: esm support; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2026-06-25 |
| First published | 2025-05-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | >=22 |
| Dependencies | 0 |
| Unpacked size | 13.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Dan Onoshko |
| Maintainers | dangreen |
| Keywords | git, github, bitbucket, gitlab, hosted-git-info |

## Links

- npm: https://www.npmjs.com/package/@simple-libs/hosted-git-info
- Repository: https://github.com/TrigenSoftware/simple-libs
- Homepage: https://github.com/TrigenSoftware/simple-libs/tree/main/packages/hosted-git-info#readme
- Issues: https://github.com/TrigenSoftware/simple-libs/issues
- Funding: https://ko-fi.com/dangreen
- npm.io page: https://npm.io/package/@simple-libs/hosted-git-info

## Recent versions

- 2.0.0 (latest) — 2026-06-25
- 1.0.2 — 2026-03-01
- 1.0.1 — 2025-06-01
- 1.0.0 — 2025-05-28

## README

# @simple-libs/hosted-git-info

[![ESM-only package][package]][package-url]
[![NPM version][npm]][npm-url]
[![Node version][node]][node-url]
[![Dependencies status][deps]][deps-url]
[![Install size][size]][size-url]
[![Build status][build]][build-url]
[![Coverage status][coverage]][coverage-url]

[package]: https://img.shields.io/badge/package-ESM--only-ffe536.svg
[package-url]: https://nodejs.org/api/esm.html

[npm]: https://img.shields.io/npm/v/@simple-libs/hosted-git-info.svg
[npm-url]: https://www.npmjs.com/package/@simple-libs/hosted-git-info

[node]: https://img.shields.io/node/v/@simple-libs/hosted-git-info.svg
[node-url]: https://nodejs.org

[deps]: https://img.shields.io/librariesio/release/npm/@simple-libs/hosted-git-info
[deps-url]: https://libraries.io/npm/@simple-libs%2Fhosted-git-info

[size]: https://packagephobia.com/badge?p=@simple-libs/hosted-git-info
[size-url]: https://packagephobia.com/result?p=@simple-libs/hosted-git-info

[build]: https://img.shields.io/github/actions/workflow/status/TrigenSoftware/simple-libs/tests.yml?branch=main
[build-url]: https://github.com/TrigenSoftware/simple-libs/actions

[coverage]: https://coveralls.io/repos/github/TrigenSoftware/simple-libs/badge.svg?branch=main
[coverage-url]: https://coveralls.io/github/TrigenSoftware/simple-libs?branch=main

A small library to parse hosted git info.

## Install

```bash
# pnpm
pnpm add @simple-libs/hosted-git-info
# yarn
yarn add @simple-libs/hosted-git-info
# npm
npm i @simple-libs/hosted-git-info
```

## Usage

```ts
import { parseHostedGitUrl } from '@simple-libs/hosted-git-info'

parseHostedGitUrl('github:foo/bar')
/* {
  type: 'github',
  url: 'https://github.com/foo/bar',
  host: 'https://github.com',
  owner: 'foo',
  project: 'bar'
} */
parseHostedGitUrl('git+ssh://bitbucket.org:foo/bar.git')
/* {
  type: 'bitbucket',
  url: 'https://bitbucket.org/foo/bar',
  host: 'https://bitbucket.org',
  owner: 'foo',
  project: 'bar'
} */
parseHostedGitUrl('https://user@gitlab.com/foo/bar.git#branch')
/* {
  type: 'gitlab',
  url: 'https://gitlab.com/foo/bar/tree/branch',
  host: 'https://gitlab.com',
  owner: 'foo',
  project: 'bar'
} */
```

---
_Source: https://npm.io/package/@simple-libs/hosted-git-info · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
