{"name":"env-paths","version":"4.0.0","description":"Get paths for storing things like data, config, cache, etc","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/env-paths.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":["common","user","paths","env","environment","directory","dir","appdir","path","data","config","cache","logs","temp","linux","unix"],"dependencies":{"is-safe-filename":"^0.1.0"},"devDependencies":{"ava":"^6.4.1","tsd":"^0.33.0","xo":"^1.2.3"},"gitHead":"c3c0dd464c268a99a28feeaec54c54d0a12c4291","types":"./index.d.ts","_id":"env-paths@4.0.0","bugs":{"url":"https://github.com/sindresorhus/env-paths/issues"},"homepage":"https://github.com/sindresorhus/env-paths#readme","_nodeVersion":"25.3.0","_npmVersion":"11.7.0","dist":{"integrity":"sha512-pxP8eL2SwwaTRi/KHYwLYXinDs7gL3jxFcBYmEdYfZmZXbaVDvdppd0XBU8qVz03rDfKZMXg1omHCbsJjZrMsw==","shasum":"d0bb1f84a81d2542581bf7b7e8085d0683b39097","tarball":"http://registry-npm.ywwl.com/env-paths/download/env-paths-4.0.0.tgz","fileCount":5,"unpackedSize":9557,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD1lm7L392zIjr3ATkLdh4DKM/DR0xlEQd7sGERx24+GQIgbZdrXbVPrCtG2BhFIsjDi/YL/MPNJHhFXbL0CTfwhZY="}],"size":3061,"noattachment":false,"key":"/env-paths/-/env-paths-4.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/env-paths_4.0.0_1769264947207_0.5276079631423061"},"_hasShrinkwrap":false,"readme":"# env-paths\n\n> Get paths for storing things like data, config, cache, etc\n\nUses the correct OS-specific paths. Most developers get this wrong.\n\n## Install\n\n```sh\nnpm install env-paths\n```\n\n## Usage\n\n```js\nimport envPaths from 'env-paths';\n\nconst paths = envPaths('MyApp');\n\npaths.data;\n//=> '/home/sindresorhus/.local/share/MyApp-nodejs'\n\npaths.config\n//=> '/home/sindresorhus/.config/MyApp-nodejs'\n```\n\n## API\n\n### paths = envPaths(name, options?)\n\nNote: It only generates the path strings. It doesn't create the directories for you. You can use [`fs.mkdir(…, {recursive: true})`](https://nodejs.org/api/fs.html#fspromisesmkdirpath-options) to create the directories.\n\n#### name\n\nType: `string`\n\nThe name of your project. Used to generate the paths.\n\n#### options\n\nType: `object`\n\n##### suffix\n\nType: `string`\\\nDefault: `'nodejs'`\n\n**Don't use this option unless you really have to!**\n\nSuffix appended to the project name to avoid name conflicts with native apps. Pass an empty string to disable it.\n\n### paths.data\n\nDirectory for data files.\n\nExample locations (with the default `nodejs` [suffix](#suffix)):\n\n- macOS: `~/Library/Application Support/MyApp-nodejs`\n- Windows: `%LOCALAPPDATA%\\MyApp-nodejs\\Data` (for example, `C:\\Users\\USERNAME\\AppData\\Local\\MyApp-nodejs\\Data`)\n- Linux: `~/.local/share/MyApp-nodejs` (or `$XDG_DATA_HOME/MyApp-nodejs`)\n\n### paths.config\n\nDirectory for config files.\n\nExample locations (with the default `nodejs` [suffix](#suffix)):\n\n- macOS: `~/Library/Preferences/MyApp-nodejs`\n- Windows: `%APPDATA%\\MyApp-nodejs\\Config` (for example, `C:\\Users\\USERNAME\\AppData\\Roaming\\MyApp-nodejs\\Config`)\n- Linux: `~/.config/MyApp-nodejs` (or `$XDG_CONFIG_HOME/MyApp-nodejs`)\n\n### paths.cache\n\nDirectory for non-essential data files.\n\nExample locations (with the default `nodejs` [suffix](#suffix)):\n\n- macOS: `~/Library/Caches/MyApp-nodejs`\n- Windows: `%LOCALAPPDATA%\\MyApp-nodejs\\Cache` (for example, `C:\\Users\\USERNAME\\AppData\\Local\\MyApp-nodejs\\Cache`)\n- Linux: `~/.cache/MyApp-nodejs` (or `$XDG_CACHE_HOME/MyApp-nodejs`)\n\n### paths.log\n\nDirectory for log files.\n\nExample locations (with the default `nodejs` [suffix](#suffix)):\n\n- macOS: `~/Library/Logs/MyApp-nodejs`\n- Windows: `%LOCALAPPDATA%\\MyApp-nodejs\\Log` (for example, `C:\\Users\\USERNAME\\AppData\\Local\\MyApp-nodejs\\Log`)\n- Linux: `~/.local/state/MyApp-nodejs` (or `$XDG_STATE_HOME/MyApp-nodejs`)\n\n### paths.temp\n\nDirectory for temporary files.\n\nExample locations (with the default `nodejs` [suffix](#suffix)):\n\n- macOS: `/var/folders/jf/f2twvvvs5jl_m49tf034ffpw0000gn/T/MyApp-nodejs`\n- Windows: `%LOCALAPPDATA%\\Temp\\MyApp-nodejs` (for example, `C:\\Users\\USERNAME\\AppData\\Local\\Temp\\MyApp-nodejs`)\n- Linux: `/tmp/USERNAME/MyApp-nodejs`\n","publish_time":1769264947374,"_cnpm_publish_time":1769264947374,"dist-tags":{"latest":"4.0.0"}}