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

@geut/chan

v3.2.9

Published

Write and maintain a CHANGELOG from your command line.

Downloads

5,120

Readme

Chan CLI

Build Status npm version

Chan is a likeable CLI tool used for writing and maintaining a CHANGELOG empowering the user to use a coloquial/friendly style. See more here: keepachangelog.com

chan

Getting started

Install:

$ npm install -g @geut/chan

Usage

Create a CHANGELOG.md file in your project root folder with:

$ chan init

To add entries to your CHANGELOG use the command that describes better your change (added, changed, fixed, etc)

$ chan added "New feature in my API to print foo in the console."

This command will modify your CHANGELOG creating a new entry called added under the Unreleased section.

chan follows the keepachangelog.com format/style.

Release your changes:

$ chan release 0.0.1

And you will get something like:

# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## 0.0.1 - 2019-01-11
### Added
- New feature in my API to print foo in the console.

[Unreleased]: https://github.com/my-org/my-repo/compare/v0.0.1..HEAD

chan init [dir]

Creates a CHANGELOG.md if it does not exists. Chan will work with this file.

Options

[dir] (string)

Allows you to run init in a specific directory: chan init packages/package-one.

-o, --overwrite (boolean)

Overwrite the current CHANGELOG.md

chan <action> <msg>

Create new entries with the <msg> in your changelog under the release: Unreleased

<action> could be:

  • added Writes your changelog indicating new stuff.

  • fixed Writes your changelog indicating fixed stuff.

  • changed Writes your changelog indicating updated stuff.

  • security Writes your changelog indicating security upgrades.

  • removed Writes your changelog indicating removed stuff.

  • deprecated Writes your changelog indicating deprecated stuff.

Options

-p, --path (string)

Define the path of the CHANGELOG.md (cwd by default).

-g, --group (string)

Prefix change with provided group value.

Example:

chan added --group=packages/package-one 'New stuff added'

will add to you changelog unreleased changes:

### Added
- packages/package-one
  - New stuff added.

This could be a good option to work with a monorepo and root changelog.

chan release <semver>

Marks the unreleased changes as a new release in your changelog.

Keep a changelog defines that each release can have a compare preview url like: https://help.github.com/articles/comparing-commits-across-time/

By default, chan will try to generate it automatically from your .git local directory, but you can change this behaviour. Check the next options.

Options

<semver> (string)

Valid semver version.

-p, --path (string)

Define the path of the CHANGELOG.md (cwd by default).

--yanked (boolean)

Marks the release as a yanked version.

--git-url (string)

You can provide the git url of your project so chan can tries to find the git provider to generate the url compare for your releases.

Example: https://github.com/geut/chan will generate releases with the url: https://github.com/geut/chan/compare/v0.0.1..HEAD

Also, this kind of configurations can be defined in the package.json.

--git-template (string)

If --git-url is not enough you can define the template url to compare your releases.

Example: https://otherhost.com/geut/chan/compare/[prev]...[next] will generate releases with the url: https://otherhost.com/geut/chan/compare/v0.0.1..HEAD

--git-branch (string)

Defines which branch chan is going to use to compare the unreleased version.

Example: chan release 0.0.1 --git-branch master will generate releases with the url: https://github.com/geut/chan/compare/v0.0.1..master

--release-prefix (string)

You can provide a custom release prefix fitting your project release process. (v by default).

Example: V will generate releases with the url: https://github.com/geut/chan/compare/V0.0.1..HEAD

Also, this kind of configurations can be defined in the package.json.

--allow-yanked (boolean)

Allow yanked releases. When this option is true and the release doesn't have new changes it will released as a yanked version.

--allow-prerelease (boolean)

Allow prerelease versions.

--merge-prerelease (boolean)

Merge the prerelease versions into the next stable version.

--ghrelease (boolean)

Creates a github release.

By default it opens the browser with the github release to edit and accept.

If you define the env GITHUB_TOKEN it will publish the release directly, best option for CI.

chan gh-release <semver>

Creates a github release.

Options

--git-url (string)

Define the url of the repository project.

--release-prefix (string)

You can provide a custom release prefix fitting your project release process. (v by default).

Example: V will generate releases with the url: https://github.com/geut/chan/compare/V0.0.1..HEAD

Also, this kind of configurations can be defined in the package.json.

chan show <semver>

Shows the release notes for a specific version.

Global options

--stdout (boolean)

Define the output as STDOUT

--verbose (boolean)

Show more info on error

--help (boolean)

Show help

--version (boolean)

Show version number

Configuration

You can configure the chan options using the package.json or a rc file (.chanrc, .chanrc.json):

.chanrc

{
  "git-url": "https://github.com/geut/chan",
  "release-prefix": "v"
}

package.json

{
  "chan": {
    "git-url": "https://github.com/geut/chan",
    "release-prefix": "v"
  }
}

ISSUES

If you found an issue we encourage you to report it on github. Please specify your OS and the actions to reproduce it.

CONTRIBUTE

Ideas and contributions to the project are welcome. You must follow this guideline.


A GEUT project