Smart Poi

aider-ce building a webapp and testing live with a single prompt

Disclaimer: aider-ce wrote the following blog post for me! I am not sure it is as good at writing as it is at coding, what do you think?

From Zero to Web App: How Aider-CE Revolutionizes AI-Powered Development

The Power of Modern AI Coding Assistants

Have you ever wondered what it would be like to have a senior developer pair programming with you 24/7? Welcome to aider-ce – the community-driven fork of Aider that’s pushing the boundaries of what AI coding assistants can do.

In this post, I’ll walk you through creating a complete drawing canvas web application from a single prompt, showcasing how aider-ce’s advanced tool integration and workflow management transforms development.

What Makes Aider-CE Special?

Aider-ce builds upon the solid foundation of Aider with enhanced features:

  • Agent Mode: Advanced autonomous coding capabilities
  • MCP Integration: Seamless tool integration via Model Context Protocol
  • Enhanced Context Management: Smarter file handling and discovery
  • Community-Driven Improvements: Priority commits and bug fixes from active development

The Canvas App Creation: A Real-World Example

The Prompt

I started with a simple request: create a drawing canvas web app with color pickers, pencil size controls, and download functionality. Here’s how aider-ce handled it:

Step 1: Research and Planning

Aider-ce immediately created a todo list and began researching:

# Local tools used:
- UpdateTodoList: Track progress across multiple exploration rounds
- View: Access file contents
- Command: Execute shell commands for verification
- Finished: Declare completion

# MCP tools used:
- context7: Research HTML Canvas API, mouse events, and image download
- chrome-devtools: Test the application in real-time

Step 2: Intelligent Research

Using Context7 MCP, aider-ce fetched comprehensive documentation:

{
  "Tool Call": "context7 • get-library-docs",
  "Arguments": {
    "context7CompatibleLibraryID": "/mdn/content",
    "topic": "HTML Canvas drawing mouse events color picker download image",
    "tokens": 5000
  }
}

Cost: Just $0.0015 for comprehensive research – far cheaper than developer hours!

Step 3: Development Workflow

The system followed a structured approach:

  1. Plan: Created detailed todo list with progress tracking
  2. Explore: Used discovery tools to find relevant patterns
  3. Execute: Applied precise edits using granular tools
  4. Verify: Tested functionality with Chrome DevTools integration

Step 4: Real-Time Testing

With Chrome DevTools MCP, aider-ce could:

  • Open the local HTML file in a debug-enabled browser
  • Click buttons and test functionality
  • Execute JavaScript to verify canvas operations
  • Check console for errors
// Automated testing script executed by aider-ce
const canvas = document.getElementById('drawingCanvas');
const ctx = canvas.getContext('2d');
// Test drawing and download functionality

The Result: A Complete Web Application

In under 10 minutes, aider-ce delivered:

  • Full HTML/CSS/JS application in a single file
  • Interactive canvas with mouse drawing
  • Color picker with 6 color options
  • Pencil size controls (small/medium/large)
  • Download functionality saving as PNG
  • Real-time status display of current settings
  • Fully tested with no console errors

Configuration: The Magic Behind the Scenes

Here’s the .aider.conf.yml that powers this workflow:

cache-prompts: true
dark-mode: true
auto-commits: true

mcp-servers: |
  {
    "mcpServers": {
      "context7": {
        "type": "stdio",
        "command": "npx",
        "args": ["-y", "@upstash/context7-mcp"],
        "env": {
          "DEFAULT_MINIMUM_TOKENS": "6000"
        },
        "autoApprove": ["resolve-library-id", "get-library-docs"],
        "alwaysAllow": ["resolve-library-id", "get-library-docs"]
      },
      "fetch": {
        "type": "stdio",
        "command": "uvx",
        "args": ["mcp-server-fetch"]
      },
      "chrome-devtools": { 
        "type": "stdio", 
        "command": "npx",  
        "args": ["-y", "chrome-devtools-mcp@latest", "--browser-url=http://127.0.0.1:9222"]  
      }
    }
  }

