# Commands An overview of available commands for `typings`. ## Install **Please note:** `npm` and `bower` resolve using their respective algorithms over the local filesystem. They will need to be installed before running `typings install`. The other schemes (`http`, `https`, `github`, `bitbucket`) resolve over HTTP(s). Finally, file is a location in the local filesystem relative to the `typings.json` directory. Write a dependency to the `typings/` directory, optionally persisting it in `typings.json`. ``` typings install (with no arguments, in package directory) typings install [=] Alternate name of the definition The location to read from (described below) Valid Locations: [~][@][#] file: github:/[/][#] bitbucket:/[/][#] npm:[/] bower:[/] jspm: (for jspm@0.17+) http(s):/// The registry mirror: "npm", "bower", "env", "global", "lib" or "dt" When not specified, `defaultSource` in `.typingsrc` will be used. Path to a `.d.ts` file or `typings.json` A domain name (with optional port) A semver range (E.g. ">=4.0") The specific tag of a registry entry A git commit, tag or branch Options: [--save|-S] Persist to "dependencies" [--save-dev|-D] Persist to "devDependencies" [--save-peer|-P] Persist to "peerDependencies" [--global|-G] Install and persist as a global definition [-SG] Persist to "globalDependencies" [-DG] Persist to "globalDevDependencies" [--production] Install only production dependencies (omits dev dependencies) and is implictly set when environment variable NODE_ENV=production [--no-production] Install production and dev dependencies (overrides environment variable NODE_ENV=production) Aliases: i, in ``` ## Uninstall Remove a dependency from the typings/ directory, and optionally remove from `typings.json`. ``` typings uninstall [--save|--save-dev|--save-peer] [--global] Options: [--save|-S] Remove from "dependencies" [--save-dev|-D] Remove from "devDependencies" [--save-peer|-P] Remove from "peerDependencies" [--global|-G] Remove from the global version of dependencies [-SG] Remove from "globalDependencies" [-DG] Remove from "globalDevDependencies" Aliases: r, rm, remove, un ``` ## Init Initialize a new typings.json file. If you're currently using TSD, you can use `--upgrade` to convert `tsd.json` to `typings.json`. ``` typings init Options: [--upgrade] Upgrade `tsd.json` to `typings.json` ``` ## List Print the typings dependency tree. ``` typings list Options: [--production] List only production dependencies (omit dev dependencies) Aliases: la, ll, ls ``` ## Bundle Bundle the current project types into an single global module. ``` typings bundle --out Options: [--out|-o] The bundled output file path [--global|-G] Bundle as a global definition ``` ## Search Search the Typings Registry for type defintions. ``` typings search [query] Options: [--name] Search for definitions by exact name (E.g. only "react") [--source] The registry mirror (E.g. "npm", "bower", "env", "global", "dt", ...) [--offset] Skip first "x" results (default: 0) [--limit] Limit to "x" results (default: 20, max: 100) [--order] Direction to sort results (default: "asc", enum: "asc" or "desc") [--sort] Order results by a column (E.g. "versions", "name", ...) ``` ## Open Get the full URL from a Typings location ``` typings open A known Typings location with scheme (see typings install -h) ``` ## View Get information for a package on the Typings Registry ``` typings view A registry expression like `[~]` Options: [--versions] List all package versions Aliases: info ``` ## Prune Prune extraneous typings from directory ``` typings prune Options: [--production] Also prune non-production dependencies ```