{"id":29112241,"url":"https://github.com/adrianogil/nodeutils","last_synced_at":"2026-04-10T20:47:21.649Z","repository":{"id":194203575,"uuid":"690205704","full_name":"adrianogil/nodeutils","owner":"adrianogil","description":"Utilities functions for NodeJS development","archived":false,"fork":false,"pushed_at":"2025-05-27T02:27:32.000Z","size":43,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-27T03:32:23.097Z","etag":null,"topics":["bash","nodejs","utilities"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adrianogil.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-09-11T18:32:14.000Z","updated_at":"2025-05-27T02:27:36.000Z","dependencies_parsed_at":"2023-09-12T09:27:02.927Z","dependency_job_id":"91154dca-a143-4a93-97d6-1baaad3a7520","html_url":"https://github.com/adrianogil/nodeutils","commit_stats":null,"previous_names":["adrianogil/nodeutils"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/adrianogil/nodeutils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianogil%2Fnodeutils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianogil%2Fnodeutils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianogil%2Fnodeutils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianogil%2Fnodeutils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adrianogil","download_url":"https://codeload.github.com/adrianogil/nodeutils/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianogil%2Fnodeutils/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262579940,"owners_count":23331867,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","nodejs","utilities"],"created_at":"2025-06-29T10:38:17.793Z","updated_at":"2026-04-10T20:47:21.631Z","avatar_url":"https://github.com/adrianogil.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NodeUtils\n\nA suite of Bash utilities for Node.js developers, **NodeUtils** make use of fuzzy-finding to enhance your Node.js development workflow.\n\n## Table of Contents\n\n- [Prerequisites](#prerequisites)\n- [Installation](#installation)\n- [Features](#features)\n    - [Run JavaScript Files](#run-javascript-files)\n    - [Run Node.js Test Files](#run-nodejs-test-files)\n    - [List Jest Tests from a File](#list-jest-tests-from-a-file)\n    - [Run Specific Jest Test](#run-specific-jest-test)\n    - [Summarize Node.js Project](#summarize-nodejs-project)\n    - [Run Script from package.json](#run-script-from-packagejson)\n    - [Serve a Local File over HTTP](#serve-a-local-file-over-http)\n- [npm audit HTML Report](#npm-audit-html-report)\n- [Usage Notes](#usage-notes)\n- [Contribution](#contribution)\n\n## Prerequisites\n\n- [`fzf`](https://github.com/junegunn/fzf) - Command-line fuzzy finder.\n- [`jq`](https://stedolan.github.io/jq/) - Lightweight and flexible command-line JSON processor.\n\nEnsure these are installed and accessible from your shell.\nYou should also define an `default-fuzzy-finder` alias for your preferred fuzzy finder. Here's an example using `fzf`:\n\n```bash\nalias default-fuzzy-finder=\"fzf\"\n```\n\n## Installation\n\n1. Copy the provided Bash functions from `nodeutils` into your `.bashrc`, `.bash_profile`, or similar shell configuration file.\n2. Restart your terminal or `source` the configuration file.\n3. Navigate to any Node.js project directory and use the provided functions and aliases.\n\n## Features\n\n### Run JavaScript Files\n\nInvoke with:\n\n```bash\nnode-fz [directory]\n```\n\n- Provides a fuzzy-finding interface to select and run a `.js` file from the specified directory.\n- Alias: `nfz`\n\n### Run Node.js Test Files\n\nInvoke with:\n\n```bash\nnpm-test-fz [directory]\n```\n\n- Fuzzy-find and run a test file with `npm test`.\n- Alias: `ntest-fz`\n\n### List Jest Tests from a File\n\nInvoke with:\n\n```bash\nnode-list-jest-tests [file-path]\n```\n\n- Lists descriptions of tests (based on `it()` blocks) from a Jest test file.\n\n### Run Specific Jest Test\n\nInvoke with:\n\n```bash\nnpm-test-fz-it [directory]\n```\n\n- Fuzzy-find a test file and then a specific test within it to run with `npm test`.\n- Alias: `ntest-fz-it`\n\n### Summarize Node.js Project\n\nInvoke with:\n\n```bash\nnode-summarize-project\n```\n\n- Provides a summary of the Node.js project, including the number of JavaScript files, the total lines of code, and details about installed packages.\n- Alias: `nsummarize`\n\n### Run Script from `package.json`\n\nInvoke with:\n\n```bash\nnpm-run-fz\n```\n\n- Fuzzy-finding interface to select and run a script from `package.json`.\n- Alias: `nrun`\n\n### Serve a Local File over HTTP\n\nInvoke with:\n\n```bash\nnode-serve-file [file-path] [port]\n```\n\n- Serves a single local file over HTTP using Node.js.\n- Defaults to `custom_html.html` when no file path is provided.\n- Defaults to port `8080` when no port is provided.\n- Alias: `nserve-file`\n\n### npm audit HTML Report\n\nGenerate a filterable, single-file HTML report from the current project's `npm audit --json` output:\n\n```bash\nnpm-audit-html-report\n# optional custom output\nnpm-audit-html-report custom-report.html\n```\n\n- Runs `npm audit --json` for the current directory and writes the output to a temporary file automatically.\n- Produces `audit-report.html` by default (or uses the custom output path argument).\n- Includes vulnerability title, package, severity, direct/indirect status, fix availability, and CWEs.\n- Enriches each vulnerability with top-level `package.json` roots that pull it in.\n- Marks each tied root section (`dependencies`, `devDependencies`, or `optionalDependencies`) and reachability (`prod`, `dev-only`, or both).\n- Report is fully offline and self-contained (embedded CSS/JS, no server required).\n\n## Usage Notes\n\n- For most functions, you can provide a directory as an argument. If no directory is provided, the current directory is used.\n- NodeUtils assumes the existence of a `package.json` in the directory where the commands are run.\n\n## Contribution\n\nYour contributions are welcome! Feel free to extend `nodeutils` by adding new commands or tweaking the existing ones. Ensure you test any changes to maintain the integrity of the utility.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrianogil%2Fnodeutils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadrianogil%2Fnodeutils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrianogil%2Fnodeutils/lists"}