{"id":13596916,"url":"https://github.com/xavdid/typed-install","last_synced_at":"2025-08-20T22:31:45.154Z","repository":{"id":37933166,"uuid":"127703797","full_name":"xavdid/typed-install","owner":"xavdid","description":"[Project] Easily install new packages and their types, every time. ","archived":false,"fork":false,"pushed_at":"2023-01-20T04:18:51.000Z","size":1818,"stargazers_count":101,"open_issues_count":15,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-08-10T16:54:30.283Z","etag":null,"topics":["npm","typescript","yarn"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xavdid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-02T04:48:34.000Z","updated_at":"2025-04-23T02:38:18.000Z","dependencies_parsed_at":"2023-02-11T23:35:18.673Z","dependency_job_id":null,"html_url":"https://github.com/xavdid/typed-install","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/xavdid/typed-install","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xavdid%2Ftyped-install","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xavdid%2Ftyped-install/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xavdid%2Ftyped-install/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xavdid%2Ftyped-install/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xavdid","download_url":"https://codeload.github.com/xavdid/typed-install/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xavdid%2Ftyped-install/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271397955,"owners_count":24752640,"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","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["npm","typescript","yarn"],"created_at":"2024-08-01T16:02:57.105Z","updated_at":"2025-08-20T22:31:44.884Z","avatar_url":"https://github.com/xavdid.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","Tools"],"sub_categories":["IDE"],"readme":"# typed-install\n\n[![npm](https://img.shields.io/npm/v/typed-install.svg?style=flat-square)](https://www.npmjs.com/package/typed-install)\n\nYou're writing Typescript and it's time to install your favorite node module. Has this ever happened to you?\n\n```\n% npm i my-module @types/my-module\nnpm ERR! code E404\nnpm ERR! 404 Not Found: @types/my-module@latest\n\nnpm ERR! A complete log of this run can be found in:\nnpm ERR!     /Users/user/.npm/_logs/2018-03-31T23_41_37_683Z-debug.log\n```\n\nIt's hard to know if type declarations are included with the module, shipped separately, or non-existent. Enter `typed-install`.\n\n## Installation and Usage\n\nInstall from npm using your favorite package manager.\n\n```\n% npm i -g typed-install\n```\n\nRun it with the `typedi` command, passing any number space-separated package names (this should be very familiar).\n\n```\n% typedi heroku-config lodash striptags\n✔ Installing Packages\n✔ Checking for @types\n✔ Installing Available Types\n\nThe following packages were fully installed:\n  * lodash\n  * striptags\n\nThe following packages were installed, but lack types:\n  * heroku-config\n```\n\nBy default, `typedi` guesses your preferred package manager (based on a lockfile), uses `npm` if there's no hint, saves packages into `dependencies`, and `@types` into `devDependencies.`. This is configurable with the following flags:\n\n- **-d** | **--dev**: save packages into the `devDependencies`\n- **-p** | **--prod**: save @types into `dependencies`\n- **-m** | **--package-manager**: one of `npm`, `yarn`, or `pnpm`. Specifying one of these overwrites lockfile guessing.\n- **-e** | **--exact**: install with an exact type instead of a caret (`^`). This overwrites your config files for the tool you're using\n\nUsing `--dev` and `--prod` together will probably not do what you expect.\n\n### Exceptions\n\nAs of the release of `v1.0.6`, the following packages ship with a stub types file, confusing this utility:\n\n- `jest`\n\nThose are always explicitly fetched. If you know of another example (or one of the above is shipping actual types) [file an issue](https://github.com/xavdid/typed-install/issues/new) and I'll add the exception.\n\n### Using without installing\n\nIf you have `npm@5.2.0` or greater installed, you can run this via `npx` ([more info](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b)), a tool to run CLI packages without explicitly installing them. This is great for periodic or one time use.\n\nThe previous example becomes:\n\n```\n% npx typed-install heroku-config lodash striptags\n```\n\nSimilarly, if you're using `yarn@2`, you can use `yarn dlx` (see [the docs](https://yarnpkg.com/cli/dlx)).\n\nIf you're going to invoke this repeatedly or frequently, global installation is recommended.\n\n## API\n\nThe code that powers `typedi` can also be used via the Node.js API.\n\nThe main function takes the following options, in order:\n\n### modules (string[])\n\nAn array of npm module names\n\n### opts (object, default `{}`)\n\nan object with any of the following keys (see above):\n\n- dev\n- prod\n- packageManager\n- exact\n\nAny keys not present default to false.\n\n### shouldSpin (boolean, default `false`)\n\nWhether or not to run the fancy spinner. If you're using this in other code, this should probably be `false`. Also controls whether messages are logged.\n\n```js\nconst typedi = require('typed-install').default\n\ntypedi(['lodash', 'striptags'], { dev: true }).then(() =\u003e {\n  console.log('all done!')\n})\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxavdid%2Ftyped-install","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxavdid%2Ftyped-install","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxavdid%2Ftyped-install/lists"}