{"id":29881903,"url":"https://github.com/dhruwlalan/opm","last_synced_at":"2026-05-03T12:35:04.857Z","repository":{"id":57314846,"uuid":"362414352","full_name":"dhruwlalan/opm","owner":"dhruwlalan","description":"Use only-package-manager to run the right package manager.","archived":false,"fork":false,"pushed_at":"2022-06-03T15:27:28.000Z","size":71,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-23T10:41:33.071Z","etag":null,"topics":["node-cli","npm","package-manager","pnpm","yarn"],"latest_commit_sha":null,"homepage":"http://npm.im/@dhruwlalan/opm","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/dhruwlalan.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2021-04-28T09:39:12.000Z","updated_at":"2023-10-17T15:13:53.000Z","dependencies_parsed_at":"2022-09-20T23:20:19.844Z","dependency_job_id":null,"html_url":"https://github.com/dhruwlalan/opm","commit_stats":null,"previous_names":["dhruwlalan/only-package-manager"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/dhruwlalan/opm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhruwlalan%2Fopm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhruwlalan%2Fopm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhruwlalan%2Fopm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhruwlalan%2Fopm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dhruwlalan","download_url":"https://codeload.github.com/dhruwlalan/opm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhruwlalan%2Fopm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32569714,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["node-cli","npm","package-manager","pnpm","yarn"],"created_at":"2025-07-31T11:14:36.116Z","updated_at":"2026-05-03T12:35:04.821Z","avatar_url":"https://github.com/dhruwlalan.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## only-package-manager\n\n\u003e Use only-package-manager to run the right package manager.\n\n[![NPM](https://img.shields.io/npm/l/only-package-manager)](https://github.com/dhruwlalan/only-package-manager/blob/master/LICENSE) [![npm](https://img.shields.io/npm/v/only-package-manager)](https://www.npmjs.com/package/only-package-manager) [![npm](https://img.shields.io/npm/dt/only-package-manager)](https://www.npmjs.com/package/only-package-manager)\n\n## Why\n\nCurrently there are three main nodejs package managers, namely - `npm`, `yarn` \u0026 `pnpm`.\u003cbr\u003e\nSome projects use `npm` or some uses `yarn` or `pnpm`. Having to remember the syntax of all three is quite confusing for me and might be for you.\u003cbr\u003e\n\nTherefor using `only-package-manager` I have to just remember **ONE** default syntax for all the basic \u0026 the mostly used commands and the CLI will take care of running the right command based on the package manager the project is using.\n\nI made this project getting inspired by [@antfu](https://github.com/antfu)'s [`ni`](https://github.com/antfu/ni) project and wanted to make one with my own set of syntax \u0026 to practice TypeScript. So a Huge credit to Him🙌\n\n## Installation\n\n```\nnpm i -g only-package-manager\n```\n\n## Usage\n\n##### Install all dependencies for a project.\n\n```bash\n$ opm\n$ opm i                   # same as the above.\n```\n\n##### Install package/packages\n\n```bash\n$ opm i \u003cpackage...\u003e      # saved to dependencies.\n$ opm i -d \u003cpackage...\u003e   # saved to devDependencies.\n$ opm i -p \u003cpackage...\u003e   # saved to peerDependencies.\n$ opm i -o \u003cpackage...\u003e   # saved to optionalDependencies.\n$ opm i -e \u003cpackage...\u003e   # saved with the exact version specified.\n$ opm i -g \u003cpackage...\u003e   # saved globally on npm.\n```\n\n\u003e Note: currently all global commands are set to use only npm.\n\n##### Remove package/packages\n\n```bash\n$ opm r \u003cpackage...\u003e      # removes locally installed package.\n$ opm r -g \u003cpackage...\u003e   # removes globally installed package.\n```\n\n##### Run scripts defined in your package.json\n\n```bash\n$ opm run                 # Interactively select the script to run.\n$ opm \u003ccommand\u003e           # runs the script named \u003ccommand\u003e.\n$ opm run \u003ccommand\u003e       # same as the above.\n```\n\n##### List all the packages\n\n```bash\n$ opm list                # List all locally installed packages.\n$ opm list -g             # List all globally installed packages in npm.\n```\n\n##### Clean Install / Frozen Install\n\n```bash\n$ opm ci\n```\n\n##### Run a security audit.\n\n```bash\n$ opm audit\n$ opm audit fix           # automatically fix (only works on npm).\n```\n\n##### Check for outdated packages.\n\n```bash\n$ opm outdated            # Check for all outdated packages.\n```\n\n##### Update packages\n\n```bash\n$ opm up                  # Updates all packages, adhering to ranges specified in package.json.\n$ opm up -l               # Updates all packages to their latest version.\n$ opm up -g               # Updates all globally installed packages.\n$ opm up \u003cpackage\u003e        # Updates \u003cpackage\u003e\n$ opm up \u003cpackage\u003e -l     # Updates \u003cpackage\u003e to the latest version.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhruwlalan%2Fopm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdhruwlalan%2Fopm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhruwlalan%2Fopm/lists"}