An open API service indexing awesome lists of open source software.

https://github.com/1407arjun/cli-shorturl-template

A personalised CLI-based URL shortner using GitHub actions and Next.js
https://github.com/1407arjun/cli-shorturl-template

cli github-actions nextjs template url-shortener

Last synced: 2 months ago
JSON representation

A personalised CLI-based URL shortner using GitHub actions and Next.js

Awesome Lists containing this project

README

          

# cli-shorturl

A personalised CLI-based URL shortner using GitHub actions and Next.js

## Setup

> All registered URLs are stored in `urls.json`

### Add the environment variables to your `.bashrc` or `.zshrc`

```sh
export GITHUB_PAT=
export BASE_URL=
```

### Add the package to `PATH`

```sh
cd url-shortner
npm link
```

### Update your Git config in `.github/workflows/ci.yml`

```sh
git config --global user.email ""
git config --global user.name ""
```

### Deployment

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https%3A%2F%2Fgithub.com%2F1407arjun%2Fcli-shorturl-template%2Ftree%2Fmain)

## Getting started

### Adding a URL

```sh
shorturl add
```

### Removing a URL

```sh
shorturl remove
```

### Listing all registered URLs

```sh
shorturl list
```

### Checking a URL

```sh
shorturl check all
```

### Checking for a particular URL field

```sh
shorturl check
```