{"id":15573036,"url":"https://github.com/brigjs/brig","last_synced_at":"2026-03-18T00:04:14.985Z","repository":{"id":12511606,"uuid":"15181313","full_name":"BrigJS/brig","owner":"BrigJS","description":"User Interface Toolkits for Node.js","archived":false,"fork":false,"pushed_at":"2017-10-02T07:38:16.000Z","size":863,"stargazers_count":314,"open_issues_count":10,"forks_count":27,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-05-07T17:49:55.731Z","etag":null,"topics":["c-plus-plus","nodejs","qml"],"latest_commit_sha":null,"homepage":"","language":"C++","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/BrigJS.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}},"created_at":"2013-12-14T06:36:40.000Z","updated_at":"2025-04-29T06:55:49.000Z","dependencies_parsed_at":"2022-09-16T23:10:40.312Z","dependency_job_id":null,"html_url":"https://github.com/BrigJS/brig","commit_stats":null,"previous_names":["cfsghost/brig"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrigJS%2Fbrig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrigJS%2Fbrig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrigJS%2Fbrig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrigJS%2Fbrig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BrigJS","download_url":"https://codeload.github.com/BrigJS/brig/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252931391,"owners_count":21827104,"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","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":["c-plus-plus","nodejs","qml"],"created_at":"2024-10-02T18:10:13.512Z","updated_at":"2026-03-18T00:04:14.947Z","avatar_url":"https://github.com/BrigJS.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/cfsghost/brig\"\u003e\n\u003cimg src=\"https://cloud.githubusercontent.com/assets/252072/26544332/0329d67c-4494-11e7-9dc3-7dbaccfc5bd8.png\"\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\nBrig\n====\n\nA user interface toolkit for Node.js, which is based on Qt for rendering. This project can be used to load and play QML file, make it possible to have a easy way to communicate between QML and Node.js for desktop application.\n\n[![NPM](https://nodei.co/npm/brig.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://nodei.co/npm/brig/)\n\n## The JavaScript in QML is limited, so `Brig`\n\nThe JavaScript in QML is limited, which is used for QML components control only. If developer need more functions that something's like system calls(FileSystem, Socket, crypto ...etc) or using external libraries, C/C++ is the only way to make it.\n\nIn order to make QML application in pure JavaScript possible, `Brig` provides a way to use Node.js to extends QML without C/C++. That means developer can do more thing in QML with NPM modules and Node.js APIs.\n\n## Requirements\n\nEnsure Qt 5+ tookits and Node.js 0.10+ are ready to go on your system.\n\nFor MacOSX user, no need to install Qt development environment for brig anymore. :-)\n\n## Known Issues\n\n* Failed to build brig for Qt 5.8+\n\n## Installation\n\nInstall module via NPM\n```\nnpm install brig\n```\n\n## Get Started\n\nThere is a simple way to go by loading existed QML file, so you can prepare a QML content like below:\n\n__Application.qml__\n```qml\nimport QtQuick 2.3\nimport QtQuick.Controls 1.0\n\nApplicationWindow {\n\tvisible: true;\n\tcolor: 'black';\n\ttitle: 'Brig Demo';\n\twidth: 640;\n\theight: 480;\n\n\tText {\n\t\tanchors.centerIn: parent;\n\t\ttext: 'Brig';\n\t\tfont.family: 'Helvetica';\n\t\tfont.bold: true;\n\t\tfont.pointSize: 72;\n\t\tcolor: '#00ffcc';\n\t\tscale: 0;\n\t\topacity: 0;\n\n\t\tText {\n\t\t\tanchors.topMargin: 10;\n\t\t\tanchors.top: parent.bottom;\n\t\t\tanchors.horizontalCenter: parent.horizontalCenter;\n\t\t\ttext: 'QML Application in Node.js';\n\t\t\tfont.family: 'Helvetica';\n\t\t\tfont.pointSize: 16;\n\t\t\tcolor: '#e6fffa';\n\t\t}\n\n\t\tBehavior on opacity {\n\t\t\tNumberAnimation {\n\t\t\t\tduration: 800;\n\t\t\t\teasing.type: Easing.OutCubic;\n\t\t\t}\n\t\t}\n\n\t\tBehavior on scale {\n\t\t\tNumberAnimation {\n\t\t\t\tduration: 1000;\n\t\t\t\teasing.type: Easing.OutBack;\n\t\t\t}\n\t\t}\n\n\t\tComponent.onCompleted: {\n\t\t\topacity = 1.0;\n\t\t\tscale = 1.0;\n\t\t}\n\t}\n}\n```\n\nThen using `Brig` to load file in Node.js:\n\n```javascript\nvar Brig = require('brig');\n\nvar brig = new Brig();\n\nbrig.on('ready', function(brig) {\n\n  // Loading QML file to play\n  brig.open('Application.qml', function(err, window) {\n    // window was opened\n  });\n});\n\n```\n\n## Customized Type\n\n_(This is experimental feature, API might be changed in the next version)_\n\nYou can create a customized type in order to expose some APIs or functionality from Node.js to QML, see below:\n\n```javascript\nvar myQmlType = brig.createType('MyItem', {\n\tproperty: {\n\t\tprop1: 123\n\t},\n\tmethod: {\n\t\t'readFile(a)': function(filename) {\n\t\t\treturn require('fs').readFileSync(filename).toString();\n\t\t}\n\t},\n\tsignal: [\n\t\t'test(a)'\n\t]\n});\n\n// Triggered when instance of customized type was created\nmyQmlType.on('instance-created', function(instance) {\n\n\t// Signals\n\tinstance.on('test', function(a) {\n\t\t// test(a) signal was emitted\n\t\tconsole.log(a);\n\t});\n});\n```\n\nIn QML, we can import customized type with its type name and use it directly:\n\n```qml\nimport Brig.MyItem 1.0\n```\n\nUsage:\n```\nMyItem {\n\t// attributes...\n}\n```\n\n## Examples\n\nSome exmaples you can found which used brig:\n\n* [Example App](https://github.com/cfsghost/brig-example-app)\n\t* Example application for a demo\n* [FishFarming](https://github.com/cfsghost/FishFarmingBrowser)\n\t* Web browser\n* [Hankathon](https://github.com/HanGee/Hankathon)\n\t* A countdown timer for hackathon event\n\n## Demonstration\n\nHere is a great countdown timer with `Brig` for hackathon event to show off, you can click image to play YouTube video:\n\n[![Countdown Timer](https://cloud.githubusercontent.com/assets/252072/7604018/44697ee8-f96f-11e4-9690-db826fccbc22.png)](http://www.youtube.com/watch?v=D6CnZfK723M)\n(clicks to play video)\n\n## License\n\nLicensed under the MIT License\n\n## Authors\n\nCopyright(c) 2015-2017 Fred Chien \u003c\u003ccfsghost@gmail.com\u003e\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrigjs%2Fbrig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrigjs%2Fbrig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrigjs%2Fbrig/lists"}