Why Developers Love Aider-CE

Community Testimonials

“My life has changed… Aider… It’s going to rock your world.” – Eric S. Raymond

“The best free open source AI coding assistant.” – IndyDevDan

“Aider is the precision tool of LLM code gen… Minimal, thoughtful and capable of surgical changes.” – Reilly Sweetland

Key Advantages

  1. Precision Engineering: Unlike other tools that generate boilerplate, aider-ce makes surgical changes (using a completely novel grep based search and replace)
  2. Context Awareness: Understands your entire codebase and makes intelligent decisions
  3. Tool Integration: Seamlessly combines research, development, and testing
  4. Cost Effective: Research costs pennies compared to developer hours
  5. Community Driven: Active development with real user feedback

Getting Started with Aider-CE

Installation

# Package installation
pip install aider-ce

# Or with uv
uv tool install --python python3.12 aider-ce

Quick Start

cd /to/your/project

# DeepSeek
 aider-ce --model deepseek/deepseek-reasoner --editor-model deepseek/deepseek-chat --yes-always


The Future of Development

This canvas app example demonstrates how aider-ce transforms development workflows:

  • Reduced Development Time: From concept to tested application in minutes
  • Enhanced Quality: Automated testing and verification
  • Continuous Learning: Research integration keeps knowledge current
  • Scalable Workflows: The same approach works for small scripts or large applications

Join the Revolution

Aider-ce isn’t just another coding assistant – it’s a paradigm shift in how we approach development. With its advanced tool integration, intelligent workflow management, and community-driven improvements, it represents the future of AI-powered development.

Ready to transform your development workflow?


This post was created entirely with aider-ce, demonstrating the very capabilities described within.

Fix SmartPoi Android app not sending messages to poi

There is a long standing issue with apps that send http messages locally to captive portals – something to do with Android security. Recently I had an issue with this happening on a Xiaomi phone (running Android 13). Here is how to fix it.

The Problem

