From 15cd4548fd0bd72bc5bce6b5ee8b595fae43bf30 Mon Sep 17 00:00:00 2001 From: "alexander.andriishin" Date: Tue, 28 Apr 2026 01:28:58 +0300 Subject: [PATCH] docs: migrate 5 README files to a single NRG template Replaces 5 hand-maintained READMEs (en + es/id/pt/tr) with a single README.src.md, regenerated in CI by nanolaba/nrg-action@v1 on push to main. All 5 outputs are byte-identical to the originals (modulo a 2-line auto-generated header NRG injects at the top). Drift-check job runs in mode: check on PRs that touch any README*.md or the template, failing the build with a unified diff when a contributor edits a generated file directly. --- .github/workflows/nrg.yml | 48 ++ README.es.md | 2 + README.id.md | 2 + README.md | 2 + README.pt.md | 2 + README.src.md | 1346 +++++++++++++++++++++++++++++++++++++ README.tr.md | 2 + 7 files changed, 1404 insertions(+) create mode 100644 .github/workflows/nrg.yml create mode 100644 README.src.md diff --git a/.github/workflows/nrg.yml b/.github/workflows/nrg.yml new file mode 100644 index 00000000..307f6ca9 --- /dev/null +++ b/.github/workflows/nrg.yml @@ -0,0 +1,48 @@ +name: Regenerate READMEs +on: + push: + branches: [main] + paths: + - 'README.src.md' + - '.github/workflows/nrg.yml' + pull_request: + paths: + - 'README.md' + - 'README.es.md' + - 'README.id.md' + - 'README.pt.md' + - 'README.tr.md' + - 'README.src.md' +permissions: + contents: write +jobs: + regenerate: + if: github.event_name == 'push' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + - uses: nanolaba/nrg-action@v1 + with: + file: README.src.md + nrg-version: '1.1' + - name: Commit regenerated READMEs + run: | + if [ -n "$(git status --porcelain README.md README.es.md README.id.md README.pt.md README.tr.md)" ]; then + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git add README.md README.es.md README.id.md README.pt.md README.tr.md + git commit -m "docs: regenerate READMEs from README.src.md" + git push + fi + drift-check: + if: github.event_name == 'pull_request' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: nanolaba/nrg-action@v1 + with: + file: README.src.md + mode: check + nrg-version: '1.1' diff --git a/README.es.md b/README.es.md index 4c2f8cac..a06db9b2 100644 --- a/README.es.md +++ b/README.es.md @@ -1,3 +1,5 @@ + +

npkill logo npkill logo scope diff --git a/README.id.md b/README.id.md index 8c868a45..c370cd59 100644 --- a/README.id.md +++ b/README.id.md @@ -1,3 +1,5 @@ + +

npkill logo npkill logo scope diff --git a/README.md b/README.md index 314c5676..1c459adf 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ + +

npkill logo

diff --git a/README.pt.md b/README.pt.md index c9efaea8..059685e8 100644 --- a/README.pt.md +++ b/README.pt.md @@ -1,3 +1,5 @@ + +

npkill logo npkill logo scope diff --git a/README.src.md b/README.src.md new file mode 100644 index 00000000..e6032c59 --- /dev/null +++ b/README.src.md @@ -0,0 +1,1346 @@ + + +

+ npkill logo +

+

+npm +Donations Badge +npm version +NPM +

+ +### Easily find and **remove** old and heavy **node_modules** folders :sparkles: + +

+ npkill demo GIF +

