{"id":15042478,"url":"https://github.com/christiangracia/bash-script-generator","last_synced_at":"2026-01-07T03:40:10.028Z","repository":{"id":44767133,"uuid":"451661190","full_name":"ChristianGracia/Bash-Script-Generator","owner":"ChristianGracia","description":"This repository is for a TypeScript NPM package I made that reads dependency installation files like requirements.text or package.json and generates long bash script commands for quick installation in Linux, Python, and JavaScript environments","archived":false,"fork":false,"pushed_at":"2022-02-03T00:38:56.000Z","size":342,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-02-27T13:43:03.639Z","etag":null,"topics":["bash","bash-script","generator","npm","package","pip","python","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/bash-script-dependency-generator","language":"TypeScript","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/ChristianGracia.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}},"created_at":"2022-01-24T22:55:38.000Z","updated_at":"2022-06-10T13:08:10.000Z","dependencies_parsed_at":"2022-08-28T17:42:02.691Z","dependency_job_id":null,"html_url":"https://github.com/ChristianGracia/Bash-Script-Generator","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChristianGracia%2FBash-Script-Generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChristianGracia%2FBash-Script-Generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChristianGracia%2FBash-Script-Generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChristianGracia%2FBash-Script-Generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ChristianGracia","download_url":"https://codeload.github.com/ChristianGracia/Bash-Script-Generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245832142,"owners_count":20679699,"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","bash-script","generator","npm","package","pip","python","typescript"],"created_at":"2024-09-24T20:47:22.247Z","updated_at":"2026-01-07T03:40:10.003Z","avatar_url":"https://github.com/ChristianGracia.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bash Installation Script Generator\n\nThis repository is for a TypeScript NPM package I made that reads dependency installation files like requirements.text or package.json and generates long bash script commands for quick installation in Linux, Python, and JavaScript environments\n\nThis tool allows you to rebuild your bash installation scripts very fast and makes it easier to maintain.\n\nYou can read dependencies from a file like requirements.txt for Python or package.json for JavaScript/TypeScript.\n\nThis is still in development so this package's main use is to generate very long scripts using hardcoded objects/arrays in the Generator class or using a file like requirements.txt to generate a long chain of pip installs or package.json for npm installs (regular dependencies and dev)\n\n![pic](https://i.imgur.com/cKVykHp.png)\n\n**I made this from scratch in a couple hours so this is very Work in Progress and a lot of features to be implemented**\n\nClick the image below to watch demo\n\n[![Video](https://i.imgur.com/v3XHNKT.png)](https://i.imgur.com/fIsW1WI.mp4)\n\n**Other dependency installation file types will get added in the future**\n\nIf you do not have dependency files or want to use an unsupported language you can hardcode in your dependencies as seen below in **'node_modules/bash-script-dependency-generator/class/Generator.js'**. Here you can update one large array of strings called nonVersionedDependencies **if package version does not matter** or one large object called versionedDependencies **if you want to keep track of versions**. This allows you to be able to update your dependencies and change the wording of the installation quick and easy.\n\n![pic](https://i.imgur.com/n4rYntY.png)\n\n---\n\nEditing nonVersionedDependencies Array when version does not matter\n\nEx. install python3-dev and python3-pip without specific version\n\n```\n\n// This is for arrays of package names when version isn't important\n\n// Leave this as empty array unless you want to hardcode each package\n\n\n\nconst nonVersionedDependencies = [\n\n\"python3-dev\",\n\n\"python3-pip\"\n\n];\n\n```\n\n---\n\nEditing versionedDependencies object when specific versions is required\n\nEx. install pip at 20.3.4 and requests as 2.25.1\n\n```\n\n// This is for an object with keys equal to package names and values of the package version for when specific version is important\n\n// Leave this as empty object unless you want to hardcode in the package + version\n\n\n\nconst versionedDependencies = {\n\npip: \"20.3.4\",\n\nrequests: \"2.25.1\",\n\n};\n\n\n\n\n```\n\n---\n\n## Demo\n\nclone this repo with\n\n`git clone https://github.com/ChristianGracia/Bash-Script-Generator.git`\n\nrun in root of project after repository is cloned\n\nCreating pip install script from examples/requirements.txt\n\n`npm run pip`\n\nCreating npm install script from examples/package.json\n\n`npm run npm`\n\n---\n\n## Installation\n\n`npm i --dev bash-script-dependency-generator@latest`\n\n## Use\n\nRun the following command where language is the installation language (Ex. Python would be `pip install`, Linux would use `sudo apt-get install`)\n\n`node node_modules/bash-script-dependency-generator/ INSTALLATION_LANGUAGE FILE`\n\nFile argument is optional, if omitted, a script will be attempted to be built from whatever is in the versionedDependencies object or nonVersionedDependencies array\n\n**Python dependencies - Pip**\n\nRun in terminal if hardcoded versionedDependencyObject property on Generator class\n\n`node node_modules/bash-script-dependency-generator/ pip`\n\nRun in terminal if you have the dependency file\n\n`node node_modules/bash-script-dependency-generator/ pip PATH/TO/requirements.txt`\n\n**Debian Linux - APT**\n\nRun in terminal if hardcoded nonVersionedDependency array property on Generator class\n\n`node node_modules/bash-script-dependency-generator/ apt`\n\n**JavaScript/TypeScript - NPM**\n\nRun in terminal\n\n`node node_modules/bash-script-dependency-generator/ npm package.json`\n\n## Tests\n\n![pic](https://i.imgur.com/3PPUpRJ.png)\n\nrun tests with jest using\n\n`npm run test`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristiangracia%2Fbash-script-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchristiangracia%2Fbash-script-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristiangracia%2Fbash-script-generator/lists"}