{"_id":"termi-link","_rev":"6-03ffaa7a3838e5bbe3173a58c23d5c7b","name":"termi-link","dist-tags":{"latest":"2.0.2"},"versions":{"1.0.0":{"name":"termi-link","version":"1.0.0","keywords":["terminal","link","hyperlink","terminal-link","terminal-hyperlink"],"author":{"url":"king8fisher","name":"Anton Veretennikov"},"license":"MIT","_id":"termi-link@1.0.0","maintainers":[{"name":"king8fisher","email":"anton.veretennikov@gmail.com"}],"homepage":"https://github.com/king8fisher/terminal-colors#readme","bugs":{"url":"https://github.com/king8fisher/terminal-colors/issues"},"dist":{"shasum":"44fe2f8208f630a29940543b0abcd2ed2facee93","tarball":"https://registry.npmjs.org/termi-link/-/termi-link-1.0.0.tgz","fileCount":9,"integrity":"sha512-LCXwLcFuWr8xS6TX4fLE59kFl2JL33Nn86mLCKb8V+SPqgCRmt3EAolHMHNkLIHokWzzsRkxg5gduTW2QCmayg==","signatures":[{"sig":"MEUCIQCoqiKDoKXMrSptS6pdkIGnmlOG//U//w8zix2PoXtqqAIgeZeUJG+Wfk3Ji14J43uogVOJbshYSHHEL6lwvRzepw4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24463},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=12"},"gitHead":"d83a6dbf3716d5015d773db9ed7ec75bab2bc1a3","scripts":{"test":"vitest --run","build":"tsup","wtest":"vitest","prepublishOnly":"pnpm build"},"_npmUser":{"name":"king8fisher","email":"anton.veretennikov@gmail.com"},"repository":{"url":"git+https://github.com/king8fisher/terminal-colors.git","type":"git"},"_npmVersion":"10.8.3","description":"This library provides terminal links for terminals that support them.","directories":{},"_nodeVersion":"22.11.0","_hasShrinkwrap":false,"packageManager":"pnpm@9.15.4+sha512.b2dc20e2fc72b3e18848459b37359a32064663e5627a51e4c74b2c29dd8e8e0491483c3abb40789cfd578bf362fb6ba8261b05f0387d76792ed6e23ea3b1b6a0","devDependencies":{"tsup":"^8.3.5","vitest":"^3.0.2","ts-node":"^10.9.2","@vitest/ui":"^3.0.2","typescript":"^5.7.3","@types/node":"^22.10.7"},"_npmOperationalInternal":{"tmp":"tmp/termi-link_1.0.0_1737397929381_0.20927476788912336","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"termi-link","version":"1.0.1","keywords":["terminal","link","hyperlink","terminal-link","terminal-hyperlink","terminal link","terminal hyperlink"],"author":{"url":"king8fisher","name":"Anton Veretennikov"},"license":"MIT","_id":"termi-link@1.0.1","maintainers":[{"name":"king8fisher","email":"anton.veretennikov@gmail.com"}],"homepage":"https://github.com/king8fisher/termi-link#readme","bugs":{"url":"https://github.com/king8fisher/termi-link/issues"},"dist":{"shasum":"d24cfa81a7bc92c36f082a45a4c3b0def61e7234","tarball":"https://registry.npmjs.org/termi-link/-/termi-link-1.0.1.tgz","fileCount":9,"integrity":"sha512-se9YCWClX9cAl5ZVkqyrgj2o+fQaEF7ER46ikctmfs3DmIo4N7x8utKb+/sxdpJpxGQ/Wtb9mxEzZaGJKhmGUA==","signatures":[{"sig":"MEUCIQDd2KmTUrc1+zotKFbaKI9c9efUhuRtESuBlSXJpH07gAIgf6gBb45dSB7vVgJffjvC+OOfPF1qcpPHC03n4i2Y8II=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24505},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=12"},"gitHead":"8cdd2252ae8859b8524c00dce7f970afbfec696c","scripts":{"test":"vitest --run","build":"tsup","wtest":"vitest","prepublishOnly":"pnpm build"},"_npmUser":{"name":"king8fisher","email":"anton.veretennikov@gmail.com"},"repository":{"url":"git+https://github.com/king8fisher/termi-link.git","type":"git"},"_npmVersion":"10.8.3","description":"This library provides terminal links for terminals that support them.","directories":{},"_nodeVersion":"22.11.0","_hasShrinkwrap":false,"packageManager":"pnpm@9.15.4+sha512.b2dc20e2fc72b3e18848459b37359a32064663e5627a51e4c74b2c29dd8e8e0491483c3abb40789cfd578bf362fb6ba8261b05f0387d76792ed6e23ea3b1b6a0","devDependencies":{"tsup":"^8.3.5","vitest":"^3.0.2","ts-node":"^10.9.2","@vitest/ui":"^3.0.2","typescript":"^5.7.3","@types/node":"^22.10.7"},"_npmOperationalInternal":{"tmp":"tmp/termi-link_1.0.1_1737402854834_0.6475220926910925","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"termi-link","version":"1.1.0","keywords":["terminal","link","hyperlink","terminal-link","terminal-hyperlink","terminal link","terminal hyperlink"],"author":{"url":"king8fisher","name":"Anton Veretennikov"},"license":"MIT","_id":"termi-link@1.1.0","maintainers":[{"name":"king8fisher","email":"anton.veretennikov@gmail.com"}],"homepage":"https://github.com/king8fisher/termi-link#readme","bugs":{"url":"https://github.com/king8fisher/termi-link/issues"},"dist":{"shasum":"f39a5dcd913a50c362d178d616bc1dfc61b641ac","tarball":"https://registry.npmjs.org/termi-link/-/termi-link-1.1.0.tgz","fileCount":9,"integrity":"sha512-2qSN6TnomHgVLtk+htSWbaYs4Rd2MH/RU7VpHTy6MBstyNyWbM4yKd1DCYpE3fDg8dmGWojXCngNi/MHCzGuAA==","signatures":[{"sig":"MEUCID0DmTcmVtUlI5wYHi6WtO6ODJIvt9fPuavQ088HfXnrAiEAiyr5T6NVS6EhOfZiQR7/B+OzyQ/RUBhT37aZ5j+7cog=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25946},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=12"},"gitHead":"e119ac548296c51c44a0d2ab3086a987455c7432","scripts":{"test":"vitest --run","build":"pnpm test && tsup","wtest":"vitest","prepublishOnly":"pnpm build"},"_npmUser":{"name":"king8fisher","email":"anton.veretennikov@gmail.com"},"repository":{"url":"git+https://github.com/king8fisher/termi-link.git","type":"git"},"_npmVersion":"10.8.3","description":"This library provides terminal links for terminals that support them.","directories":{},"_nodeVersion":"22.11.0","_hasShrinkwrap":false,"packageManager":"pnpm@9.15.4+sha512.b2dc20e2fc72b3e18848459b37359a32064663e5627a51e4c74b2c29dd8e8e0491483c3abb40789cfd578bf362fb6ba8261b05f0387d76792ed6e23ea3b1b6a0","devDependencies":{"tsup":"^8.3.5","vitest":"^3.0.2","ts-node":"^10.9.2","@vitest/ui":"^3.0.2","typescript":"^5.7.3","@types/node":"^22.10.7"},"_npmOperationalInternal":{"tmp":"tmp/termi-link_1.1.0_1737461361054_0.045910539764778546","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"termi-link","version":"2.0.0","keywords":["terminal","link","hyperlink","terminal-link","terminal-hyperlink","terminal link","terminal hyperlink"],"author":{"url":"king8fisher","name":"Anton Veretennikov"},"license":"MIT","_id":"termi-link@2.0.0","maintainers":[{"name":"king8fisher","email":"anton.veretennikov@gmail.com"}],"homepage":"https://github.com/king8fisher/termi-link#readme","bugs":{"url":"https://github.com/king8fisher/termi-link/issues"},"dist":{"shasum":"c3113b6f30b386c3dd0e6707845c19b124805705","tarball":"https://registry.npmjs.org/termi-link/-/termi-link-2.0.0.tgz","fileCount":10,"integrity":"sha512-ZeCiWPSzYO1eLGLLxRi4sMh7HNNPEzuteYewGhzmHs6YHRQaASOchmgg2u+56BJqFj2v5lfDiYuMN8hHZK1RnQ==","signatures":[{"sig":"MEQCIFP+YAets+G1fK12Ifx/Tds1rWAtp3Pcvtmuv2DJ8uM0AiAF53LIYHK2BXk6X0ct7zledryicZKKr6BLPU9z0URHdg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQCdkX3pqbXHmJjjZ8GEIRjbZDjHXpvDNEV5bFWX3G0XCgIhAKdwPgxMKqI70+amBm1VKK8DKv3rpHGehKjALQKU8nWv","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":69419},"main":"./dist/index.js","type":"commonjs","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"gitHead":"9ce479dfb95aa8c25a5266bdae08e66d24bf9e97","scripts":{"lint":"biome check --error-on-warnings .","test":"vitest --run","build":"pnpm test && tsup","wtest":"vitest","format":"biome check --write .","prepare":"tsup","prepublishOnly":"pnpm test && tsup"},"_npmUser":{"name":"king8fisher","email":"anton.veretennikov@gmail.com"},"repository":{"url":"git+https://github.com/king8fisher/termi-link.git","type":"git"},"_npmVersion":"11.16.0","description":"This library provides terminal links for terminals that support them.","directories":{},"sideEffects":false,"_nodeVersion":"26.3.0","_hasShrinkwrap":false,"packageManager":"pnpm@10.13.1+sha512.37ebf1a5c7a30d5fabe0c5df44ee8da4c965ca0c5af3dbab28c3a1681b70a256218d05c81c9c0dcf767ef6b8551eb5b960042b9ed4300c59242336377e01cfad","devDependencies":{"tsup":"^8.5.1","vitest":"^3.2.7","@vitest/ui":"^3.2.7","typescript":"^5.9.3","@types/node":"^22.20.1","@biomejs/biome":"2.5.6"},"_npmOperationalInternal":{"tmp":"tmp/termi-link_2.0.0_1785326657669_0.2405018111828936","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"name":"termi-link","version":"2.0.1","keywords":["terminal","link","hyperlink","terminal-link","terminal-hyperlink","terminal link","terminal hyperlink"],"author":{"url":"king8fisher","name":"Anton Veretennikov"},"license":"MIT","_id":"termi-link@2.0.1","maintainers":[{"name":"king8fisher","email":"anton.veretennikov@gmail.com"}],"homepage":"https://github.com/king8fisher/termi-link#readme","bugs":{"url":"https://github.com/king8fisher/termi-link/issues"},"dist":{"shasum":"0640469ceb265a8a1f5e188029ddb31437bf907d","tarball":"https://registry.npmjs.org/termi-link/-/termi-link-2.0.1.tgz","fileCount":10,"integrity":"sha512-lKHTK2hEFRbwopUM030CiBIuIEZskKm6AkDiWiaZ2Gvh8nQm0en6zuM6TPPUGVHogKwJ1ZSCbIs/55RESApoiw==","signatures":[{"sig":"MEUCIQC5IXGpH25+hKbwCWRI4+brvPMeIR/cwhxOFM/zSmiY1AIgbNWk0wldWU1mcYLewf8/0ggR7eFHUjl/se6GA8PoK9o=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQCxonit6/+47e6JecaXGc6QS7IiwcHJcvAADWs1PughhAIhAOyRPxqCNrsxWkbhaJ6qdDexmXbNsEGVlsaGOm42cVds","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":84487},"main":"./dist/index.js","type":"commonjs","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"gitHead":"945a7782f5f1f20fbfee76996d09123af7b735f7","scripts":{"lint":"biome check --error-on-warnings .","test":"vitest --run","build":"pnpm test && tsup","wtest":"vitest","format":"biome check --write .","prepare":"tsup","prepublishOnly":"pnpm test && tsup"},"_npmUser":{"name":"king8fisher","email":"anton.veretennikov@gmail.com"},"repository":{"url":"git+https://github.com/king8fisher/termi-link.git","type":"git"},"_npmVersion":"11.16.0","description":"This library provides terminal links for terminals that support them.","directories":{},"sideEffects":false,"_nodeVersion":"26.3.0","_hasShrinkwrap":false,"packageManager":"pnpm@10.13.1+sha512.37ebf1a5c7a30d5fabe0c5df44ee8da4c965ca0c5af3dbab28c3a1681b70a256218d05c81c9c0dcf767ef6b8551eb5b960042b9ed4300c59242336377e01cfad","devDependencies":{"tsup":"^8.5.1","vitest":"^3.2.7","@vitest/ui":"^3.2.7","typescript":"^5.9.3","@types/node":"^22.20.1","@biomejs/biome":"2.5.6"},"_npmOperationalInternal":{"tmp":"tmp/termi-link_2.0.1_1785498034509_0.7233251397680931","host":"s3://npm-registry-packages-npm-production"}},"2.0.2":{"_id":"termi-link@2.0.2","bugs":{"url":"https://github.com/king8fisher/termi-link/issues"},"dist":{"shasum":"1342ebcdfe65af436dd9b153938b3cf3538745e1","tarball":"https://registry.npmjs.org/termi-link/-/termi-link-2.0.2.tgz","fileCount":10,"integrity":"sha512-eYWLz9L8lBk1ihCC1zQrQUIfnL0pgIOYD4iUnj2mrsnW8ttFhdsThdw8lYIsy0nJhcJITPWM6tbEjd9pPHHZTw==","signatures":[{"sig":"MEYCIQCCP4/hWOlLAz+Eb1+U+qpzxnFsAR/1DquZh0vy/be+NAIhAIkHlhIlI6EJYJzjVNEqG3WN8rrbZqxF31m8faFNfn2T","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIG+25A1p90NCU+rEwIZ/NJhBvoPjiHlZTVaHsfJT6JK1AiEAkPe0nR5L6srFLL/jcOu5u0il6Vzpr9fafsVPkju9YfQ="}],"unpackedSize":114314},"main":"./dist/index.js","name":"termi-link","type":"commonjs","types":"./dist/index.d.ts","author":{"url":"king8fisher","name":"Anton Veretennikov"},"module":"./dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"gitHead":"de954fe968990e67e0a86857925c41f711c6a254","license":"MIT","scripts":{"lint":"biome check --error-on-warnings .","test":"vitest --run","build":"pnpm test && tsup","wtest":"vitest","format":"biome check --write .","prepare":"tsup","prepublishOnly":"pnpm test && tsup"},"version":"2.0.2","_npmUser":{"name":"king8fisher","email":"anton.veretennikov@gmail.com"},"homepage":"https://github.com/king8fisher/termi-link#readme","keywords":["terminal","link","hyperlink","terminal-link","terminal-hyperlink","terminal link","terminal hyperlink"],"repository":{"url":"git+https://github.com/king8fisher/termi-link.git","type":"git"},"_npmVersion":"11.16.0","description":"This library provides terminal links for terminals that support them.","directories":{},"maintainers":[{"name":"king8fisher","email":"anton.veretennikov@gmail.com"}],"sideEffects":false,"_nodeVersion":"26.3.0","_hasShrinkwrap":false,"packageManager":"pnpm@10.34.5+sha512.a4ee05f2f73658255bd6a89859c065a45c28a57daefae2c893a168ee2b73168c37b91e83e57ea67654ad03f03031746430e8bce38e362e042605fb8abc80192e","devDependencies":{"tsup":"^8.5.1","vitest":"^3.2.7","@vitest/ui":"^3.2.7","typescript":"^5.9.3","@types/node":"^22.20.1","@biomejs/biome":"2.5.6"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/termi-link_2.0.2_1785714049181_0.5676162610008813"}}},"time":{"created":"2025-01-20T18:32:09.380Z","modified":"2026-08-02T23:40:49.440Z","1.0.0":"2025-01-20T18:32:09.550Z","1.0.1":"2025-01-20T19:54:14.990Z","1.1.0":"2025-01-21T12:09:21.254Z","2.0.0":"2026-07-29T12:04:17.746Z","2.0.1":"2026-07-31T11:40:34.591Z","2.0.2":"2026-08-02T23:40:49.263Z"},"bugs":{"url":"https://github.com/king8fisher/termi-link/issues"},"author":{"url":"king8fisher","name":"Anton Veretennikov"},"license":"MIT","homepage":"https://github.com/king8fisher/termi-link#readme","keywords":["terminal","link","hyperlink","terminal-link","terminal-hyperlink","terminal link","terminal hyperlink"],"repository":{"url":"git+https://github.com/king8fisher/termi-link.git","type":"git"},"description":"This library provides terminal links for terminals that support them.","maintainers":[{"name":"king8fisher","email":"anton.veretennikov@gmail.com"}],"readme":"[![npm version](https://img.shields.io/npm/v/termi-link?logo=npm&labelColor=black&color=07293F)](https://npmjs.com/package/termi-link)\n\n# termi-link\n\nClickable links for terminals that support them, and readable plain text for the ones that do not.\nIt is an alternative to [terminal-link](https://npmjs.com/package/terminal-link) with an almost\nmatching API and semantics, differing in [a few places](#differences-from-terminal-link), so you\ncan move an existing import over with a small edit rather than a rewrite.\n\n> [!TIP]\n> The exact contracts, the version history and a glossary of the terminal jargon live in [README.details.md](README.details.md).\n\n## Installation\n\n```bash\nnpm install termi-link\n```\n\n## Usage\n\n```ts\nimport { terminalLink } from 'termi-link';\n\nterminalLink('example.com', 'https://example.com');\nterminalLink('example.com', 'https://example.com', { fallback: (_text, url) => `${url}` });\n```\n\nHere is what each call renders, where `url` is `https://example.com`. The supported-terminal\ncolumn is imitated with a markdown link, because that is exactly what a supporting terminal\nshows you: a clickable label with the url hidden inside the escape sequence.\n\n| Call                                                                           | Supported terminals                        | Unsupported terminals               |\n| ------------------------------------------------------------------------------ | ------------------------------------------ | ----------------------------------- |\n| `terminalLink('example.com', url)`                                             | [example.com](https://example.com)         | `example.com https://example.com`   |\n| `terminalLink('', url)`                                                        | [https://example.com](https://example.com) | `https://example.com`               |\n| `terminalLink('example.com', url, { fallback: false })`                        | [example.com](https://example.com)         | `example.com`                       |\n| `terminalLink('example.com', url, { fallback: (t, u) => t + ' <' + u + '>' })` | [example.com](https://example.com)         | `example.com <https://example.com>` |\n\n> [!NOTE]\n> The supported-terminal column never changes. `fallback` only decides what a terminal\n> *without* link support prints. Leave `text` empty and the url becomes the label on\n> both paths.\n\n### Text formatting\n\nYou can pass text formatting, such as color, to either argument. `red` and `blue` below stand for\nwhichever color helper you use; this library ships none.\n\n```ts\nterminalLink(red('termi-link'), blue('https://github.com/king8fisher/termi-link'));\n// fallback: red text, blue url, and the link target itself stays byte-clean\n```\n\nA supported terminal renders the text, not the url, so the url color shows up only in the\nfallback. To give both parts the same color, wrap the whole return value:\n\n```ts\nred(terminalLink(text, url));\n```\n\n### Url encoding\n\nEncoding your urls is up to you. Once a url is a single string, only you know whether an `&`\nseparates two query parameters or is part of the data inside one, so build your urls with\n`new URL()` and `URLSearchParams` instead of gluing strings together, then hand the finished\nresult to `terminalLink`.\n\nThe library takes care of the rest. It removes anything from your url that could break or hijack\nthe link, and encodes the characters the escape sequence cannot carry, both in the link itself and\nin the text it prints. Color is the deliberate exception: the formatting you wrapped the\nurl in survives into whatever gets printed, which is what makes the colored example above show\nblue. Your `text` is a different matter, printed exactly as you give it, so clean it yourself if\nit can carry anything you did not put there.\n\nTen characters fall between those two cases: space, `\"`, `<`, `>`, `\\`, `^`, `` ` ``, `{`, `|` and\n`}`. A url is not supposed to contain any of them, but the escape sequence accepts them, so the\nlibrary passes them through as you wrote them. `strictUrlEncoding` encodes them for you, and it\nstays off unless you ask for it. Turn it on when a url can reach you already unescaped, say from\nthe filesystem or a config file. A space is the one that does visible damage, cutting your link\nshort in the plain-text fallback:\n\n```ts\nterminalLink('report', 'file:///Users/me/My Documents/report.pdf');\n// fallback linkifies only  file:///Users/me/My\n\nterminalLink('report', 'file:///Users/me/My Documents/report.pdf', { strictUrlEncoding: true });\n// fallback linkifies       file:///Users/me/My%20Documents/report.pdf\n```\n\nOne thing to know before you turn it on: inside the path of an `https` or `file` style url, a\nbackslash works as a path separator, so encoding it changes where the link points. In a query or\na fragment it is just a character. Read [url safety](README.details.md#url-safety) if that could\naffect your urls.\n\n## API\n\nThree exports:\n\n```ts\nterminalLink(text: string, url: string, options?: {\n  fallback?: false | ((text: string, url: string) => string),\n  strictUrlEncoding?: boolean,\n} | undefined): string\n```\n\n`terminalLink` returns a clickable link when the terminal supports one, and the configured\nfallback when it does not.\n\n- `fallback: false` keeps `text` unchanged and drops the url\n- `fallback: fn` replaces the whole fallback string with `fn(text, url)`, where `url` arrives\n  sanitized and keeps its color\n\nThe table above shows what each form outputs. By default the url is left delimited by\nwhitespace, so the terminal's own url detector picks it up intact.\n\n```ts\nisSupported(): boolean\n```\n\n`isSupported()` reports whether the current terminal supports links.\n\n### `TERMI_LINK_HYPERLINK`\n\nThis environment variable lets you force links on or off at runtime. It is checked before every\ndetection branch, so it overrides both `terminalLink` and `isSupported`:\n\n- `1`, `true`, `always`, `enabled` force links on\n- `0`, `false`, `never`, `disabled` force links off\n\nMatching is exact and case-sensitive. Anything else, including `TRUE` and the empty string,\nfalls through to normal detection.\n\n## Supported terminals\n\nDetection is built in. The library reads only the environment variables a terminal sets about\nitself, with no runtime dependency, no network call and no round-trip to the terminal. Every\nterminal it recognizes, the release each is supported from and the variables each is read\nfrom are listed in [README.details.md](README.details.md#supported-terminals).\n\n## Differences from terminal-link\n\nThis is an alternative with a different API. The surface differs in three places:\n\n|               | [terminal-link](https://npmjs.com/package/terminal-link) v5 | `termi-link` (this library)    |\n| ------------- | ----------------------------------------------------------- | ------------------------------ |\n| entry         | default export, callable                                    | named export `terminalLink`    |\n| support check | `terminalLink.isSupported` (boolean **property**)           | `isSupported()` (**function**) |\n| stderr        | `terminalLink.stderr(...)`                                  | none                           |\n\nBehavior differs in three ways:\n\n- No runtime dependencies, because [terminal detection](#supported-terminals) is built in.\n- Urls are made [safe for the escape sequence](README.details.md#url-safety), so a crafted url\n  cannot break or hijack the link.\n- The [fallback contract](README.details.md#the-fallback-contract) differs twice:\n  `terminalLink('', url)` returns the url alone, and a custom `fallback` receives the sanitized\n  display value rather than the raw url.\n\n## Reason\n\nThe [terminal-link](https://npmjs.com/package/terminal-link) library, long the go-to for\noutputting links, added zero-width spaces around urls, which made links lead to `404` in\nWindows terminals. [Issue #18](https://github.com/sindresorhus/terminal-link/issues/18) was\nopened in February 2022 and stayed open for more than three years. That, plus a\nsupported-terminal list that needed updating more often than upstream released, led me to\ncreate this alternative.\n\n> [!NOTE]\n> terminal-link v5.0.0 (2025-09-08) fixed this issue and removed the zero-width spaces entirely.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}