{"name":"tasklist","version":"6.0.0","description":"Wrapper for the Windows `tasklist` command. Returns a list of apps and services with their Process ID (PID) for all tasks running on either a local or a remote computer.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/tasklist.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=20"},"scripts":{"test":"xo && ava && tsd"},"keywords":["tasklist","task","list","windows","win","win32","pid","process","processes","services"],"dependencies":{"csv":"^6.4.1","sec":"^2.0.0"},"devDependencies":{"@types/node":"^25.2.0","ava":"^6.4.1","get-stream":"^9.0.1","tsd":"^0.33.0","xo":"^1.2.3"},"ava":{"files":["test/*.test.js"]},"xo":{"ignores":["*.ts"]},"gitHead":"809811bff4bbee33e68de535df57f3c7f72fb818","types":"./index.d.ts","_id":"tasklist@6.0.0","bugs":{"url":"https://github.com/sindresorhus/tasklist/issues"},"homepage":"https://github.com/sindresorhus/tasklist#readme","_nodeVersion":"25.3.0","_npmVersion":"11.7.0","dist":{"integrity":"sha512-tIonICLZa2pvzlCkyjFbdxwVH+ZJmH6Z0G2xKLxvU4T4fzzTT3ku8FhQksMrfgDq33kfeSXxdzPL1PLQHPVVjg==","shasum":"4c2f0ef65fc8862612ad2f97612a54fd8e7635e9","tarball":"http://registry-npm.ywwl.com/tasklist/download/tasklist-6.0.0.tgz","fileCount":7,"unpackedSize":25861,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFiwhUdeyE2FJV5/RTtuwZtCj7mLa+U8NKGaS8D240PdAiBatopJLBTIe5jIdnVDxJHJUp0ie+8mf2DudJDhwnIhIg=="}],"size":6056,"noattachment":false,"key":"/tasklist/-/tasklist-6.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tasklist_6.0.0_1770120905360_0.14330088891867487"},"_hasShrinkwrap":false,"readme":"# tasklist\n\n> Wrapper for the Windows [`tasklist`](https://technet.microsoft.com/en-us/library/bb491010.aspx) command. Returns a list of apps and services with their Process ID (PID) for all tasks running on either a local or a remote computer.\n\nCleans up and normalizes the data.\n\n## Install\n\n```sh\nnpm install tasklist\n```\n\n## Usage\n\n```js\nimport {tasklist} from 'tasklist';\n\nconsole.log(await tasklist());\n/*\n[\n\t{\n\t\timageName: 'taskhostex.exe',\n\t\tpid: 1820,\n\t\tsessionName: 'Console',\n\t\tsessionNumber: 1,\n\t\tmemUsage: 4415488\n\t},\n\t...\n]\n*/\n```\n\n## API\n\nSee the [`tasklist` docs](https://technet.microsoft.com/en-us/library/bb491010.aspx) for more.\n\n### tasklist(options?)\n\nReturns a `Promise<object[]>` that contains the normalized results of the command output.\n\nExamples for `options` below will use this interface, but you can check `tasklistStream` below for usage of the stream interface.\n\n### tasklistStream(options?)\n\nReturns a `stream.Readable` that returns the resulting lines, normalized, one by one.\n\nOptions are the same as the Promise interface.\n\n```js\nimport {tasklistStream} from 'tasklist';\n\ntasklistStream({verbose: true}).pipe(process.stdout);\n/*\n{\n\timageName: 'taskhostex.exe',\n\tpid: 1820,\n\tsessionName: 'Console',\n\tsessionNumber: 1,\n\tmemUsage: 4415488,\n\tstatus: 'Running',\n\tusername: 'SINDRESORHU3930\\\\sindre',\n\tcpuTime: 0,\n\twindowTitle: 'Task Host Window'\n}\n...\n*/\n```\n\n#### options\n\nType: `object`\n\n**Warning**\n- The `system`, `username`, `password` options must be specified together.\n- The `modules` and `services` options can't be specified if verbose is set to `true`.\n- The `modules` and `services` options can't be specified at the same time.\n- The `apps` option can't be specified with `modules` or `services`.\n- When `system`, `username`, `password` options are specified, the filter option can't have `windowtitle` and `status` as the parameter.\n\n##### verbose\n\nType: `boolean`\\\nDefault: `false`\n\nReturn verbose results.\n\nWithout the `verbose` and `apps` option, `tasklist` returns tasks with the following properties:\n\n- `imageName` (Type: `string`)\n- `pid` (Type: `number`)\n- `sessionName` (Type: `string`)\n- `sessionNumber` (Type: `number`)\n- `memUsage` in bytes (Type: `number`)\n\nWith the `verbose` option set to `true` but the `apps` option still set to `false`, it additionally returns the following properties:\n\n- `status` (Type: `string`): One of `Running`, `Suspended`, `Not Responding`, or `Unknown`\n- `username` (Type: `string`)\n- `cpuTime` in seconds (Type: `number`)\n- `windowTitle` (Type: `string`)\n\n**Note:** It's not guaranteed that the `username` and `windowTitle` properties are returned with proper values. If they are *not available*, `'N/A'` may be returned on English systems. In contrast, `'Nicht zutreffend'` may be returned on German systems, for example.\n\n**Verbose example:**\n\n```js\nimport {tasklist} from 'tasklist';\n\nconsole.log(await tasklist({verbose: true}));\n/*\n[\n\t{\n\t\timageName: 'taskhostex.exe',\n\t\tpid: 1820,\n\t\tsessionName: 'Console',\n\t\tsessionNumber: 1,\n\t\tmemUsage: 4415488,\n\t\tstatus: 'Running',\n\t\tusername: 'SINDRESORHU3930\\\\sindre',\n\t\tcpuTime: 0,\n\t\twindowTitle: 'Task Host Window'\n\t},\n\t...\n]\n*/\n```\n\n**Warning:** Using the `verbose` option may have a considerable performance impact (See: [#6](https://github.com/sindresorhus/tasklist/issues/6)).\n\n##### system\n\nType: `string`\n\nName or IP address of a remote computer (don't use backslashes). The default is the local computer.\n\n##### username\n\nType: `string`\\\nExample: `'SINDRESORHU3930\\\\sindre'`\n\nUser specified by `User` or `Domain\\User`. The default is the permissions of the current logged on user on the computer issuing the command.\n\n##### password\n\nType: `string`\n\nPassword of the user account for the specified `username`.\n\n##### filter\n\nType: `string[]`\n\nSpecify the types of processes to include or exclude. [More info.](https://technet.microsoft.com/en-us/library/bb491010.aspx)\n\n##### apps\n\nType: `boolean`\n\nDisplays store apps.\n\nWithout the `verbose` option, the command returns the following data:\n\n- `imageName` (Type: `string`)\n- `pid` (Type: `number`)\n- `memUsage` in bytes (Type: `number`)\n- `packageName` (Type: `string`)\n\n```js\nimport {tasklist} from 'tasklist';\n\nconsole.log(await tasklist({apps: true}));\n/*\n[\n\t{\n\t\timageName: 'SearchUI.exe (CortanaUI)',\n\t\tpid: 1820,\n\t\tmemUsage: 4415488,\n\t\tpackageName: 'Microsoft.Windows.Cortana'\n\t},\n\t...\n]\n*/\n```\n\nWith the `verbose` option set to `true`, the command additionally returns the following data:\n\n- `sessionName` (Type: `string`)\n- `sessionNumber` (Type: `number`)\n- `status` (Type: `string`): One of `Running`, `Suspended`, `Not Responding`, or `Unknown`\n- `username` (Type: `string`)\n- `cpuTime` in seconds (Type: `number`)\n- `windowTitle` (Type: `string`)\n\n**Note:** It's not guaranteed that the `username` and `windowTitle` properties are returned with proper values. If they are *not available*, `'N/A'` may be returned on English systems. In contrast, `'Nicht zutreffend'` may be returned on German systems, for example.\n\n**Verbose example:**\n\n```js\nimport {tasklist} from 'tasklist';\n\nconsole.log(await tasklist({apps: true, verbose: true}));\n/*\n[\n\t{\n\t\timageName: 'SearchUI.exe (CortanaUI)',\n\t\tpid: 1820,\n\t\tsessionName: 'Console',\n\t\tsessionNumber: 1,\n\t\tmemUsage: 4415488,\n\t\tstatus: 'Running',\n\t\tusername: 'SINDRESORHU3930\\\\sindre',\n\t\tcpuTime: 0,\n\t\twindowTitle: 'N/A',\n\t\tpackageName: 'Microsoft.Windows.Cortana'\n\t},\n\t...\n]\n*/\n```\n\n##### modules\n\nType: `string`\n\nList all tasks using the given DLL module name. If an empty string is given, it will list all tasks with the used DLL modules.\n\n**Note:** You can't use the `verbose` option with this option set.\n\n```js\nimport {tasklist} from 'tasklist';\n\nconsole.log(await tasklist({modules: 'wmiutils.dll'}));\n/*\n[{\n\timageName: 'chrome.exe',\n\tpid: 1820,\n\tmodules: ['wmiutils.dll']\n}, ...]\n*/\n```\n\n##### services\n\nType: `boolean`\n\nDisplays services hosted in each process.\n\n**Note:** You can't use the `verbose` option with this option set.\n\n```js\nimport {tasklist} from 'tasklist';\n\nconsole.log(await tasklist({services: true}));\n/*\n[{\n\timageName: 'lsass.exe',\n\tpid: 856,\n\tservices: ['KeyIso', 'SamSs', 'VaultSvc']\n}, ...]\n*/\n```\n\n## Related\n\n- [taskkill](https://github.com/sindresorhus/taskkill) - Wrapper for the Windows `taskkill` command\n\n## Maintainers\n\n- [Sindre Sorhus](https://sindresorhus.com)\n- [Mark Tiedemann](https://marksweb.site)\n","publish_time":1770120905503,"_cnpm_publish_time":1770120905503,"dist-tags":{"latest":"6.0.0"}}