Run a Local Neuro Sama with Just 1 Line of Code Using the LivinGrimoire software design pattern.
The sequel to the 3‑LOC method — now even cleaner, smarter, and more modular
(Follow‑up to the original article: https://dev.to/owly/localized-neuro-sama-setup-with-only-3-lines-of-code-using-the-livingrimoire-4e93)
In the previous article, we built a localized Neuro Sama using only 3 lines of code.
That was already impressively minimal — but LivinGrimoire evolves fast.
Today, we’re taking the next step:
building the same Neuro Sama with just 1 line of code.
And the secret is a brand‑new LivinGrimoire skill pattern that changes everything.
⚡ Introducing: DiInstaller
A self‑removing skill that installs other skills, then vanishes
This new pattern is deceptively simple but incredibly powerful.
Here’s the core class:
class DiInstaller(Skill):
"""
This skill lets you package a bunch (do so in the subclass).
After adding the skills, it removes itself from the brain.
The input method therefore never runs.
"""
def __init__(self, brain: Brain):
super().__init__()
self.skills: list[Skill] = []
self.brain = brain
def manifest(self):
for skill in self.skills:
self.brain.add_skill(skill)
self.brain.remove_skill(self)
What makes this special?
- It acts as a bundle of skills
- It installs all of them in one atomic action
- It removes itself immediately, keeping the brain clean
- Its
input()method never runs — it’s a pure installer - It eliminates boilerplate and reduces clutter in your main file
This is the LivinGrimoire philosophy taken to the next level:
skills as modular, self‑contained units of intelligence.
🎁 Packaging Neuro Sama into a Single Installer
Using DiInstaller, we can create a subclass that bundles the three core Neuro Sama skills:
class DiNeuroInstaller(DiInstaller):
def __init__(self, brain: Brain):
super().__init__(brain)
self.skills.append(DiSTT(brain))
self.skills.append(DiLLMOver())
self.skills.append(DiTTS_narakeet())
def input(self, ear: str, skin: str, eye: str):
self.setSimpleAlg("Installer removed; input is unreachable.")
This class:
- Packages STT
- Packages the local LLM
- Packages TTS
- Installs all three
- Deletes itself instantly
🚀 And now the magic: 1‑line Neuro Sama
brain.add_skill(DiNeuroInstaller(brain))
That’s it.
One line.
One skill.
One complete Neuro Sama setup.
No clutter.
No boilerplate.
No leftover installer logic.
🧩 Why DiInstaller is a game‑changer
✔ Skill Bundles
Group related skills into a single installer class.
✔ Cleaner Main Files
Your AI’s entry point stays tiny and readable.
✔ Self‑Cleaning Behavior
The installer removes itself after doing its job.
✔ Perfect for DLC‑style expansions
Want to add a “Combat Pack,” “Math Pack,” or “Personality Pack”?
Just create a new DiInstaller subclass.
✔ Zero runtime overhead
The installer never participates in the input cycle.
🔮 The Future of LivinGrimoire Development
DiInstaller opens the door to:
- Conditional installers
- Skill‑set presets
- Hot‑swappable AI personalities
This is the kind of modularity that makes LivinGrimoire feel less like a framework and more like a living spellbook.
If you haven’t explored it yet, you absolutely should:
👉 https://github.com/yotamarker/LivinGrimoire
It’s packed with examples, DLC skills, and patterns that make AI development fast, expressive, and fun.
Top comments (0)