+ +This tool allows you to list any _node_modules_ directories in your system, as well as the space they take up. You can then select which ones you want to erase to free up space. Yay! + +## i18n + +We're making an effort to internationalize the Npkill docs. Here's a list of the available translations: + +- [Español](./README.es.md) +- [Indonesian](./README.id.md) +- [Português](./README.pt.md) +- [Turkish](./README.tr.md) + +## Table of Contents + +- [Features](#features) +- [Installation](#installation) +- [Usage](#usage) + - [Multi-Select Mode](#multi-select-mode) + - [Options](#options) + - [Examples](#examples) + - [JSON Output](#json-output) +- [Set Up Locally](#setup-locally) +- [API](#API) +- [Roadmap](#roadmap) +- [Known bugs](#known-bugs) +- [Contributing](#contributing) +- [Buy us a coffee](#donations) +- [License](#license) + + + +# :heavy_check_mark: Features + +- **Clear space:** Get rid of old and dusty _node_modules_ cluttering up your machine. + +- **Last Workspace Usage**: Check when was the last time you modified a file in the workspace (indicated in the **last_mod** column). + +- **Very fast:** NPKILL is written in TypeScript, but searches are performed at a low level, improving performance greatly. + +- **Easy to use:** Say goodbye to lengthy commands. Using npkill is as simple as reading a list of your node_modules, and pressing Del to get rid of them. Could it be any easier? ;) + +- **Minified:** It barely has any dependencies. + + + +# :cloud: Installation + +You don't really need to install it to use it! +Simply use the following command: + +```bash +$ npx npkill +``` + +Or if for some reason you really want to install it: + +```bash +$ npm i -g npkill +# Unix users may need to run the command with sudo. Go carefully +``` + +> NPKILL does not support node + + + +# :clipboard: Usage + +```bash +$ npx npkill +# or just npkill if installed globally +``` + +By default, npkill will scan for node_modules starting at the path where `npkill` command is executed. + +Move between the listed folders with , and use Space or Del to delete the selected folder. +You can also use j and k to move between the results. + +You can open the directory where the selected result is placed by pressing o. + +To exit, Q or Ctrl + c if you're brave. + +**Important!** Some applications installed on the system need their node_modules directory to work and deleting them may break them. NPKILL will highlight them by displaying a :warning: to be careful. + +## Search Mode + +Search mode allows you to filter results. This can be particularly useful for limiting the view to a specific route or ensuring that only those results that meet the specified condition are “selected all.” + +For example, you can use this expression to limit the results to those that are in the `work` directory and that include `data` somewhere in the path: `/work/.*/data`. + +Press / to enter search mode. You can type a regex pattern to filter results. + +Press Enter to confirm the search and navigate the filtered results, or Esc to clear and exit. + +To exit from this mode, leave empty. + +## Multi-Select Mode + +This mode allows you to select and delete multiple folders at once, making it more efficient when cleaning up many directories. + +### Entering Multi-Select Mode + +Press T to toggle multi-select mode. When active, you'll see a selection counter and additional instructions at the top of the results. + +### Controls + +- **Space**: Toggle selection of the current folder. +- **V**: Start/end range selection mode. +- **A**: Toggle select/unselect all folders. +- **Enter**: Delete all selected folders. +- **T**: Unselect all and back to normal mode. + +### Range Selection + +After pressing V to enter range selection mode: + +- Move the cursor with arrow keys, j/k, Home/End, or page up/down +- All folders between the starting position and current cursor position will be selected/deselected +- Press V again to exit range selection mode + + + +## Options + +| ARGUMENT | DESCRIPTION | +| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| -p, --profiles | Allows you to select the [profile](./docs/profiles.md) (set of targets) to use. If no option is specified, the available ones will be listed _(**node** by default)_. | +| --config | Path to a custom .npkillrc configuration file. By default, npkill looks first for `./.npkillrc` and then for `~/.npkillrc`. | +| -d, --directory | Set the directory from which to begin searching. By default, starting-point is . | +| -D, --delete-all | Automatically delete all folders that are found. Suggested to be used together with `-x`. | +| -e, --hide-errors | Hide errors if any | +| -E, --exclude | Exclude directories from search (directory list must be inside double quotes "", each directory separated by ',' ) Example: "ignore1, ignore2" | +| -f, --full | Start searching from the home of the user (example: "/home/user" in linux) | +| --size-unit | Set the unit for displaying folder sizes. _(Available: **auto**, mb, gb)_. With auto, sizes < 1024MB are shown in MB (rounded), larger sizes in GB (with decimals). | +| -h, --help, ? | Show help page | +| -nu, --no-check-update | Don't check for updates on startup | +| -s, --sort | Sort results by: `size`, `path` or `age` | +| -t, --targets | Disable profiles feature and specify the name of the directories you want to search for. You can define multiple targets separating with comma. Ej. `-t node_modules,.cache`. | +| -x, --exclude-sensitive | Exclude sensitive directories. | +| -y | Avoid displaying a warning when executing --delete-all. | +| --dry-run | It does not delete anything (will simulate it with a random delay). | +| --json | Output results in JSON format at the end of the scan. Useful for automation and scripting. | +| --json-stream | Output results in streaming JSON format (one JSON object per line as results are found). Useful for real-time processing. | +| -v, --version | Show npkill version | + + + +## Examples + +- Search **node_modules** directories in your _projects_ directory: + +```bash +npkill -d ~/projects + +# other alternative: +cd ~/projects +npkill +``` + +- List **node_modules** in your _projects_ directory, excluding the ones in _progress_ and _ignore-this_ directories: + +```bash +npkill -d 'projects' --exclude "progress, ignore-this" +``` + +- Automatically delete all node_modules that have sneaked into your backups: + +```bash +npkill -d ~/backups/ --delete-all +``` + +- Get results in JSON format for automation or further processing: + +```bash +npkill --json > results.json +``` + +- Stream results in real-time as JSON (useful for monitoring or piping to other tools): + +```bash +npkill --json-stream | jq '.' +``` + +- Save only successful results to a file, ignoring errors: + +```bash +npkill --json-stream 2>/dev/null | jq -s '.' > clean-results.json +``` + + + +## JSON Output + +Npkill supports JSON output formats for automation and integration with other tools: + +- **`--json`**: Output all results as a single JSON object at the end of the scan +- **`--json-stream`**: Output each result as a separate JSON object in real-time + +For detailed documentation, examples, and TypeScript interfaces, see [JSON Output Documentation](./docs/json-output.md). + +**Quick Examples:** + +```bash +# Get all results as JSON +npkill --json > results.json + +# Process results in real-time +npkill --json-stream | jq '.result.path' + +# Find directories larger than 100MB +npkill --json | jq '.results[] | select(.size > 104857600)' +``` + + + +# :pager: Set Up Locally + +```bash +# -- First, clone the repository +git clone https://github.com/voidcosmos/npkill.git + +# -- Navigate to the dir +cd npkill + +# -- Install dependencies +npm install + +# -- And run! +npm run start + + +# -- If you want to run it with some parameter, you will have to add "--" as in the following example: +npm run start -- -f -e +``` + + + +# :bookmark_tabs: API + +The api allows you to interact with npkill from node to create your own implementations in your scripts (automations, for example). + +You can check the basic API [here](./API.md) or on the web (comming soon). + + + +# :crystal_ball: Roadmap + +- [x] Release 0.1.0 ! +- [x] Improve code + - [x] Improve performance + - [ ] Improve performance even more! +- [x] Sort results by size and path +- [x] Allow the search for other types of directories (targets) +- [ ] Reduce dependencies to be a more minimalist module +- [ ] Allow to filter by directories that have not been used in a period of time +- [ ] Create option for displaying directories in tree format +- [x] Add some menus +- [x] Add log service +- [ ] Periodic and automatic cleaning (?) + + + +# :bug: Known bugs :bug: + +- Sometimes, CLI is blocked while folder is deleting. +- Sorting, especially by routes, can slow down the terminal when there are many results at the same time. +- Sometimes, size calculations are higher than they should be. +- (SOLVED) Performance issues when searching from high level directories (like / in linux). +- (SOLVED) Sometimes text collapses when updating the cli. +- (SOLVED) Analyzing the size of the directories takes longer than it should. + +> If you find any bugs, don't hesitate and open an issue :) + + + +# :revolving_hearts: Contributing + +If you want to contribute check the [CONTRIBUTING.md](.github/CONTRIBUTING.md) + + + +# :coffee: Buy us a coffee + + +We have developed npkill in our free time, because we are passionate about the programming sector. +Tomorrow we would like to dedicate ourselves to this, but first, we have a long way to go. + +We will continue to do things anyway, but donations are one of the many ways to support what we do. + +Open Collective donate button + +### Thanks!! + +## A huge thank you to our backers :heart: + + + +--- + +### Crypto alternative + +- btc: 1ML2DihUoFTqhoQnrWy4WLxKbVYkUXpMAX +- bch: 1HVpaicQL5jWKkbChgPf6cvkH8nyktVnVk +- eth: 0x7668e86c8bdb52034606db5aa0d2d4d73a0d4259 + + + +# :scroll: License + +MIT © [Nya García Gallardo](https://github.com/NyaGarcia) and [Juan Torres Gómez](https://github.com/zaldih) + +:cat::baby_chick: + +--- +