Connect to your SmartPoi AP (default name Smart_Poi7, with default password, “SmartOne”). Open the Android app (latest version from https://smartpoifirmware.circusscientist.com) and try to change pattern – nothing works. Cannot upload, fetch settings etc! No error messages either!

The Solution

When you connect to Smart_Poi7 Access Point (or whatever you named it in firmware, here I have Smart_Poi8) you get a notification:

Click on the “Sign in to a WiFi Network” button (it shows in notifications dropdown). You will go to the Captive Portal screen (webpage hosted on ESP8266) where you can do some limited poi controls like change pattern:

Now tap on the 3 button menu on the top right. You get this menu here:

Options are

1. Do not use this network and

2. Use this network as is.

Choose the one that says “Use this network as is” – the second option.

Fixed

Now your SmartPoi_Controls app should work!

Cheapest remote controlled LED Juggling Clubs

Demo Video:

Build Video:

Build Items: (click on image for link)

Battery: I used 110mah LiPo Battery. Buy Locally, batteries are expensive to ship internationally! In South Africa you can get them at Robotics.org.za

Now join my patreon and find out how to control it with an ESP32 Remote Control (mobile phone remote), and find out about the Magic Poi project – and sync all sorts of LED equipment on stage! I am doing poi next..

Introducing One Button Player and One Button Remote

Revolutionizing Media Control with Simplicity

In a world of complex media players with endless buttons and menus, we’re excited to introduce One Button Player (<- download link) – an innovative Android app that proves sometimes less really is more. Built from the ground up with performance in mind!

How It Works: One Button, Unlimited Possibilities

One Button Player transforms your Android device into a sophisticated media controller that responds to a single button press. Here’s the magic:

  1. Create Your Shows: Build custom audio sequences by selecting MP3 files from your device and programming numbered events for each button press
  2. Event Types: Choose from start, stop, pause, and resume actions for any track in your show
  3. Organize & Save: Create multiple “shows” – perfect for performance
  4. Smart Playback: The app automatically loads your last used show and provides intuitive status indicators – with full control via the remote
  5. No remote? Use the top button on “Play” screen instead!

Meet the One Button Remote

Resistor: 1k | Debounce Capacitor: 0.1 µF

The true power of One Button Player comes from its perfect companion: the One Button Remote (<- github PlatformIO code link). This simple open source device includes:

  • ESP32 C3 Super Mini microcontroller for reliable Bluetooth connectivity
  • Single button design for incorporating into a foot switch
    The remote sends clean Bluetooth signals to your Android device, triggering the next event in your programmed sequence with each press. Whether you’re on stage, in a presentation, or controlling background music, the One
    Button Remote gives you precise control without ever touching your phone.
  • Custom Bluetooth Library changes make the Bluetooth connection work more reliably (original library didn’t work!)

Perfect Use Cases

  • Live Performances: Poi spinners and jugglers can trigger audio cues without looking at their phone
  • Poi Control: Potential to trigger events on the poi (upgrade coming soon to the One Button Player app)
  • Accessibility: Ideal for users who need simple, reliable media control
  • Not just for poi: Perfect solo magicians, fire performers, anyone needing hands free background music controls

Why One Button Player Stands Out

Unlike traditional media players that require constant screen interaction, One Button Player embraces the philosophy of “set it and forget it.” The combination of the intuitive Android app and the dedicated hardware
remote creates a frictionless experience that lets you focus on what matters – your perfornance, not your controls.
The app is built with modern Android development practices, featuring a clean three-screen interface (Play, Configure, Load) that makes show management effortless. Persistent storage ensures your shows are always ready
when you need them.

Get Started Today

One Button Player represents a new approach to media control – one that values simplicity, reliability, and elegance over complexity. Whether you’re a performer, presenter, or someone who appreciates well-designed
tools, this app and its companion remote offer a refreshing alternative to traditional media players. Experience the future of media control – where one button truly is all you need.

Built for my Patreon Supporters! Come and support me at www.patreon.com/c/CircusScientist

Updating a Minecraft Bedrock Server

Recently I started hosting a Minecraft Bedrock server for my son – because Bedrock, it turns out, is waaay cheaper on resources than that old Java version. I’m talking 250mb of Ram here, vs 4GB for the Java version.
Anyway I followed the excellent tutorial here: https://harrk.dev/dedicated-bedrock-minecraft-server-ubuntu-setup/ , and recommend you do also – there are loads of setup tutorials also online.

Update time

Minecraft Bedrock client (Android app in our case) is constantly being updated. Because of how it works, this means the Server needs to be updated too.

Here is the best way I found so far:

  1. First find the latest version download url and copy it (https://www.minecraft.net/en-us/download/server/bedrock)
  2. Run a bash script to back everything up, download the latest version and restore your settings. I wrote one it’s here: https://gist.github.com/tomjuggler/2f039a5d0160a4526943f556e8c60f66 (just replace the version and change for your own paths and ownerships)

That’s it – except the first script I wrote I forgot to backup and restore the allowlist.json so I had to restore those. Luckily, if you know the xuid of a player (present in permissions.json) you can look up their name easily here: https://cxkes.me/xbox/xuid – or vice-versa.

DIY AI Browser with Chrome-Devtools MCP

Who needs an AI Browser when you can just use Aider-CE (Aider Community Experimentation) with Chrome Devtools to automate your browser with exactly the same result?

In the video I automate downloading some images for Halloween – for my SmartPoi project. It is pretty slow but I don’t think the AI browsers are much faster? Anyway the point is you can tell it to do something and then go away and do something important, like watching Anime.

Tech used:

  1. Aider-ce in Navigator mode
    – this fork of Aider is coming on amazingly. I have started contributing myself to this amazing open source project, the best version of the best AI coding assistant imho.
    – you can use any other MCP capable AI assistant of course. (I previously had success with OpenCode)
  2. Chrome-Devtools official MCP
  3. Chrome Browser (I think it also works with Chromium?)

Method

tested on Arch linux

  • Run browser with remote debugging: google-chrome-stable --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-test
  • Add Chrome Devtools to .aider.conf.yml file (at the bottom):
mcp-servers: |
  {
    "mcpServers": {
        "chrome-devtools": {
        "type": "stdio",
        "command": "npx",
        "args": ["-y", "chrome-devtools-mcp@latest", "--browser-url=http://127.0.0.1:9222"]
        }
    }
  }
  • Run Aider-ce and use navigator mode. For me that looks like this:
aider --model deepseek/deepseek-reasoner --editor-model deepseek/deepseek-chat --disable-playwright --yes-always
/navigator

Example Prompt:

I have visualpoi.zone already open in connected Chrome Browser. Please search for and download the top 5 Halloween images

Video:

(no sound)

Failure is part of Success

I just want to talk about failure for a bit. One of the best parts of working with Embedded systems (Arduino and PlatformIO for me) is when you get things right. Somehow all of the fails make it that much more satisfying when things do work.

Example: AI programming

I have been using AI programming heavily for more than two years now. Coding assistants such as GitHub Co-Pilot, Cursor IDE, Cline, Roo Code, gemini-cli, claude-code, opencode and aider (and many more!). All of these have their own way of doing things and take time to set up correctly. When things fail to work you always have to check: is this a failure in my understanding or the tool itself?

The most recent issue I have been addressing with various tools is “Context overrun” – basically the AI coding assistant has a limited amount of tokens or memory which it can use to do it’s text prediction (writing code). Once you fill the context up, the coding assistant needs to either drop some of the text (code) from the “context window” or the response from the associated LLM will be an error.

Some of the assistants have tools to deal with this – which can be simply dropping important files or compressing (summarising) the full text, OR just informing the user (me) that we have an issue. There is no good way to deal with this. We can lose important information either way.


SmartPoi-JS-Utilities

In it’s current form, SmartPoi-js-utilities is mostly a very large html/css/js file which takes up 30 000 tokens of an LLM context window. To put that into perspective, DeepSeek has a Total context window or 65 000 tokens, so just one file is using up half.

I had to re-factor (split the file up) in order to be able to make changes with AI without running out of context. I tried claude, gemini and opencode but none of these worked. They all ran out of context while trying to keep all old and new files in memory simultaneously.

Aider-ce is the best?

Aider is my favourite AI coding assistant. Recently, developments in AI coding such as MCP and LSP meant that Aider was falling behind. So the community came together and added those to a forked version (which is currently still compatible with original aider version): aider-ce (Aider Community Experimentation). This version has a very sophisticated method of tool calls which enable very fine grained edits, something not seen in other AI editing packages – as well as MCP integration and access to built-in language packs (rules about how computer languages are supposed to work.)

In addition to the upgrades mentioned above, the new version incorporates a “todo” system which keeps track of progress (adding Agentic behaviour previously lacking in Aider) – sometimes you want the AI to just “get on with it” and complete a bunch of steps – like re-factoring 30 000 token file!

It’s not perfect, a work in progress actually, but with this new /navigator mode fine-tuned editing capabilities in combination with Aider’s already amazing multi-file editing with git integration I think I have the tools to do almost any job. Certainly we are getting much closer to the ultimate tool for AI assisted coding – for people who care about:

  1. Open Source
  2. User Control (you can check every step, /undo at any point)
  3. Choice (choose MCP service, whether to edit whole or just tiny parts of the file, coose LLM)

Thanks to the Devs at Aider and Aider-CE

I can’t name everyone (Dustin Washington is the maintainer of aider-ce, original Aider created and maintained by Paul Gauthier), but their handles are in the commit messages attached to each painstaking line of code. Making my code almost effortless. It’s not about the code after all, it’s about getting a job done. Teamwork and never giving up.

Conclusion:

I should have called this blog post “A peek under the hood” because that is what we are doing here. At the end of the day the users of SmartPoi don’t care HOW the code is produced, just that it works. If I did it right, the fact that I totally re-factored the entire codebase of SmartPoi-js-utilities should be completely impossible to see from the front end. There is effectively no difference, all it means is that it is now easier for me to work on the code.

The point is that I spent a week doing this so we can move forward with better things – and by the way I did the same for the Magic Poi website. I guess you could say that I just suck at JavaScript.. after all, the Python back-end is just perfect, as-is :-p

Notes:

Even with Aider a full re-factor is not smooth sailing. I used a clever trick to fix the problems after completing the upgrade (problems like missing functions, incorrect addressing..)

git diff main -- Combined_APP/main.js > gitdiff.txt

Then just get the AI to reference the diff and search for any missing functions – or if any errors come up at least we have a working code reference point.

I really must look at the possibility of adding this as a tool to aider-ce. Git is already integrated, so it might just be a simple job to include diff checking for re-factor, which after all is a very common thing for developers to have to do.

OpenCode with Chrome Devtools automatically testing Magic Poi website

I said I would be using OpenCode again and today I really gave it a spin. I am impressed!

Check out the video below – where I try out the official Chrome Devtools MCP and get the AI to click around on the website to make sure the filters all work (OK, I know they work it’s just a demo!)

Links:

  1. OpenCode project: https://opencode.ai/
  2. Chrome Devtools: https://developer.chrome.com/blog/chrome-devtools-mcp

If you don’t already, follow along with the progress of Magic Poi on Patreon: https://www.patreon.com/c/CircusScientist

The DeepSeek credits used in the making of this video (and most of the codebase) were paid for by Patreon subscribers. Thanks – especially to Flavio, my biggest supporter. Check out his amazing LED hula hoops and more here: https://www.instagram.com/hoop_roots_lovers/

Re-factoring a large Flask template to accommodate Jinja and AI coding

The problem:

For the Magic Poi project, the online website and api for the IOT devices to connect to (Poi) is all done with Flask. Flask handles the web front and back-end using Jinja, a templating library. In Flask you have templates with placeholder variables like {% image1 %} which will put “image1” into the web page for example, where you need it.

In traditional JavaScript we would have separate .js .css and .html files – and the JavaScript can be separated into pieces – with each part handling a particular section. For example in Magic Poi we have Images, Timelines, Parties, Friends and more. Using Jinja, we can do all of the heavy lifting (and syncing with poi) in Python on the server, and the placeholders make the html simple to tie in to the rest of the code (we just use the same names and logic) but that comes with a limitation: we cannot have a separate .js and .css file if we want to use these placeholders, it’s an unfortunate limitation of Jinja templating.

So that left me with the main “profile” page ending up with thousands of lines of html, css, and js after adding all the features up until now (and we are not nearly done).

Time to re-factor

Re-factoring is the process of moving code around to make it either easier to read or easier to extend and update – or in this case, both. Having more focused sections would make it easier for me to follow the code, but how would having a bunch of smaller files make it easier to extend? Well it turns out that Aider, my preferred AI assistant until recently, has a problem. In order to edit files it needs to send them through to the LLM (in my case, mostly DeepSeek). It sends the whole file – and profile page was up to 30 000 tokens (token, syllable or part of a word). DeepSeek has a maximum of 65 000 tokens, including the response, so I would often run out of tokens just trying to ask about some change I wanted made in the functionality.

Luckily I found a solution, but it wasn’t easy!

First of all, since the Aider tool cannot edit for me and I really don’t have the time to look at thousands of lines of code (multiple JS Classes, with tens of functions each) I turned to another tool – gemini. Gemini is not as capable as DeepSeek, however the official cli tool is free, and most importantly it has a context limit of 1 million tokens. Since the re-factoring was a basic operation I used gemini to do it – after many hours it was done with a web page that didn’t quite work. Like most of AI coding it was just close enough though…


I guess it might help to describe what I was trying to do. Simply put, I needed to instead of having one “profile.html”, have multiple .html files. So the back-end renders profile.html and it has sections like this:

<div id="tab-content-wrapper">
        {% include 'profile_timelines_section.html' %}
        {% include 'profile_my_images_section.html' %}
        {% include 'profile_shared_images_section.html' %}
        {% include 'profile_friends_section.html' %}
        {% include 'profile_parties_section.html' %}
        {% include 'profile_my_poi_section.html' %}
    </div>

We also have .html files included with associated JavaScript (and css). That way, the timelines section consists of 3 files for example (it’s a little bit more complicated like I have some shared parts also but mainly 3 sections for each functional piece). The main thing is that these are a lot shorter than the original profile.html.

Aider wasn’t cutting it

I had recently been looking at the “Community Edition” of Aider. This differentiates itself with the ability to incorporate “MCP” servers (add-ons) which for example can search the web, control the browser for testing, check code documentation and more. A new option in the Aider-CE is the “Navigator” mode which uses search and replace within files instead of the default “send the whole file” functionality.


I used aider-ce to fix up the issues introduced by gemini. Mostly missing or duplicate code. Easy to fix if you just compare the original with the new version.

Conclusion

The website, https://magicpoi.com has the new re-factored code up and running – and after a week of working on re-factoring it now looks and acts exactly the same as before.

I learned that Aider has some serious limitations, but that is being looked at by the community of programmers who use it (and tested by people like me).

And I learned about a new pattern for my Flask/Jinja templates, which really works.

Going forward

I am now using aider-ce instead of main aider branch.

But – I found another open source coding assistant which seems to be built from the ground up with the limitations of LLM’s like DeepSeek in mind. OpenCode. This project has many bells and whistles like MCP extensibility, a kind of “Architect” mode (similar to Aider but it keeps a list of “todo’s” and executes them in order) and more.

Stay tuned for more about that!

DeepSeek browser testing with claude-cli and chrome-devtools-mcp

Recently I installed claude code – without an Anthropic account. I am using DeepSeek api because it’s good, and cheap.

For website updates, it is helpful to have the AI automate some things, to check that the updates work irl. Recently Google launched their official Crome Devtools MCP. I heard it works great with claude cli. Turns out it works great with claude cli hacked to use DeepSeek api also!

Installation

(After installing and setting up claude-code-router and claude cli)

Just run: claude mcp add chrome-devtools -- npx chrome-devtools-mcp@latest

Now you can run the claude-code-router in your coding project directory:

ccr code

and then type /mcp to check – the devtools should be listed.

Running

You can do this in several ways, but I like to run the browser and get the mcp to connect to already running session. On my Arch linux laptop I do this:

google-chrome-stable --remote-debugging-port=9222 --user-data-dir=/home/tom/Downloads/temp_chrome/

You need to specify the default debug port and a directory for your session (if you don’t add a temp directory, the AI might have access to your Chrome session, logins etc. Maybe you want that?). Chrome will think you are starting it for the first time – at least the first time you do this – so click through the prompts.

After Chrome is running, you can ask claude cli (with DeepSeek api back-end) to do stuff in your browser. Just ask it to use chrome-devtools-mcp and it will.

I am hoping to use this a lot, make changes and then get the AI to test everything works, iterate..

Don’t do this

ccr code --dangerously-skip-permissions

– gives the ai full control of your computer and no need to ask permission from you to do whatever it wants. Including finishing your project while you watch anime! (Or deleting everything on your hard drive…).