{"_id":"@cantez/onyx","_rev":"8-f15661edd0617d5e1099dd542f05d01b","name":"@cantez/onyx","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.2":{"name":"@cantez/onyx","version":"1.0.2","keywords":["package manager","cli"],"author":{"name":"Alperen Cantez"},"license":"MIT","_id":"@cantez/onyx@1.0.2","maintainers":[{"name":"cantez","email":"alperencantez@gmail.com"}],"homepage":"https://github.com/alperencantez/onyx","bugs":{"url":"https://github.com/alperencantez/onyx/issues"},"dist":{"shasum":"0a123ad6fe66c151161e3eaaa16c89c36175c4c7","tarball":"https://registry.npmjs.org/@cantez/onyx/-/onyx-1.0.2.tgz","fileCount":16,"integrity":"sha512-yXBeJDkUdPakSBGc954vbHO0UVqchDgKPgqM+cOYgbrGdpNX8JjAdOPGJT7tYLnEEp1Aqp07OFEGpzGU8BOxZw==","signatures":[{"sig":"MEYCIQDb0rL1oybw6F33zY6NzEzzC3sHUeAaZ8mNePJhLyd46gIhAPG+vGvjxutneDLwa4febE1Oy/G9TDnzut01ghVQrf+B","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26112},"gitHead":"41500aeebc9228851c50ea5533a7da7a47cb3105","scripts":{"postinstall":"go-npm install","preuninstall":"go-npm uninstall"},"_npmUser":{"name":"cantez","email":"alperencantez@gmail.com"},"goBinary":{"url":"https//github.com/alperencantez/onyx/releases","name":"onyx","path":"."},"repository":{"url":"git+https://github.com/alperencantez/onyx.git","type":"git"},"_npmVersion":"10.2.4","description":"A blazingly-fast package manager for JavaScript.","directories":{},"_nodeVersion":"18.19.1","dependencies":{"go-npm":"^0.1.9"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/onyx_1.0.2_1727374927204_0.24783120336644404","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"@cantez/onyx","version":"1.0.3","keywords":["package manager","cli"],"author":{"name":"Alperen Cantez"},"license":"MIT","_id":"@cantez/onyx@1.0.3","maintainers":[{"name":"cantez","email":"alperencantez@gmail.com"}],"homepage":"https://github.com/alperencantez/onyx","bugs":{"url":"https://github.com/alperencantez/onyx/issues"},"dist":{"shasum":"8ad7b384cc619b107853cbe62580b86a408663f5","tarball":"https://registry.npmjs.org/@cantez/onyx/-/onyx-1.0.3.tgz","fileCount":16,"integrity":"sha512-KrvEqI5qnSj79xVGrx04nSUye7s5CVbfb0DRmNXC9BPILtGrm+HGHk0pynytc1yhj6NEFwSDW3wzzhHh29+goQ==","signatures":[{"sig":"MEQCIBdZsB5aQvguLkvXuAUgRSETI1l0mPr2qs/S8LVCMpiEAiAhR2wwn8/vhkmAJebeetNec/5XpTc8Tok+30TuUhdKoQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26116},"gitHead":"9e17cd1fc4823be1ad9a8174c94abc3c2d423b20","scripts":{"postinstall":"go-npm install","preuninstall":"go-npm uninstall"},"_npmUser":{"name":"cantez","email":"alperencantez@gmail.com"},"goBinary":{"url":"https//github.com/alperencantez/onyx/releases","name":"onyx","path":"./bin"},"repository":{"url":"git+https://github.com/alperencantez/onyx.git","type":"git"},"_npmVersion":"10.2.4","description":"A blazingly-fast package manager for JavaScript.","directories":{},"_nodeVersion":"18.19.1","dependencies":{"go-npm":"^0.1.9"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/onyx_1.0.3_1727375522507_0.5572444108577093","host":"s3://npm-registry-packages"}},"1.0.3-x":{"name":"@cantez/onyx","version":"1.0.3-x","keywords":["package manager","cli"],"author":{"name":"Alperen Cantez"},"license":"MIT","_id":"@cantez/onyx@1.0.3-x","maintainers":[{"name":"cantez","email":"alperencantez@gmail.com"}],"homepage":"https://github.com/alperencantez/onyx","bugs":{"url":"https://github.com/alperencantez/onyx/issues"},"dist":{"shasum":"5764aafb92457207b917f670e3a2993f887d7d6f","tarball":"https://registry.npmjs.org/@cantez/onyx/-/onyx-1.0.3-x.tgz","fileCount":16,"integrity":"sha512-1yW3ZAQfqFvEVvH/hsaFDNXdxTRC5wg6YOsFb55fRFEd9EOJ23inzm8oJMBrjZUS7PTcMBDsTNYlC7m37AcTNw==","signatures":[{"sig":"MEUCIQDBV8Xen1g1tNF+RGPtlMkMFRHCUhzO9jrV25ZXW13fMgIgGWTWMZeKcXD1+nn+KnGo5A1wDauSPX6Fvfm2v/9zgFU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26117},"gitHead":"9e17cd1fc4823be1ad9a8174c94abc3c2d423b20","scripts":{"postinstall":"go-npm install","preuninstall":"go-npm uninstall"},"_npmUser":{"name":"cantez","email":"alperencantez@gmail.com"},"goBinary":{"url":"https//github.com/alperencantez/onyx/releases","name":"onyx","path":"./bin"},"repository":{"url":"git+https://github.com/alperencantez/onyx.git","type":"git"},"_npmVersion":"10.2.4","description":"A blazingly-fast package manager for JavaScript.","directories":{},"_nodeVersion":"18.19.1","dependencies":{"go-npm":"^0.1.9"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/onyx_1.0.3-x_1727375739546_0.6463662738431035","host":"s3://npm-registry-packages"}},"1.0.4":{"name":"@cantez/onyx","version":"1.0.4","keywords":["package manager","cli"],"author":{"name":"Alperen Cantez"},"license":"MIT","_id":"@cantez/onyx@1.0.4","maintainers":[{"name":"cantez","email":"alperencantez@gmail.com"}],"homepage":"https://github.com/alperencantez/onyx","bugs":{"url":"https://github.com/alperencantez/onyx/issues"},"dist":{"shasum":"4ddb38e7a2ec7a8c402f8c4ed2c68d4625c53735","tarball":"https://registry.npmjs.org/@cantez/onyx/-/onyx-1.0.4.tgz","fileCount":16,"integrity":"sha512-HQTBXzm5+QPHOX2DX8/au6Je4o3XImo1wN3sPYmPLIMHHyK4GCdiHyWso/IpO5f4XKHFIpSkPpDnTwK2997TUQ==","signatures":[{"sig":"MEYCIQCrMD9wF/3DdExtPycTcTH6diDJ617dDFvccZSNqADoYgIhAIyKEwM4hYhjzquZqN3XCX3qmu/zOhUf1/0NxgOeiWE1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26142},"gitHead":"59ba71d1acf51fb3ce6addc9753d675af1373da5","scripts":{"postinstall":"go-npm install","preuninstall":"go-npm uninstall"},"_npmUser":{"name":"cantez","email":"alperencantez@gmail.com"},"goBinary":{"url":"https//github.com/alperencantez/onyx/releases","name":"onyx","path":"./bin"},"repository":{"url":"git+https://github.com/alperencantez/onyx.git","type":"git"},"_npmVersion":"10.2.4","description":"A blazingly-fast package manager for JavaScript.","directories":{},"_nodeVersion":"18.19.1","dependencies":{"go-npm":"^0.1.9"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/onyx_1.0.4_1727376480720_0.26398872590799893","host":"s3://npm-registry-packages"}},"1.0.5":{"name":"@cantez/onyx","version":"1.0.5","author":{"name":"Alperen Cantez"},"homepage":"https://github.com/alperencantez/onyx#readme","description":"A blazingly-fast package manager for JavaScript.","license":"MIT","bugs":{"url":"https://github.com/alperencantez/onyx/issues"},"keywords":["package manager","cli"],"goBinary":{"name":"onyx","path":"./bin","url":"https://github.com/alperencantez/onyx/releases/download/{{version}}/onyx_{{version}}_{{platform}}_{{arch}}.tar.gz"},"scripts":{"postinstall":"go-npm install","preuninstall":"go-npm uninstall"},"repository":{"type":"git","url":"git+https://github.com/alperencantez/onyx.git"},"dependencies":{"go-npm":"^0.1.9"},"_id":"@cantez/onyx@1.0.5","gitHead":"92368a7c00576e510c013cd64cb291e5eacfb40b","_nodeVersion":"18.19.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-1VyZi/xOVD5wWGWxLxrFw8f6GRJyc+GRxh9mae/vCu4kpV1ENCPaKYwyQvWvUEltdaUkjsUr6wPZX0YkR2Ineg==","shasum":"5d473637256af0c879ad825cb6d3aa6b76447cdb","tarball":"https://registry.npmjs.org/@cantez/onyx/-/onyx-1.0.5.tgz","fileCount":16,"unpackedSize":26217,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCxwFjJzjwypoIE45QcSsGs/SLhIybiNyx7kdd2fNSWsQIhAJ96ZqUZEP1rs54ywb/rxCLQQcPTofjdurZ46F1vno5r"}]},"_npmUser":{"name":"cantez","email":"alperencantez@gmail.com"},"directories":{},"maintainers":[{"name":"cantez","email":"alperencantez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/onyx_1.0.5_1727377923213_0.47911063275049925"},"_hasShrinkwrap":false}},"time":{"created":"2024-09-26T18:22:07.076Z","modified":"2024-09-26T19:12:03.659Z","1.0.0":"2024-09-26T14:39:08.580Z","1.0.1":"2024-09-26T14:43:50.310Z","1.0.2":"2024-09-26T18:22:07.423Z","1.0.3":"2024-09-26T18:32:02.821Z","1.0.3-x":"2024-09-26T18:35:39.750Z","1.0.4":"2024-09-26T18:48:00.891Z","1.0.5":"2024-09-26T19:12:03.461Z"},"bugs":{"url":"https://github.com/alperencantez/onyx/issues"},"author":{"name":"Alperen Cantez"},"license":"MIT","homepage":"https://github.com/alperencantez/onyx#readme","keywords":["package manager","cli"],"repository":{"type":"git","url":"git+https://github.com/alperencantez/onyx.git"},"description":"A blazingly-fast package manager for JavaScript.","maintainers":[{"name":"cantez","email":"alperencantez@gmail.com"}],"readme":"<h1 align=\"center\">⭕️ Onyx</h1>\n\n<div style=\"display:flex; justify-content:center\">\n\n[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/dwyl/esta/issues)\n[![Version](https://badge.fury.io/gh/tterb%2FHyde.svg)](https://badge.fury.io/gh/tterb%2FHyde)\n[![Open Source](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](https://opensource.org/)\n\n</div>\n\nOnyx is a Node.js package manager built with Go (yes, ironically) and the Cobra CLI framework. It allows you to manage your Node.js dependencies without relying on traditional package managers like `npm`, `yarn` or even `pnpm`. The tool provides features for installing, removing, and running scripts from `package.json`, with additional support for handling `devDependencies`.\n\n## Features\n\n- **Install a Single Package**: Install individual Node.js packages directly from the npm registry.\n- **Install All Dependencies**: Install all dependencies listed in `package.json`.\n- **Install as DevDependencies**: Install a package as a devDependency using a flag.\n- **Remove a Package**: Remove a package from `node_modules` and `package.json`.\n- **Run Custom Scripts**: Run custom npm scripts defined in the `scripts` section of `package.json`.\n- **Install Global Packages**: Install packages globally with permissions management.\n- **Graceful Error Handling**: Handles missing or incomplete package metadata gracefully and skips problematic packages.\n\n## Prerequisites\n\n- [Go](https://golang.org/doc/install) (>=1.20)\n- [Git](https://git-scm.com/downloads)\n- [Node](https://nodejs.org) (for testing and running Onyx)\n\n## Installation\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/alperencantez/onyx.git\n   ```\n\n2. Change to the project directory:\n\n   ```bash\n   cd onyx\n   ```\n\n3. Build the CLI tool:\n\n   ```bash\n   go build -o .\n   ```\n\n4. Move the binary to your `$PATH` for global usage:\n\n   ```bash\n   sudo mv onyx /usr/local/bin/\n   ```\n\nNow you can use `onyx` from any directory!\n\n## Usage\n\n### 1. Install a Single Package\n\nTo install a package:\n\n```bash\nonyx get next 14.1.3\n```\n\nTo install a package as a devDependency:\n\n```bash\nonyx get lodash --dev\n```\n\n### 2. Install All Dependencies from `package.json`\n\nIf you already have a `package.json` file, you can install all dependencies listed:\n\n```bash\nonyx deps\n```\n\nThis command installs all dependencies and devDependencies listed in the `package.json` file.\n\n### 3. Remove a Package\n\nTo remove a package from `node_modules` and `package.json`:\n\n```bash\nonyx remove lodash\n```\n\nThis will delete the `lodash` package from your `node_modules` and remove its entry from the `package.json` file.\n\n### 4. Run a Custom Script\n\nYou can run custom scripts defined in the `scripts` section of your `package.json`:\n\n```bash\nonyx r build\n```\n\nThis will execute the `build` script defined in your `package.json`.\n\n### 5. Install Global Packages\n\nTo install a package globally:\n\n```bash\nsudo onyx get lodash -g\n```\n\nThis command installs `lodash` globally in your system.\n\n### Error Handling\n\nThe tool provides graceful error handling for cases such as:\n\n- Missing `package.json`.\n- Missing `node_modules`.\n- Packages with incomplete metadata in the npm registry.\n- Invalid or malformed versions (e.g., `^` and `~` symbols).\n\n### Logs and Warnings\n\nIn cases where a package cannot be installed due to missing metadata or other issues, warnings will be logged, but the process will continue for other packages:\n\n```bash\nWarning: 'dist' field is missing for package 'gsap'. Skipping installation.\n```\n\n## Development\n\n### Running Locally\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/alperencantez/onyx.git\n   ```\n\n2. Make your changes.\n\n3. Run the project locally:\n\n   ```bash\n   go run main.go\n   ```\n\n### Contributing\n\nIf you’d like to contribute, please fork the repository and use a feature branch. Pull requests are welcome!\n\n1. Fork the repo and create your branch:\n\n   ```bash\n   git checkout -b feature/my-feature\n   ```\n\n2. Make changes and commit them:\n\n   ```bash\n   git commit -m \"Add new feature\"\n   ```\n\n3. Push to the branch:\n\n   ```bash\n   git push origin feature/my-feature\n   ```\n\n4. Create a PR.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","readmeFilename":"README.md"}