https://github.com/ultirequiem/deno-clear
🧽 Utilities to clean the console + CLI App
https://github.com/ultirequiem/deno-clear
console deno denoland typescript
Last synced: about 2 months ago
JSON representation
🧽 Utilities to clean the console + CLI App
- Host: GitHub
- URL: https://github.com/ultirequiem/deno-clear
- Owner: UltiRequiem
- License: mit
- Created: 2021-09-23T15:47:18.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-03T18:44:18.000Z (over 3 years ago)
- Last Synced: 2025-08-22T06:50:37.535Z (about 2 months ago)
- Topics: console, deno, denoland, typescript
- Language: TypeScript
- Homepage: https://deno.land/x/clear
- Size: 18.6 KB
- Stars: 5
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Clear
[](https://gitmoji.dev)
[](https://opensource.org/licenses/MIT)

Port of [node-clear](https://github.com/bahamas10/node-clear) with some extras.
> Clear the terminal if possible.
You can get this package by [nest.land](https://nest.land/package/clear) or
[deno.land](https://deno.land/x/clear).## Usage
This package exposes two Functions,
[clear](https://github.com/UltiRequiem/deno-clear/blob/main/mod.ts#L1) (as
default) and
[delayedClear](https://github.com/UltiRequiem/deno-clear/blob/main/mod.ts#L7).```typescript
import { clear, delayedClear } from "https://deno.land/x/clear/mod.ts";console.log("Some Text...");
clear();
console.log("I will be erased in 5 seconds.");
delayedClear(5000);
```Check the [cli tool](./cli.ts) for more usage examples.
### CLI Tool
This project contains a cli tool, it is made to give an example of use mainly.
#### Install it
```bash
deno install -n declear https://deno.land/x/clear/cli.ts
```For more info check [this](https://deno.land/manual/tools/script_installer).
You can also get a binary from
[releases](https://github.com/UltiRequiem/deno-clear/releases/latest).#### Usage
- If you just run the command, it will clear your console:
```bash
$ declear
```- Full Clear:
```bash
$ declear --full
```- Delayed Clear:
```bash
$ declear --delay 3
```- You can combine the two flags:
```bash
declear --delay 4 --full
```- If you need help:
```bash
declear --help
Options:
--full Full Clean
--delay Seconds to delay
--help Print this
For more help check https://github.com/UltiRequiem/deno-clear
```### License
[This package](https://deno.land/x/fibonacci) is licensed under the
[MIT License](./LICENSE.md).