+ npkill logo + npkill logo scope +

+

+npm +Donations Badge +npm version +NPM +

+ +### Encuentra y **destruye** directorios **node_modules** viejos y pesados :sparkles: + +

+ npkill demo GIF +

+ +Esta herramienta te permite listar cualquier directorio _node_modules_ que haya en tu sistema, además del espacio que ocupa. Entonces puedes seleccionar los que quieras borrar para liberar espacio. ¡Yay! + +## i18n + +Nos estamos esforzando por internacionalizar la documentación de Npkill. Aquí tienes una lista de las traducciones disponibles: + +- [Español](./README.es.md) +- [Português](./README.pt.md) + +## Table of Contents + +- [Características](#features) +- [Instalación](#installation) +- [Uso](#usage) + - [Opciones](#options) + - [Ejemplos](#examples) +- [Configuración local](#setup-locally) +- [Roadmap](#roadmap) +- [Bugs conocidos](#known-bugs) +- [Cómo contribuir](#contributing) +- [Invítanos a un café](#donations) +- [Licencia](#license) + + + +# :heavy_check_mark: Características + +- **Libera espacio:** Elimina tus directorios _node_modules_ viejos y polvorientos que le roban espacio a tu máquina. + +- **Último uso del Workspace**: Comprueba cuándo ha sido la última vez que has modificado un fichero en el workspace (indicado en la columna **last_mod**). + +- **Rapidez:** NPKILL está escrito en TypeScript, pero las búsquedas se llevan a cabo a bajo nivel, lo que supone una mejora considerable del rendimiento. + +- **Fácil de utilizar:** Despídete de comandos largos y difíciles. Utilizar Npkill es tan sencillo como leer la lista de tus node_modules, y pulsar la tecla Del para eliminarlos. ¿Podría ser más fácil? ;) + +- **Minificado:** Apenas tiene dependencias. + + + +# :cloud: Instalación + +¡Lo mejor es que no tienes que instalar Npkill para utilizarlo! +Simplemente utiliza el siguiente comando: + +```bash +$ npx npkill +``` + +O, si por alguna razón te apetece instalarlo: + +```bash +$ npm i -g npkill +# Los usuarios de Unix quizá tengan que ejecutar el comando con sudo. Ve con cuidado +``` + +> NPKILL no tiene soporte para node + + + +# :clipboard: Uso + +```bash +$ npx npkill +# o solo npkill si está instalado de forma global +``` + +Por defecto, Npkill comenzará la búsqueda de node_modules comenzando en la ruta donde se ejecute el comando `npkill`. + +Muévete por los distintos directorios listados con , y utiliza Space para borrar el directorio seleccionado. + +También puedes usar j y k para moverte por los resultados. + +Puedes abrir el directorio donde se aloja el resultado seleccionado pulsando o. + +Para salir de Npkill, utiliza Q, o si te sientes valiente, Ctrl + c. + +**¡Importante!** Algunas aplicaciones que están instaladas en el sistema necesitan su directorio node_modules para funcionar, y borrarlo puede romperlas. NPKILL te mostrará un :warning: para que sepas que tienes que tener cuidado. + + + +## Opciones + +| ARGUMENTO | DESCRIPCIÓN | +| -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| -c, --bg-color | Cambia el color de selección de la fila. _(Colores disponibles: **azul**, cyan, magenta, blanco, rojo y amarillo)_ | +| -d, --directory | Permite seleccionar el directorio desde el que comienza la búsqueda. Por defecto, se empieza en . | +| -D, --delete-all | Borra automáticamente todos los node_modules que se encuentren. Recomendable utilizar junto a `-x` | +| -e, --hide-errors | Esconde los errores en el caso de que ocurra alguno | +| -E, --exclude | Excluye directorios de la búsqueda (la lista de directorios debe estar entre comillas dobles "", cada directorio separado por ',' Ejemplo: "ignore1, ignore2") | +| -f, --full | Comienza la búsqueda en el home del usuario (ejemplo: "/home/user" en Linux) | +| -gb | Muestra el tamaño en Gigabytes en lugar de en Megabytes. | +| -h, --help, ? | Muestra esta página de ayuda y finaliza | +| -nu, --no-check-update | No comprobar si hay actualizaciones al iniciar la aplicación | +| -s, --sort | Ordena los resultados por: `size`, `path` or `last-mod` | +| -t, --target | Especifica el nombre del directorio que se buscará (por defecto es node_modules) | +| -x, --exclude-hidden-directories | Excluye directorios ocultos (directorios "dot") de la búsqueda | +| --dry-run | No borra nada (simula un tiempo de borrado aleatorio) | +| -v, --version | Muestra la versión de Npkill | + +**Precaución:** _Algunos comandos pueden cambiar en versiones futuras_ + + + +## Ejemplo + +- Busca y encuentra los directorios **node_modules** en un directorio _projects_ : + +```bash +npkill -d ~/projects + +# otra alternativa: +cd ~/projects +npkill +``` + +- Lista los directorios llamados "dist" y muestra los errores que ocurran: + +```bash +npkill --target dist -e +``` + +- Muestra el cursor de color magenta... ¡Porque me gusta el magenta! + +```bash +npkill --bg-color magenta +``` + +- Lista los directorios **vendor** en un directorio _projects_, ordenados por tamaño y mostrando el tamaño en gb: + +```bash +npkill -d '~/more projects' -gb --sort size --target vendor +``` + +- Lista los **node_modules** en el directorio _projects_, excluyendo los que están en los directorios _progress_ e _ignore-this_: + +```bash +npkill -d 'projects' --exclude "progress, ignore-this" +``` + +- Borra automáticamente todos los **node_modules** que se encuentren en el directorio _backups_: + +```bash +npkill -d ~/backups/ --delete-all +``` + + + +# :pager: Configuración local + +```bash +# -- Primero, clona el repositorio +git clone https://github.com/voidcosmos/npkill.git + +# -- Navega al dir +cd npkill + +# -- Instala las dependencias +npm install + +# -- ¡Y ejecuta! +npm run start + + +# -- Si quieres ejecutar con algún parámetro, hay que añadir "--", tal y como se muestra a continuación: +npm run start -- -f -e +``` + + + +# :crystal_ball: Roadmap + +- [x] Lanzar la versión 0.1.0 ! +- [x] Mejorar el código + - [x] Mejorar el rendimiento + - [ ] ¡Mejorar el rendimiento aún más! +- [x] Ordenar los resultados por tamaño y ruta +- [x] Permitir la búsqueda de otro tipo de directorios (targets) +- [ ] Reducir las dependencies para ser un módulo más minimalista +- [ ] Permitir el filtrado por directorios que no se hayan utilizado en un periodo de tiempo determinado +- [ ] Crear una opción para mostrar los directorios en formato árbol +- [x] Añadir menús +- [x] Añadir un servicio de logs +- [ ] Limpieza periódica y automática (?) + + + +# :bug: Bugs conocidos :bug: + +- A veces, el CLI se bloquea mientras un directorio se está borrando. +- La ordenación, especialmente por rutas, puede ralentizar la terminal cuando haya muchos resultados al mismo tiempo. +- A veces, los cálculos de tamaño son mayores de lo que deberían ser. +- (RESUELTO) Problemas de rendimiento al hacer la búsqueda desde directorios de alto nivel (como / en Linux). +- (RESUELTO) A veces el texto se colapsa al actualizar el CLI. +- (RESUELTO) Analizar el tamaño de los directorios tarda más de lo que debería. + +> Si encuentras algún bug, no dudes en abrir un issue :) + + + +# :revolving_hearts: Cómo contribuir + +Si quieres contribuir, échale un vistazo al [CONTRIBUTING.md](.github/CONTRIBUTING.es.md) + + + +# :coffee: Invítanos a un café + + +Hemos desarrollado Npkill en nuestro tiempo libre, porque nos apasiona la programación. + +El día de mañana nos gustaría dedicarnos al open source completamente, pero antes, nos queda un largo camino por recorrer. + +Seguiremos contribuyendo al open source por y para siempre, pero las donaciones son una de las muchas formas de apoyarnos. + +¡Invítanos a un café! (O a un té para Nya, la única programadora a la que no le gusta el café). + +Botón de donar con Open Collective + +### ¡¡Mil gracias!! + +## Muchísimas gracias a todos los que nos han apoyado :heart: + + + +--- + +### Alternativa cripto + +- btc: 1ML2DihUoFTqhoQnrWy4WLxKbVYkUXpMAX +- bch: 1HVpaicQL5jWKkbChgPf6cvkH8nyktVnVk +- eth: 0x7668e86c8bdb52034606db5aa0d2d4d73a0d4259 + + + +# :scroll: Licencia + +MIT © [Nya García Gallardo](https://github.com/NyaGarcia) y [Juan Torres Gómez](https://github.com/zaldih) + +:cat::baby_chick: + +--- +

