Last updated 2 years ago by self_refactor .
GPL-3.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install tag-gn -g
SYNC missed versions from official npm registry.

CircleCI Codecov


CLI command to create Github tags for your repos


Setting tags in Github is not hard, but it seems like something that could be automated as we need to use the UI for that.

How it works

Tag-fn uses Puppeteer library to log in your Github account and generate a new tag 0.2.0 for the repo where the command tag 0.2.0 is executed.

If no argument is passed, then it will automatically generate minor tag release.

In other words, if the current tag is 0.1.0 and command tag is executed, then this will result in automatic generation of 0.2.0 tag.


  • Install

I would suggest an Yarn command, but there is some issues with Yarn itself when installing global packages.

npm i -g tag-fn

  • Setting credentials

As Tag-fn uses Puppeteer library, this means that the library needs information about your Github username and password. Feel free to explore the code of Tag-fn to ensure that this sensitive data is not at risk.

One option is set Github credentials is to set GITHUB_USER and GITHUB_PASSWORD as your enviroinment variables.

The other possibility is to run command tag init --user user --password pass once with your Github credentials.

How to use?

Command is of type tag ${tagValue}

  • If there is no previous tag, then the new tag will be 0.1.0.

  • tagValue can be just a text like foo.

  • tagValue is optional.

  • If tagValue is omitted, then auto incrementation of the latest tag will be applied.

Auto incremention rules

  • Auto tag incremention increase the minor tag value.
  • If the previous tag is 0.1.0, then the new tag will be 0.2.0
  • If the previous tag is 0.9.0, then the new tag will be 1.0.0

Additional info

  • You can run the command in the project root folder or any subfolder.

  • It makes sense to have a clean repo state before running the tag command.


  • Accept 'major', 'minor' and 'patch' as tagValue argument.

Current Tags

  • 0.2.1                                ...           latest (2 years ago)

1 Versions

  • 0.2.1                                ...           2 years ago
Maintainers (1)
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 2
Dependencies (7)
Dev Dependencies (8)
Dependents (0)

Copyright 2014 - 2016 © taobao.org |