<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: James Jeremy Foong</title>
    <description>The latest articles on Forem by James Jeremy Foong (@jamesjf7).</description>
    <link>https://forem.com/jamesjf7</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F930804%2F89c8e072-f191-4c05-aa6d-085a6bbc1b12.jpeg</url>
      <title>Forem: James Jeremy Foong</title>
      <link>https://forem.com/jamesjf7</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/jamesjf7"/>
    <language>en</language>
    <item>
      <title>I Was About to Quit Ollama — Then I Deleted One File and Never Looked Back</title>
      <dc:creator>James Jeremy Foong</dc:creator>
      <pubDate>Sat, 02 May 2026 17:39:00 +0000</pubDate>
      <link>https://forem.com/jamesjf7/i-was-about-to-quit-ollama-then-i-deleted-one-file-and-never-looked-back-27a9</link>
      <guid>https://forem.com/jamesjf7/i-was-about-to-quit-ollama-then-i-deleted-one-file-and-never-looked-back-27a9</guid>
      <description>&lt;h2&gt;
  
  
  I Was About to Quit Ollama — Then I Deleted One File and Never Looked Back
&lt;/h2&gt;

&lt;p&gt;Last month I almost quit using Ollama entirely. Not because it was slow. Not because the models were bad. Because I was &lt;strong&gt;tired of editing the same JSON file for the 47th time.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Breaking Point
&lt;/h2&gt;

&lt;p&gt;Here's what my evenings looked like:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ollama pull qwen2.5-coder:1.5b&lt;/code&gt; — cool, new model.&lt;/p&gt;

&lt;p&gt;Then: open &lt;code&gt;~/.pi/agent/models.json&lt;/code&gt;. Scroll to the &lt;code&gt;ollama.models&lt;/code&gt; array. Add &lt;code&gt;{ "id": "qwen2.5-coder:1.5b" }&lt;/code&gt;. Save. Restart pi. Test if it works. It works. Great.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ollama pull gemma3:12b&lt;/code&gt; — another one.&lt;/p&gt;

&lt;p&gt;Same dance. Same file. Same restart.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ollama pull deepseek-v4-pro&lt;/code&gt; — bigger, more interesting.&lt;/p&gt;

&lt;p&gt;Same. Fucking. Dance.&lt;/p&gt;

&lt;p&gt;By model #12 in a single week, I started dreading the process. Not the models — the &lt;strong&gt;paperwork&lt;/strong&gt;. I was spending more time filling out JSON IDs than actually coding with them. And I started noticing something worse: every time I had to restart pi, I lost my context. My train of thought. The thing I was actually trying to do.&lt;/p&gt;

&lt;p&gt;That's when I realized: &lt;em&gt;this isn't a model problem. This is a friction problem.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;And friction at the discovery layer kills experimentation dead.&lt;/p&gt;

&lt;h2&gt;
  
  
  The "Why Doesn't This Exist?" Moment
&lt;/h2&gt;

&lt;p&gt;I assumed someone had already solved this. pi had a concept called "extensions" — dynamic provider registration. I searched the docs, the Discord, npm. Nothing auto-discovered from Ollama's API.&lt;/p&gt;

&lt;p&gt;Maybe I missed it. Maybe it's buried somewhere. I asked in the pi Discord. Crickets.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Quick context: this whole thing happened because I was trying something new.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For the past few months I'd been using OpenCode daily. It's solid — inline edits, web search, browser automation, the whole IDE-integrated workflow. I even had ohmyopenagent set up for custom agent behaviors. It felt like having a senior dev sitting next to me who could also Google things and operate a browser. I got used to it. It became my default.&lt;/p&gt;

&lt;p&gt;But I kept hearing about &lt;a href="https://pi.dev" rel="noopener noreferrer"&gt;pi&lt;/a&gt; — this weird minimal terminal harness that looked nothing like what I was used to. No GUI panels. No file tree sidebar. Just a TTY and a blinking cursor. People on Discord kept mentioning it like it was a secret weapon. I was skeptical. Honestly, I thought it sounded like a step backward. Why would I trade an IDE integration for a terminal?&lt;/p&gt;

