{"id":112220,"date":"2026-08-12T12:00:00","date_gmt":"2026-08-12T12:00:00","guid":{"rendered":"https:\/\/www.red-gate.com\/simple-talk\/?p=112220"},"modified":"2026-08-03T15:54:23","modified_gmt":"2026-08-03T15:54:23","slug":"how-to-use-the-power-bi-desktop-bridge-to-automate-tasks-in-power-bi-desktop-and-github-copilot","status":"publish","type":"post","link":"https:\/\/www.red-gate.com\/simple-talk\/data-analytics\/powerbi\/how-to-use-the-power-bi-desktop-bridge-to-automate-tasks-in-power-bi-desktop-and-github-copilot\/","title":{"rendered":"How to use the Power BI Desktop Bridge to automate tasks in Power BI Desktop and GitHub Copilot\u00a0"},"content":{"rendered":"\n<p><strong>Microsoft continues to blur the line between low-code visual tools and code-first development for <a href=\"https:\/\/www.red-gate.com\/simple-talk\/databases\/sql-server\/bi-sql-server\/power-bi-part-1-introduction\/\" target=\"_blank\" rel=\"noreferrer noopener\">Power BI<\/a>, recently launching a set of official <a href=\"https:\/\/learn.microsoft.com\/en-us\/fabric\/fundamentals\/skills-for-fabric-overview\" target=\"_blank\" rel=\"noreferrer noopener\">Fabric AI Skills<\/a> and the <a href=\"https:\/\/learn.microsoft.com\/en-us\/power-bi\/developer\/agentic\/power-bi-desktop-bridge-overview\" target=\"_blank\" rel=\"noreferrer noopener\">Power BI Desktop Bridge<\/a> preview feature<\/strong>. <strong>Together, they allow AI agents to install command-line tools, inspect a running Power BI Desktop process, update a report or model in the <a href=\"https:\/\/learn.microsoft.com\/en-us\/power-bi\/developer\/projects\/projects-overview\" target=\"_blank\" rel=\"noreferrer noopener\">Power BI project format (PBIP)<\/a>, and reload the report so that changes appear immediately.<\/strong> <\/p>\n\n\n\n<p><strong>This is great news &#8211; no more closing and opening Power BI Desktop to make changes to a report or <a href=\"https:\/\/learn.microsoft.com\/en-us\/power-bi\/connect-data\/service-datasets-understand\" target=\"_blank\" rel=\"noreferrer noopener\">semantic model<\/a> inside a Power BI Project file! <\/strong><\/p>\n\n\n\n<p><strong>This complete guide walks through everything you need to know, including the full setup. Learn how to install the Fabric AI Skills, enable the bridge in Power BI Desktop, convert a report to the PBIP format, and use GitHub Copilot&#8217;s agent mode to make live edits. It also covers agent hooks, a governance feature that lets teams control what the AI agent installs and runs &#8211; keeping dependencies scoped to your project instead of your <em>whole machine<\/em>.<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-do-you-need-to-use-the-power-bi-desktop-bridge\">What do you need to use the Power BI Desktop Bridge?<\/h2>\n\n\n\n<p><strong>To use the Power BI Desktop Bridge to automate tasks in Power BI Desktop and Github Copilot, you&#8217;ll need the following:<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-visual-studio-code\">Visual Studio Code<\/h3>\n\n\n\n<p><a href=\"https:\/\/code.visualstudio.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Visual Studio Code<\/a> (VS Code) is a wonderful, free development tool. Now&#8217;s a great time to learn it if you haven&#8217;t already, with an increasing number of AI features that integrate with Microsoft products being added.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-github-copilot\">GitHub Copilot<\/h3>\n\n\n\n<p>More specifically, <a href=\"https:\/\/github.com\/features\/copilot\" target=\"_blank\" rel=\"noreferrer noopener\">GitHub Copilot<\/a> with the agent experience enabled. Keep in mind that this is a &#8216;free&#8217; tool, and the companies behind these tools are interested in growing their customer base, so are likely less strict on data privacy. Free is not <em>really<\/em> free, after all. <\/p>\n\n\n\n<p>So, if you&#8217;re working with company <a href=\"https:\/\/www.red-gate.com\/simple-talk\/databases\/sql-server\/bi-sql-server\/power-bi-introduction-building-reports-in-power-bi-desktop-part-7\/\" target=\"_blank\" rel=\"noreferrer noopener\">Power BI reports<\/a>, a <a href=\"https:\/\/github.com\/features\/copilot\/plans\" target=\"_blank\" rel=\"noreferrer noopener\">GitHub Copilot Enterprise<\/a> license is the preferred choice for <a href=\"https:\/\/www.red-gate.com\/simple-talk\/databases\/sql-server\/database-administration-sql-server\/storage-101-data-security-and-privacy\/\" target=\"_blank\" rel=\"noreferrer noopener\">data security and privacy<\/a>. It also lets you isolate GenAI models to the ones deployed in your <a href=\"https:\/\/www.red-gate.com\/simple-talk\/cloud\/azure\/\" target=\"_blank\" rel=\"noreferrer noopener\">Azure<\/a> tenant. If you only have a free or personal subscription, use sample Power BI reports that you don&#8217;t mind being used for training.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-power-bi-desktop\">Power BI Desktop<\/h3>\n\n\n\n<p>This is quite essential (and self-explanatory)! Ideally, have it updated to the release containing the <a href=\"https:\/\/community.fabric.microsoft.com\/t5\/Power-BI-Updates-Blog\/Power-BI-June-2026-Feature-Summary\/ba-p\/5193264\" target=\"_blank\" rel=\"noreferrer noopener\">June 2026 preview features<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-you-will-also-need\">You will also need:<\/h3>\n\n\n\n<p><a href=\"https:\/\/nodejs.org\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Node.js<\/strong><\/a> installed on your machine. The Fabric AI Skills rely on two npm-based command-line tools.&nbsp;<\/p>\n\n\n<div class=\"block-core-list\">\n<ul class=\"wp-block-list\">\n<li>The <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=analysis-services.powerbi-modeling-mcp\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Power BI Modeling MCP server<\/strong><\/a> extension for VS Code. This extension is free and gives the agent a direct connection to the semantic model.&nbsp;<\/li>\n<\/ul>\n<\/div>\n\n<div class=\"block-core-list\">\n<ul class=\"wp-block-list\">\n<li>A <a href=\"https:\/\/learn.microsoft.com\/en-us\/power-bi\/developer\/projects\/projects-overview\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Power BI report saved in the Power BI project file format (PBIP)<\/strong><\/a>. I\u2019ll provide a sample later in the walkthrough.<\/li>\n<\/ul>\n<\/div>\n\n\n<p>And that&#8217;s everything. It&#8217;s a long list of prerequisites, yes, but provides the kind of foundation that feels more and more necessary in today&#8217;s AI world. Thankfully, aside from GitHub Copilot, everything is (mostly) free.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-to-install-the-microsoft-fabric-ai-skills\">How to install the Microsoft Fabric AI Skills<\/h2>\n\n\n\n<p><strong>The <a href=\"https:\/\/github.com\/microsoft\/skills-for-fabric\" target=\"_blank\" rel=\"noreferrer noopener\">Fabric AI Skills<\/a> are a set of instructions that Microsoft now maintains in its own GitHub repository. You install them as plugins inside the GitHub Copilot agent panel in Visual Studio Code. Here&#8217;s how.<\/strong><\/p>\n\n\n\n<p>First, open Visual Studio Code, followed by the Copilot chat panel:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"54\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-1024x54.png\" alt=\"The GitHub Copilot chat panel in Visual Studio Code.\" class=\"wp-image-112221\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-1024x54.png 1024w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-300x16.png 300w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-768x40.png 768w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image.png 1120w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><em>The GitHub Copilot chat panel in Visual Studio Code.<\/em><\/figcaption><\/figure>\n\n\n\n<p>Click the gear icon labeled <strong>Open Customizations<\/strong>:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"570\" height=\"166\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-1.png\" alt=\"Opening the Customizations options in the GitHub Copilot chat panel.\" class=\"wp-image-112222\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-1.png 570w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-1-300x87.png 300w\" sizes=\"auto, (max-width: 570px) 100vw, 570px\" \/><figcaption class=\"wp-element-caption\"><em>Opening the Customizations options in the GitHub Copilot chat panel<\/em>.<\/figcaption><\/figure>\n\n\n\n<p>Next, under the <strong>Plugins<\/strong> options, select <strong>Install Plugin from Source<\/strong>:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"217\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-2-1024x217.png\" alt=\"An image showing how to select the option to install a plugin from a source repository.\" class=\"wp-image-112223\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-2-1024x217.png 1024w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-2-300x63.png 300w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-2-768x163.png 768w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-2.png 1120w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><em>Selecting the option to install a plugin from a source repository<\/em>.<\/figcaption><\/figure>\n\n\n\n<p>Now enter the repository URL at the top of VS Code: https:\/\/github.com\/microsoft\/skills-for-fabric<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"144\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-3-1024x144.png\" alt=\"Entering the Microsoft Fabric Skills repository URL.\" class=\"wp-image-112224\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-3-1024x144.png 1024w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-3-300x42.png 300w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-3-768x108.png 768w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-3.png 1120w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><em>Entering the Microsoft Fabric Skills repository URL<\/em>.<\/figcaption><\/figure>\n\n\n\n<p>Select the skills you want. For this walkthrough I used the <strong>Power BI authoring<\/strong> skill, but you can of course enable whatever skill(s) you need:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"288\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-4-1024x288.png\" alt=\"Selecting the Power BI authoring skill from the Microsoft Fabric skills repository.\" class=\"wp-image-112225\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-4-1024x288.png 1024w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-4-300x84.png 300w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-4-768x216.png 768w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-4.png 1120w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><em>Selecting the Power BI authoring skill from the Microsoft Fabric skills repository<\/em>.<\/figcaption><\/figure>\n\n\n\n<p>Once the skills are imported, GitHub Copilot can use them when you ask questions about Power BI development. The skills contain prompts and tool definitions that guide the agent toward commands that manipulate <a href=\"https:\/\/learn.microsoft.com\/en-us\/power-bi\/developer\/projects\/projects-report\" target=\"_blank\" rel=\"noreferrer noopener\">Power BI report (PBIR)<\/a> files, <a href=\"https:\/\/learn.microsoft.com\/en-us\/power-bi\/developer\/projects\/projects-dataset\" target=\"_blank\" rel=\"noreferrer noopener\">Tabular Model Definition Language (TMDL)<\/a> definitions, and the running Power BI Desktop instance.&nbsp;<\/p>\n\n\n\n<p><em>Not familiar with the terms PBIR and TMDL? They are the text-based formats for the report (PBIR) and semantic model (TMDL) that are stored when you save a Power BI file as a <a href=\"https:\/\/learn.microsoft.com\/en-us\/power-bi\/developer\/projects\/projects-overview\" target=\"_blank\" rel=\"noreferrer noopener\">Power BI Project (PBIP)<\/a>.&nbsp;<\/em><\/p>\n\n\n\n<section id=\"my-first-block-block_f1b8ff5a5af6a6e8cfb92d0919113888\" class=\"my-first-block alignwide\">\n    <div class=\"bg-brand-600 text-base-white py-5xl px-4xl rounded-sm bg-gradient-to-r from-brand-600 to-brand-500 red\">\n        <div class=\"gap-4xl items-start md:items-center flex flex-col md:flex-row justify-between\">\n            <div class=\"flex-1 col-span-10 lg:col-span-7\">\n                <h3 class=\"mt-0 font-display mb-2 text-display-sm\">Simple Talk is brought to you by Redgate Software<\/h3>\n                <div class=\"child:last-of-type:mb-0\">\n                                            Take control of your databases with the trusted Database DevOps solutions provider. Automate with confidence, scale securely, and unlock growth through AI.                                    <\/div>\n            <\/div>\n                                            <a href=\"https:\/\/www.red-gate.com\/solutions\/overview\/\" class=\"btn btn--secondary btn--lg\" aria-label=\"Discover how Redgate can help you: Simple Talk is brought to you by Redgate Software\">Discover how Redgate can help you<\/a>\n                    <\/div>\n    <\/div>\n<\/section>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-to-enable-the-power-bi-desktop-bridge-nbsp\">How to enable the Power BI Desktop Bridge&nbsp;<\/h2>\n\n\n\n<p><strong>The Power BI Desktop Bridge is the preview feature that makes hot reloading possible. It was introduced in the June 2026 release of Power BI Desktop, so make sure you are on that version. Without it, every change the agent makes to the report files would require you to close Power BI Desktop and reopen it manually. With the bridge enabled, the agent can ask Power BI Desktop to reload the report after it has finished making changes.&nbsp;<\/strong><\/p>\n\n\n\n<p><strong>Here&#8217;s how to enable the Power BI Desktop Bridge:<\/strong><\/p>\n\n\n\n<p>Open Power BI Desktop and go to <strong>File &gt; Options and Settings &gt; Options<\/strong>:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"911\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-6-1024x911.png\" alt=\"Opening the Options dialog in Power BI Desktop.\" class=\"wp-image-112227\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-6-1024x911.png 1024w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-6-300x267.png 300w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-6-768x683.png 768w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-6.png 1069w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><em>Opening the Options dialog in Power BI Desktop<\/em>.<\/figcaption><\/figure>\n\n\n\n<p>Select <strong>Preview Features<\/strong> from the left-hand menu. Check the box for <strong>Enable external access to Power BI Desktop through secure local APIs<\/strong>, then click <strong>OK<\/strong>:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"808\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-7-1024x808.png\" alt=\"Enabling the Power BI Desktop Bridge in Preview Features.\" class=\"wp-image-112228\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-7-1024x808.png 1024w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-7-300x237.png 300w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-7-768x606.png 768w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-7.png 1120w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><em>Enabling the Power BI Desktop Bridge in Preview Features<\/em>.<\/figcaption><\/figure>\n\n\n\n<p>Power BI Desktop will now prompt you to restart, so do so. Upon restarting, the Power BI Desktop Bridge preview feature is now loaded.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-to-set-up-a-power-bi-project\">How to set up a Power BI project<\/h2>\n\n\n\n<p>We now need a PBIP file to work with. Here, I&#8217;ll use a small sample .pbix report and save it as a Power BI Project so that the agent can edit the text-based report and model files directly.&nbsp;Here&#8217;s how to do it.<\/p>\n\n\n\n<p>Open Visual Studio Code and select <strong>Terminal &gt; New Terminal<\/strong> from the menu:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"985\" height=\"86\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-5.png\" alt=\"Opening a new terminal in Visual Studio Code.\" class=\"wp-image-112226\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-5.png 985w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-5-300x26.png 300w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-5-768x67.png 768w\" sizes=\"auto, (max-width: 985px) 100vw, 985px\" \/><figcaption class=\"wp-element-caption\"><em>Opening a new terminal in Visual Studio Code<\/em>.<\/figcaption><\/figure>\n\n\n\n<p>In the terminal, run the following commands to create and open a fresh workspace:<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:tsql decode:true \">mkdir desktop-bridge-demo \ncd desktop-bridge-demo \ncode .<\/pre><\/div>\n\n\n\n<p><code>mkdir desktop-bridge-demo<\/code> creates a folder for the PBIP version of the sample project.&nbsp;<br><code>cd desktop-bridge-demo<\/code> moves into that folder.<br><code>code . o<\/code> opens VS Code with that folder loaded.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"351\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-8-1024x351.png\" alt=\"Creating the workspace folder and opening it in Visual Studio Code.\" class=\"wp-image-112229\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-8-1024x351.png 1024w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-8-300x103.png 300w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-8-768x263.png 768w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-8.png 1120w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><em>Creating the workspace folder and opening it in Visual Studio Code<\/em>.<\/figcaption><\/figure>\n\n\n\n<p>You must now download the sample .pbix file <a href=\"https:\/\/github.com\/kerski\/presentations\/blob\/main\/SampleModel\/SampleModel.pbix\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a> and open it in Power BI Desktop. You should see a report similar to the one below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"417\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-16-1024x417.png\" alt=\"An image showing the sample report opened in Power BI Desktop.\" class=\"wp-image-112239\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-16-1024x417.png 1024w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-16-300x122.png 300w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-16-768x313.png 768w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-16.png 1120w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><em>The sample report opened in Power BI Desktop<\/em>.<\/figcaption><\/figure>\n\n\n\n<p>In Power BI Desktop, go to <strong>File &gt; Save As &gt; Browse this device<\/strong>:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"993\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-13-1024x993.png\" alt=\"Choosing Save As to save the report to the local machine.\" class=\"wp-image-112240\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-13-1024x993.png 1024w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-13-300x291.png 300w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-13-768x745.png 768w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-13.png 1032w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><em>Choosing Save As to save the report to the local machine<\/em>.<\/figcaption><\/figure>\n\n\n\n<p>Navigate to the <code>desktop-bridge-demo<\/code> folder you created earlier, then change <strong>Save as type<\/strong> to <strong>Power BI project files<\/strong>:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"676\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-11-1024x676.png\" alt=\"Saving the report as Power BI project files.\" class=\"wp-image-112234\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-11-1024x676.png 1024w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-11-300x198.png 300w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-11-768x507.png 768w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-11.png 1120w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><em>Saving the report as Power BI project files<\/em>.<\/figcaption><\/figure>\n\n\n\n<p>This is the critical step. Without it, the files remain in the binary .pbix format and the agent cannot edit them directly.\u00a0<\/p>\n\n\n\n<p>Back in Visual Studio Code, you should now see <code>SampleModel.Report<\/code> and <code>SampleModel.SemanticModel<\/code> folders. These contain the text-based <a href=\"https:\/\/learn.microsoft.com\/en-us\/power-bi\/developer\/projects\/projects-report\" target=\"_blank\" rel=\"noreferrer noopener\">Power BI report (PBIR)<\/a> and <a href=\"https:\/\/learn.microsoft.com\/en-us\/power-bi\/developer\/projects\/projects-dataset\" target=\"_blank\" rel=\"noreferrer noopener\">Tabular Model Definition Language (TMDL)<\/a> files that represent this report. This text-based format is exactly what the AI needs so it can make changes, validate them, and commit the diff to Git.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-to-interact-with-the-power-bi-desktop-bridge\">How to interact with the Power BI Desktop Bridge<\/h2>\n\n\n\n<p>Now we can ask GitHub Copilot to interact with Power BI Desktop and automatically update the report.&nbsp;Open the Copilot chat panel in Visual Studio Code and make sure Agent mode is selected:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"468\" height=\"163\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-10.png\" alt=\"Selecting Agent mode in the Copilot chat panel.\" class=\"wp-image-112233\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-10.png 468w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-10-300x104.png 300w\" sizes=\"auto, (max-width: 468px) 100vw, 468px\" \/><figcaption class=\"wp-element-caption\"><em>Selecting Agent mode in the Copilot chat panel<\/em>.<\/figcaption><\/figure>\n\n\n\n<p>Ask the agent to duplicate the report page and reload. Then, connect to <code>SampleModel<\/code>, duplicate Page 1, refresh the report, and install the required <a href=\"https:\/\/aws.amazon.com\/what-is\/cli\/\" target=\"_blank\" rel=\"noreferrer noopener\">command line interfaces (CLIs)<\/a>.<\/p>\n\n\n\n<p><em>Regarding the latter: depending on the AI model you use, the agent sometimes skips the CLI installation step, so I add that phrase to coax it along. I&#8217;ve found that with some of the more frontier AI models in 2026, such as <a href=\"https:\/\/www.anthropic.com\/claude\/fable\" target=\"_blank\" rel=\"noreferrer noopener\">Claude Fable<\/a>, this is not necessary.<\/em><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"747\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-15-1024x747.png\" alt=\"Asking the agent to connect to the model, duplicate a page, and install the required CLIs.\" class=\"wp-image-112237\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-15-1024x747.png 1024w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-15-300x219.png 300w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-15-768x560.png 768w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-15.png 1073w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><em>Asking the agent to connect to the model, duplicate a page, and install the required CLIs<\/em>.<\/figcaption><\/figure>\n\n\n\n<p>So what exactly is the agent installing? Well, the Fabric AI Skills don&#8217;t talk <em>directly<\/em> to Power BI Desktop. Instead, they instruct the agent to install and run two npm packages:&nbsp;<\/p>\n\n\n<div class=\"block-core-list\">\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.npmjs.com\/package\/@microsoft\/powerbi-desktop-bridge-cli\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Power BI Desktop Bridge CLI<\/strong><\/a> (@microsoft\/powerbi-desktop-bridge-cli): this finds the running Power BI Desktop process and can trigger a reload.<br><\/li>\n<\/ul>\n<\/div>\n\n<div class=\"block-core-list\">\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.npmjs.com\/package\/@microsoft\/powerbi-report-authoring-cli\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Report Authoring CLI<\/strong><\/a> (@microsoft\/powerbi-report-authoring-cli): this validates, updates, and formats PBIR files.&nbsp;<\/li>\n<\/ul>\n<\/div>\n\n\n<p>These packages are registered by Microsoft on npm, so the agent downloads them with commands that look like <code>npm install -g powerbi-desktop-bridge<\/code> or similar global installs. The skills then call the installed binaries by name, such as <code>powerbi-desktop<\/code> or <code>powerbi-report-author<\/code>.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"729\" height=\"1024\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-17-729x1024.png\" alt=\"The two npm packages that the Fabric AI Skills use to interact with Power BI Desktop.\" class=\"wp-image-112241\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-17-729x1024.png 729w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-17-213x300.png 213w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-17-768x1079.png 768w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-17.png 1044w\" sizes=\"auto, (max-width: 729px) 100vw, 729px\" \/><figcaption class=\"wp-element-caption\"><em>The two npm packages the Fabric AI Skills use to interact with Power BI Desktop<\/em>.<\/figcaption><\/figure>\n\n\n\n<p>At the time of writing, the instructions in the skills files use a global install. This is fine for a quick demo but creates problems for teams, because:<\/p>\n\n\n<div class=\"block-core-list\">\n<ul class=\"wp-block-list\">\n<li>The installed version is <em>not<\/em> tracked in <a href=\"https:\/\/en.wikipedia.org\/wiki\/Version_control\" target=\"_blank\" rel=\"noreferrer noopener\">source (version) control<\/a>.<br><\/li>\n<\/ul>\n<\/div>\n\n<div class=\"block-core-list\">\n<ul class=\"wp-block-list\">\n<li>Different projects may need different versions of the CLI.&nbsp;<br><\/li>\n<\/ul>\n<\/div>\n\n<div class=\"block-core-list\">\n<ul class=\"wp-block-list\">\n<li>Global installs can conflict with other tools or organizational policies.&nbsp;<br><\/li>\n<\/ul>\n<\/div>\n\n<div class=\"block-core-list\">\n<ul class=\"wp-block-list\">\n<li>A security fix in one global package affects every project on the machine.&nbsp;<\/li>\n<\/ul>\n<\/div>\n\n\n<p>If you&#8217;ve worked in <a href=\"https:\/\/www.red-gate.com\/simple-talk\/development\/dotnet-development\/10-reasons-python-better-than-c-sharp\/\" target=\"_blank\" rel=\"noreferrer noopener\">Python<\/a>, <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\" target=\"_blank\" rel=\"noreferrer noopener\">JavaScript<\/a>, or <a href=\"https:\/\/dotnet.microsoft.com\/en-us\/\" target=\"_blank\" rel=\"noreferrer noopener\">.NET (dotnet)<\/a>, you&#8217;re probably already used to keeping dependencies local to the workspace. We have virtual environments, local <code>node_modules<\/code>, and solution-level packages for exactly this reason. We can do the same here with GitHub Copilot agent hooks, which I cover in the <a href=\"bookmark:\/\/introducing-agent-hooks\" target=\"_blank\" rel=\"noreferrer noopener\">Agent Hooks<\/a> section.&nbsp;<\/p>\n\n\n\n<div id=\"callout-block_d51cd2ecfba2eea2b377491d8752188d\" class=\"callout alignnone\">\n    <div class=\"child-last:mb-0 child-first:mt-0 bg-gray-50 dark:bg-gray-950 p-4xl my-3xl\">\n\n<p><strong>You may also be interested in&#8230;<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/www.red-gate.com\/simple-talk\/development\/dotnet-development\/\" target=\"_blank\" rel=\"noreferrer noopener\">The full selection of .NET articles and guides on Simple Talk.<\/a><\/p>\n\n<\/div>\n<\/div> \n\n\n<p>Now, back to the step-by-step guide. When the agent asks to install the npm packages, approve the installation:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"729\" height=\"1024\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-18-729x1024.png\" alt=\"npm package checks and subsequent installation by the agent.\" class=\"wp-image-112242\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-18-729x1024.png 729w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-18-213x300.png 213w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-18-768x1079.png 768w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-18.png 1044w\" sizes=\"auto, (max-width: 729px) 100vw, 729px\" \/><figcaption class=\"wp-element-caption\"><em>npm package checks and subsequent installation by the agent<\/em>.<\/figcaption><\/figure>\n\n\n\n<p>As the agent progresses, it uses the skills to duplicate the appropriate <a href=\"https:\/\/www.red-gate.com\/simple-talk\/databases\/oracle-databases\/json-for-absolute-beginners-part-1-introduction\/\" target=\"_blank\" rel=\"noreferrer noopener\">JSON<\/a> files in the <code>.Report<\/code> folder:&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"610\" height=\"1024\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-19-610x1024.png\" alt=\"The agent duplicating page JSON in the report folder.\" class=\"wp-image-112243\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-19-610x1024.png 610w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-19-179x300.png 179w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-19-768x1289.png 768w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-19-915x1536.png 915w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-19.png 1068w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><figcaption class=\"wp-element-caption\"><em>The agent duplicating page JSON in the report folder<\/em>.<\/figcaption><\/figure>\n\n\n\n<p>Next, the agent runs the <code>powerbi-report-authoring<\/code> CLI to validate the report. This is a crucial step whereby the CLI ensures the changes the agent made meet PBIR standards:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"859\" height=\"1024\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-21-859x1024.png\" alt=\"The agent validating the report changes with the authoring CLI.\" class=\"wp-image-112245\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-21-859x1024.png 859w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-21-252x300.png 252w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-21-768x915.png 768w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-21.png 1048w\" sizes=\"auto, (max-width: 859px) 100vw, 859px\" \/><figcaption class=\"wp-element-caption\"><em>The agent validating the report changes with the authoring CLI<\/em>.<\/figcaption><\/figure>\n\n\n\n<p>If the validation passes, the agent turns to the <code>powerbi-desktop<\/code> CLI. It first runs a status command to find the port that the local Power BI Desktop instance is listening on. <\/p>\n\n\n\n<p>Every time you open a .pbip file in Power BI Desktop, a local version of <a href=\"https:\/\/learn.microsoft.com\/en-us\/analysis-services\/analysis-services-overview?view=sql-analysis-services-2025\" target=\"_blank\" rel=\"noreferrer noopener\">Analysis Services<\/a> starts on a random port, which lets agents and applications issue commands such as creating a <a href=\"https:\/\/www.red-gate.com\/simple-talk\/databases\/sql-server\/bi-sql-server\/using-dax-to-retrieve-tabular-data\/\" target=\"_blank\" rel=\"noreferrer noopener\">Data Analysis Expressions (DAX)<\/a> measure:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"327\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-14-1024x327.png\" alt=\"The agent discovering the Power BI Desktop process port.\" class=\"wp-image-112236\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-14-1024x327.png 1024w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-14-300x96.png 300w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-14-768x245.png 768w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-14.png 1048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><em>The agent discovering the Power BI Desktop process port<\/em>.<\/figcaption><\/figure>\n\n\n\n<p>Once the port is identified, the agent issues the reload command: <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"223\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-12-1024x223.png\" alt=\"The agent issuing the reload command through the Power BI Desktop Bridge.\" class=\"wp-image-112235\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-12-1024x223.png 1024w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-12-300x65.png 300w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-12-768x167.png 768w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-12.png 1041w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><em>The agent issuing the reload command through the Power BI Desktop Bridge<\/em>.<\/figcaption><\/figure>\n\n\n\n<p>In the past, you would have had to close and reopen Power BI Desktop to see the change. Now, the report updates immediately:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"743\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-22-1024x743.png\" alt=\"Power BI Desktop showing the duplicated page after the reload.\" class=\"wp-image-112246\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-22-1024x743.png 1024w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-22-300x218.png 300w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-22-768x557.png 768w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-22.png 1120w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><em>Power BI Desktop showing the duplicated page after the reload<\/em>.<\/figcaption><\/figure>\n\n\n\n<p>This is the part that feels amazing the first time you see it. It also removes a lot of friction from <a href=\"https:\/\/www.red-gate.com\/simple-talk\/ai\/the-best-ai-developer-tools-in-2026-from-coding-agents-to-code-review\/\" target=\"_blank\" rel=\"noreferrer noopener\">agentic development<\/a>. I expect Microsoft will continue refining these skills and CLIs as the bridge moves toward general availability.&nbsp;<\/p>\n\n\n\n<p><em>Note: You may notice that the <strong>Allow<\/strong> button slows down the process, but you can select auto-approve for the duration of the session so you do not have to respond to each permission. This is good design: Copilot asks you for permission for each tool and CLI call by default, and you have to deliberately lift those restrictions.&nbsp;<\/em><\/p>\n\n\n\n<p>Finally, just remember that this is a demo. Any time you&#8217;re working with AI and Power BI, I highly recommend using Git so you can roll back changes that the agent may mess up.&nbsp;<\/p>\n\n\n\n<section id=\"my-first-block-block_c792a2f9ff8c8b7e00c0688015f81b50\" class=\"my-first-block alignwide\">\n    <div class=\"bg-brand-600 text-base-white py-5xl px-4xl rounded-sm bg-gradient-to-r from-brand-600 to-brand-500 red\">\n        <div class=\"gap-4xl items-start md:items-center flex flex-col md:flex-row justify-between\">\n            <div class=\"flex-1 col-span-10 lg:col-span-7\">\n                <h3 class=\"mt-0 font-display mb-2 text-display-sm\">Subscribe to the Simple Talk newsletter<\/h3>\n                <div class=\"child:last-of-type:mb-0\">\n                                            Get selected articles, event information, podcasts and other industry content delivered straight to your inbox.                                    <\/div>\n            <\/div>\n                                            <a href=\"https:\/\/www.red-gate.com\/simple-talk\/subscribe\/\" class=\"btn btn--secondary btn--lg\" aria-label=\"Subscribe: Subscribe to the Simple Talk newsletter\">Subscribe<\/a>\n                    <\/div>\n    <\/div>\n<\/section>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-agent-hooks-in-visual-studio-code-and-github-copilot\">Agent hooks in Visual Studio Code and GitHub Copilot<\/h2>\n\n\n\n<p><strong>Agent hooks are a relatively new feature in Visual Studio Code and GitHub Copilot. They let you run a script before the agent executes a tool command. With a hook you can log the command, deny it, rewrite it, or redirect it to a local version.&nbsp;<\/strong><\/p>\n\n\n\n<p>The hook lives in a <code>.github\/hooks<\/code> folder in your project and is defined in JSON. The key property is pre-tool-use, which tells Copilot to run a script before it runs any tool command. That includes terminal commands such as npm install, or CLI invocations such as <code>powerbi-report-author<\/code> validate.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"258\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-20-1024x258.png\" alt=\"The .github\/hooksfolder containing the hook definition and reference to script.\" class=\"wp-image-112244\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-20-1024x258.png 1024w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-20-300x76.png 300w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-20-768x193.png 768w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-20.png 1120w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><em>The .github\/hooksfolder containing the hook definition and reference to script<\/em>.<\/figcaption><\/figure>\n\n\n\n<p>In my project, I created a <code>.github\/hooks<\/code> folder and added a JSON file that references a small JavaScript file in the scripts folder. The JavaScript file does two things.<\/p>\n\n\n\n<p>First, if the agent tries to run <code>npm install -g<\/code>, it rewrites the command to initialize a local <code>package.json<\/code> and install the package as a development dependency instead.&nbsp;<\/p>\n\n\n\n<p>Second, if the agent tries to run one of the Power BI CLIs directly, it prefixes the command with npx so that the local copy in <code>node_modules<\/code> is used.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"619\" height=\"1024\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-23-619x1024.png\" alt=\"The hook script that redirects global installs\/agent to perform local installs.\" class=\"wp-image-112247\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-23-619x1024.png 619w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-23-181x300.png 181w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-23-768x1271.png 768w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-23-928x1536.png 928w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/08\/image-23.png 1053w\" sizes=\"auto, (max-width: 619px) 100vw, 619px\" \/><figcaption class=\"wp-element-caption\"><em>The hook script that redirects global installs\/agent to perform local installs<\/em>.<\/figcaption><\/figure>\n\n\n\n<p>I&#8217;ve shared the hook file and script as gists: <a href=\"https:\/\/gist.github.com\/kerski\/a74ee046b890e6448baf8fecf73d69d5\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a> (hook file) and <a href=\"https:\/\/gist.github.com\/kerski\/ce77b44d852c722e16049e60a223a536\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a> (the script executed by the hook file.)<\/p>\n\n\n\n<p>The value of hooks is not just limited to this one scenario, however. Any time you want to enforce policy on what an agent is allowed to do, reduce <a href=\"https:\/\/learn.microsoft.com\/en-us\/dotnet\/ai\/conceptual\/understanding-tokens\" target=\"_blank\" rel=\"noreferrer noopener\">token usage<\/a>, or keep dependencies scoped to a workspace, hooks give you a place to intercept and shape the agent\u2019s behavior without modifying the original skills files. <\/p>\n\n\n\n<p>This is important because the skills files are maintained by Microsoft and, if you edit them locally, your changes will be overwritten the next time the plugin updates.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-prompts-to-help-you-leverage-the-bridge\">Prompts to help you leverage the bridge<\/h2>\n\n\n\n<p>This combination &#8211; Fabric AI Skills, the Power BI Desktop Bridge, and agent hooks &#8211; opens up a range of automation scenarios. Here are a few prompts you can try once the setup is in place:&nbsp;<\/p>\n\n\n<div class=\"block-core-list\">\n<ul class=\"wp-block-list\">\n<li><strong>\u201cConnect to my report and list the pages, measures, and tables in the model.\u201d<\/strong> This is a good way to verify that the agent can see both the files on disk <em>and<\/em> the running Power BI Desktop process.&nbsp;<\/li>\n<\/ul>\n<\/div>\n\n<div class=\"block-core-list\">\n<ul class=\"wp-block-list\">\n<li><strong>\u201cCreate a new report page named Executive Summary and add the Total Sales and Profit Margin measures as cards.\u201d<\/strong> The agent can update PBIR files and then reload the report so you see the new page immediately.&nbsp;<\/li>\n<\/ul>\n<\/div>\n\n<div class=\"block-core-list\">\n<ul class=\"wp-block-list\">\n<li><strong>\u201cTake snapshots of each page and build documentation on the report, its visuals, and any bookmarks.\u201d<\/strong> The report authoring CLI supports taking snapshots in PNG format and can help with documentation.&nbsp;<\/li>\n<\/ul>\n<\/div>\n\n\n<p>When writing prompts, I find it helps to be explicit about the model or report you want the agent to connect to and to include the word \u201creload\u201d when you want the changes reflected in Power BI Desktop. The skills are good at inferring context, but explicit instructions reduce the chance the agent asks for clarification or takes the wrong approach, which uses up tokens.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-why-does-all-of-this-actually-matter-for-teams\">Why does all of this actually <em>matter<\/em> for teams?<\/h2>\n\n\n\n<p><strong>The Power BI Desktop Bridge is more than a convenience. It moves Power BI development closer to a workflow where the source files in Git are the source of truth and an agent can apply changes to them reliably. <\/strong><\/p>\n\n\n\n<p>The bridge handles the mechanical step of reloading the report so the developer can stay focused on the intent of the change rather than the tooling.&nbsp;Agent hooks then add a governance layer on top of that &#8211; crucial in regulated environments or on shared virtual desktops where administrators often want to control <em>what<\/em> software is installed, and <em>where<\/em>. <\/p>\n\n\n\n<p>Hooks let you enforce those policies without blocking AI-assisted development entirely. You can redirect installs to a local scope, deny commands that touch production systems, or log every command for audit purposes.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-in-summary-how-to-use-the-power-bi-desktop-bridge-to-automate-tasks-in-power-bi-desktop-and-github-copilot-nbsp\">In summary: how to use the Power BI Desktop Bridge to automate tasks in Power BI Desktop and GitHub Copilot&nbsp;<\/h2>\n\n\n\n<p>The Power BI Desktop Bridge and the official Fabric AI Skills give GitHub Copilot the ability to interact with Power BI Desktop in ways that previously required manual steps. By enabling the preview feature and installing the skills, you can ask an agent to update a report or model and see the result without restarting Power BI Desktop.&nbsp;<\/p>\n\n\n\n<p>Behind the scenes, the skills install two npm-based CLI tools that handle process discovery, validation, and reloading. The current version of the skills installs those tools globally but, with GitHub Copilot agent hooks, you can redirect the installs to your workspace and run the tools locally with npx.&nbsp;<\/p>\n\n\n\n<p>If you&#8217;re working on a team interested in agentic development, I encourage you to experiment with the desktop bridge and hooks. They&#8217;re a small addition to your project but can have a large impact on how safely and consistently your team uses AI-assisted development with Power BI.&nbsp;<\/p>\n\n\n\n<section id=\"faq\" class=\"faq-block my-5xl\">\n    <h2>FAQs<\/h2>\n\n                        <h3 class=\"mt-4xl\">1. What is the Power BI Desktop Bridge?<\/h3>\n            <div class=\"faq-answer\">\n                <p>It&#8217;s a preview feature in Power BI Desktop (introduced June 2026) that exposes secure local APIs, letting an AI agent detect a running Power BI Desktop instance, update report or model files, and trigger a reload without restarting the application.<\/p>\n            <\/div>\n                    <h3 class=\"mt-4xl\">2. What do I need to use it?<\/h3>\n            <div class=\"faq-answer\">\n                <p>Visual Studio Code, GitHub Copilot with agent mode, an updated version of Power BI Desktop, Node.js, the Power BI Modeling MCP server extension, and a report saved in PBIP (Power BI Project) format rather than .pbix.<\/p>\n            <\/div>\n                    <h3 class=\"mt-4xl\">3. How do I enable the bridge in Power BI Desktop?<\/h3>\n            <div class=\"faq-answer\">\n                <p>Go to File &gt; Options and Settings &gt; Options &gt; Preview Features, then check &#8220;Enable external access to Power BI Desktop through secure local APIs&#8221; and restart the application.<\/p>\n            <\/div>\n                    <h3 class=\"mt-4xl\">4. What are the Fabric AI Skills?<\/h3>\n            <div class=\"faq-answer\">\n                <p>A set of Microsoft-maintained instructions installed as plugins in GitHub Copilot&#8217;s agent panel (from the <code class=\"bg-text-200\/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]\">microsoft\/skills-for-fabric<\/code> GitHub repo) that guide the agent to safely edit PBIR and TMDL files and call the bridge&#8217;s CLI tools.<\/p>\n            <\/div>\n                    <h3 class=\"mt-4xl\">5. What are agent hooks used for?<\/h3>\n            <div class=\"faq-answer\">\n                <p>Agent hooks are scripts that run before a Copilot tool command executes. They let teams intercept, rewrite, deny, or redirect commands &#8211; for example, forcing global npm installs to become local project dependencies instead.<\/p>\n            <\/div>\n            <\/section>\n","protected":false},"excerpt":{"rendered":"<p>Learn how Microsoft&#8217;s Power BI Desktop Bridge and Fabric AI Skills let GitHub Copilot edit and hot-reload Power BI reports. No restart needed!&hellip;<\/p>\n","protected":false},"author":344919,"featured_media":107492,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[159169,159160,53,159164,159166],"tags":[159075,4483,159047,158997,101611],"coauthors":[159224],"class_list":["post-112220","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai","category-data-analytics","category-featured","category-microsoft-fabric","category-powerbi","tag-ai","tag-data","tag-fabric","tag-microsoft-fabric","tag-power-bi"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/112220","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/users\/344919"}],"replies":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/comments?post=112220"}],"version-history":[{"count":11,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/112220\/revisions"}],"predecessor-version":[{"id":112366,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/112220\/revisions\/112366"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/media\/107492"}],"wp:attachment":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/media?parent=112220"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/categories?post=112220"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/tags?post=112220"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/coauthors?post=112220"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}