'use client'; import React, { useState, useEffect } from 'react'; import { Brain as BrainIcon, Terminal, Copy, Check, ChevronLeft, Database, ShieldCheck, Zap, Command, Settings, Link as LinkIcon, RefreshCw, Trash2, ExternalLink, Download, MessageSquare, FileCode, Box, CheckCircle2, FolderOpen } from 'lucide-react'; import Link from 'next/link'; export default function DocsPage() { const [copied, setCopied] = useState(null); const [toast, setToast] = useState<{ message: string; visible: boolean }>({ message: '', visible: false }); const showToast = (message: string) => { setToast({ message, visible: true }); setTimeout(() => setToast({ message: '', visible: false }), 3000); }; const handleCopy = (cmd: string, label: string) => { navigator.clipboard.writeText(cmd); setCopied(cmd); showToast(`${label} Copied`); setTimeout(() => setCopied(null), 2000); }; const DocCommand = ({ cmd, label }: { cmd: string, label: string }) => (
$ {cmd}
); return (
{/* Structural Background */}
{/* Toast Notification */}
{toast.message}
{/* Navbar */}
DOCUMENTATION // PROTOCOL V0.1

The Core
Protocol

Master the "Handshake" between your code and your intelligence.

{/* Section: End-to-End Guide */}

01 // END-TO-END WORKFLOW

{/* Step 1: Install */}
01

Installation

Install Ever Brain globally via Pip (recommended) or use our one-line installer.

Option A: Python Package
Option B: PowerShell One-Liner
{/* Step 2: Initialize */}
02

Initialize Your Cognition

Create and select a brain instance. This creates the .brains/ folder where your project memories live.

{/* Step 3: Attach */}
03

Perform the Handshake

Run ever-brain attach. This generates AGENT.md in your project root. This is the file your AI will read to understand how to connect to the brain.

Handshake Complete
{/* Step 4: The Agent Interaction */}
04

Directing Your Agent

Now, open your AI Agent (Cursor, Claude, etc.) and give it its first order.

Suggested Prompt

"Please read AGENT.md in the root directory. You are now connected to my Cognition OS. Use the 'ever-brain' tools to remember architectural decisions and project context."

{/* Section: Command Reference */}

02 // COMMAND REFERENCE

ever-brain create

ever-brain use

ever-brain attach

ever-brain sync

{/* Section: Folder Structure */}

03 // PROJECT ANATOMY

.brains/ // The Storage (Permanent Memory)
my-brain/ // Your actual cognitive instance
.brain/ // The Runtime (Active Session Config)
AGENT.md // The Protocol (Show this to your AI)
{/* Footer */}
); }