{"id":13393666,"url":"https://github.com/nut-project/nut","last_synced_at":"2025-07-26T18:04:28.662Z","repository":{"id":40660056,"uuid":"176462890","full_name":"nut-project/nut","owner":"nut-project","description":"🌰 A framework born for micro frontends","archived":false,"fork":false,"pushed_at":"2024-12-08T22:42:32.000Z","size":5962,"stargazers_count":109,"open_issues_count":19,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-29T11:50:19.546Z","etag":null,"topics":["cli","framework","microfrontends","nut","spa"],"latest_commit_sha":null,"homepage":"https://nut.js.org","language":"HTML","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/nut-project.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-19T08:30:23.000Z","updated_at":"2025-03-10T16:02:16.000Z","dependencies_parsed_at":"2024-06-19T02:02:48.181Z","dependency_job_id":"522afd03-5695-4010-8b15-93943daf6d07","html_url":"https://github.com/nut-project/nut","commit_stats":{"total_commits":585,"total_committers":4,"mean_commits":146.25,"dds":0.09059829059829061,"last_synced_commit":"672e123a975dc02ffc12a5bbad31a2c5a49fc776"},"previous_names":["fengzilong/nut"],"tags_count":317,"template":false,"template_full_name":null,"purl":"pkg:github/nut-project/nut","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nut-project%2Fnut","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nut-project%2Fnut/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nut-project%2Fnut/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nut-project%2Fnut/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nut-project","download_url":"https://codeload.github.com/nut-project/nut/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nut-project%2Fnut/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267205993,"owners_count":24052762,"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-26T02:00:08.937Z","response_time":62,"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":["cli","framework","microfrontends","nut","spa"],"created_at":"2024-07-30T17:00:58.357Z","updated_at":"2025-07-26T18:04:28.604Z","avatar_url":"https://github.com/nut-project.png","language":"HTML","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg width=\"100px\" src=\"media/logo.png\" alt=\"nut logo\"\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eNUT Project\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@nut-project/cli\"\u003e\n    \u003cimg src=\"https://flat.badgen.net/npm/v/@nut-project/cli\" alt=\"npm version\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/nut-project/nut\"\u003e\n    \u003cimg src=\"https://flat.badgen.net/david/dep/nut-project/nut/packages/cli\" alt=\"dependencies\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/nut-project/nut\"\u003e\n    \u003cimg src=\"https://flat.badgen.net/npm/node/@nut-project/cli\" alt=\"node version\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://circleci.com/gh/nut-project/nut\"\u003e\n    \u003cimg src=\"https://flat.badgen.net/circleci/github/nut-project/nut/master\" alt=\"build status\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@nut-project/cli\"\u003e\n    \u003cimg src=\"https://flat.badgen.net/npm/dm/@nut-project/cli\" alt=\"npm downloads\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/nut-project/nut/blob/master/LICENSE\"\u003e\n    \u003cimg src=\"https://flat.badgen.net/npm/license/@nut-project/cli\" alt=\"license\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## Features\n\n- Flexible layout mechanism\n- File-based router system\n- Customizable layouts and themes\n- Builtin markdown support\n- System events\n- Configuration management\n- Convenient hot reload during development\n- Plugin system\n\n## layout / theme HMR\n\n\u003cimg src=\"media/hmr.gif\" alt=\"hmr.gif\" width=\"600px\"\u003e\n\n## markdown theme HMR\n\n\u003cimg src=\"media/markdown-theme-hmr.gif\" alt=\"markdown-theme-hmr.gif\" width=\"600px\"\u003e\n\n\n## System events\n\n\u003cimg src=\"media/system-events.jpg\" alt=\"system-events.jpg\" width=\"300px\"\u003e\n\n## Route matching\n\n\u003cimg src=\"media/route-match.jpg\" alt=\"route-match.jpg\" width=\"300px\"\u003e\n\n## Builtin layouts\n\n#### default\n\n| ocean | sakura |\n| :---: | :---: |\n| ![ocean](media/default-ocean.jpg) | ![sakura](media/default-sakura.jpg) |\n\n#### saber\n\n| ocean | sakura |\n| :---: | :---: |\n| ![ocean](media/saber-ocean.jpg) | ![sakura](media/saber-sakura.jpg) |\n\n#### now\n\n\u003cimg src=\"media/now.jpg\" alt=\"now\" width=\"400px\"\u003e\n\n### How to write a layout\n\n...\n\n### How to write a plugin\n\nA standard plugin looks like\n\n```js\nexport default {\n  name: 'your-superb-plugin',\n  // some special plugin need specify type，but you can ignore this in most cases\n  type: 'login',\n  apply( ctx = {}, options = {} ) {\n    const { api, events } = ctx\n\n    api.expose( 'method_name', () =\u003e {} )\n    api.expose( 'prop', 'value' )\n\n    events.on( 'system:before-startup', async ctx =\u003e {\n      await api.axios() // do some request\n      await events.pluginEmit( 'some-event', data ) // emit plugin event out\n    } )\n  }\n}\n```\n\nYou can expose some methods or props to application, or listen for system events, emit out some event in plugin\n\n#### Using plugin\n\nnut.config.js\n\n```js\nmodule.exports = {\n  plugins: {\n    superb: {\n      package: 'your-superb-plugin',\n      enable: true,\n    }\n  }\n}\n```\n\nsuperb is the name in current application\n\nUse above plugin for example\n\n```js\n// plugin exposed\nctx.use( 'superb', 'method_name' )\nctx.use( 'superb', 'prop' )\n\n// plugin events\nctx.events.on( 'plugin:superb:some-event', async data =\u003e {} )\n```\n\n## Get started\n\n```bash\nyarn global add @nut-project/cli\n```\n\n```bash\nnut # develop locally\nnut --prod # build for production\n```\n","funding_links":[],"categories":["Tools","Uncategorized","Tooling","cli"],"sub_categories":["Uncategorized","Frameworks"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnut-project%2Fnut","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnut-project%2Fnut","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnut-project%2Fnut/lists"}