+ npkill logo + npkill logo scope +

+

+npm +Donations Badge +npm version +NPM +

+ +### Mudah menemukan dan **menghapus** folder **node_modules** yang lama dan berat :sparkles: + +

+ npkill demo GIF +

+ +Alat ini memungkinkan Anda untuk mencantumkan semua direktori _node_modules_ di sistem Anda, serta ruang yang mereka gunakan. Anda kemudian dapat memilih mana yang ingin Anda hapus untuk mengosongkan ruang penyimpanan. Yay! + +## i18n + +Kami berusaha untuk menerjemahkan dokumen Npkill ke berbagai bahasa. Berikut daftar terjemahan yang tersedia: + +- [Español](./README.es.md) +- [Indonesian](./README.id.md) +- [Portugis](./README.pt.md) +- [Turki](./README.tr.md) + +## Daftar Isi + +- [Fitur](#features) +- [Instalasi](#installation) +- [Penggunaan](#usage) + - [Opsi](#options) + - [Contoh](#examples) +- [Pengaturan Lokal](#setup-locally) +- [Peta Jalan](#roadmap) +- [Bug yang Diketahui](#known-bugs) +- [Kontribusi](#contributing) +- [Buy us a coffee](#donations) +- [Lisensi](#license) + + + +# :heavy_check_mark: Fitur + +- **Bersihkan Ruang:** Hapus _node_modules_ lama yang tidak digunakan yang memenuhi mesin Anda. + +- **Penggunaan Terakhir Workspace:** Cek kapan terakhir kali Anda mengubah file di workspace (ditunjukkan di kolom **last_mod**). + +- **Sangat Cepat:** NPKILL ditulis dalam TypeScript, tetapi pencarian dilakukan di tingkat rendah, sehingga performanya sangat baik. + +- **Mudah Digunakan:** Tidak perlu perintah panjang. Menggunakan npkill semudah membaca daftar _node_modules_ Anda, dan menekan tombol Del untuk menghapusnya. Bisa lebih mudah dari itu? + +- **Ringkas:** Hampir tidak memiliki dependensi. + + + +# :cloud: Instalasi + +Anda tidak perlu menginstal untuk menggunakannya! Cukup gunakan perintah berikut: + +```bash +$ npx npkill +``` + +Atau jika Anda benar-benar ingin menginstalnya: + +```bash +$ npm i -g npkill +# Pengguna Unix mungkin perlu menjalankan perintah dengan sudo. Gunakan dengan hati-hati +``` + +> NPKILL tidak mendukung node + + + +# :clipboard: Penggunaan + +```bash +$ npx npkill +# atau cukup npkill jika telah diinstal secara global +``` + +Secara default, npkill akan memindai _node_modules_ mulai dari jalur tempat perintah `npkill` dijalankan. + +Pindah di antara folder yang terdaftar menggunakan , dan gunakan Space atau Del untuk menghapus folder yang dipilih. Anda juga dapat menggunakan j dan k untuk bergerak di antara hasil. + +Anda dapat membuka direktori tempat hasil yang dipilih berada dengan menekan o. + +Untuk keluar, tekan Q atau Ctrl + c jika Anda pemberani. + +**Penting!** Beberapa aplikasi yang diinstal di sistem membutuhkan direktori _node_modules_ untuk berfungsi, dan menghapusnya dapat menyebabkan kerusakan. NPKILL akan menandainya dengan :warning: agar berhati-hati. + + + +## Opsi + +| ARGUMEN | DESKRIPSI | +| -------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| -c, --bg-color | Ubah warna sorotan baris. _(Tersedia: **blue**, cyan, magenta, white, red, dan yellow)_ | +| -d, --directory | Tetapkan direktori awal pencarian. Secara default, mulai dari . | +| -D, --delete-all | Secara otomatis hapus semua folder _node_modules_ yang ditemukan. Disarankan digunakan bersama `-x`. | +| -e, --hide-errors | Sembunyikan kesalahan (jika ada) | +| -E, --exclude | Kecualikan direktori dari pencarian. Daftar direktori harus dalam tanda kutip ganda "", dipisahkan dengan ',' | +| -f, --full | Mulai pencarian dari direktori home pengguna (contoh: "/home/user" di Linux) | +| -gb | Tampilkan folder dalam Gigabyte daripada Megabyte. | +| -h, --help, ? | Tampilkan halaman bantuan ini dan keluar | +| -nu, --no-check-update | Jangan memeriksa pembaruan saat startup | +| -s, --sort | Urutkan hasil berdasarkan: `size`, `path`, atau `last-mod` | +| -t, --target | Tentukan nama direktori yang ingin Anda cari (default: node_modules) | +| -x, --exclude-hidden-directories | Kecualikan direktori tersembunyi dari pencarian. | +| --dry-run | Tidak menghapus apa pun (hanya simulasi dengan delay acak). | +| -v, --version | Tampilkan versi npkill | + +**Peringatan:** _Di versi mendatang, beberapa perintah mungkin berubah._ + + + +## Contoh + +- Cari direktori **node_modules** di direktori _projects_ Anda: + +```bash +npkill -d ~/projects + +# alternatif lain: +cd ~/projects +npkill +``` + +- Daftar direktori bernama "dist" dan tampilkan kesalahan jika ada: + +```bash +npkill --target dist -e +``` + +- Tampilkan kursor warna magenta... karena saya suka magenta! + +```bash +npkill --color magenta +``` + +- Daftar direktori **vendor** di _projects_, urutkan berdasarkan ukuran, dan tampilkan ukuran dalam GB: + +```bash +npkill -d '~/more projects' -gb --sort size --target vendor +``` + +- Secara otomatis hapus semua _node_modules_ di folder cadangan Anda: + +```bash +npkill -d ~/backups/ --delete-all +``` + + + +# :pager: Pengaturan Lokal + +```bash +# -- Pertama, kloning repositori +git clone https://github.com/voidcosmos/npkill.git + +# -- Masuk ke direktori +cd npkill + +# -- Instal dependensi +npm install + +# -- Dan jalankan! +npm run start + +# -- Jika ingin menjalankannya dengan parameter, tambahkan "--" seperti contoh berikut: +npm run start -- -f -e +``` + + + +# :crystal_ball: Peta Jalan + +- [x] Rilis versi 0.1.0! +- [x] Tingkatkan kode + - [x] Tingkatkan performa + - [ ] Tingkatkan performa lebih lanjut! +- [x] Urutkan hasil berdasarkan ukuran dan jalur +- [x] Izinkan pencarian untuk jenis direktori (target) lainnya +- [ ] Kurangi dependensi agar minimalis +- [ ] Filter berdasarkan waktu terakhir penggunaan +- [ ] Tampilkan direktori dalam format tree +- [x] Tambahkan beberapa menu +- [x] Tambahkan log +- [ ] Pembersihan otomatis berkala (?) + + + +# :bug: Bug yang Diketahui :bug: + +- CLI terkadang berhenti saat menghapus folder. +- Beberapa terminal tanpa TTY (seperti Git Bash di Windows) tidak bekerja. +- Mengurutkan berdasarkan jalur dapat memperlambat terminal dengan banyak hasil. +- Perhitungan ukuran kadang lebih besar dari seharusnya. +- (TERPECAHKAN) Masalah performa pada direktori tingkat tinggi (seperti / di Linux). +- (TERPECAHKAN) Teks terkadang kacau saat CLI diperbarui. +- (TERPECAHKAN) Analisis ukuran direktori memakan waktu lebih lama dari seharusnya. + +> Jika menemukan bug, jangan ragu untuk membuka issue. :) + + + +# :revolving_hearts: Kontribusi + +Jika ingin berkontribusi, cek [CONTRIBUTING.md](.github/CONTRIBUTING.md). + + + +# :coffee: Buy us a coffee + + +Kami mengembangkan npkill di waktu luang karena kami mencintai pemrograman. + +Kami akan terus mengerjakan ini, tetapi donasi adalah salah satu cara mendukung apa yang kami lakukan. + +Open Collective donate button + +### Terima Kasih!! + +## Terima kasih banyak kepada pendukung kami :heart: + + + +--- + +### Alternatif Crypto + +- btc: 1ML2DihUoFTqhoQnrWy4WLxKbVYkUXpMAX +- bch: 1HVpaicQL5jWKkbChgPf6cvkH8nyktVnVk +- eth: 0x7668e86c8bdb52034606db5aa0d2d4d73a0d4259 + + + +# :scroll: Lisensi + +MIT © [Nya García Gallardo](https://github.com/NyaGarcia) dan [Juan Torres Gómez](https://github.com/zaldih) + +:cat::baby_chick: + +--- +

