{"id":28893794,"url":"https://github.com/unplugin/unplugin-printer","last_synced_at":"2025-07-31T12:08:48.827Z","repository":{"id":191727838,"uuid":"685390920","full_name":"unplugin/unplugin-printer","owner":"unplugin","description":"✨ Print beautiful info in the terminal","archived":false,"fork":false,"pushed_at":"2023-08-31T14:26:18.000Z","size":376,"stargazers_count":31,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-21T03:09:59.525Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/unplugin.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":null,"support":null,"governance":null},"funding":{"github":["antfu"]}},"created_at":"2023-08-31T06:00:14.000Z","updated_at":"2025-03-20T04:09:38.000Z","dependencies_parsed_at":"2023-09-01T03:28:40.901Z","dependency_job_id":null,"html_url":"https://github.com/unplugin/unplugin-printer","commit_stats":null,"previous_names":["webfansplz/unplugin-printer","unplugin/unplugin-printer"],"tags_count":2,"template":false,"template_full_name":"unplugin/unplugin-starter","purl":"pkg:github/unplugin/unplugin-printer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unplugin%2Funplugin-printer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unplugin%2Funplugin-printer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unplugin%2Funplugin-printer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unplugin%2Funplugin-printer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unplugin","download_url":"https://codeload.github.com/unplugin/unplugin-printer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unplugin%2Funplugin-printer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268036141,"owners_count":24185161,"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","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-06-21T03:09:25.507Z","updated_at":"2025-07-31T12:08:48.819Z","avatar_url":"https://github.com/unplugin.png","language":"TypeScript","readme":"# unplugin-printer\n\n\u003c!-- \u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/unplugin-printer\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\u003cimg src=\"https://badgen.net/npm/v/unplugin-printer\" alt=\"NPM Version\" /\u003e\u003c/a\u003e\n \u003ca href=\"https://github.com/unplugin/unplugin-printer/blob/main/LICENSE\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\u003cimg src=\"https://badgen.net/github/license/unplugin/unplugin-printer\" alt=\"License\" /\u003e\u003c/a\u003e\n\u003c/p\u003e --\u003e\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"./screenshot.png\" alt=\"unplugin-printer\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://stackblitz.com/edit/unplugin-printer-vite?file=vite.config.ts\u0026view=editor\"\u003e\u003cimg src=\"https://developer.stackblitz.com/img/open_in_stackblitz.svg\" alt=\"\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\n## Install\n\n```bash\nnpm i unplugin-printer\n```\n\n## Features\n\n- User-friendly options\n\n- Customizable styles\n\n- Supports async functions\n\n## Options\n\n`unplugin-printer` uses [kolorist](https://github.com/marvinhagemeister/kolorist) and [boxen](https://github.com/sindresorhus/boxen) to customize the text color and style of the output. You can refer to the documentation to explore the available options in detail.\n\n```ts\nimport type * as kolorist from 'kolorist'\n\nimport type { Options as BoxenOptions } from 'boxen'\n\ntype Kolorist = typeof kolorist\n\ntype MessageValue = BoxenOptions \u0026 { text: string }\n\ntype Message = string | MessageValue | ((kolorist: Kolorist) =\u003e string | MessageValue | Promise\u003cstring | MessageValue | void\u003e)\n\ninterface Options {\n  info: Message[]\n}\n```\n\n## Usage\n\n```ts\n// vite.config.ts\n\nimport Printer from 'unplugin-printer/vite'\n\nexport default defineConfig({\n  plugins: [\n    Printer({\n      info: [\n        // 1. use string value\n        'Hello World',\n\n        // 2. use object to customize the style\n        { text: 'Hello World', padding: 1, margin: 1, borderColor: 'green' },\n\n        // 3. use function to customize the text color and style\n        (kolorist) =\u003e {\n          return {\n            text: kolorist.yellow('Hello World'),\n            padding: 1,\n            margin: 1,\n          }\n        },\n\n        // 4. use with async function\n        async (kolorist) =\u003e {\n          const text = await fetch('https://api.github.com/repos/unplugin/unplugin-printer')\n            .then(res =\u003e res.json())\n            .then(res =\u003e res.description)\n\n          return {\n            text: kolorist.yellow(text),\n            padding: 1,\n            margin: 1,\n          }\n        },\n      ]\n    }),\n  ],\n})\n```\n\n\n\u003cdetails\u003e\n\u003csummary\u003eVite\u003c/summary\u003e\u003cbr\u003e\n\n```ts\n// vite.config.ts\nimport Printer from 'unplugin-printer/vite'\n\nexport default defineConfig({\n  plugins: [\n    Printer({ /* options */ }),\n  ],\n})\n```\n\n\u003cbr\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eWebpack\u003c/summary\u003e\u003cbr\u003e\n\n```ts\n// webpack.config.js\nmodule.exports = {\n  /* ... */\n  plugins: [\n    require('unplugin-printer/webpack')({ /* options */ })\n  ]\n}\n```\n\n\u003cbr\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eNuxt\u003c/summary\u003e\u003cbr\u003e\n\n```ts\n// nuxt.config.js\nexport default defineNuxtConfig({\n  modules: [\n    ['unplugin-printer/nuxt', { /* options */ }],\n  ],\n})\n```\n\n\u003e This module works for both Nuxt 2 and [Nuxt Vite](https://github.com/nuxt/vite)\n\n\u003cbr\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eVue CLI\u003c/summary\u003e\u003cbr\u003e\n\n```ts\n// vue.config.js\nmodule.exports = {\n  configureWebpack: {\n    plugins: [\n      require('unplugin-printer/webpack')({ /* options */ }),\n    ],\n  },\n}\n```\n\n\u003cbr\u003e\u003c/details\u003e\n\n\n## License\n\nMIT License © 2023-PRESENT [webfansplz](./LICENSE)\n","funding_links":["https://github.com/sponsors/antfu"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funplugin%2Funplugin-printer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funplugin%2Funplugin-printer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funplugin%2Funplugin-printer/lists"}