Installations
npm install trash-cli
Developer Guide
Typescript
No
Module System
ESM
Min. Node Version
>=18
Node Version
18.20.2
NPM Version
10.6.0
Releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
sindresorhus
Download Statistics
Total Downloads
4,344,471
Last Day
920
Last Week
5,481
Last Month
43,815
Last Year
703,960
GitHub Statistics
1,331 Stars
39 Commits
36 Forks
11 Watching
1 Branches
4 Contributors
Sponsor this package
Package Meta Information
Latest Version
6.0.0
Package Id
trash-cli@6.0.0
Unpacked Size
3.83 kB
Size
2.09 kB
File Count
4
NPM Version
10.6.0
Node Version
18.20.2
Publised On
26 Jul 2024
Total Downloads
Cumulative downloads
Total Downloads
4,344,471
Last day
-16.4%
920
Compared to previous day
Last week
-37.3%
5,481
Compared to previous week
Last month
-63.2%
43,815
Compared to previous month
Last year
5.2%
703,960
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dev Dependencies
5
trash-cli
Move files and folders to the trash
Works on macOS (10.12+), Linux, and Windows (8+).
In contrast to rm
which is dangerous and permanently deletes files, this only moves them to the trash, which is much safer and reversible. I would also recommend reading my guide on safeguarding rm
.
Accepts paths and glob patterns.
Install
1npm install --global trash-cli
Usage
$ trash --help
Usage
$ trash <path|glob> […]
Examples
$ trash unicorn.png rainbow.png
$ trash '*.png' '!unicorn.png'
Tip
Add alias rm=trash
to your .zshrc
/.bashrc
to reduce typing & safely trash files: $ rm unicorn.png
.
FAQ
Related
- trash - API for this package
- empty-trash-cli - Empty the trash
- del-cli - Delete files and folders
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
security policy file detected
Details
- Info: security policy file detected: .github/security.md:1
- Info: Found linked content: .github/security.md:1
- Info: Found disclosure, vulnerability, and/or timelines in security policy: .github/security.md:1
- Info: Found text in security policy: .github/security.md:1
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: license:0
- Info: FSF or OSI recognized license: MIT License: license:0
Reason
Found 4/30 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/main.yml:1
- Info: no jobLevel write permissions found
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/sindresorhus/trash-cli/main.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/sindresorhus/trash-cli/main.yml/main?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/main.yml:22
- Info: 0 out of 2 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 1 npmCommand dependencies pinned
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'main'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 4 are checked with a SAST tool
Score
4.2
/10
Last Scanned on 2024-12-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More