Skip to content

TheElegantCoding/gitlys

Repository files navigation

wave

Gitlys


divider

  📦 SETUP⚙️ CONFIGURATION⚡ FEATURES 

divider


                   

divider

About

The ultimate Git workflow toolkit for Node and Bun. Orchestrate your entire release cycle: from linting staged files and enforcing commit standards to automated semantic versioning and GitHub releases.

divider

Table of content

divider

Requirements

  • node >= 22.17.0
  • bun >= 1.1.0
  • github cli >= 2.89.0

divider

Installation

Bun

bun i -D gitlys

Npm

npm i -D gitlys

Pnpm

pnpm i -D gitlys

Yarn

yarn i -D gitlys

divider

Features

  • Commitlint - Enforce commit message standards
  • Lint-staged - Lint staged files before commit
  • Changelog - Generate and maintain a changelog
  • Semantic Release - Automated semantic versioning and changelog generation
  • GitHub Release - Automatically create releases on GitHub with the generated changelog
  • Customizable - Highly customizable to fit your workflow

divider

Usage

To initialize gitlys in your project, just run the following command in your terminal, you can use the package manager you want:

bunx gitlys init

In order to release a version of your project, just run the following command in your terminal:

bunx gitlys release

I recommend you to add this command in your package.json for more comfortable use:

{
  "scripts": {
    "postinstall": "bunx gitlys init",
    "release": "bunx gitlys release",
    "prepublishOnly": "bun run build",
  }
}

divider

Configuration

The configuration of gitlys is really simple, create a file named .gitlys.json in the root of your project and export an object with the configuration you want, for example:

{
  "commitlint": {
    "allowedTypes": ["feat", "fix", "docs", "style", "refactor", "perf", "test", "chore"],
    "maxLength": 120
  },
  "lintStaged": {
    "*.{ts,tsx,js,jsx}": "eslint --fix",
    "*.{css,scss}": "stylelint --fix"
  },
  "release": {
    "releaseToGithub": false
  },
  "changelog": {
    "changelogPath": "CHANGELOG.md",
    "generateChangelog": false
  },
  "packageManager": "npm"
}
  • commitlint.allowedTypes - Allowed types for commit messages, by default it uses the conventional commits types
  • commitlint.maxLength - Maximum length for commit messages
  • lintStaged - Configuration for lint-staged, files and commands to run when those files are staged
  • release.releaseToGithub - Configuration for release, whether to release to GitHub or not
  • changelog.changelogPath - Path to the changelog file
  • changelog.generateChangelog - Whether to generate a changelog or not
  • packageManager - Package manager to use for install gitlys and run scripts

Additionally, if you are using Gitlens and also Copilot you can add the following configuration to your settings.json to have a better experience with gitlys:

{
  "gitlens.codeLens.recentChange.enabled": false,
  "gitlens.ai.generateCommitMessage.customInstructions": "Use conventional commits, format: <type>: <short description in lowercase>, The description should be concise and describe the change in a few words and always in lowercase, max length of 120 characters, allowed types: feat, fix, doc, style, refactor, perf, test, build, ci, config, update, release, breaking, typo, asset, package, language, security, revert, the message must be in English",
}

divider

  BACK TO TOP

divider

  Copyright © All rights reserved,
  developed by LuisdaByte and

About

📦️ A lightweight, zero-dependency release automation toolkit for Node.js and Bun. Handles semantic versioning, categorized changelogs, and automated GitHub releases

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors