AI - Pi CLI

Installing and Launching Pi (pi.dev)#

Follow these steps to set up the Pi coding agent on your Mac Studio and link it straight to your custom local short-context models.


1 Environment Preparation#

Because Pi is a JavaScript terminal application, it runs on Node.js. If you do not have Node installed yet, use Homebrew to get it ready.

1.1 Install Node.js via Homebrew#

brew install node

2 Installation#

Install the official global Pi command-line tool. As noted in the documentation, we include the security flag to bypass unnecessary third-party package scripts.

n8n AI & Database Management

n8n AI & Database Management#


1. Database Administration#

Access the backend Postgres instance to monitor or clear AI-related data.

Access the Database#

docker exec -it n8n_postgres16 psql -U n8n -d n8n

Table Inspection#

-- Count entries in knowledge base
SELECT COUNT(*) FROM n8n_knowledge_base;
-- Count entries in chat history
SELECT COUNT(*) FROM n8n_chat_histories;
-- View table structure
\d n8n_knowledge_base
-- Preview top 20 entries
SELECT * FROM n8n_knowledge_base LIMIT 20;

Maintenance (Data Deletion)#

-- Clear all chat histories
DELETE FROM n8n_chat_histories;
-- Clear all knowledge base vectors
DELETE FROM n8n_knowledge_base;

2. AI Agent: System Prompt (Wally)#

Copy and paste the following into the System Message field of your n8n AI Agent node.

Obsidian and Hugo setup on Mac

Homelab: Obsidian to Hugo Automated Publishing Guide#

This guide outlines the infrastructure and configuration required to sync an Obsidian vault across multiple devices and automate the publishing process to a Hugo website via Cloudflare Pages.


1. Multi-Device Sync (The Git & Web Layer)#

To sync your notes between computers and view them on mobile devices without the overhead of real-time database sync engines:

1.1. Between Computers (Mac Studio & MacBook Pro/Air)#

We use the Obsidian Git plugin to synchronize vaults directly via GitHub.

Ollama & Stable Diffusion AI Guide

Ollama & Stable Diffusion AI Guide#

1 HP1GPU - Docker (Ollama Model Inventory)#

1.1 llama3.2:latest (2.0 GB)#

  • Consuming VM: HP1Docker
  • Services:
    • karakeep (Docker)
    • paperless (Docker)
    • [n8n](n8n.md) (Docker)

1.2 qwen3-vl:8b (6.1 GB)#

  • Consuming VM: HP1Docker
    • Service: paperless-ai (Docker)

1.3 gemma3:12b (8.1 GB)#

  • Consuming VM: HP1GPU
  • Service:
    • open-webui (Docker)

1.4 llama3.2-vision:latest (7.8 GB)#

  • Consuming VM: HP1Docker
  • Service:
    • paperless Inactive (Commented out in compose)

1.5 qwen2.5vl:3b (3.2 GB)#

  • Consuming VM: HP1Docker
  • Service: paperless (Testing)
  • Status: Inactive (Commented out in compose)

1.6 glm-ocr:latest (2.2 GB)#

1.7 gemma4::e4b (9.6 GB)#

1.8 nomic-embed-text:latest (274 MB)#

  • Service: Internal Embeddings / RAG
  • Status: Active (Implicit)

2 Ollama Installation & Network Setup#

2.1 Basic Installation#

# Open firewall port
ufw allow 11434/tcp
# Official Install Script
curl -fsSL [https://ollama.com/install.sh](https://ollama.com/install.sh) | sh

2.2 Enable Local Network Access#

To allow other devices to use the AI, you must change the bind address from 127.0.0.1 to 0.0.0.0.