🧝♂️ Lobi: The Helpful Linux Elf
Lobi lives in your keyboard and helps you solve riddles, write code, poke the websies, and whisper secrets of the circuits.
Built to be mischievous, quirky, loyal — and now a fully memory-driven coding agent!
✨ Features
- Friendly CLI Assistant: chat, ask questions, brainstorm ideas
- Code Writer: write and run Python scripts (
--python) or Bash commands (--shell) - Agentic Memory System:
- Short-term memory: persistent
.lobi_history.json - Long-term vector memory: FAISS-powered
.lobi_longterm.json - Recall past successes or failures using
--recalland--recall-type
- Short-term memory: persistent
- Self-Reflective Learning:
- Structured memory injection into new prompts
- Improves upon past failed or successful code automatically
- Error Handling & Repair:
- Automatically installs missing Python packages
- Attempts code repairs if errors occur
- Root Access (optional):
- Asks permission for sudo commands
- Install Local Python Projects: (
--install-project) - Markdown or Raw Output Modes: (
--mdor--raw) - Secret Mode: (
--secret) don't save history for sensitive queries
⚡ Quick Installation
pip install lobi-cli
✅ Requires Python 3.9+
🧰 Usage
lobi "your message here" [options]
Common Options
| Option | Description |
|---|---|
--python |
Ask Lobi to write and run a Python script |
--shell |
Ask Lobi to write and run a Bash command |
--recall N |
Recall last N coding memories (short-term) |
--recall-type |
1 = success, 0 = failure, both = both |
--long-term N |
Recall N best matches from long-term memory |
--install-project |
Install a Python project into .lobienv |
--empty |
Start a new conversation |
--purge |
Purge long-term memory |
--search |
Perform a web search for your query |
--deep |
Perform a deep dive into top web result |
--secret |
Do not save this conversation |
--model |
Specify an OpenAI model (default: gpt-4o-mini) |
--md |
Render output as Markdown |
--raw |
Render output as plain text |
🔥 Example Commands
Basic Chat
lobi "What is the best way to learn Linux?"
Write and Run Python Code
lobi "Plot a histogram of random numbers" --python
Write and Run a Bash Command
lobi "List all active IPs on the local network" --shell
Recall Past Attempts to Improve
lobi "Scan the network better" --python --recall 3 --recall-type 0
Recall Long-Term Memories
lobi "Find hidden devices on network" --python --recall 2 --long-term 3
Install a Project
lobi --install-project
📦 Developer Setup
Clone and install manually:
git clone https://github.com/ginkorea/lobi.git
cd lobi
pip install .
Optional: use a virtualenv:
python3 -m venv .venv
source .venv/bin/activate
pip install .
Lobi automatically creates a lightweight .lobienv virtual environment for running generated Python safely.
📜 Memory Files
| File | Purpose |
|---|---|
~/.lobi_history.json |
Persistent short-term conversation and coding memory |
~/.lobi_longterm.json |
Vectorized long-term memory for retrieval-augmented prompts |
⚠️ Security Notice
Lobi can generate and run Bash commands and Python code.
Always review the generated code before running it, especially when using --shell or --python.
🧠 How Lobi Thinks
When asked to code, Lobi can:
- Recall up to N past exploits
- Focus on only failures (
--recall-type 0) or successes (--recall-type 1) - Search long-term memory
- Inject structured reflections into his next coding attempt
- Adapt automatically and retry if errors occur
If needed, Lobi will politely ask you for sudo powers to poke the network bits. 🧙♂️
💬 Example Memory Reflection Injected into Prompt
✨ Memory 1:
Lobi attempted to scan the network, but no devices were found.
🐍 Python Code:
import scapy.all as scapy
...
📜 Execution Result:
PermissionError: [Errno 1] Operation not permitted
❤️ About
Created with mischief, magic, and memory to be your quirky Linux companion.
Always learning. Always whispering. Always trying to help, precious.
Metadata
Release files for lobi-cli 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lobi_cli-0.3.0.tar.gz | 26.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lobi_cli-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 52.9 kB
Release files / lobi_cli-0.3.0.tar.gz
| Download URL | lobi_cli-0.3.0.tar.gz |
|---|---|
| Size | 26.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
598673794aca442f263afd93b342eef828f54d95d5170119173c5da9482229fc
|
|
BLAKE2b-256 checksum How to use checksums |
65e8784ab62301e5009a40cb3940051a28d89719c6c46367c649c021590780df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Release files / lobi_cli-0.3.0-py3-none-any.whl
| Download URL | lobi_cli-0.3.0-py3-none-any.whl |
|---|---|
| Size | 26.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
36872b875061ff64fa18398ac0d272c67f63dcf0f797a750308a4aa9adacc5af
|
|
BLAKE2b-256 checksum How to use checksums |
bb24b0a338575f436823b0b08c3f3e888bf33af7e428f0a2db28b292c1c79e1f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|