+ npkill logo + npkill logo scope +

+

+npm +Donations Badge +npm version +NPM +

+ +### Encontre e **remova** facilemente pastas **node_modules** antigas e pesadas :sparkles: + +

+ npkill demo GIF +

+ +Esta ferramenta permite que você liste as pastas _node_modules_ em seu sistema, bem como o espaço que ocupam. Então você pode selecionar quais deles deseja apagar para liberar espaço. ¡Yay! + +## i18n + +Estamos fazendo esforço para internacionalizar a documentação do Npkill. Aqui está uma lista das traduções disponíveis: + +- [Español](./README.es.md) +- [Português](./README.pt.md) + +## Table of Contents + +- [Funcionalidades](#features) +- [Instalação](#installation) +- [Utilização](#usage) + - [Opções](#options) + - [Exemplos](#examples) +- [Configurar localmente](#setup-locally) +- [Roteiro](#roadmap) +- [Problemas conhecidos](#known-bugs) +- [Contribuindo](#contributing) +- [Compre-nos um café](#donations) +- [Licença](#license) + + + +# :heavy_check_mark: Funcionalidades + +- **Liberar espaço:** Livre-se dos antigos e empoeirados node_modules que ocupam espaço em sua máquina. + +- **Último Uso do Espaço de Trabalho**: Verifique quando foi a última vez que você modificou um arquivo no espaço de trabalho (indicado na coluna **última_modificação**). + +- **Muito rápido:** O NPKILL é escrito em TypeScript, mas as pesquisas são realizadas em um nível baixo, melhorando muito o desempenho. + +- **Fácil de usar:** Diga adeus aos comandos longos. Usar o npkill é tão simples quanto ler uma lista de seus node_modules e pressionar Delete para se livrar deles. Pode ser mais fácil do que isso? ;) + +- **Minificado:** Ele mal possui dependências. + + + +# :cloud: Instalação + +Você nem precisa instalá-lo para usar! +Basta usar o seguinte comando: + +```bash +$ npx npkill +``` + +Ou, se por algum motivo você realmente deseja instalá-lo: + +```bash +$ npm i -g npkill +# Usuários do Unix podem precisar executar o comando com sudo. Tome cuidado. +``` + +> O NPKILL não suporta versões node + + + +# :clipboard: Utilização + +```bash +$ npx npkill +# ou apenas npkill se você instalou globalmente +``` + +Por padrão, o npkill fará a varredura em busca de node_modules a partir do local onde o comando npkill é executado. + +Para mover entre as pastas listadas, utilize as teclas e , e use Space ou Del para excluir a pasta selecionada. +Você também pode usar j e k para se mover entre os resultados. + +Para abrir o diretório onde o resultado selecionado está localizado, pressione o. + +Para sair, use Q ou Ctrl + c se você estiver se sentindo corajoso. + +**Importante!** Algumas aplicações instaladas no sistema precisam do diretório node_modules delas para funcionar, e excluí-los pode quebrá-las. O NPKILL irá destacá-los exibindo um :warning: para que você tenha cuidado. + + + +## Opções + +| Comando | Descrição | +| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| -c, --bg-color | Troca a cor de destaque da linha. _(Disponível: **blue**, cyan, magenta, white, red e yellow)_ | +| -d, --directory | Defina o diretório a partir do qual iniciar a pesquisa. Por padrão, o ponto de partida é a raiz is . | +| -D, --delete-all | Exclui automaticamente todos os node_modules encontrados. Recomendado para usar junto com `-x` | +| -e, --hide-errors | Oculta erros | +| -E, --exclude | Excluir diretórios da pesquisa (a lista de diretórios deve estar entre aspas duplas "", com cada diretório separado por vírgula ','). Exemplo: "ignorar1, ignorar2" | +| -f, --full | Iniciar a pesquisa a partir do diretório pessoal do usuário (exemplo: "/home/user" no Linux) | +| -gb | Mostra as pastas em Gigabytes ao invés de Megabytes. | +| -h, --help, ? | Mostrar a página de ajuda e sair | +| -nu, --no-check-update | Não verificar atualizações na inicialização | +| -s, --sort | Ordenar resultados por: `size` (tamanho), `path`(localização) ou `last-mod`(última modificação) | +| -t, --target | Especifique o nome dos diretórios que deseja pesquisar (por padrão, é node_modules) | +| -x, --exclude-hidden-directories | Excluir diretórios ocultos ("diretórios com ponto") da pesquisa. | +| --dry-run | Não exclui nada (irá simular com um atraso aleatório). | +| -v, --version | Mostrar versão do npkill | + +**Aviso:** _No futuro alguns comandos podem mudar_ + + + +## Examples + +- Busque pastas **node_modules** no seu diretório de projetos: + +```bash +npkill -d ~/projetos + +# alternativa: +cd ~/projetos +npkill +``` + +- Listar diretórios com o nome "dist" e mostrar erros, se houver algum: + +```bash +npkill --target dist -e +``` + +- Exibe o cursor na cor magenta... porque eu gosto de magenta! + +```bash +npkill --bg-color magenta +``` + +- Listar pastas **vendor** no seu diretório de _projetos_, ordenar por tamanho e mostrar o tamanho em GB: + +```bash +npkill -d '~/more projetos' -gb --sort size --target vendor +``` + +- Listar **node_modules** no seu diretório de _projetos_, exceto nas pastas _progresso_ e _ignorar_: + +```bash +npkill -d 'projetos' --exclude "progresso, ignorar" +``` + +- Exclua automaticamente todos os node_modules que tenham entrado em seus backups: + +```bash +npkill -d ~/backups/ --delete-all +``` + + + +# :pager: Configurar localmente + +```bash +# -- Primeiramente, clone o repositório +git clone https://github.com/voidcosmos/npkill.git + +# -- Acesse a pasta +cd npkill + +# -- Instale as dependências +npm install + +# -- E rode! +npm run start + + +# -- Se você deseja executá-lo com algum parâmetro, você terá que adicionar "--" como no seguinte exemplo: +npm run start -- -f -e +``` + + + +# :crystal_ball: Roteiro + +- [x] Lançamento 0.1.0 ! +- [x] Melhorias de código + - [x] Melhorias de performance + - [ ] Ainda mais melhorias de performance! +- [x] Ordenação de resultados por tamanho e localização +- [x] Permitir a pesquisa por outros tipos de diretórios (alvo) +- [ ] Reduzir as dependências para tornar o módulo mais minimalista +- [ ] Permitir filtrar por diretórios que não foram usados em um período de tempo +- [ ] Criar opção para mostrar as pastas em formato de árvore +- [x] Adicionar menus +- [x] Adicionar logs +- [ ] Limpeza automatizada periódica (?) + + + +# :bug: Problemas conhecidos :bug: + +- Às vezes, a CLI fica bloqueada enquanto a pasta está sendo excluída. +- Alguns terminais que não utilizam TTY (como o git bash no Windows) não funcionam. +- A ordenação, especialmente por rotas, pode deixar o terminal mais lento quando há muitos resultados ao mesmo tempo. +- Às vezes, os cálculos de tamanho são maiores do que deveriam ser. +- (RESOLVIDO) Problemas de desempenho ao pesquisar em diretórios de alto nível (como / no Linux). +- (RESOLVIDO) Às vezes, o texto se desfaz ao atualizar a interface de linha de comando (CLI). +- (RESOLVIDO) A análise do tamanho dos diretórios leva mais tempo do que deveria. + +> Se você encontrar algum erro, não hesite em abrir uma solicitação (via issue) :) + + + +# :revolving_hearts: Contribuindo + +Se você quer contribuir confira o [CONTRIBUTING.md](.github/CONTRIBUTING.md) + + + +# :coffee: Compre-nos um café + + +Desenvolvemos o npkill em nosso tempo livre, porque somos apaixonados pelo setor de programação. Amanhã, gostaríamos de nos dedicar mais a isso, mas antes, temos um longo caminho a percorrer. + +Continuaremos a fazer as coisas de qualquer maneira, mas as doações são uma das muitas formas de apoiar o que fazemos. + +Open Collective donate button + +### Obrigado!! + +## Um enorme agradecimento aos nossos apoiadores :heart: + + + +--- + +### via Crypto + +- btc: 1ML2DihUoFTqhoQnrWy4WLxKbVYkUXpMAX +- bch: 1HVpaicQL5jWKkbChgPf6cvkH8nyktVnVk +- eth: 0x7668e86c8bdb52034606db5aa0d2d4d73a0d4259 + + + +# :scroll: Licença + +MIT © [Nya García Gallardo](https://github.com/NyaGarcia) e [Juan Torres Gómez](https://github.com/zaldih) + +:cat::baby_chick: + +--- +

