https://github.com/flxwu/shortlinker
Tiny 9KB CLI Tool to turn your website into a link shortening service for your own URLs
https://github.com/flxwu/shortlinker
cli linkshortener node npm website
Last synced: 2 months ago
JSON representation
Tiny 9KB CLI Tool to turn your website into a link shortening service for your own URLs
- Host: GitHub
- URL: https://github.com/flxwu/shortlinker
- Owner: flxwu
- Created: 2018-08-28T15:49:36.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-28T20:51:42.000Z (almost 8 years ago)
- Last Synced: 2025-10-26T17:27:44.219Z (9 months ago)
- Topics: cli, linkshortener, node, npm, website
- Language: JavaScript
- Homepage:
- Size: 9.77 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# shortlinker
A Simple Node.js CLI Utility to create redirecting shortlinks on your own website.
## Usage
Install using `npm` or `yarn`:
```bash
npm install -g shortlinker
yarn global add shortlinker
```
Then run it:
```
shortlinker https://github.com/flxwu/shortlinker GH-Link
```
will create a `GH-Link.html` file in your current directory that redirects to `https://github.com/flxwu/shortlinker`.
### CLI Options
###### Output Directory
Use `-D` to specify the directory in which the redirect-file will be put into:
```
shortlinker https://github.com/flxwu/shortlinker GH-Link -D code/flxwu.github.io/links/
```
Given the website root is `flxwu.github.io`, I can now access the shortlink via `flxwu.github.io/links/GH-Link.html`.
###### Version Control
Use `-G` to enable automatic version control commit and push:
```
shortlinker https://github.com/flxwu/shortlinker GH-Link -D code/flxwu.github.io/links/ -G
```
shortlinker now creates the same shortlink as above, but also commits the new file and pushes it to the remote repository.