&lt;p&gt;Curiosity won. I installed it on a whim one weekend. Just to confirm my suspicion that it was overhyped.&lt;/p&gt;

&lt;p&gt;The first thing that struck me was speed. pi opens in under a second. No electron window, no plugin loading, no "indexing your project." Just — &lt;em&gt;instant&lt;/em&gt;. Compared to OpenCode's feature-rich setup — web search, browser automation, ohmyopenagent plugins, the whole IDE integration — pi felt almost comically lightweight. But that lightness turned out to be the point.&lt;/p&gt;

&lt;p&gt;The second thing was the session tree. I could fork my conversation at any point, try a different approach, and jump back without losing anything. OpenCode had threads, but this felt different. More like Git branches for your thinking.&lt;/p&gt;

&lt;p&gt;Then I found the extension system. Drop a &lt;code&gt;.ts&lt;/code&gt; file in a directory and the agent loads it immediately. No &lt;code&gt;npm init&lt;/code&gt;. No webpack. No build step. The code runs directly. I tested it by writing a 5-line extension that added a custom command. It worked on the first try. I stared at the terminal and realized this was a completely different category of tool.&lt;/p&gt;

&lt;p&gt;That Sunday afternoon — it was raining, I remember because I was annoyed about that too — I was literally just exploring pi's features. Poking around. Not planning to build anything. I discovered you could register providers dynamically at runtime. The docs said &lt;code&gt;pi.registerProvider("ollama", {...})&lt;/code&gt; and I thought: &lt;em&gt;what if I could make &lt;code&gt;ollama pull&lt;/code&gt; and &lt;code&gt;pi open&lt;/code&gt; into one contiguous action?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Like they were actually connected.&lt;/p&gt;

&lt;p&gt;I wasn't planning to build anything that day. I was just trying a new tool. But pi's extension model made it so frictionless that I couldn't resist. I pulled up &lt;code&gt;extensions/index.ts&lt;/code&gt;. No plan. No research. No coffee left. Just pure spite-driven development.&lt;/p&gt;

&lt;h2&gt;
  
  
  The 2-Hour Spite Build (That Actually Took 5 Hours)
&lt;/h2&gt;

&lt;p&gt;I started with the dumbest thing that could work. Five minutes. Maybe ten.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// fetch /api/tags, map names, register provider&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;http://localhost:11434/api/tags&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;models&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nx"&gt;pi&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;registerProvider&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ollama&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;models&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;models&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="p"&gt;})),&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It worked. First try. I stared at pi's model list and there they were. All of them. Without touching JSON.&lt;/p&gt;

&lt;p&gt;I felt this weird mix of satisfaction and anger. Satisfaction because it worked. Anger because I'd been doing it the hard way for months.&lt;/p&gt;

&lt;p&gt;Then reality hit.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hour 1:&lt;/strong&gt; Some setups don't expose &lt;code&gt;/api/tags&lt;/code&gt;. They only have the OpenAI-compatible &lt;code&gt;/v1/models&lt;/code&gt;. So I added a fallback chain. Try one, if it fails, try the other. If both fail, panic (gracefully).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hour 2:&lt;/strong&gt; pi startup froze when Ollama wasn't running. Because the extension was waiting for a fetch that would never complete. I had to flip the whole architecture: register from cache immediately (synchronous, never blocks), then kick off live discovery in the background. This meant I was dealing with race conditions between cache registration and live registration. The provider registration API replaces the old one, which is fine, but I had to make sure the user didn't see a flicker or an empty list. Took three attempts to get it smooth.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hour 3:&lt;/strong&gt; &lt;code&gt;/api/show&lt;/code&gt; returned &lt;code&gt;capabilities: ["vision"]&lt;/code&gt; for one of my models. Great, it supports images. I tried sending an image. It failed. The model choked. Ollama's metadata was lying. So I built &lt;code&gt;/ollama-fix&lt;/code&gt; — a guided override where you pick a model, pick what's wrong, and it saves a persistent fix. Then &lt;code&gt;/ollama-info&lt;/code&gt; to inspect what the final config actually looks like after all overrides.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hour 4:&lt;/strong&gt; A friend DMed me. He runs Ollama behind a proxy with three API keys. When one hits rate limits, he manually switches to the next. I added key rotation. Automatic failover on 401/403. I didn't even have this problem myself, but I could feel his pain through the screen.&lt;/p&gt;