+ npkill logo + npkill logo scope +

+

+npm +Donations Badge +npm version +NPM +

+ +### Eski ve büyük **node_modules** klasörlerini kolayca bulun ve **silin** :sparkles: + +

+ npkill demo GIF +

+ +Bu araç, sisteminizdeki tüm _node_modules_ dizinlerini ve kapladıkları alanı listelemenizi sağlar. Daha sonra, hangilerini silmek istediğinizi seçerek yer açabilirsiniz. Yaşasın! + +## i18n + +Npkill dokümantasyonunu uluslararası hale getirmek için çaba gösteriyoruz. İşte mevcut çevirilerin listesi: + +- [Endonezce](./README.id.md) +- [İspanyolca](./README.es.md) +- [Portekizce](./README.pt.md) +- [Türkçe](./README.tr.md) + +## İçindekiler + +- [Özellikler](#features) +- [Kurulum](#installation) +- [Kullanım](#usage) + - [Seçenekler](#options) + - [Örnekler](#examples) +- [Yerel Kurulum](#setup-locally) +- [Yol Haritası](#roadmap) +- [Bilinen Hatalar](#known-bugs) +- [Katkıda Bulunma](#contributing) +- [Kahve Ismarlayın](#donations) +- [Lisans](#license) + + + +# :heavy_check_mark: Özellikler + +- **Alan Açın:** Makinenizde birikmiş, eski ve tozlu _node_modules_ klasörlerinden kurtulun. + +- **Son Çalışma Alanı Kullanımı**: Çalışma alanındaki bir dosyayı en son ne zaman değiştirdiğinizi kontrol edin (bu, **last_mod** sütununda gösterilir). + +- **Çok Hızlı:** NPKILL TypeScript ile yazılmıştır, ancak aramalar düşük seviyede gerçekleştirilerek performans büyük ölçüde artırılır. + +- **Kullanımı Kolay:** Uzun komutlara elveda deyin. NPKILL kullanmak, node_modules listenizi okumak ve silmek için Del tuşuna basmak kadar basittir. Daha kolay olabilir mi? ;) + +- **Düşük Bağımlılık:** Hiçbir bağımlılığı yok denecek kadar az. + + + +# :cloud: Kurulum + +Kullanmak için gerçekten yüklemenize gerek yok! +Basitçe aşağıdaki komutu kullanabilirsiniz: + +```bash +$ npx npkill +``` + +Ya da herhangi bir nedenle gerçekten yüklemek isterseniz: + +```bash +$ npm i -g npkill +# Unix kullanıcılarının komutu sudo ile çalıştırması gerekebilir. Dikkatli olun. +``` + +> NPKILL, Node 14’ten düşük sürümleri desteklemiyor. Eğer bu durum sizi etkiliyorsa, `npkill@0.8.3` sürümünü kullanabilirsiniz. + + + +# :clipboard: Kullanım + +```bash +$ npx npkill +# Ya da global olarak yüklüyse sadece npkill kullanabilirsiniz. +``` + +Varsayılan olarak, npkill `npkill` komutunun çalıştırıldığı dizinden başlayarak node_modules klasörlerini tarar. + +Listelenen klasörler arasında ve tuşlarıyla gezinebilir, seçili klasörü silmek için Space veya Del tuşlarını kullanabilirsiniz. +Ayrıca sonuçlar arasında gezinmek için j ve k tuşlarını da kullanabilirsiniz. + +Seçili sonucun bulunduğu klasörü açmak için o tuşuna basabilirsiniz. + +Çıkmak için, Q ya da Ctrl + C. + +**Önemli!** Sisteme kurulu bazı uygulamaların çalışması için node_modules klasörüne ihtiyacı vardır ve bu klasörlerin silinmesi uygulamaların bozulmasına yol açabilir. NPKILL, dikkatli olmanız için bu klasörleri :warning: simgesiyle vurgulayacaktır. + + + +## Seçenekler + +| ARGÜMAN | AÇIKLAMA | +| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | +| -c, --bg-color | Satır vurgulama rengini değiştirin. _(Mevcut seçenekler: **mavi**, cam göbeği, eflatun, beyaz, kırmızı ve sarı)_ | +| -d, --directory | Aramaya başlanacak dizini ayarlayın. Varsayılan başlangıç noktası . olarak belirlenmiştir. | +| -D, --delete-all | Bulunan tüm node_modules klasörlerini otomatik olarak siler. `-x` ile birlikte kullanılması önerilir. | +| -e, --hide-errors | Varsa hataları gizler | +| -E, --exclude | Aramadan hariç tutulacak dizinleri belirtin (dizin listesi çift tırnak içinde "", dizinler virgülle ',' ayrılmalıdır). Örnek: "ignore1, ignore2" | +| -f, --full | Aramaya kullanıcının ev dizininden başlayın (örneğin Linux'ta "/home/user"). | +| -gb | Klasörleri Megabytes yerine Gigabytes olarak göster. | +| -h, --help, ? | Bu yardım sayfasını göster ve çık. | +| -nu, --no-check-update | Başlangıçta güncellemeleri kontrol etme. | +| -s, --sort | Sonuçları şu kriterlere göre sırala: `size`, `path` veya `last-mod` | +| -t, --target | Aramak istediğiniz dizinlerin adını belirtin (varsayılan olarak node_modules). | +| -x, --exclude-hidden-directories | Gizli dizinleri ("nokta" dizinleri) arama kapsamı dışında bırak. | +| --dry-run | Hiçbir şeyi silmez (rastgele bir gecikme ile simüle eder). | +| -v, --version | npkill sürümünü gösterir. | + +**Uyarı:** _Gelecek sürümlerde bazı komutlar değişebilir_ + + + +## Örnekler + +- _projects_ dizininizdeki **node_modules** klasörlerini arayın: + +```bash +npkill -d ~/projects + +# diğer alternatif: +cd ~/projects +npkill +``` + +- "dist" adlı dizinleri listeleyin ve hata oluşursa gösterin. + +```bash +npkill --target dist -e +``` + +- Mor renkli imleç gösterilir... çünkü moru seviyorum! + +```bash +npkill --color magenta +``` + +- _projects_ dizininizdeki **vendor** klasörlerini listeleyin, boyuta göre sırala ve boyutları GB cinsinden göster: + +```bash +npkill -d '~/more projects' -gb --sort size --target vendor +``` + +- _projects_ dizininizdeki **node_modules** klasörlerini listeleyin, ancak _progress_ ve _ignore-this_ dizinlerindeki klasörleri hariç tutun: + +```bash +npkill -d 'projects' --exclude "progress, ignore-this" +``` + +- Yedeklerinize gizlice karışmış tüm node_modules klasörlerini otomatik olarak silin: + +```bash +npkill -d ~/backups/ --delete-all +``` + + + +# :pager: Yerel Kurulum + +```bash +# -- Öncelikle, repoyu klonlayın. +git clone https://github.com/voidcosmos/npkill.git + +# -- Dizin içine gidin +cd npkill + +# -- Bağımlılıkları yükleyin +npm install + +# -- Ve çalıştırın! +npm run start + + +# -- Eğer bazı parametrelerle çalıştırmak istiyorsanız, aşağıdaki örnekte olduğu gibi "--" eklemeniz gerekir: +npm run start -- -f -e +``` + + + +# :crystal_ball: Yol Haritası + +- [x] 0.1.0 yayınla! +- [x] Kodu geliştir + - [x] Performansı iyileştir + - [ ] Performansı daha da iyileştir! +- [x] Sonuçları boyuta ve yola göre sırala +- [x] Diğer türde dizinlerin (hedeflerin) aranmasına izin ver +- [ ] Daha minimalist bir modül olması için bağımlılıkları azalt +- [ ] Belirli bir süredir kullanılmayan dizinlere göre filtreleme yapmaya izin ver +- [ ] Dizinleri ağaç biçiminde göstermek için bir seçenek oluştur +- [x] Bazı menüler ekle +- [x] Log servisi ekle +- [ ] Periyodik ve otomatik temizlik (?) + + + +# :bug: Bilinen Hatalar :bug: + +- Bazen klasör silinirken CLI kilitlenebilir. +- TTY kullanmayan bazı terminaller (örneğin Windows’taki Git Bash) çalışmaz. +- Özellikle yol (path) bazında sıralama, çok sayıda olduğunda terminali yavaşlatabilir. +- Bazen, boyut hesaplamaları olması gerekenden daha yüksek çıkabilir. +- (ÇÖZÜLDÜ) Yüksek seviyeli dizinlerden (örneğin Linux'taki / dizini) arama yaparken performans sorunları yaşanabilir. +- (ÇÖZÜLDÜ) Bazen CLI güncellenirken metinler bozuluyor. +- (ÇÖZÜLDÜ) Dizinlerin boyutunu analiz etmek olması gerekenden daha uzun sürüyor. + +> Eğer herhangi bir hata bulursanız, çekinmeden bir issue açın :) + + + +# :revolving_hearts: Katkıda Bulunma + +Katkıda bulunmak isterseniz [CONTRIBUTING.md](.github/CONTRIBUTING.md) dosyasını inceleyin. + + + +# :coffee: Bize bir kahve ısmarlayın + + +Boş zamanlarımızda, programlama sektörüne olan tutkumuz nedeniyle npkill'i geliştirdik. +Gelecekte, tamamen buna odaklanmak istiyoruz ama önümüzde uzun bir yol var. + +Yine de işlerimizi yapmaya devam edeceğiz, ancak bağışlar yaptığımız işi desteklemenin birçok yolundan sadece biridir. + +Open Collective donate button + +### Teşekkürler!! + +## Destekçilerimize kocaman teşekkürler :heart: + + + +--- + +### Kripto alternatifi + +- btc: 1ML2DihUoFTqhoQnrWy4WLxKbVYkUXpMAX +- bch: 1HVpaicQL5jWKkbChgPf6cvkH8nyktVnVk +- eth: 0x7668e86c8bdb52034606db5aa0d2d4d73a0d4259 + + + +# :scroll: Lisans + +MIT © [Nya García Gallardo](https://github.com/NyaGarcia) and [Juan Torres Gómez](https://github.com/zaldih) + +:cat::baby_chick: + +--- diff --git a/README.tr.md b/README.tr.md index df07b734..7707186f 100644 --- a/README.tr.md +++ b/README.tr.md @@ -1,3 +1,5 @@ + +

npkill logo npkill logo scope