<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ben Racicot on Medium]]></title>
        <description><![CDATA[Stories by Ben Racicot on Medium]]></description>
        <link>https://medium.com/@benracicot?source=rss-aec6dd17f9ff------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*FdXuhnxlSxjOamVENO4cCA.jpeg</url>
            <title>Stories by Ben Racicot on Medium</title>
            <link>https://medium.com/@benracicot?source=rss-aec6dd17f9ff------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 20:48:50 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@benracicot/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Ollama vs ToolPiper: Model Runner or Model Platform]]></title>
            <link>https://benracicot.medium.com/ollama-vs-toolpiper-model-runner-or-model-platform-07758f60919e?source=rss-aec6dd17f9ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/07758f60919e</guid>
            <category><![CDATA[mcp-server]]></category>
            <category><![CDATA[ollama-webui]]></category>
            <category><![CDATA[ollama]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[mcps]]></category>
            <dc:creator><![CDATA[Ben Racicot]]></dc:creator>
            <pubDate>Mon, 13 Apr 2026 23:48:53 GMT</pubDate>
            <atom:updated>2026-04-14T00:04:03.320Z</atom:updated>
            <content:encoded><![CDATA[<p>Ollama is a model runner. ToolPiper is a model platform. Same models, different scope.</p><p>That one-sentence version is the honest summary, but the distinction between a runner and a platform determines which problems each tool solves, which it doesn’t, and when you’d pick one, the other, or both.</p><h4>What Ollama actually is</h4><p>Ollama is a Go binary that downloads GGUF model files, loads them into memory, and runs inference using llama.cpp with Metal GPU acceleration. It exposes a REST API on `localhost:11434`. That API is the product.</p><p>The design is intentionally minimal. Pull a model, run it, get tokens.</p><p>Ollama handles model management and GPU scheduling. It doesn’t handle user interfaces, audio, vision pipelines, browser automation, document indexing, or anything else.</p><p>This is a strength. Ollama is infrastructure. It runs on Mac, Linux, and Windows. It works in Docker containers and on bare metal. Python, JavaScript, and Go client libraries make it easy to integrate into scripts and backends. If you need a local inference server that other tools connect to, Ollama is a solid choice.</p><h4>What ToolPiper actually is</h4><p>ToolPiper is a macOS application built in Swift that bundles its own llama.cpp alongside eight other AI backends: speech-to-text, text-to-speech, OCR, embeddings, image upscale, video upscale, pose estimation, and browser automation. It exposes all of these through an HTTP API and an MCP server with 136 tools.</p><p>The design is deliberately broad. Instead of installing Ollama for inference, a Whisper server for transcription, a TTS tool for speech, a vector database for RAG, and a browser automation framework for testing, ToolPiper bundles everything into one app.</p><p>ModelPiper is the visual web interface that connects to ToolPiper — chat, pipeline builder, model browser, settings. ToolPiper is the engine. Together they form the platform.</p><h4>The inference question</h4><p>Both run llama.cpp with Metal GPU acceleration. Same underlying technology. We measured token generation speed on an M2 Max 32GB across multiple model sizes: within 2–3% for the same model at the same quantization.</p><p>Effectively identical.</p><p>The differences are in ecosystem, not raw performance:</p><p>Model source.</p><p>Ollama uses its own curated registry. ToolPiper downloads from HuggingFace. Significant overlap — Llama, Qwen, Mistral, DeepSeek, Phi are on both. Ollama’s registry is more curated. HuggingFace has more variety.</p><p>Model format. Both use GGUF. Files are interchangeable.</p><h4>Where Ollama wins</h4><p>Cross-platform. macOS, Linux, Windows. ToolPiper is macOS-only. If you need inference on Linux or Windows, Ollama is the clear choice.<br>Server deployment. Ollama runs as a background service, in Docker, behind load balancers. ToolPiper is a desktop app.</p><p>API ecosystem. Hundreds of third-party tools integrate with Ollama’s API. Python, JavaScript, Go, Rust client libraries exist. ToolPiper’s API is newer and has a smaller ecosystem, though it also exposes an OpenAI-compatible endpoint.</p><p>Minimal footprint. Ollama is a single binary. No app bundle, no embedded web server, no audio backends, no browser automation engine.<br>Docker orchestration. For teams using Docker Compose or Kubernetes, Ollama fits naturally into container workflows.</p><h4>Where ToolPiper wins</h4><p>Voice. Three TTS engines (PocketTTS, Soprano, Orpheus) and speech-to-text (Parakeet v3). Ollama has no audio capabilities.</p><p>Vision with a GUI. Drag an image into chat and ask about it.</p><p>Ollama supports vision models but requires base64 curl commands.<br>Visual pipelines. Chain models in a workflow builder: STT → LLM → TTS for voice chat, OCR → embeddings → chat for document Q&amp;A. Ollama runs one model per request.</p><p>Resource intelligence. Per-model memory tracking, GPU utilization monitoring, RAM pressure warnings before you load something that won’t fit. Ollama checks RAM once at startup.</p><p>136 MCP tools. Browser automation, OCR, upscale, RAG, pose estimation, desktop control. One `claude mcp add toolpiper` gives Claude Code access to everything.</p><p>No CORS configuration. ToolPiper’s HTTP server handles cross-origin requests natively. Ollama requires environment variable setup for any browser-based client.</p><h4>Using both</h4><p>This is probably the right answer for most people who already have Ollama installed.</p><p>ToolPiper connects to Ollama as an external provider. Your Ollama models appear alongside ToolPiper’s built-in models. Use Ollama for text generation, ToolPiper for everything else. They run on different ports (11434 vs 9998) and coexist without conflict.</p><p>Memory is shared — it’s all unified memory on Apple Silicon. ToolPiper’s resource monitor shows system-wide memory pressure, which accounts for Ollama’s usage indirectly.</p><p>Over time, you might find you don’t need Ollama at all. ToolPiper runs the same models at the same speed. But there’s no urgency to switch.</p><h4>The decision framework</h4><p>Use Ollama if: You need Linux or Windows. You’re scripting against an inference API. You want the smallest installation for text-only work. Your team uses Docker. You’ve built integrations against Ollama’s API.</p><p>Use ToolPiper if: You’re on a Mac and want more than text chat. You need voice, vision, OCR, RAG, pipelines, or Pro-Level MCP tools. You want to see what’s in memory before loading another model. You prefer a native app to a terminal + Docker stack.</p><p>Use both if: You have Ollama models downloaded and want a better interface. ToolPiper gives Ollama a visual frontend, pipeline builder, voice, vision, and resource monitoring without requiring you to abandon anything.</p><p>Download [ToolPiper](<a href="https://modelpiper.com/?utm_source=medium&amp;utm_medium=syndication&amp;utm_campaign=ollama-cluster">https://modelpiper.com?utm_source=medium&amp;utm_medium=syndication&amp;utm_campaign=ollama-cluster</a>). Connect your Ollama instance in settings. Your models appear immediately.</p><p>— -<br>*Originally published at [modelpiper.com](<a href="https://modelpiper.com/blog/ollama-vs-toolpiper?utm_source=medium&amp;utm_medium=syndication&amp;utm_campaign=ollama-cluster">https://modelpiper.com/blog/ollama-vs-toolpiper?utm_source=medium&amp;utm_medium=syndication&amp;utm_campaign=ollama-cluster</a>).</p><p>Performance measurements on M2 Max 32GB, April 2026.*</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=07758f60919e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Run Multiple Ollama Models on Mac: See What Fits in Memory]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">You loaded a 13B model. Now you want to load a 7B alongside it for a different task. Ollama doesn&#x2019;t tell you whether your Mac can handle&#x2026;</p><p class="medium-feed-link"><a href="https://benracicot.medium.com/run-multiple-ollama-models-on-mac-see-what-fits-in-memory-ea1e03b4af8a?source=rss-aec6dd17f9ff------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://benracicot.medium.com/run-multiple-ollama-models-on-mac-see-what-fits-in-memory-ea1e03b4af8a?source=rss-aec6dd17f9ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/ea1e03b4af8a</guid>
            <dc:creator><![CDATA[Ben Racicot]]></dc:creator>
            <pubDate>Fri, 10 Apr 2026 00:00:58 GMT</pubDate>
            <atom:updated>2026-04-14T01:08:52.685Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Ollama runs language models.]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">Voice changes what local AI feels like. Instead of typing and reading, you talk and listen. The model becomes a conversational partner&#x2026;</p><p class="medium-feed-link"><a href="https://benracicot.medium.com/ollama-runs-language-models-0fd3370542e8?source=rss-aec6dd17f9ff------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://benracicot.medium.com/ollama-runs-language-models-0fd3370542e8?source=rss-aec6dd17f9ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/0fd3370542e8</guid>
            <dc:creator><![CDATA[Ben Racicot]]></dc:creator>
            <pubDate>Tue, 07 Apr 2026 00:00:22 GMT</pubDate>
            <atom:updated>2026-04-14T01:11:04.634Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Best Ollama Frontend for Mac: Every GUI Option Compared]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">You installed Ollama. The models download fast, inference is quick, Apple Silicon handles it well. Now what?</p><p class="medium-feed-link"><a href="https://benracicot.medium.com/best-ollama-frontend-for-mac-every-gui-option-compared-ca24e5188c56?source=rss-aec6dd17f9ff------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://benracicot.medium.com/best-ollama-frontend-for-mac-every-gui-option-compared-ca24e5188c56?source=rss-aec6dd17f9ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/ca24e5188c56</guid>
            <dc:creator><![CDATA[Ben Racicot]]></dc:creator>
            <pubDate>Fri, 03 Apr 2026 00:00:19 GMT</pubDate>
            <atom:updated>2026-04-14T01:11:20.675Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Ollama Chat Without Docker on Mac: Native Alternatives to Open WebUI]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">&#x201C;Open WebUI needs Docker.&#x201D; Four words that filter out half the people who wanted an Ollama frontend.</p><p class="medium-feed-link"><a href="https://benracicot.medium.com/ollama-chat-without-docker-on-mac-native-alternatives-to-open-webui-964446f8b7e1?source=rss-aec6dd17f9ff------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://benracicot.medium.com/ollama-chat-without-docker-on-mac-native-alternatives-to-open-webui-964446f8b7e1?source=rss-aec6dd17f9ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/964446f8b7e1</guid>
            <dc:creator><![CDATA[Ben Racicot]]></dc:creator>
            <pubDate>Tue, 31 Mar 2026 00:00:11 GMT</pubDate>
            <atom:updated>2026-04-14T01:11:40.674Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[“The TechneKata”: Coining A New Term for Technology’s End]]></title>
            <link>https://benracicot.medium.com/the-technekata-coining-a-new-term-for-technologys-end-f72073af9121?source=rss-aec6dd17f9ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/f72073af9121</guid>
            <category><![CDATA[language]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Ben Racicot]]></dc:creator>
            <pubDate>Wed, 18 Jun 2025 20:59:40 GMT</pubDate>
            <atom:updated>2025-06-18T20:59:40.949Z</atom:updated>
            <content:encoded><![CDATA[<p><em>How ancient Greek roots helped me name humanity’s return from digital to natural intelligence</em></p><h3>The Problem with Naming the Future</h3><p>We live in an age of rapid technological advancement, where artificial intelligence grows more sophisticated daily and neural interfaces edge closer to reality. Yet we lack precise language for discussing what might happen if this trajectory reverses — if humanity steps back from digital dependence toward biological intelligence.</p><p>Existing terms feel inadequate. “Technological collapse” sounds accidental. “Digital detox” is too small-scale. “Luddism” carries historical baggage. We needed a term that captures the systematic, purposeful dismantling of technological systems — not through destruction, but through conscious disconnection.</p><h3>Enter Ancient Greek</h3><p>The solution came from the same linguistic tradition that gave us most scientific terminology: ancient Greek. Scientists combine Greek and Latin roots to create precise new terms because these “dead” languages provide stable, international meanings.</p><p>I started with <strong>techne</strong> (τέχνη) — the Greek word for “art, craft, or skill.” This is the root of our word “technology,” but techne originally meant all human artifice and craftsmanship.</p><p>Then I added <strong>kata</strong> (κατά) — a Greek prefix meaning “down, against, or thoroughly.” This prefix appears in words like:</p><ul><li><strong>Cataclysm</strong> (kata + klysmos = “down-washing”)</li><li><strong>Catastrophe</strong> (kata + strophe = “down-turning”)</li><li><strong>Catabolism</strong> (kata + ballein = “throwing down”)</li></ul><p>All of these describe systematic, thorough transformation or destruction.</p><h3>The TechneKata</h3><p><strong>TechneKata</strong> literally translates to “craft-reversal” or “the thorough undoing of human artifice.”</p><p>Unlike terms that suggest technology simply failing or breaking down, TechneKata implies an active, systematic dismantling — as if nature itself were methodically reversing centuries of human technological development.</p><p>This could happen through various mechanisms: biological networks interfacing with and shutting down digital systems, humans collectively choosing to disconnect from AI-controlled infrastructure, or natural forces reclaiming technological spaces. The key is intentionality — TechneKata isn’t accidental breakdown, but purposeful restoration.</p><h3>Why This Matters</h3><p>As we stand at the threshold of potentially transformative technologies like advanced AI and neural interfaces, we need language to discuss not just technological advancement, but technological retreat. What happens when we realize we’ve gone too far? What do we call the moment humanity chooses biological over artificial intelligence? Will that ever happen? What will we call it if it does?</p><p>“The TechneKata” offers a term that sounds both ancient and inevitable — like a natural force that was always going to emerge once human artifice reached a certain threshold. It suggests not random breakdown, but purposeful restoration.</p><p>Consider real-world parallels: the Amish community’s conscious technological limits, indigenous communities preserving traditional knowledge systems, or even individual choices to disconnect from social media. These are all small-scale examples of what TechneKata might look like at planetary scale.</p><h3>A Gift to the Future</h3><p>I hope that if “TechneKata” ever enters common usage, people remember it was coined to describe the moment when our greatest technological achievement might be knowing when to step back.</p><p>Because in a world of endless digital advancement, perhaps our most sophisticated choice would be choosing to disconnect.</p><p><strong>Etymology:</strong> From Greek techne (craft, skill) + kata (down, against, thoroughly). First coined June, 2025 by Ben Racicot.</p><p><em>What do you think about this new term? Have you encountered other examples of successfully coined words for future concepts? Share your thoughts in the comments.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f72073af9121" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CBDCs Will Not Compete (and the future of cryptocurrency)]]></title>
            <link>https://benracicot.medium.com/cbdcs-will-not-compete-and-the-future-of-cryptocurrency-be7eb037f60a?source=rss-aec6dd17f9ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/be7eb037f60a</guid>
            <category><![CDATA[investing]]></category>
            <category><![CDATA[cbdc]]></category>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[money]]></category>
            <dc:creator><![CDATA[Ben Racicot]]></dc:creator>
            <pubDate>Thu, 24 Jun 2021 17:38:02 GMT</pubDate>
            <atom:updated>2021-06-30T11:54:10.525Z</atom:updated>
            <content:encoded><![CDATA[<p>Central Bank Digital Currencies (CBDCs) are being tested and prototyped by many countries. While slow to adopt a massive currency changeover, as would be a physical-to-digital economy, this is by design. As we know, government is slow and rarely is government initiative a catalyst for innovation.</p><p>CBDCs are no different. Digital currency initiatives, centralized (controlled by one entity, a bank) and applied to economy at scale are taking notes from private companies.</p><h3>The State of Digital Money</h3><p>The United States, China, Europe and others have publicly announced some form of research and or prototypes for digital money. China leads the world with 2021’s digital yuan trials.</p><p>Libra, Facebook’s attempt at positioning its own cryptocurrency as a global token of payment revealed the opinions of the G7, a group of seven leading financial officials from the world’s seven largest economies.</p><blockquote>“The G7 continues to maintain that no global stablecoin project should begin operation until it adequately addresses relevant legal, regulatory, and oversight requirements through appropriate design and by adhering to applicable standards,”</blockquote><p>In fact this came on the heals of a public announcement from a much larger body, the G20 where a public roadmap for cross-boarder “arrangements among authorities” will be established throughout 2023.</p><blockquote>It is working with the International Monetary Fund (IMF), the World Bank and the Bank for International Settlements (BIS) to formalize the use of central bank digital currencies (CBDC) in banking systems.</blockquote><p>Cash will become insolvent. There will be a day when cash becomes unusable. As with all technology cash will eventually become legally deprecated for its digital successor.</p><p>Think of the benefits from the standpoint of the agency bodies who govern money, the United States IRS, SEC, Reserve, Mint etc. A trackable digital dollar will not only disrupt but create paper trails everywhere leading to a major question about its legal precedent.</p><p><strong>Will CBDC record be public information?</strong></p><p>Could you subpoena this record from the government if you where to sue or be sued by them? What about if they could use this (their?) record against you or or your company at will?</p><p>Illegal — grey-area money-making no doubt exists. Within the walls of government as well as on a massive scale within economy. Major entities which may hold sway no doubt have vested interest in precisely how CBDC takes over private and public accounting. To think otherwise would be naive.</p><h3>Taxes</h3><p>Could all sorts of automation be applied? Sure it could. Monopolies, and potential monopolies, could be identified very easily. What if your business corners a niche market and a micro monopoly tax is applied to your business’ net profit to slow it down? This is an example but could be done without human intervention and in the future is a very real possibility.</p><p>Why?</p><p><a href="https://www.irs.gov/businesses/small-businesses-self-employed/levy">The IRS already does this</a> but they have to catch tax discrepancy to legally do so.</p><p>Imagine a world where this was automated. Taxes removed from every transaction based upon its category and filtered through the sender/recipient’s tax situation.</p><p>This will no doubt be efficiently built into CBDC process.</p><h3>Ben Racicot on Twitter: &quot;If #CBDC s will coexist with other #blockchain currency tokens (like #BTC / #XRP) will US Gov agencies require authoritative mechanisms to retrieve currency from those blockchains?e.g. @StellarOrg&#39;s #XLM clawback https://t.co/WywIckfqME@PeterSchiff @michael_saylor @bhorowitz / Twitter&quot;</h3><p>If #CBDC s will coexist with other #blockchain currency tokens (like #BTC / #XRP) will US Gov agencies require authoritative mechanisms to retrieve currency from those blockchains?e.g. @StellarOrg&#39;s #XLM clawback https://t.co/WywIckfqME@PeterSchiff @michael_saylor @bhorowitz</p><h3>Cryptocurrency</h3><p>No one wants to talk about this but…</p><p>Will CBDCs be built for interoperability between other CBDCs? Of course they will. The intent of global economy regulation reveals the goal of bridging the gaps of remittance and currency exchange that we have today.</p><p>So why wouldn’t government agencies require that blockchains, which drive a native token, where people and organizations store money, have mechanisms built-in for them to levy?</p><p><a href="https://stellar.org/blog/using-protocol-17s-asset-clawback?locale=en">Using Protocol 17&#39;s Asset Clawback - SDF Blog</a></p><p>An IRS levy protocol? Yes, this will exist.</p><p>An SEC accredited investor filter for the purchase of securities? Yes, and masking the category of your transaction would be, of course, illegal or impossible in the first place.</p><p>As it stands the SEC has had to scramble to create process to monitor and penalize ICOs who misappropriate their tokens. Unregistered tokens are faced with major penalties but in the future all blockchains will be embraced as economic stimulus.</p><p><a href="https://www.coindesk.com/telegram-is-nearly-done-paying-back-ton-investors-eyes-ipo-next">Telegram Is Nearly Done Paying Back TON Investors - CoinDesk</a></p><p>Imagine a future where entire blockchains become locked via automation, or at the push of a button by any one of the many authoritative agencies who govern or have interest.</p><p>Here’s a list of actions which could have been much easier on the SEC if there was an in-built protocol to manage them via CBDC interoperability protocol.</p><p><a href="https://www.sec.gov/spotlight/cybersecurity-enforcement-actions">Cyber Enforcement Actions</a></p><p>Registering an ICO (or blockchain?) and its token category will no doubt become easier.</p><p>Like registering an LLC, playing ball with the SEC here in the US, and any other country, is a smart move for these founders. And in the future, mechanisms for supreme governance will no doubt be required or these tokens will become illegal.</p><p>They’d be the same as cash-only businesses… who don’t pay taxes.</p><p>Conclusion</p><p>Creating CBDCs globally will be easy. Especially after private companies pave the way, then they will be regulated heavily. The treasury will fill “Fort Knox” with compute power for financial audits of both itself and other blockchain forensics.</p><p>Those blockchains who do not cooperate will be classified as black-market.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=be7eb037f60a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Want Realtime CSS Style Replacement While Developing Angular Applications?]]></title>
            <link>https://benracicot.medium.com/want-realtime-css-style-replacement-while-developing-angular-applications-967d12e35c06?source=rss-aec6dd17f9ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/967d12e35c06</guid>
            <category><![CDATA[angular-cli]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[angular]]></category>
            <dc:creator><![CDATA[Ben Racicot]]></dc:creator>
            <pubDate>Fri, 04 Jun 2021 17:11:05 GMT</pubDate>
            <atom:updated>2021-06-04T17:18:08.666Z</atom:updated>
            <content:encoded><![CDATA[<p>Perhaps you’ve used tools such as <a href="https://prepros.io/">Prepros</a> to prototype HTML/SCSS designs?</p><p>It allows for injected CSS changes.</p><p>For instance Prepros watches your project, compiles your CSS on each save and replaces the CSS inside your browser.</p><p>No reload, no refresh, just instantaneous results.</p><p>This was at least 5 years ago but the Angular team has never approached this feature. In fact, <strong>updating Angular application styles still requires a basic recompile and page reload</strong>.</p><h3>Style Replacement in 2021</h3><p>While searching for an Angular-focused solution to HOT CSS reloading I came across <a href="https://medium.com/u/f6562d19f273">Hiep Tran</a>’s plugin which had an impressive direction and a promising future.</p><p>As his project progressed it seems that leveraging the CLI to replace CSS like Prepros does was becoming problematic. Deeper knowledge of the Angular CLI was needed and Hiep reached out to the Angular team.</p><p>That is where his project ended.</p><h3>Ben Racicot on Twitter: &quot;Want realtime #CSS style replacement while #developing #angular #applications? Please thumb up this proposal 👍https://t.co/okIvRTDB6d / Twitter&quot;</h3><p>Want realtime #CSS style replacement while #developing #angular #applications? Please thumb up this proposal 👍https://t.co/okIvRTDB6d</p><p>The call for advocating for this feature has begun! Please vote by giving <a href="https://github.com/angular/angular/issues/31464">github.com/angular/issues/31464</a> your thumbs up!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=967d12e35c06" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Your App’s Git Branch In the Title (per env.)]]></title>
            <link>https://benracicot.medium.com/your-apps-git-branch-in-the-title-per-env-47c894182b6e?source=rss-aec6dd17f9ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/47c894182b6e</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[webpack]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[build-system]]></category>
            <dc:creator><![CDATA[Ben Racicot]]></dc:creator>
            <pubDate>Thu, 27 May 2021 17:39:07 GMT</pubDate>
            <atom:updated>2021-05-28T16:49:52.018Z</atom:updated>
            <content:encoded><![CDATA[<p>Engineers, are you meticulous about your tooling? I know I am!</p><p>The <strong>Favicons for Each Environment</strong> article led to an Angular (and Webpack) build targets piece… which led to this: how to get the current build’s branch name into your title tag for non-production environments.</p><p><strong>This article is part of a series on customizing Webpack build targets.</strong></p><ol><li><a href="https://benracicot.medium.com/customize-angulars-build-system-for-local-dev-stage-and-prod-53516c8bc311">Configure Angular’s Build System For Local, Dev, Stage and Prod</a></li><li><a href="https://benracicot.medium.com/favicons-for-each-environment-327f5b832bae">Favicons for Each Environment</a></li><li>Your App’s Git Branch In the Title (per env.)</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3hDbnZhGB_tdSUyrlzDk5g.png" /></figure><p>This is a 3 step process. First, update your application’s package.json.</p><p>If it looks strange visit the Configure Build System article for a walk-through.</p><pre>{<br>&quot;name&quot;: &quot;aspectratia&quot;,<br>&quot;version&quot;: &quot;0.0.0&quot;,<br>&quot;scripts&quot;: {<br>  <strong>&quot;config&quot;: &quot;ts-node ./src/environments/set-env.ts&quot;,</strong> &lt;-- step one<br>  &quot;ng&quot;: &quot;ng&quot;,<br>  &quot;start&quot;: &quot;npm run config &amp;&amp; ng serve --configuration dev&quot;,<br>  &quot;start:dev&quot;: &quot;npm run config &amp;&amp; ng serve --configuration dev&quot;,<br>  &quot;start:stage&quot;: &quot;npm run config &amp;&amp; ng serve --configuration stage&quot;,<br>  &quot;start:prod&quot;: &quot;npm run config &amp;&amp; ng serve --configuration prod&quot;,<br>  ...<br>&quot;devDependencies&quot;: {<br>  <strong>&quot;</strong><a href="http://twitter.com/types/git-branch"><strong>@types/git-branch</strong></a><strong>&quot;: &quot;^2.0.1&quot;</strong></pre><p>Create the Git branch “set” file anywhere, I chose /environments/set-env.ts</p><pre>const { writeFile } = require(&#39;fs&#39;);<br>const gitBranch = require(&#39;git-branch&#39;);</pre><pre>gitBranch().then(branchName =&gt; {<br>    const content = `<br>        export const customEnv = {<br>            branchName: &#39;${branchName}&#39;<br>        };<br>    `;<br>    writeFile(&#39;./src/environments/custom.ts&#39;, content, err =&gt; {<br>        if (err) {<br>            console.log(err);<br>        } else {<br>            console.log(&#39;Updated custom env&#39;);<br>        }<br>    });<br>});</pre><p>The above uses git-branch to, well… get the Git branch related to this build.</p><p>If you take a look at the start commands above they define which environment we’re serving (and building) for.</p><p>Again, the Configure Build System article will explain how build targets and configuration flags tell the build system which environment file to use.</p><p>Yup, that’s it!</p><p>For Angular we have cool utilities for setting SEO related tags.</p><pre>// seo.service.ts<br>import { environment } from &#39;<a href="http://twitter.com/env">@env</a>&#39;; // I use path vars but whatever</pre><pre>...</pre><pre>constructor(<br>    private title: Title,<br>    private meta: Meta<br>) { }</pre><pre>...</pre><pre>public setTitle(): void {<br>    this._pageTitle = environment.prod <br>        ? `TITLE TEXT` <br>        : `${environment.branchName}`;</pre><pre>    this.title.setTitle(this._pageTitle);<br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=47c894182b6e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Favicons for Each Environment]]></title>
            <link>https://benracicot.medium.com/favicons-for-each-environment-327f5b832bae?source=rss-aec6dd17f9ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/327f5b832bae</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[favicon]]></category>
            <dc:creator><![CDATA[Ben Racicot]]></dc:creator>
            <pubDate>Thu, 27 May 2021 14:31:55 GMT</pubDate>
            <atom:updated>2021-05-27T17:42:26.079Z</atom:updated>
            <content:encoded><![CDATA[<p>Have you ever been editing a local, dev or staged application and were confused why the production version wasn’t updating?</p><p><strong>This article is part of a series on customizing Angular builds.</strong></p><ol><li><a href="https://benracicot.medium.com/customize-angulars-build-system-for-local-dev-stage-and-prod-53516c8bc311">Configure Angular’s Build System For Local, Dev, Stage and Prod</a></li><li>Favicons for Each Environment</li><li><a href="https://benracicot.medium.com/your-apps-git-branch-in-the-title-per-env-47c894182b6e">Your App’s Git Branch In the Title</a> (per env.)</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3hDbnZhGB_tdSUyrlzDk5g.png" /></figure><p>This article focuses on Angular CLI’s use of Webpack bundling but likely applies to general Webpack build configuration.</p><h4>We’ll be setting up two nice-to-haves:</h4><ul><li>Favicon for each environment configuration target</li><li>Git branch and app versioning in the webpage title</li></ul><p>Prepare to enter… <strong>angular.json</strong> configuration.</p><h3>What Didn’t Work</h3><p>Commonly mentioned solutions include two configuration arguments that I could not get to work.</p><ul><li>Configuring <em>assets</em> caused a mess IMO.</li><li>fileReplacements only works with some file types</li></ul><h4>Angular Asset Configuration</h4><p>TL:DR; I didn’t want new folders filled with environment specific files. Especially for the simplicity of 3 new favicons. And how would we rename them or update the index.html’s favicon src?</p><pre>{<br>  ...<br>  &quot;projects&quot;: {<br>    &quot;angular-extreme-build-configuration&quot;: {<br>      ...<br>      &quot;architect&quot;: {<br>          ...<br>          &quot;configurations&quot;: {<br>            &quot;staging&quot;: {<br>              ...<br>              &quot;assets&quot;: [<br>                &quot;src/favicon.ico&quot;,<br>                {<br>                  &quot;glob&quot;: &quot;**/*&quot;,<br>                  &quot;input&quot;: &quot;src/staging_assets/&quot;,<br>                  &quot;output&quot;: &quot;/assets/&quot; &lt;-- just nope<br>                }<br>              ],<br>              ...<br>            },<br>            ...<br>          }<br>        },<br>        ...<br>      }<br>    }<br>  },<br>  ...<br>} </pre><p>If you got assets configuration to replace favicon.ico with favicon-prod.ico (and renamed to favicon.ico) please let me know how.</p><h4>Angular.json fileReplacements</h4><p>Another was <strong>fileReplacements</strong> which in my exp. only supports .ts files.</p><pre>&quot;dev&quot;: {<br><strong>  &quot;fileReplacements&quot;: [<br>    {<br>       &quot;replace&quot;: &quot;src/favicon.ico&quot;, &lt;-- nope<br>       &quot;with&quot;: &quot;src/favicon-dev.ico&quot; &lt;-- nope<br>    }<br>  ]</strong></pre><h3>The Best Solution Includes Extras</h3><p>I’ll assume your Angular project <strong>is</strong> setup for customizing each environment.</p><p>If <strong>not</strong>, checkout Angular Workspace Configuration in the article <a href="https://benracicot.medium.com/customize-angulars-build-system-for-local-dev-stage-and-prod-53516c8bc311">Customize Angular’s Build System For Local, Dev, Stage and Prod</a>.</p><p>Let’s start with angular-builders/custom-webpack!</p><pre>npm i -D <a href="http://twitter.com/angular">@angular</a>-builders/custom-webpack</pre><p>You’ve seen Angular’s default builder used in the configuration, I’m sure of it!</p><pre>{<br>  ...<br>  &quot;projects&quot;: {<br>    &quot;app-name&quot;: {<br>      ...<br>      &quot;architect&quot;: {<br>        &quot;build&quot;: {<br>          &quot;builder&quot;: &quot;<a href="http://twitter.com/angular"><strong>@angular</strong></a><strong>-devkit/build-angular:browser</strong>&quot;</pre><p>Yup we’re gonna replace that with Jeb’s awesome custom-webpack builder.</p><pre>{<br>  ...<br>  &quot;projects&quot;: {<br>    &quot;app-name&quot;: {<br>      ...<br>      &quot;architect&quot;: {<br>        &quot;build&quot;: {<br>          &quot;builder&quot;: &quot;<strong>@angular-builders/custom-webpack:browser</strong>&quot;<br>          &quot;options&quot;: {<br>             <strong>&quot;customWebpackConfig&quot;: {<br>               &quot;path&quot;: &quot;./webpack.config.js&quot;,<br>               &quot;replaceDuplicatePlugins&quot;: true<br>             },<br>             &quot;indexTransform&quot;: &quot;./index-html-transform.ts&quot;,</strong><br>             ...</pre><p>Now we have to create those two new configuration files.</p><p>src/<strong>index-html-transform.ts</strong> ← New JS file for manipulating index.html<br>src/<strong>webpack.config.js</strong> ← Customize Angular’s <a href="https://webpack.js.org/concepts/">Webpack</a> config!</p><p>Now you can customize your index file and Angular’s Webpack compilation!</p><h4>angular-builders/custom-webpack index-html-transform</h4><p>Let’s setup our favicon conditions.</p><p>Within your new index-html-transform.ts file use this code as a base to toggle favicon file names.</p><pre>import { TargetOptions } from &#39;<a href="http://twitter.com/angular">@angular</a>-builders/custom-webpack&#39;;<br>import * as cheerio from &#39;cheerio&#39;;</pre><pre>export default (targetOptions: TargetOptions, indexHtml:string) =&gt; {<br>  const $ = cheerio.load(indexHtml);</pre><pre>  <strong>const favicon = targetOptions.configuration<br>        ? `favicon-${targetOptions.configuration}`<br>        : &#39;favicon&#39;;</strong></pre><pre><strong>  const favLink = `&lt;link rel=&quot;icon&quot; type=&quot;image/x-icon&quot;       href=&quot;assets/${favicon}.ico&quot;&gt;&lt;/link&gt;`;</strong></pre><pre><strong>  $(&#39;head&#39;).find(&#39;link#favicon&#39;).remove(); // remove the OG favicon<br>  $(&#39;head&#39;).append(favLink); // add the new favicon</strong><br>  return $.html();<br>};</pre><p>A friend helped me understand that targetOptions.configuration contains the --configuration value from our build command (below)</p><pre>&quot;start:dev&quot;: &quot;ng serve --configuration dev&quot;</pre><p>So convenient!</p><p><strong>But we can push this setup even further by adding the </strong><a href="https://benracicot.medium.com/your-apps-git-branch-in-the-title-per-env-47c894182b6e"><strong>Git Branch in the Title</strong></a><strong> of each build target.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=327f5b832bae" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>