
Security News
New CVE Forecasting Tool Predicts 47,000 Disclosures in 2025
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
A simple Node CLI wrapper for http://git.io. In Terminal, simply enter gitio shrink
followed by the GitHub URL you would like to shrink and the shortened URL will be copied automatically to your clipboard. Read more about git.io here.
Copying to clipboard is implemented via the copy-paste package which supports OSX, Windows, Linux, and OpenBSD.
A quick note: This is not a generic URL shortener. git.io—and by extension, this package—only shortens links that are hosted within the github.com
domain.
npm install -g node-gitio
$ gitio shrink github.com/.../my_cool_package
# => http://git.io/vZHUg ✔ copied to clipboard
$ gitio shrink github.com/.../my_cool_package -c mycoolpackage
# => http://git.io/mycoolpackage ✔ copied to clipboard
Usage: gitio <command> [options]
Commands:
shrink Shrink a GitHub URL.
Options:
--help, -h Show the help menu.
--version, -v Show version number.
Usage: gitio shrink <long url> [-c code] [-f]
Options:
--code, -c A custom code for the short link, e.g. http://git.io/mycode. (Optional)
--force, -f Try to shorten link even if the custom code has been used previously.
(Optional)
--help, -h Show the help menu.
var gitio = require('node-gitio');
/**
* Using callbacks.
*/
gitio.shrink(payload, function (err, result) {
if (!err) {
console.log(result);
}
});
/**
* Using promises.
*/
gitio.shrink(payload).then(function (result) {
console.log(result);
}, function (err) {
console.error(err);
});
Name | Type | Description | Required |
---|---|---|---|
url | string | The GitHub URL to shorten. | Yes |
code | string | A custom code for the short link, e.g. http://git.io/mycode. | No |
force | boolean | Try to shorten link even if the custom code has been used previously. | No |
github.com/nathanbuchar/node-gitio
.$ gitio shrink github.com/nathanbuchar/node-gitio
# => http://git.io/vZ9RJ ✔ copied to clipboard
github.com/nathanbuchar/node-gitio
and attempt to use nathan-gitio
as the custom code (if available).$ gitio shrink github.com/nathanbuchar/node-gitio -c nathan-gitio
# => http://git.io/nathan-gitio ✔ copied to clipboard
github.com/nathanbuchar/node-gitio
via Node JS and log the result.var gitio = require('node-gitio');
gitio.shrink({
url: 'github.com/nathanbuchar/node-gitio'
}, function (err, result) {
if (!err) {
console.log(result);
}
});
FAQs
A simple Node CLI wrapper for git.io.
The npm package node-gitio receives a total of 6 weekly downloads. As such, node-gitio popularity was classified as not popular.
We found that node-gitio demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.