Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ COPY build.sh /opt/neuros/
COPY Makefile /opt/neuros/
COPY validate-build.sh /opt/neuros/

# COPY carries the mode from the build context, so this is a no-op on a normal
# checkout. It is here because the entrypoint is one of these files: if the
# execute bit is ever lost upstream, the failure is "exec format"/"permission
# denied" at docker run time rather than anything visible during the build.
RUN chmod +x /opt/neuros/build.sh /opt/neuros/validate-build.sh

# Install Python dependencies
RUN pip3 install --break-system-packages requests || true

Expand Down
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ log() {
}

success() {
echo -e "${GREEN}[]${NC} $1"
echo -e "${GREEN}[OK]${NC} $1"
}

warn() {
echo -e "${YELLOW}[!]${NC} $1"
}

error() {
echo -e "${RED}[]${NC} $1"
echo -e "${RED}[FAIL]${NC} $1"
exit 1
}

Expand Down
18 changes: 9 additions & 9 deletions config/hooks/live/0700-install-neuros-tools.hook.chroot
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ NEUROS_TOOLS=(
for tool in "${NEUROS_TOOLS[@]}"; do
if [ -f "$tool" ]; then
chmod +x "$tool"
echo " $(basename "$tool")"
echo " [ok] $(basename "$tool")"
else
echo " ⚠️ $(basename "$tool") not found"
echo " [warn] $(basename "$tool") not found"
fi
done

Expand All @@ -107,17 +107,17 @@ if [ -f /etc/neuros-completions.bash ]; then
echo "# NeurOS completions" >> /etc/skel/.bashrc
echo "source /etc/neuros-completions.bash 2>/dev/null" >> /etc/skel/.bashrc
fi
echo " bash completions"
echo " [ok] bash completions"
fi

# Install zsh completions
if [ -d /usr/share/zsh/site-functions ]; then
echo " zsh completions"
echo " [ok] zsh completions"
fi

# Install fish completions (if fish is installed)
if [ -d /etc/skel/.config/fish/completions ]; then
echo " fish completions"
echo " [ok] fish completions"
fi

# Create symlinks for convenience
Expand Down Expand Up @@ -152,15 +152,15 @@ DESKTOP
if [ -f /etc/systemd/system/neuros-autofix.service ]; then
systemctl daemon-reload 2>/dev/null || true
systemctl enable neuros-autofix.service 2>/dev/null && \
echo " neuros-autofix service enabled" || \
echo " ⚠️ neuros-autofix service enable skipped (no systemd)"
echo " [ok] neuros-autofix service enabled" || \
echo " [warn] neuros-autofix service enable skipped (no systemd)"
fi

# Refresh the hicolor icon theme cache so the tray icon (neuros-symbolic) is found
if command -v gtk-update-icon-cache >/dev/null 2>&1; then
gtk-update-icon-cache -f -t /usr/share/icons/hicolor 2>/dev/null && \
echo " icon cache updated" || \
echo " ⚠️ icon cache update skipped"
echo " [ok] icon cache updated" || \
echo " [warn] icon cache update skipped"
fi

echo "[NeurOS] Tools installation complete."
4 changes: 2 additions & 2 deletions config/includes.chroot/etc/skel/.zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ bindkey '^@' nn-widget

# === Prompt customization ===
# Add NeurOS indicator to prompt
NEUROS_INDICATOR="🧠"
NEUROS_INDICATOR=""

# === Environment ===
export EDITOR="nvim"
Expand All @@ -186,7 +186,7 @@ zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
# === Welcome (first run) ===
if [ ! -f "$HOME/.config/neuros/.welcome-shown" ]; then
echo ""
echo " 🧠 Welcome to NeurOS!"
echo " Welcome to NeurOS!"
echo " Type 'nn \"your question\"' to ask the local AI."
echo " Type 'nn -i' for interactive mode."
echo ""
Expand Down
4 changes: 2 additions & 2 deletions config/includes.chroot/usr/local/bin/neuros-agent
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ def system_status():
info = get_system_info()
ollama = get_ollama_status()

print("🧠 NeurOS System Status")
print("NeurOS System Status")
print("=" * 40)

if "uptime" in info:
Expand All @@ -393,7 +393,7 @@ def system_status():
if "local_ip" in info:
print(f" Local IP: {info['local_ip']}")

print(f" LLM: {'🟢 Running' if ollama['running'] else '🔴 Stopped'}")
print(f" LLM: {'[green] Running' if ollama['running'] else '[red] Stopped'}")
if ollama.get("models"):
print(f" Models: {', '.join(ollama['models'])}")

Expand Down
12 changes: 6 additions & 6 deletions config/includes.chroot/usr/local/bin/neuros-alert
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ def run_script(script_path, message):


def listen_stdin():
print("👂 Alert listener active (Ctrl+C to stop)")
print("Alert listener active (Ctrl+C to stop)")
try:
for line in sys.stdin:
line = line.strip()
if not line:
continue
send_desktop("NeurOS Alert", line)
print(f" 🔔 {line}")
print(f" {line}")
except KeyboardInterrupt:
pass

Expand Down Expand Up @@ -132,22 +132,22 @@ def main():
if args.webhook:
ok = send_webhook(args.webhook, args.message)
log_alert("webhook", args.message, ok)
results.append(f"{'' if ok else ''} webhook")
results.append(f"{'[ok]' if ok else '[fail]'} webhook")

if args.email:
ok = send_email(args.email, args.title, args.message)
log_alert("email", args.message, ok)
results.append(f"{'' if ok else ''} email")
results.append(f"{'[ok]' if ok else '[fail]'} email")

if args.script:
ok = run_script(args.script, args.message)
log_alert("script", args.message, ok)
results.append(f"{'' if ok else ''} script")
results.append(f"{'[ok]' if ok else '[fail]'} script")

if not (args.webhook or args.email or args.script):
ok = send_desktop(args.title, args.message, args.urgency)
log_alert("desktop", args.message, ok)
results.append(f"{'' if ok else ''} desktop")
results.append(f"{'[ok]' if ok else '[fail]'} desktop")

if results:
print(f" Alert: {' '.join(results)}")
Expand Down
12 changes: 6 additions & 6 deletions config/includes.chroot/usr/local/bin/neuros-analyze
Original file line number Diff line number Diff line change
Expand Up @@ -86,25 +86,25 @@ def analyze_data(filepath):
print(f"Error: Could not read {filepath}")
return

print(f"\n📊 Analyzing {fname}")
print(f"\nAnalyzing {fname}")
print(f" {len(headers)} columns, {len(rows)} rows sampled\n")

# Show column stats
for col, info in stats.items():
if isinstance(info, dict):
if info.get("type") == "numeric":
print(f" 📈 {col}: avg={info['avg']:.2f}, min={info['min']}, max={info['max']}")
print(f" {col}: avg={info['avg']:.2f}, min={info['min']}, max={info['max']}")
else:
samples = ', '.join(str(v) for v in info.get('sample_values', [])[:5])
print(f" 🏷️ {col}: {info['unique_count']} unique values ({samples}...)")
print(f" {col}: {info['unique_count']} unique values ({samples}...)")

# AI analysis
sample_data = json.dumps([dict(r) for r in rows[:15]], indent=2)
stats_json = json.dumps(stats, indent=2)

elif ext == '.json':
content = read_json(filepath)
print(f"\n📊 Analyzing {fname}")
print(f"\nAnalyzing {fname}")
stats_json = "(see sample below)"
sample_data = content
else:
Expand All @@ -127,7 +127,7 @@ Provide:

Be specific and data-driven."""

print(f"\n🤖 AI Analysis\n{'─'*50}")
print(f"\nAI Analysis\n{'─'*50}")
print(query_ollama(prompt))

def natural_sql(db_path, question):
Expand Down Expand Up @@ -165,7 +165,7 @@ Return ONLY the SQL query. No explanation."""
if sql.startswith('sql'):
sql = sql[3:].strip()

print(f"\n💡 SQL:\n{sql}\n")
print(f"\nSQL:\n{sql}\n")

choice = input("Execute? [y/N]: ")
if choice.lower() == 'y':
Expand Down
Loading