Spaces:
Sleeping
Sleeping
feat: complete Ever-Brain engine, MCP server, CLI evb mcp command, Dockerfile and release workflow
61b1da1 |
Download docs/wiki/05-cli-specification-and-workflows.md from projectsorg/ever-brain: direct link, hf CLI and curl.
- Browser
- Download file 6.66 kB
-
https://huggingface.co/spaces/projectsorg/ever-brain/resolve/main/docs/wiki/05-cli-specification-and-workflows.md
- Command line
-
hf download hf://spaces/projectsorg/ever-brain/docs/wiki/05-cli-specification-and-workflows.md
-
curl -L -o 05-cli-specification-and-workflows.md https://huggingface.co/spaces/projectsorg/ever-brain/resolve/main/docs/wiki/05-cli-specification-and-workflows.md
6.66 kB
Wiki: 05. CLI Specification & Workflows
The Ever-Brain CLI (packages/cli / evb) is the developer and AI agent control plane for the Ever-Brain project intelligence layer. It connects workspaces to Ever-Brain sources, manages local caches, auto-bootstraps agent meta-skills, materializes runbooks into agent directories, and provides Read & Write collaboration via GitHub's native RBAC.
1. Zero SQLite & Pure Filesystem Architecture
All local configuration and state is plain human- and agent-readable YAML:
my-project/
βββ .evb/
β βββ config.yaml # Project binding (remote repo & branch)
β βββ state.yaml # Last sync timestamps, baseline source hashes (gitignored)
β βββ auth.yaml # Optional local credentials / token profile (gitignored)
β βββ cache/ # Local working mirror of knowledge/skills (gitignored)
β βββ knowledge/
β β βββ architecture.md
β β βββ conventions.md
β βββ skills/
β βββ testing/
β β βββ SKILL.md
β βββ api-design/
β βββ SKILL.md
βββ .agents/skills/ever-brain/
β βββ SKILL.md # Auto-bootstrapped Ever-Brain Meta-Skill for Agent
βββ .gitignore # Contains .evb/cache/, .evb/state.yaml, .evb/auth.yaml
2. Agent-First Ergonomics & Meta-Skill Bootstrapping
When evb init is executed, it automatically generates and installs the ever-brain meta-skill into:
- Antigravity / Universal Standard:
.agents/skills/ever-brain/SKILL.md&AGENTS.md - Gemini:
.gemini/skills/ever-brain/SKILL.md - Cursor:
.cursor/rules/ever-brain.mdc - Claude Code:
.claude/skills/ever-brain/SKILL.md
This equips local AI agents to autonomously discover, read, update, push, and propose intelligence whenever the developer asks questions like:
- "What's our rule on password hashing?"
- "Update the deployment runbook with the Redis timeout fix."
- "Propose a new skill for Docker Compose."
3. GitHub Native RBAC (Read & Write Collaboration)
Developer / AI Agent
β
ββββββββββββββ΄βββββββββββββ
βΌ βΌ
[Has Write Access] [Read-Only / Needs Review]
β β
βΌ βΌ
evb push evb propose
β β
Direct Commit Branch + Pull Request
β β
βΌ βΌ
GitHub Target Branch GitHub PR Review UI
A. Direct Commit (evb push)
- Used by maintainers and collaborators with
writeoradminaccess. - Uses GitHub Git Data API to create a multi-file commit directly on the target branch.
- Updates
state.yamlbaseline immediately upon commit creation.
B. Pull Request Proposal (evb propose)
- Used by contributors or when teams enforce Pull Request reviews.
- Checks user write access; automatically creates a user fork if no direct branch-creation permission exists on upstream.
- Creates a proposal branch, pushes changes, and opens a GitHub Pull Request with a clickable review URL.
4. Local Modification Tracking & Collision Protection
- Dirty State Detection:
- Compares local file SHA-256 hashes against
state.yamlbaseline hashes. - Categorizes changes into
M(modified),A(added), andD(deleted).
- Compares local file SHA-256 hashes against
- Unified Diffing (
evb diff):- Emits raw unified diffs (
PAGER=cat/--json) comparing local cached files with remote baseline text.
- Emits raw unified diffs (
- Collision Protection:
evb syncchecks if local modifications exist before overwriting cache. If dirty, sync halts with an actionable warning unless--forceis supplied.
- Reset (
evb reset):- Discards uncommitted modifications and restores the remote baseline.
5. Command Reference
| Command | Description |
|---|---|
evb init [repoUrl] |
Connects workspace, creates config, syncs cache, and bootstraps agent meta-skill |
evb sync |
Synchronizes remote intelligence into local cache (collision protected) |
evb status |
Shows workspace connection, cache volume, and uncommitted modifications |
evb diff [path] |
Shows unified diff of local uncommitted modifications against baseline |
evb reset |
Discards local uncommitted modifications, restoring clean remote baseline |
evb push |
Directly commits local modifications to remote repository (write collaborators) |
evb propose |
Creates a proposal branch and opens a GitHub PR for team review |
evb auth login |
Authenticates with GitHub via PAT or GitHub CLI (explicit choice prompt) |
evb auth status |
Checks current GitHub authentication status and repository access level |
evb auth logout |
Clears stored GitHub authentication credentials |
evb knowledge list |
Lists all cached knowledge documents |
evb knowledge show <path> |
Displays content of a knowledge document |
evb skills list |
Lists all available project skills |
evb skills show <id> |
Renders a skill runbook in the terminal |
evb skills install <id> |
Materializes canonical skill into agent-native directories |
6. End-to-End Workflow: Using Ever-Brain on Any Local Workspace
Developers can attach Ever-Brain to any existing project on their machine:
- Globally Link CLI:
(Or runpnpm cli:linkpnpm evbdirectly inside the monorepo root). - Ensure API is running:
pnpm dev:api - Navigate to external workspace:
cd ~/my-other-project # or C:\Projects\MyOtherApp - Initialize Ever-Brain connection:
evb init https://github.com/spencerpauly/skills-repo - Observe automatic bootstrapping:
- Meta-skill
.agents/skills/ever-brain/SKILL.md(and.gemini/skills/ever-brain//.cursor/rules/ever-brain.mdc/.claude/skills/ever-brain/) is written. - Remote skills and knowledge are cached in
.evb/cache/. - Your local agent immediately has access to search, list, and materialize skills for that workspace.
- Meta-skill