# link-checker-tool

> A tool used to check whether an URL is available or not

Latest version **1.0.2** (published 2020-12-06) · ISC license · 0 weekly downloads

## Install

```sh
npm install link-checker-tool
pnpm add link-checker-tool
yarn add link-checker-tool
bun add link-checker-tool
```

Provides the command `lct`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2020-12-06 |
| First published | 2020-12-06 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 386.3 KB |
| Known vulnerabilities | 0 (+25 in 1 direct dependencies) |
| Install scripts | no |
| Author | Thanh Tien Phat Nguyen |
| Maintainers | phast184 |
| Keywords | cli |

## Links

- npm: https://www.npmjs.com/package/link-checker-tool
- npm.io page: https://npm.io/package/link-checker-tool

## Dependencies (5)

- [nock](https://npm.io/package/nock.md) ^13.0.5
- [axios](https://npm.io/package/axios.md) ^0.20.0
- [chalk](https://npm.io/package/chalk.md) ^4.1.0
- [yargs](https://npm.io/package/yargs.md) ^16.0.3
- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.1

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2020-12-06
- 1.0.1 — 2020-12-06
- 1.0.0 — 2020-12-06

## README

# link-checker-tool

This tool is used to check whether an URL is available or not.

## Features

- [x] Offline support
- [x] Check all valid URLs in a file
- [x] Read multiple files at once
- [x] Check if an URL is available
- [x] Optimize code for header requests
- [x] Check archived versions of a website
- [x] Output json format result
- [x] Only display good/bad urls from a file
- [x] Exclude URLs from our check based on a URL pattern file.

## Usage

### To Install the package

```sh
$ npm -i link-checker-tool
```

or to install globally

```sh
$ npm install -g link-checker-tool
```

### Check all URL in a file

```sh
$ lct -f foo.js
```

### Check a single URL

```sh
$ lct -u https://github.com/phast184/link-checker-tool.git
$ lct --url https://github.com/phast184/link-checker-tool.git

```

### Check archived versions of a website

```sh
$ lct -a https://www.google.com/
$ lct --archived https://www.google.com/

```

### Read multiple files at once

```sh
$ lct -f index2.html test1.txt test.txt
```

### Output only good urls (from multiple files)

```sh
$ lct -g foo.js
$ lct --good foo.js
```

```sh
$ lct -g foo.js foo1.js
$ lct --good foo.js foo1.js
```

### Output only bad urls (from multiple files)

```sh
$ lct -b foo.js
$ lct --bad foo.js
```

```sh
$ lct -b foo.js foo1.js
$ lct --bad foo.js foo1.js
```

### JSON format output

```sh
$ lct -j https://github.com/phast184/link-checker-tool
$ lct --json https://github.com/phast184/link-checker-tool
```

### Ignore URL Patterns

```sh
$ lct -i ingonre-urls.txt -f test.txt
```

Note: `i` option can be used with any other available options : `-f-`,`-g`, `-b`, `-a`

## Output

[![1.jpg](https://i.postimg.cc/L8wZTJND/1.jpg)](https://postimg.cc/Hr0xWkG8)

#### GOOD: the URL is available with the status code of 200

#### BAD: the URL is not available with the status code of 400 or 404

#### UNKNOWN: other status code will be shown as unknown

## License

MIT © [Thanh Tien Phat Nguyen]

---
_Source: https://npm.io/package/link-checker-tool · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
