What's behind the curtain of Toko?
8 min read
This is going to be a very long article, but it will be worth your time.
I’ve been serving you some apps I was cooking over the past few weeks.
But I didn’t share with you how I built them, nor did I share my workflow.
Today, I’m pulling back the curtain to show you what’s behind all this.
The reason I introduced the Malagasy Toko was to prepare you for this moment.
Everything I’ve been building until now was built with… TOKO.
The hearthstone I’ve been using to cook everything was Toko.
And Toko is also built with… Toko.
Meet Toko: the hearthstone of all my projects.
Source code: github.com/donovan-ratefison/toko
Toko
What is Toko? Let’s go back in time a bit, so I can give you more context about how it came into existence.
The original workflow
In March, I wrote an article about my workflow. It is long and pretty terrible to read, so let me atone for my sin and re-explain it in a simpler way today:
- I use multiple square papers on my desk to capture my thoughts as they arise.
- I take a photo when I need to digitize them.
- When I’m done processing a note, I scrunch the paper up and drop it in a transparent jar (a very good idea from Laurie Herault).
- The jar is emptied every week. On Monday, I start with an empty jar.
- Time blocking, work tracking and everything timer-related was handled within Emacs.
- Gemini for digitizing the handwriting.
- Logseq for keeping the long-term notes and resurfacing them.
As you can tell, it is very scattered. That’s why I said back then that I was building an app to bring that workflow together.
I’ve been thinking about it a lot, and I came to the conclusion that only a board-like app can reproduce a feeling similar to that of my square papers. Something similar to Miro, that integrates well with the rest.
I wish I could find different tools to choose from, but Excalidraw was the closest one I found in the open source world. Making it fit my needs was not an obvious task, so I dropped the idea and built my own tool: the first version of Toko was born.
It had the board, the cards, the links and an editor. It was OK, but not that useful. I rarely used it.
Instead, I built Vakana.mg, which was solving part of the problem.
LLM usage
Over time, with heavy usage of LLMs in a professional context, I found myself heavily using the scratch buffer of Emacs to drop ideas, polish prompts and track task completions.
It was easier to use the scratch buffer because it has no structure. If I want to, I can just activate org-mode or save it to an Org file. I talked a bit about it in this article.
The reason for this is that the chat approach takes a toll on my mental energy when you have multiple threads running at once. It’s the fast and constant context switching between all those threads that burns out my mental energy.
Add to that the frustration I get with the prompt editors of the agent CLI tools, which I find terrible.
How often did I hit Enter instead of C-j and send an unfinished prompt?
Or hit the up arrow to go back and edit, only to end up in the prompt history and lose my editing progress?
And when you work with different tools, searching for an interesting prompt you’ve used before across all of them is not obvious.
The scratch buffer was the simplest way I found to solve those issues. It served as a single buffer between me and the tools.
And it was good. But it wasn’t really scalable.
With different tasks in parallel, I still found myself lost in the buffer sometimes. And switching between them to search for a specific topic wasn’t that fun when you don’t remember a specific keyword to search for.
From those challenges, I revived Toko. I added a single magical feature to it: copy to clipboard. And it became my favorite tool to work with LLMs.
I feel so dumb for not noticing this earlier.
This little upgrade of Toko was a game changer for my productivity. Now Toko had everything I needed:
- Project scoping using boards
- Tagging of cards
- Prompt forging, by jotting ideas into cards and editing them at will
- Reminder notifications for the tasks or agents I need to check at a specific time
- Search across all projects
- Rating and reusing prompts
Now I have all my data structured and searchable, independently of the tool I’m using, whether it’s a web chat, a desktop app or a CLI.
Herdr integration
Another game changer for me was the integration of Herdr inside Toko.
With Herdr integrated into Toko, I no longer need to open a terminal to send prompts. I can send them directly to any agent tool I want, across the different machines I work on.
Better yet, with the scheduler and the reminders of Toko, I can schedule any agent to run a prompt at any given moment, on any of my machines.
- It has helped me get the maximum out of my AI subscriptions.
- It has also saved me from AI burnout, because now I can have scheduled tasks running while I’m sleeping or doing other activities.
Instead of randomly checking and steering the AI tools, I can plan ahead and properly time-block my interactions with the agents (and yes, I’ve built a time blocker inside Toko too).
When I send a card to an agent on the board, the agent responds in a card linked to the previous one. I can respond to that card directly to send another prompt to the agent, and so on.
We end up with a thread of cards on the board that we can collapse or expand.
Later on, I can send the thread to a new agent and keep the context of the entire discussion.
It is very useful for me as a human, but it is also token efficient.
With the Herdr integration, we now have a complete and highly usable version of Toko.
The last piece I’ve added was a mod. Sometimes, I’m just fed up with text and want to see something more pleasant and calming while the agents are working. So I built an aquarium mod for my own pleasure:
- Each fish is an agent running in Herdr. When it’s active, there is an aura around it.
- I can click one to send a prompt, to steer the agent or to see what it is doing.
- When an agent finishes its task, it drops a pearl at the bottom of the tank. When it’s checked, the pearl goes inside a transparent jar (the same idea I explained above).
It is quite pleasant and requires less mental energy than a wall of text.
And it’s just a view, not another app: the board is one toggle away. One click and I’m back to my cards.
The aquarium mod
Toko inside Emacs
Having my workflow entirely in Emacs is a dream of mine. But for convenience, and out of professional necessity, I have to use other tools and other platforms.
The moment I learned about the Emacs canvas, I knew this was the missing piece that could make my workflow within Emacs complete. But someone had yet to build the foundation that others can build upon.
I had been waiting for something like excali-mode to happen within Emacs. But now that it is there, it isn’t really a good fit for what I was trying to have in my workflow. I felt like I needed something specific, not related to Excalidraw.
And that’s why I ended up building Rary, which serves as the foundation for the rest.
Once a usable version of Rary was done, I started building a few tools on top of it to test and enhance its capabilities. One such tool is Tadidy: a gamification of Org for agenda, tasks, habits, project management and memory palace.
And along with that, I built a port of Toko inside Emacs.
The process of building it was pretty straightforward, as the features and the spec were already there. I knew exactly what needed to be done.
A functional and usable version of this Toko port is already there. I’ve been using it to build and enhance itself, along with other experimental projects.
Meet Toko.el, the port of Toko inside Emacs 32.
Source code: github.com/donovan-ratefison/toko.el
It brings the essential features of Toko, along with integration with some of the built-in Emacs packages like project.el, Org mode, etc. (the advantage of using Emacs).
Toko.el
Today, I’m releasing both Toko and Toko.el publicly.
- Toko: the binaries are available for download on the releases page (Linux, macOS and Windows). You can try it immediately.
- Toko.el: you have to build Emacs 32 first. But don’t worry, an easy guide is available in the repo, and one script does the job for you.
If you like the tools, leave a star on their respective GitHub repositories.
And I would love to know what you think about Toko. You can send me an email at contact@donovan-ratefison.mg for feedback.