{"_id":"@remix-run/terminal","_rev":"3-ec589a0552cb31eedb504b53817fb067","name":"@remix-run/terminal","dist-tags":{"latest":"0.1.1"},"versions":{"0.0.0":{"name":"@remix-run/terminal","version":"0.0.0","license":"MIT","_id":"@remix-run/terminal@0.0.0","maintainers":[{"name":"mjackson","email":"mjijackson+npm@gmail.com"}],"homepage":"https://github.com/remix-run/remix#readme","bugs":{"url":"https://github.com/remix-run/remix/issues"},"dist":{"shasum":"c695e615d6b31d931347d8f1cdb08be06b70d559","tarball":"https://registry.npmjs.org/@remix-run/terminal/-/terminal-0.0.0.tgz","fileCount":2,"integrity":"sha512-XFxcrYJsp/b/HRldVsX9ajBg6Icp7A1Ypi5jIzDdKkyG9tExU9cwHrfOBG0UBFuCPJxx81I+gpAfQusg/f+bXQ==","signatures":[{"sig":"MEUCIHOJfeE2/89UxeOdnT9c6BhQiLM5MHl4AcX5vNYo7NqHAiEAuYenVtCIwNOgCYGQUkWbOBeQn7tabwvtXZLlf+5iRvE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":463},"_npmUser":{"name":"mjackson","email":"mjijackson+npm@gmail.com"},"repository":{"url":"git+https://github.com/remix-run/remix.git","type":"git","directory":"packages/terminal"},"_npmVersion":"11.12.1","description":"Placeholder package for Remix CI/OIDC setup","directories":{},"_nodeVersion":"24.15.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/terminal_0.0.0_1777155099122_0.052191422499498596","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@remix-run/terminal","version":"0.1.0","keywords":["terminal","ansi","colors","cli","output"],"author":{"name":"Michael Jackson","email":"mjijackson@gmail.com"},"license":"MIT","_id":"@remix-run/terminal@0.1.0","maintainers":[{"name":"mjackson","email":"mjijackson+npm@gmail.com"}],"homepage":"https://github.com/remix-run/remix/tree/main/packages/terminal#readme","bugs":{"url":"https://github.com/remix-run/remix/issues"},"dist":{"shasum":"a252d2c715e80d54ec1a021e32fb3ef24e185091","tarball":"https://registry.npmjs.org/@remix-run/terminal/-/terminal-0.1.0.tgz","fileCount":23,"integrity":"sha512-vxiiCm3yQTBeG4j9Lm4PVZElEdD7gBNm+Q2rqTGMlE4ImrWFoq7h2Jk1y3BMylNZYz0m3pzihQ5G2sbY1XtdLg==","signatures":[{"sig":"MEUCIGsPbhaGeDTyOwc505PX3cwhSoW+9AoKZs+MunbzrnAuAiEAqoyuXY5ISS+HrnwPBtZelZaqrS3w09qblBdy1d9SBMk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@remix-run%2fterminal@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":65990},"type":"module","_from":"file:remix-run-terminal-0.1.0.tgz","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json"},"scripts":{"test":"node --disable-warning=ExperimentalWarning --test './src/**/*.test.ts'","build":"tsgo -p tsconfig.build.json","clean":"git clean -fdX","typecheck":"tsgo --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:20d2fa4c-0cbc-4726-9f86-6795f1c10a41"}},"_resolved":"/tmp/1402308624ec06f12bf3c00733a4bb50/remix-run-terminal-0.1.0.tgz","_integrity":"sha512-vxiiCm3yQTBeG4j9Lm4PVZElEdD7gBNm+Q2rqTGMlE4ImrWFoq7h2Jk1y3BMylNZYz0m3pzihQ5G2sbY1XtdLg==","repository":{"url":"git+https://github.com/remix-run/remix.git","type":"git","directory":"packages/terminal"},"_npmVersion":"11.11.0","description":"Terminal output utilities for JavaScript libraries and CLIs","directories":{},"_nodeVersion":"24.14.1","_hasShrinkwrap":false,"devDependencies":{"@types/node":"^24.6.0","@typescript/native-preview":"7.0.0-dev.20251125.1"},"_npmOperationalInternal":{"tmp":"tmp/terminal_0.1.0_1777482871536_0.5866589737280175","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@remix-run/terminal","version":"0.1.1","description":"Terminal output utilities for JavaScript libraries and CLIs","author":{"name":"Michael Jackson","email":"mjijackson@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/remix-run/remix.git","directory":"packages/terminal"},"homepage":"https://github.com/remix-run/remix/tree/main/packages/terminal#readme","type":"module","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json"},"devDependencies":{"@types/node":"^24.6.0","@typescript/native-preview":"7.0.0-dev.20251125.1"},"keywords":["terminal","ansi","colors","cli","output"],"scripts":{"build":"tsgo -p tsconfig.build.json","clean":"git clean -fdX","test":"node --disable-warning=ExperimentalWarning --test './src/**/*.test.ts'","typecheck":"tsgo --noEmit"},"_id":"@remix-run/terminal@0.1.1","bugs":{"url":"https://github.com/remix-run/remix/issues"},"_integrity":"sha512-M8JNcsYp/mWZ0yOB12Ir+Ud1eLxodPr8YSKQcG2PTPeiq9p9c59D9gvF9m6EU2Hmd4esJMiTyy6lJHc/VKKvcw==","_resolved":"/tmp/1abc44cad04659b3aa6cdee91b925c42/remix-run-terminal-0.1.1.tgz","_from":"file:remix-run-terminal-0.1.1.tgz","_nodeVersion":"24.15.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-M8JNcsYp/mWZ0yOB12Ir+Ud1eLxodPr8YSKQcG2PTPeiq9p9c59D9gvF9m6EU2Hmd4esJMiTyy6lJHc/VKKvcw==","shasum":"88c927bd11195a8a77b5f37ad7e72911caa62273","tarball":"https://registry.npmjs.org/@remix-run/terminal/-/terminal-0.1.1.tgz","fileCount":23,"unpackedSize":63956,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@remix-run%2fterminal@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCI/hkI2AjW8/S7BWXEO65ZN7UFznaHMC5KunDkvuETSQIhAMYY6eu8h7I99ArnnM2dEZTBeMAVuUlqWU5s08coLaDN"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:20d2fa4c-0cbc-4726-9f86-6795f1c10a41"}},"directories":{},"maintainers":[{"name":"mjackson","email":"mjijackson+npm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/terminal_0.1.1_1779308185429_0.6628464281961268"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-25T22:11:38.891Z","modified":"2026-05-20T20:16:25.965Z","0.0.0":"2026-04-25T22:11:39.290Z","0.1.0":"2026-04-29T17:14:31.672Z","0.1.1":"2026-05-20T20:16:25.626Z"},"bugs":{"url":"https://github.com/remix-run/remix/issues"},"author":{"name":"Michael Jackson","email":"mjijackson@gmail.com"},"license":"MIT","homepage":"https://github.com/remix-run/remix/tree/main/packages/terminal#readme","keywords":["terminal","ansi","colors","cli","output"],"repository":{"type":"git","url":"git+https://github.com/remix-run/remix.git","directory":"packages/terminal"},"description":"Terminal output utilities for JavaScript libraries and CLIs","maintainers":[{"name":"mjackson","email":"mjijackson+npm@gmail.com"}],"readme":"# terminal\n\nTerminal output utilities for JavaScript libraries and CLIs. It provides small primitives for ANSI styles, color support detection, escape sequences, and testable stdout/stderr handling.\n\n## Features\n\n- **ANSI Styles** - Apply common modifiers, foreground colors, and background colors\n- **Color Detection** - Respect `CI`, `NO_COLOR`, `FORCE_COLOR`, `TERM=dumb`, TTY streams, and explicit style overrides\n- **Terminal Controls** - Generate escape sequences for cursor movement, line clearing, and cursor visibility\n- **Testable Streams** - Create terminal instances around injected stdout/stderr/stdin streams\n\n## Installation\n\n```sh\nnpm i remix\n```\n\n## Usage\n\n```ts\nimport { createTerminal } from 'remix/terminal'\n\nlet terminal = createTerminal()\n\nterminal.writeLine(`${terminal.styles.green('ready')} listening on port 3000`)\nterminal.errorLine(terminal.styles.red('failed to start'))\n```\n\n### ANSI Styles\n\nUse `createStyles` when you only need formatting helpers.\n\n```ts\nimport { createStyles } from 'remix/terminal'\n\nlet styles = createStyles({ colors: true })\n\nconsole.log(styles.bold(styles.cyan('Ready')))\nconsole.log(styles.format('warning', 'dim', 'yellow', 'bgBlackBright'))\n```\n\nStyle helpers preserve outer styles when nested formatted strings close an inner style.\n\n```ts\nconsole.log(styles.red(`Error: ${styles.bold('fatal')} retrying`))\n```\n\nSupported modifiers include `bold`, `dim`, `italic`, `underline`, `overline`, `inverse`, and `strikethrough`. Supported colors include the base foreground/background ANSI colors, bright variants, and `gray`/`grey` aliases.\n\nBy default, color detection disables styles in CI, when `NO_COLOR` is present, for `TERM=dumb`, and outside TTY output streams. Set `colors` to `true` or `false` to override automatic detection.\n\n### Terminal Controls\n\nUse `ansi` for raw terminal escape sequences.\n\n```ts\nimport { ansi } from 'remix/terminal'\n\nprocess.stdout.write(ansi.clearLine)\nprocess.stdout.write(ansi.cursorTo(0))\nprocess.stdout.write('Updated status')\n```\n\n### Testing Output\n\nInject streams to test terminal output without writing to the real console.\n\n```ts\nimport { createTerminal } from 'remix/terminal'\n\nlet output = ''\n\nlet terminal = createTerminal({\n  colors: false,\n  stdout: {\n    write(chunk) {\n      output += chunk\n    },\n  },\n})\n\nterminal.writeLine(terminal.styles.green('ok'))\n```\n\n## Related Packages\n\n- [`logger-middleware`](https://github.com/remix-run/remix/tree/main/packages/logger-middleware) - HTTP request/response logging middleware\n- [`test`](https://github.com/remix-run/remix/tree/main/packages/test) - Browser-based test framework for Remix components\n\n## License\n\nSee [LICENSE](https://github.com/remix-run/remix/blob/main/LICENSE)\n","readmeFilename":"README.md"}