&lt;p&gt;By dinner I had 800 lines of TypeScript that made my original problem feel ridiculous. I kept thinking: &lt;em&gt;why did I wait this long?&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Architecture Nobody Asked For (But I Needed)
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;extensions/
├── index.ts         # Cache-first bootstrap — pi opens instantly
├── discovery.ts     # Two APIs, one fallback chain
├── provider.ts      # Mutable state, clean registration
├── config.ts        # env → file → models.json → defaults
├── cache.ts         # Offline survival
├── overrides.ts     # When Ollama lies about capabilities
├── commands.ts      # /ollama-setup /ollama-refresh /ollama-status
├── setup-wizard.ts  # Arrow-key TUI, zero typing required
└── types.ts         # Types I wish I'd written first
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The part that still shocks me: &lt;strong&gt;zero runtime dependencies.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No Axios. No Lodash. No framework. No utility belt. Just Node.js built-ins and &lt;code&gt;fetch&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Why? Because pi extensions run in the user's Node process. Every dependency is a supply-chain risk that you can't control. I don't want my extension to break because someone upstream published a bad semver minor. I want this thing to still work in 3 years even if half of npm goes down.&lt;/p&gt;

&lt;p&gt;My &lt;code&gt;devDependencies&lt;/code&gt; are tiny: &lt;code&gt;tsx&lt;/code&gt; to run tests, &lt;code&gt;c8&lt;/code&gt; for coverage, &lt;code&gt;prettier&lt;/code&gt; so I don't have to think about formatting, and &lt;code&gt;@types/node&lt;/code&gt;. That's it. Nothing ships to users.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Test of "Will I Actually Use This?"
&lt;/h2&gt;

