{"id":13447182,"url":"https://github.com/sindresorhus/env-paths","last_synced_at":"2025-05-14T19:04:44.850Z","repository":{"id":54139102,"uuid":"61668259","full_name":"sindresorhus/env-paths","owner":"sindresorhus","description":"Get paths for storing things like data, config, cache, etc","archived":false,"fork":false,"pushed_at":"2024-07-02T07:17:55.000Z","size":24,"stargazers_count":385,"open_issues_count":1,"forks_count":19,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-04-09T21:25:22.067Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/sindresorhus.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":".github/funding.yml","license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/security.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"sindresorhus","open_collective":"sindresorhus","buy_me_a_coffee":"sindresorhus","custom":"https://sindresorhus.com/donate"}},"created_at":"2016-06-21T21:25:15.000Z","updated_at":"2025-03-19T23:42:53.000Z","dependencies_parsed_at":"2024-11-05T19:55:02.758Z","dependency_job_id":null,"html_url":"https://github.com/sindresorhus/env-paths","commit_stats":{"total_commits":28,"total_committers":7,"mean_commits":4.0,"dds":0.25,"last_synced_commit":"f1729272888f45f6584e74dc4d0af3aecba9e7e8"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fenv-paths","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fenv-paths/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fenv-paths/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fenv-paths/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sindresorhus","download_url":"https://codeload.github.com/sindresorhus/env-paths/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248161262,"owners_count":21057552,"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","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":[],"created_at":"2024-07-31T05:01:10.322Z","updated_at":"2025-04-10T04:52:01.405Z","avatar_url":"https://github.com/sindresorhus.png","language":"JavaScript","readme":"# env-paths\n\n\u003e 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```\n$ npm install env-paths\n```\n\n## Usage\n\n```js\nimport envPaths from 'env-paths';\n\nconst paths = envPaths('MyApp');\n\npaths.data;\n//=\u003e '/home/sindresorhus/.local/share/MyApp-nodejs'\n\npaths.config\n//=\u003e '/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 could use [`make-dir`](https://github.com/sindresorhus/make-dir) 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\napps. 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\n---\n\n\u003cdiv align=\"center\"\u003e\n\t\u003cb\u003e\n\t\t\u003ca href=\"https://tidelift.com/subscription/pkg/npm-env-paths?utm_source=npm-env-paths\u0026utm_medium=referral\u0026utm_campaign=readme\"\u003eGet professional support for this package with a Tidelift subscription\u003c/a\u003e\n\t\u003c/b\u003e\n\t\u003cbr\u003e\n\t\u003csub\u003e\n\t\tTidelift helps make open source sustainable for maintainers while giving companies\u003cbr\u003eassurances about security, maintenance, and licensing for their dependencies.\n\t\u003c/sub\u003e\n\u003c/div\u003e\n","funding_links":["https://github.com/sponsors/sindresorhus","https://opencollective.com/sindresorhus","https://buymeacoffee.com/sindresorhus","https://sindresorhus.com/donate","https://tidelift.com/subscription/pkg/npm-env-paths?utm_source=npm-env-paths\u0026utm_medium=referral\u0026utm_campaign=readme"],"categories":["JavaScript","others"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindresorhus%2Fenv-paths","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsindresorhus%2Fenv-paths","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindresorhus%2Fenv-paths/lists"}