{"_id":"marked-terminal-forked","_rev":"4-de99e21d22d607b364c564e0f2c9e649","name":"marked-terminal-forked","dist-tags":{"latest":"7.3.3"},"versions":{"7.3.1":{"name":"marked-terminal-forked","version":"7.3.1","keywords":["marked","render","terminal","markdown","markdown-to-terminal"],"author":{"name":"Mikael Brevik"},"license":"MIT","_id":"marked-terminal-forked@7.3.1","maintainers":[{"name":"sergiou87","email":"sergio.padrino@gmail.com"}],"homepage":"https://github.com/sergiou87/marked-terminal-forked","bugs":{"url":"https://github.com/sergiou87/marked-terminal-forked/issues"},"dist":{"shasum":"eed246f2228a07e0be52c0251b14a760e3c62e19","tarball":"https://registry.npmjs.org/marked-terminal-forked/-/marked-terminal-forked-7.3.1.tgz","fileCount":5,"integrity":"sha512-T8RklScAEFAD1DH7oSbxk36dYyA/S6znSlb0OsZXpsGFbWyBLkOQVT/2VcqExnNBS/U7pOpuibRKrsoDCnmGBw==","signatures":[{"sig":"MEYCIQDoJRS4fmfc65ZbkRhpqzqwpj30Q2A6LdbHnPFAMbki7AIhAOskCt1bJPSVwYUQqQZ4KId5GqxAjKmo21K7fuI0AtL1","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1959202},"main":"./index.cjs","type":"module","browser":"./index.js","engines":{"node":">=16.0.0"},"exports":{"node":{"import":"./index.js","require":"./index.cjs"},"default":"./index.js"},"gitHead":"0e495d14317a3fca674ea292e0cd7b6b98ddd41e","scripts":{"test":"cross-env FORCE_HYPERLINK=0 mocha tests/*.js --reporter spec","build":"rollup -c","prepack":"npm run build"},"_npmUser":{"name":"sergiou87","email":"sergio.padrino@gmail.com"},"repository":{"url":"git+https://github.com/sergiou87/marked-terminal-forked.git","type":"git"},"_npmVersion":"10.9.2","description":"A custom render for marked to output to the Terminal","directories":{"example":"example"},"_nodeVersion":"22.17.0","dependencies":{"chalk":"^5.4.1","ansi-regex":"^6.1.0","cli-table3":"^0.6.5","node-emoji":"^2.2.0","ansi-escapes":"^7.0.0","cli-highlight":"^2.1.11","supports-hyperlinks":"^3.1.0"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^11.0.1","marked":"^16.0.0","rollup":"^4.29.1","cross-env":"^7.0.3","@rollup/plugin-commonjs":"^28.0.2","@rollup/plugin-node-resolve":"^16.0.0"},"peerDependencies":{"marked":">=1 <17"},"_npmOperationalInternal":{"tmp":"tmp/marked-terminal-forked_7.3.1_1758027465146_0.9131866124669761","host":"s3://npm-registry-packages-npm-production"}},"7.3.2":{"name":"marked-terminal-forked","version":"7.3.2","keywords":["marked","render","terminal","markdown","markdown-to-terminal"],"author":{"name":"Mikael Brevik"},"license":"MIT","_id":"marked-terminal-forked@7.3.2","maintainers":[{"name":"webbies","email":"erik@webbies.dk"},{"name":"sergiou87","email":"sergio.padrino@gmail.com"}],"homepage":"https://github.com/sergiou87/marked-terminal","bugs":{"url":"https://github.com/sergiou87/marked-terminal/issues"},"dist":{"shasum":"025cd1cb86c3fee2436dc7f5823a04bfe0896a48","tarball":"https://registry.npmjs.org/marked-terminal-forked/-/marked-terminal-forked-7.3.2.tgz","fileCount":5,"integrity":"sha512-GPlfbHc4MzaFrRJpgfco+6hSrnkG9panB/dKoWJJKObcGvHGOAingdX8xOCq9fGNwYgyHjTfVMyvuKOki9W6xg==","signatures":[{"sig":"MEQCID+V++VAlmSc1+I46U7gSHr05D1F5alvjmXRlrGYgqReAiBNTDuLdap70B0MvcjXDejSSTZ0dEVYd8h0Rxt0/saVWw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1967853},"main":"./index.cjs","type":"module","browser":"./index.js","engines":{"node":">=16.0.0"},"exports":{"node":{"import":"./index.js","require":"./index.cjs"},"default":"./index.js"},"gitHead":"4dc04f08c8cc0b2e354251e11dcdb5fcae4edbf0","scripts":{"test":"cross-env FORCE_HYPERLINK=0 mocha tests/*.js --reporter spec","build":"rollup -c","prepack":"npm run build"},"_npmUser":{"name":"webbies","email":"erik@webbies.dk"},"repository":{"url":"git+https://github.com/sergiou87/marked-terminal.git","type":"git"},"_npmVersion":"11.11.0","description":"A custom render for marked to output to the Terminal","directories":{"example":"example"},"_nodeVersion":"25.8.1","dependencies":{"chalk":"^5.4.1","ansi-regex":"^6.1.0","cli-table3":"^0.6.5","node-emoji":"^2.2.0","ansi-escapes":"^7.0.0","cli-highlight":"^2.1.11","supports-hyperlinks":"^3.1.0"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^11.0.1","marked":"^16.0.0","rollup":"^4.29.1","cross-env":"^7.0.3","@rollup/plugin-commonjs":"^28.0.2","@rollup/plugin-node-resolve":"^16.0.0"},"peerDependencies":{"marked":">=1 <17"},"_npmOperationalInternal":{"tmp":"tmp/marked-terminal-forked_7.3.2_1777476000989_0.5939708609764942","host":"s3://npm-registry-packages-npm-production"}},"7.3.3":{"name":"marked-terminal-forked","version":"7.3.3","description":"A custom render for marked to output to the Terminal","main":"./index.cjs","browser":"./index.js","exports":{"node":{"import":"./index.js","require":"./index.cjs"},"default":"./index.js"},"type":"module","engines":{"node":">=16.0.0"},"scripts":{"build":"rollup -c","prepack":"npm run build","test":"cross-env FORCE_HYPERLINK=0 mocha tests/*.js --reporter spec"},"keywords":["marked","render","terminal","markdown","markdown-to-terminal"],"author":{"name":"Mikael Brevik"},"license":"MIT","peerDependencies":{"marked":">=1 <17"},"dependencies":{"ansi-escapes":"^7.0.0","ansi-regex":"^6.1.0","chalk":"^5.4.1","cli-highlight":"^2.1.11","cli-table3":"^0.6.5","node-emoji":"^2.2.0","supports-hyperlinks":"^3.1.0"},"directories":{"example":"example"},"devDependencies":{"@rollup/plugin-commonjs":"^28.0.2","@rollup/plugin-node-resolve":"^16.0.0","cross-env":"^7.0.3","marked":"^16.0.0","mocha":"^11.0.1","rollup":"^4.29.1"},"repository":{"type":"git","url":"git+https://github.com/sergiou87/marked-terminal.git"},"bugs":{"url":"https://github.com/sergiou87/marked-terminal/issues"},"homepage":"https://github.com/sergiou87/marked-terminal","gitHead":"618c84d0750f5131fa254d0ef190d34f3e5437fd","_id":"marked-terminal-forked@7.3.3","_nodeVersion":"25.8.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-eJfprsYh+DFs7l7FxqvYZYN9XVBx/VfqmicW9ZV2Q2eXGq3k07jtgoemqatqW7gFYWpSC94ppurjI1JzW1TlgQ==","shasum":"b612fe009504d588a0e651b286ac19e90c341dd0","tarball":"https://registry.npmjs.org/marked-terminal-forked/-/marked-terminal-forked-7.3.3.tgz","fileCount":5,"unpackedSize":1970717,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHzLSfGd0Ucz2Z0i5lpokhyBAGcS68zCQXbexFdm1c2+AiAvo7daMieBRMNnr4rgOKxJucMMEfVrJrjVjvw9JfMHvQ=="}]},"_npmUser":{"name":"webbies","email":"erik@webbies.dk"},"maintainers":[{"name":"webbies","email":"erik@webbies.dk"},{"name":"sergiou87","email":"sergio.padrino@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/marked-terminal-forked_7.3.3_1777495012339_0.9857030152925388"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-16T12:57:45.145Z","modified":"2026-04-29T20:36:52.636Z","7.3.1":"2025-09-16T12:57:45.350Z","7.3.2":"2026-04-29T15:20:01.175Z","7.3.3":"2026-04-29T20:36:52.520Z"},"bugs":{"url":"https://github.com/sergiou87/marked-terminal/issues"},"author":{"name":"Mikael Brevik"},"license":"MIT","homepage":"https://github.com/sergiou87/marked-terminal","keywords":["marked","render","terminal","markdown","markdown-to-terminal"],"repository":{"type":"git","url":"git+https://github.com/sergiou87/marked-terminal.git"},"description":"A custom render for marked to output to the Terminal","maintainers":[{"name":"webbies","email":"erik@webbies.dk"},{"name":"sergiou87","email":"sergio.padrino@gmail.com"}],"readme":"# marked-terminal\n\n> Custom Renderer for [marked](https://github.com/chjj/marked)\n> allowing for printing Markdown to the Terminal. Supports pretty tables, syntax\n> highlighting for javascript, and overriding all colors and styles.\n\nCould for instance be used to print usage information.\n\n[![build](https://github.com/mikaelbr/marked-terminal/actions/workflows/ci.yml/badge.svg)](https://github.com/mikaelbr/marked-terminal/actions/workflows/ci.yml) [![npm marked-terminal](https://img.shields.io/npm/v/marked-terminal.svg)](https://www.npmjs.com/package/marked-terminal)\n\n## Install\n\n```sh\nnpm install marked marked-terminal\n```\n\n## Example\n\n```javascript\nimport { marked } from 'marked';\nimport { markedTerminal } from 'marked-terminal';\n\nmarked.use(markedTerminal([options][, highlightOptions]));\n\nmarked.parse('# Hello \\n This is **markdown** printed in the `terminal`');\n```\n\n### Using older versions\n\n```javascript\nconst marked = require('marked');\nconst TerminalRenderer = require('marked-terminal');\n\nmarked.setOptions({\n  // Define custom renderer\n  renderer: new TerminalRenderer()\n});\n\n// Show the parsed data\nconsole.log(\n  marked('# Hello \\n This is **markdown** printed in the `terminal`')\n);\n```\n\nThis will produce the following:\n\n![Screenshot of marked-terminal](./screenshot.png)\n\n### Syntax Highlighting\n\nAlso have support for syntax highlighting using [cli-highlight](https://github.com/felixfbecker/cli-highlight).\nYou can override highlighting defaults by passing in settings as the second argument for TerminalRenderer.\n\nHaving the following markdown input:\n\n<pre>\n```js\nvar foo = function(bar) {\n  console.log(bar);\n};\nfoo('Hello');\n```\n</pre>\n\n...we will convert it into terminal format:\n\n```javascript\n// Show the parsed data\nconsole.log(marked(exampleSource));\n```\n\nThis will produce the following:\n\n![Screenshot of marked-terminal](./screenshot2.png)\n\n## API\n\nConstructur: `new TerminalRenderer([options][, highlightOptions])`\n\n### `options`\n\nOptional\nUsed to override default styling.\n\nDefault values are:\n\n```javascript\nvar defaultOptions = {\n  // Colors\n  code: chalk.yellow,\n  blockquote: chalk.gray.italic,\n  html: chalk.gray,\n  heading: chalk.green.bold,\n  firstHeading: chalk.magenta.underline.bold,\n  hr: chalk.reset,\n  listitem: chalk.reset,\n  table: chalk.reset,\n  paragraph: chalk.reset,\n  strong: chalk.bold,\n  em: chalk.italic,\n  codespan: chalk.yellow,\n  del: chalk.dim.gray.strikethrough,\n  link: chalk.blue,\n  href: chalk.blue.underline,\n\n  // Formats the bulletpoints and numbers for lists\n  list: function (body, ordered) {/* ... */},\n\n  // Reflow and print-out width\n  width: 80, // only applicable when reflow is true\n  reflowText: false,\n\n  // Should it prefix headers?\n  showSectionPrefix: true,\n\n  // Whether or not to undo marked escaping\n  // of enitities (\" -> &quot; etc)\n  unescape: true,\n\n  // Whether or not to show emojis\n  emoji: true,\n\n  // Options passed to cli-table3\n  tableOptions: {},\n\n  // The size of tabs in number of spaces or as tab characters\n  tab: 3 // examples: 4, 2, \\t, \\t\\t\n\n  image: function (href, title, text) {} // function for overriding the default image handling.\n};\n```\n\n#### Example of overriding defaults\n\n```javascript\nmarked.setOptions({\n  renderer: new TerminalRenderer({\n    codespan: chalk.underline.magenta\n  })\n});\n```\n\n### `highlightOptions`\n\nOptions passed into [cli-highlight](https://github.com/felixfbecker/cli-highlight). See readme there to see what options to pass.\n\nSee [more examples](./example/)\n\n## Related\n\n- [ink-markdown](https://github.com/cameronhunter/ink-markdown) - Markdown component for Ink\n","readmeFilename":"README.md"}