&lt;p&gt;I uninstalled my old manual config. Deleted the &lt;code&gt;models&lt;/code&gt; array from my &lt;code&gt;models.json&lt;/code&gt;. Forced myself to rely on the extension. Cold turkey.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Day 1:&lt;/strong&gt; Pulled &lt;code&gt;qwen3-coder:480b&lt;/code&gt;, &lt;code&gt;glm-4.7&lt;/code&gt;, and &lt;code&gt;nemotron-3-super&lt;/code&gt;. All appeared in &lt;code&gt;/model&lt;/code&gt; the second pi opened. I smiled. Like, genuinely smiled. I felt like I'd hacked the system.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Day 2:&lt;/strong&gt; Tried to pull a vision model and test it. It failed on images. &lt;code&gt;/ollama-fix&lt;/code&gt; → override input to &lt;code&gt;["text", "image"]&lt;/code&gt; → save → &lt;code&gt;/ollama-refresh&lt;/code&gt;. Worked. I didn't have to touch a config file. I just answered questions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Day 3:&lt;/strong&gt; Ollama wasn't running. I'd forgotten to start it after a reboot. The extension didn't crash. Didn't hang. It fell back to cache, registered the stale models, and put a little warning in the status. I kept working for 2 hours before I noticed Ollama was still off. When I started it and ran &lt;code&gt;/ollama-refresh&lt;/code&gt;, the live models replaced the cached ones instantly. Seamless.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Day 7:&lt;/strong&gt; Switched from local to a remote endpoint. Usually this means editing a JSON file, copying a URL, praying I didn't typo it. Instead: &lt;code&gt;/ollama-setup&lt;/code&gt; → arrow keys to "Base URL" → type the URL → "Test connection" → it verified → "Save &amp;amp; discover" → done. Felt like cheating.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Day 14:&lt;/strong&gt; A friend asked how I managed my models. I sent him the install command. He ran it. It worked. He didn't ask me anything. That's when I knew it was real — not because I built it, but because it worked without me explaining it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Numbers
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;800 lines&lt;/strong&gt; of TypeScript&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;0&lt;/strong&gt; runtime dependencies&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;0&lt;/strong&gt; build steps (pi runs &lt;code&gt;.ts&lt;/code&gt; directly via tsx)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;62&lt;/strong&gt; unit tests using only &lt;code&gt;node:test&lt;/code&gt; + &lt;code&gt;node:assert&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;39&lt;/strong&gt; models auto-discovered from my local Ollama right now&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;1&lt;/strong&gt; JSON file I haven't touched in 2 weeks&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What I Learned (The Hard Way)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Cache is not a luxury — it's survival.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Without cache, every network hiccup means zero models and a broken workflow. You can't code. With cache, you get slightly stale data and full productivity. I made cache the &lt;strong&gt;primary&lt;/strong&gt; registration path and live discovery the background upgrade. It feels backwards if you think about it, but it's the only way to never block the user.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Interactive UI beats config files by an order of magnitude.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I started with env vars and JSON editing because that's what "serious" tools do. Then I built &lt;code&gt;/ollama-setup&lt;/code&gt; — an arrow-key TUI. I thought it was just a convenience. It's not. It's a different category of experience. I use it constantly. Manual JSON editing? Zero times since I built this. I don't even know where my &lt;code&gt;models.json&lt;/code&gt; is anymore.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Zero dependencies isn't minimalism — it's durability.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The fewer packages you rely on, the longer your code works without maintenance. This extension will work in 2028 even if nobody touches it. That's not aesthetic. That's practical.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. The best tools don't add features — they remove steps.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This extension does one thing: it deletes the "edit models.json" step from your life. That's it. Everything else is just making that deletion reliable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try It (If You Also Hate JSON Maintenance)
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# One command&lt;/span&gt;
pi &lt;span class="nb"&gt;install &lt;/span&gt;npm:@jamesjfoong/pi-ollama

&lt;span class="c"&gt;# Or test drive without installing&lt;/span&gt;
pi &lt;span class="nt"&gt;-e&lt;/span&gt; npm:@jamesjfoong/pi-ollama
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then in pi:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;/ollama-status&lt;/code&gt; — see your models&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/ollama-setup&lt;/code&gt; — configure endpoint without touching files&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/ollama-refresh&lt;/code&gt; — update without restart&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/ollama-fix&lt;/code&gt; — correct model capabilities when Ollama metadata is wrong&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;I'm exploring a few things, but I'm being careful not to bloat it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Team model sync:&lt;/strong&gt; Share model overrides across a team via a URL you can drop in a config&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local usage stats:&lt;/strong&gt; Track which models you actually use (everything stays local, zero telemetry)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Model recommendations:&lt;/strong&gt; Suggest models based on what you're trying to do&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If this saves you from config hell like it saved me, &lt;a href="https://github.com/sponsors/jamesjfoong" rel="noopener noreferrer"&gt;sponsoring the project&lt;/a&gt; helps me justify more time on spite-driven tooling. Or just star the repo — that's free and also genuinely helpful.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Repo:&lt;/strong&gt; &lt;a href="https://github.com/jamesjfoong/pi-ollama" rel="noopener noreferrer"&gt;https://github.com/jamesjfoong/pi-ollama&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Package:&lt;/strong&gt; &lt;a href="https://pi.dev/packages/@jamesjfoong/pi-ollama" rel="noopener noreferrer"&gt;https://pi.dev/packages/@jamesjfoong/pi-ollama&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;What config file are you tired of editing? I'm collecting pain points for the next zero-maintenance extension.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>typescript</category>
      <category>devtools</category>
      <category>indiehackers</category>
    </item>
    <item>
      <title>A Guide to Setting Up Zsh: Improving Your Terminal Experience</title>
      <dc:creator>James Jeremy Foong</dc:creator>
      <pubDate>Mon, 28 Oct 2024 10:36:29 +0000</pubDate>
      <link>https://forem.com/jamesjf7/a-guide-to-setting-up-zsh-improving-your-terminal-experience-3725</link>
      <guid>https://forem.com/jamesjf7/a-guide-to-setting-up-zsh-improving-your-terminal-experience-3725</guid>
      <description>&lt;p&gt;Hello. This is a guide I've put together mainly as a reference for myself when setting up a new Ubuntu device. I often forget the exact steps, so having this written down helps me replicate my preferred terminal setup. I'm sharing it in case others find it useful too. This guide covers setting up Zsh with some add-ons that I find helpful.&lt;/p&gt;

&lt;h2&gt;
  
  
  What We're Setting Up
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Zsh&lt;/strong&gt;: An improved version of the standard command-line interface.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Oh My Zsh&lt;/strong&gt;: A collection of helpful features for Zsh.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Powerlevel10k&lt;/strong&gt;: A theme that makes your command line look... nice.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Autosuggestions&lt;/strong&gt;: A feature that suggests commands as you type.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Step 1: Install Zsh
&lt;/h2&gt;

&lt;p&gt;First, we need to install Zsh. The process is usually straightforward, but it might vary depending on your operating system.&lt;/p&gt;

&lt;h3&gt;
  
  
  For Mac users:
&lt;/h3&gt;

&lt;p&gt;If you're using a recent version of macOS, Zsh is already installed. You can move on to Step 2.&lt;/p&gt;

&lt;h3&gt;
  
  
  For Ubuntu or other Debian-based Linux:
&lt;/h3&gt;

&lt;p&gt;Open your terminal and type these commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;zsh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You'll need to enter your password and confirm the installation.&lt;/p&gt;

&lt;h3&gt;
  
  
  For other operating systems:
&lt;/h3&gt;

&lt;p&gt;You might need to look up specific instructions for your system. Try searching for "How to install Zsh on [Your Operating System]".&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Install Oh My Zsh
&lt;/h2&gt;

&lt;p&gt;Now that we have Zsh, let's add Oh My Zsh. Copy and paste this command into your terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sh &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command downloads and runs the Oh My Zsh installer. Just follow any prompts that appear.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Install the Powerlevel10k Theme
&lt;/h2&gt;

&lt;p&gt;Powerlevel10k will change how your terminal looks. Here's how to set it up:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Use this command to download Powerlevel10k:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone &lt;span class="nt"&gt;--depth&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1 https://github.com/romkatv/powerlevel10k.git &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;ZSH_CUSTOM&lt;/span&gt;&lt;span class="k"&gt;:-&lt;/span&gt;&lt;span class="nv"&gt;$HOME&lt;/span&gt;&lt;span class="p"&gt;/.oh-my-zsh/custom&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;/themes/powerlevel10k
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;We need to edit a file called &lt;code&gt;.zshrc&lt;/code&gt;. Open it with this command:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nano ~/.zshrc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Find the line that starts with &lt;code&gt;ZSH_THEME&lt;/code&gt;. Change it to:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;ZSH_THEME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"powerlevel10k/powerlevel10k"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;To save and exit, press Ctrl+X, then Y, then Enter.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Step 4: Add Autosuggestions
&lt;/h2&gt;

&lt;p&gt;Autosuggestions can help you type commands faster. Here's how to add this feature:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Run this command to download the autosuggestions plugin:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/zsh-users/zsh-autosuggestions &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;ZSH_CUSTOM&lt;/span&gt;&lt;span class="k"&gt;:-&lt;/span&gt;&lt;span class="p"&gt;~/.oh-my-zsh/custom&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;/plugins/zsh-autosuggestions
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;We need to edit the &lt;code&gt;.zshrc&lt;/code&gt; file again:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nano ~/.zshrc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Find the line that starts with &lt;code&gt;plugins=&lt;/code&gt;. Add &lt;code&gt;zsh-autosuggestions&lt;/code&gt; to the list. It should look something like this:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;plugins&lt;/span&gt;&lt;span class="o"&gt;=(&lt;/span&gt;git zsh-autosuggestions&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Save and exit (Ctrl+X, Y, Enter).&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Step 5: Set Up Powerlevel10k
&lt;/h2&gt;

&lt;p&gt;Now we'll customize how your terminal looks.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Close your terminal completely and open a new one.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You should see a setup wizard for Powerlevel10k. If you don't, type &lt;code&gt;p10k configure&lt;/code&gt; and press Enter.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Follow the prompts to choose how you want your terminal to look. You can always change this later by running &lt;code&gt;p10k configure&lt;/code&gt; again.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Step 6: Using Your New Setup
&lt;/h2&gt;

&lt;p&gt;That's it. You've set up a more advanced terminal. Here are some things to note:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To use autosuggestions, start typing a command you've used before. You should see a faded suggestion appear. Press the right arrow key to accept it.&lt;/li&gt;
&lt;li&gt;You can explore more Oh My Zsh plugins on the &lt;a href="https://github.com/ohmyzsh/ohmyzsh/wiki/Plugins" rel="noopener noreferrer"&gt;official wiki&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;If something doesn't seem right, try closing your terminal and opening a new one.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's okay if you don't understand everything right away. You'll get more comfortable with it as you use it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example .zshrc File
&lt;/h2&gt;

&lt;p&gt;After setting everything up, your &lt;code&gt;.zshrc&lt;/code&gt; file will contain all the configurations we've discussed. I've put my personal &lt;code&gt;.zshrc&lt;/code&gt; file on GitHub if you want to look at it:&lt;/p&gt;

&lt;p&gt;[Link to your GitHub repository with the .zshrc file]&lt;/p&gt;

&lt;p&gt;Here's a brief explanation of what you might see in this file:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Oh My Zsh Path&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   &lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;ZSH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$HOME&lt;/span&gt;&lt;span class="s2"&gt;/.oh-my-zsh"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Theme Setting&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   &lt;span class="nv"&gt;ZSH_THEME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"powerlevel10k/powerlevel10k"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Plugins&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   &lt;span class="nv"&gt;plugins&lt;/span&gt;&lt;span class="o"&gt;=(&lt;/span&gt;git zsh-autosuggestions&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Oh My Zsh Source&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   &lt;span class="nb"&gt;source&lt;/span&gt; &lt;span class="nv"&gt;$ZSH&lt;/span&gt;/oh-my-zsh.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Powerlevel10k Customizations&lt;/strong&gt;: Lines starting with &lt;code&gt;POWERLEVEL9K_&lt;/code&gt; or &lt;code&gt;POWERLEVEL10K_&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Custom Aliases&lt;/strong&gt;: Lines starting with &lt;code&gt;alias&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You can look at my &lt;code&gt;.zshrc&lt;/code&gt; file &lt;a href="https://gist.github.com/jamesjfoong/3ab4f96fb7b2db74b4b6f2bc6e9a3d04" rel="noopener noreferrer"&gt;here&lt;/a&gt; for ideas, but remember that your file should be set up for your own needs and preferences.&lt;/p&gt;

&lt;p&gt;If you make changes to your &lt;code&gt;.zshrc&lt;/code&gt; file, you'll need to either restart your terminal or run &lt;code&gt;source ~/.zshrc&lt;/code&gt; for the changes to take effect.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Now we've set up a more advanced terminal environment. With Zsh, Oh My Zsh, Powerlevel10k, and autosuggestions. Feel free to experiment with your configuration as you become more comfortable with it. I hope you find this setup helpful for your work.&lt;/p&gt;

</description>
      <category>terminal</category>
      <category>cli</category>
      <category>zsh</category>
      <category>omz</category>
    </item>
    <item>
      <title>Creating a Custom 404 Not Found Page in Next.js 14</title>
      <dc:creator>James Jeremy Foong</dc:creator>
      <pubDate>Tue, 10 Sep 2024 15:43:51 +0000</pubDate>
      <link>https://forem.com/jamesjf7/creating-a-custom-404-not-found-page-in-nextjs-14-322h</link>
      <guid>https://forem.com/jamesjf7/creating-a-custom-404-not-found-page-in-nextjs-14-322h</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv2kqbdnlbbk51j3ttd5b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv2kqbdnlbbk51j3ttd5b.png" alt=" " width="431" height="287"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next.js 14 provides an easy way to create custom 404 Not Found pages for your web application. In this blog post, we'll create and customize a 404 page to enhance your user experience.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Create a Custom 404 Page?
&lt;/h2&gt;

&lt;p&gt;A custom 404 page allows you to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Maintain your site's branding and design&lt;/li&gt;
&lt;li&gt;Provide helpful information to users who've reached a non-existent page&lt;/li&gt;
&lt;li&gt;Offer navigation options to guide users back to valid content&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Steps to Create a Custom 404 Page
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Create the 404 File
&lt;/h3&gt;

&lt;p&gt;In Next.js 14, creating a custom 404 page is as simple as adding a &lt;code&gt;not-found.js&lt;/code&gt; or &lt;code&gt;not-found.tsx&lt;/code&gt; file to your app directory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;app/
├── not-found.js (or not-found.tsx)
└── layout.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Design Your 404 Page
&lt;/h3&gt;

&lt;p&gt;Let's create a basic 404 page. Here's an example of what your not-found.js might look like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;Link&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;next/link&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;NotFound&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"flex flex-col items-center justify-center min-h-screen bg-gray-100"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"text-6xl font-bold text-gray-800 mb-4"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;404&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h2&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"text-2xl font-semibold text-gray-600 mb-4"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Page Not Found&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h2&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"text-gray-500 mb-8"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Oops! The page you're looking for doesn't exist.&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Link&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"/"&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600 transition-colors"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        Go back home
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Link&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This example uses Tailwind CSS for styling. If you're not using Tailwind, you can replace the &lt;code&gt;className&lt;/code&gt; attributes with your own CSS.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Customize Your 404 Page
&lt;/h3&gt;

&lt;p&gt;Feel free to customize the content and styling of your 404 page. You might want to add:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Your company logo&lt;/li&gt;
&lt;li&gt;A search bar to help users find what they're looking for&lt;/li&gt;
&lt;li&gt;Links to popular pages on your site&lt;/li&gt;
&lt;li&gt;A contact form or link to report broken links&lt;/li&gt;
&lt;li&gt;Games to interact with users&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Testing Your 404 Page
&lt;/h3&gt;

&lt;p&gt;To test your custom 404 page:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Run your Next.js development server&lt;/li&gt;
&lt;li&gt;Navigate to a non-existent route (e.g., &lt;code&gt;http://localhost:3000/this-page-does-not-exist&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;You should see your custom 404 page instead of the default Next.js 404 page.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;And there you have it! With just a few lines of code, you've transformed the dreaded 404 error into an opportunity to delight your users. &lt;/p&gt;

&lt;p&gt;Happy coding, and may your users never be truly lost again! 🚀✨&lt;/p&gt;

&lt;p&gt;P.S. If you come up with any cool 404 page ideas, drop them in the comments. I'm always looking for inspiration!&lt;/p&gt;

</description>
      <category>404</category>
      <category>custom</category>
      <category>nextjs</category>
    </item>
  </channel>
</rss>
