Conversation
Move shared initialization logic (plugin registry, sandbox, proxy, cartographoor, semantic search indices) into a transport-agnostic pkg/app package. The MCP server builder now delegates to app.Build() and layers on MCP-specific concerns (auth, tool registry, resource registry). This enables the upcoming CLI to reuse the same core without depending on the MCP protocol layer.
Add a separate CLI binary entry point (cmd/cli) with Cobra root command, version subcommand, and build-cli Makefile target. The CLI binary is named 'ep' and will host analytics commands alongside the existing MCP server.
List available datasources (ClickHouse, Prometheus, Loki) discovered from the credential proxy. Supports --type filter and --json output.
Show ClickHouse table schemas via 'ep schema [table-name]'. Uses the lightweight app build (proxy + plugins only, no sandbox/embedding) for fast startup. Adds BuildLight() to pkg/app and SchemaClient() accessor to the ClickHouse plugin.
Show Python API documentation for ethpandaops library modules. Uses static embedded data from plugins — no proxy or config needed.
Execute Python code in a sandbox via 'ep execute'. Supports --code, --file, or stdin for input. Stdout goes to stdout, metadata (session ID, output files) goes to stderr for clean piping. Adds BuildWithSandbox() and SandboxEnv() to pkg/app.
Manage sandbox sessions via 'ep session {list,create,destroy}'.
Sessions keep containers alive between executions, preserving
workspace files.
Semantic search over examples and runbooks via 'ep search examples' and 'ep search runbooks'. Supports --category/--tag filters, --limit, and --json output. Uses the full app build for embedding model and search indices.
Document the ep CLI binary, its subcommands, and the shared app kernel. Update references from pkg/server/builder.go to pkg/app/app.go where plugin registration now lives. Add ethnode plugin to the list.
Add ep CLI usage alongside MCP server references so the skill works in both contexts. Document all CLI subcommands for discovery, search, execution, and session management.
The prebuilt libllama_go.so from kelindar/search uses AVX-VNNI instructions (avx_vnni) which are not available on all x86_64 CPUs, causing SIGILL crashes. Build from source with -DGGML_NATIVE=OFF for portable binaries that still enable AVX2 SIMD.
Add investigate skill for CLI-driven devnet debugging with multi-phase workflow (discovery, Dora collection, Loki logs, root cause analysis). Update create-plugin skill to reference pkg/app/app.go for registration.
The kelindar/search library searches CWD for libllama_go.so at runtime. Creating a symlink from the repo root to models/libllama_go.so removes the need for LD_LIBRARY_PATH when running binaries locally.
Add WaitForReady(ctx) to ClickHouseSchemaClient so CLI waits for the initial async schema fetch before reading results. Fix fmt.Println redundant newline vet warning in search.go.
…g prebuilt The prebuilt binary from kelindar/search uses AVX-VNNI instructions not available on all x86_64 CPUs. Build from source with -DGGML_NATIVE=OFF for portable binaries (still enables AVX2).
Member
Author
Manual Testing ResultsTested against a local Docker Compose stack (proxy on
Bugs found and fixed during testing
|
Add .githooks/pre-commit that runs golangci-lint on changed files. Install with `make setup-hooks`. Fix Makefile to install golangci-lint v2 (matching .golangci.yml config version). Remove unused buildApp(). Fix .gitignore `cli` pattern that incorrectly matched `pkg/cli/`.
Add direct CLI access to plugin datasources without requiring the
Python sandbox. Commands make authenticated HTTP calls through the
credential proxy (or directly for Dora), providing instant results.
New commands:
- ep ethnode {syncing,version,health,peers,finality,header,block-number,beacon-get,exec-rpc}
- ep dora {networks,overview,validator,slot,epoch}
- ep clickhouse query
- ep prometheus {query,query-range,labels,label-values}
- ep loki {query,labels,label-values}
All commands support --json for machine-readable output.
Member
Author
Updated Manual CLI Testing ResultsRe-tested all plugin CLI commands including ethnode (previously blocked). Used Dora (direct HTTP via cartographoor)
ClickHouse (via proxy)
Prometheus (via proxy)
Loki (via proxy)
Ethnode (via proxy →
|
| Command | Output | Status |
|---|---|---|
ep ethnode syncing |
Head slot: 180665, Sync distance: 22009, Is syncing: true |
✅ human + JSON |
ep ethnode version |
CL: Lighthouse/v8.0.1-65bb283/x86_64-linux |
✅ |
ep ethnode health |
Not initialized (503) |
✅ |
ep ethnode peers |
Connected: 20, Disconnected: 936 |
✅ |
ep ethnode finality |
Finalized: epoch 5642, Current justified: epoch 5644 |
✅ |
ep ethnode header |
Slot, proposer index, root, parent/state/body roots | ✅ |
ep ethnode beacon-get ... /eth/v1/node/identity |
Full peer ID, ENR, P2P addresses, metadata | ✅ |
ep ethnode block-number |
504 timeout (EL offline on this node) | ✅ error handling correct |
ep ethnode exec-rpc ... eth_chainId |
504 timeout (EL offline) | ✅ error handling correct |
Summary
- 22/22 commands tested ✅
- All
--jsonvariants produce valid pretty-printed JSON - Human-readable output properly formatted for all commands
- Error handling works correctly (proxy errors, timeouts, 503s propagated with meaningful messages)
- Ethnode exec-rpc/block-number timed out as expected (EL was offline on the test node —
el_offline: trueconfirmed by syncing endpoint)
Note on mainnet/hoodi/sepolia ethnode access
Mainnet, hoodi, and sepolia bn-*.srv.{network}.ethpandaops.io endpoints are behind Cloudflare mTLS. TLS handshake fails from local dev (alert 40 — no client certificate). This is by design: the proxy is meant to run inside the K8s cluster where these resolve to internal IPs. Devnet nodes (e.g. bal-devnet-2) work fine over public HTTPS with basic auth.
samcm
approved these changes
Mar 9, 2026
Member
|
LGTM! 🚀 |
parithosh
pushed a commit
that referenced
this pull request
Mar 10, 2026
* refactor: extract pkg/app from server builder
Move shared initialization logic (plugin registry, sandbox, proxy,
cartographoor, semantic search indices) into a transport-agnostic
pkg/app package. The MCP server builder now delegates to app.Build()
and layers on MCP-specific concerns (auth, tool registry, resource
registry).
This enables the upcoming CLI to reuse the same core without depending
on the MCP protocol layer.
* feat: scaffold cmd/cli and pkg/cli
Add a separate CLI binary entry point (cmd/cli) with Cobra root command,
version subcommand, and build-cli Makefile target. The CLI binary is
named 'ep' and will host analytics commands alongside the existing MCP
server.
* feat(cli): add datasources command
List available datasources (ClickHouse, Prometheus, Loki) discovered
from the credential proxy. Supports --type filter and --json output.
* feat(cli): add schema command
Show ClickHouse table schemas via 'ep schema [table-name]'. Uses the
lightweight app build (proxy + plugins only, no sandbox/embedding) for
fast startup. Adds BuildLight() to pkg/app and SchemaClient() accessor
to the ClickHouse plugin.
* feat(cli): add docs command
Show Python API documentation for ethpandaops library modules. Uses
static embedded data from plugins — no proxy or config needed.
* feat(cli): add execute command
Execute Python code in a sandbox via 'ep execute'. Supports --code,
--file, or stdin for input. Stdout goes to stdout, metadata (session
ID, output files) goes to stderr for clean piping. Adds
BuildWithSandbox() and SandboxEnv() to pkg/app.
* feat(cli): add session command
Manage sandbox sessions via 'ep session {list,create,destroy}'.
Sessions keep containers alive between executions, preserving
workspace files.
* feat(cli): add search command
Semantic search over examples and runbooks via 'ep search examples'
and 'ep search runbooks'. Supports --category/--tag filters, --limit,
and --json output. Uses the full app build for embedding model and
search indices.
* docs: update CLAUDE.md with CLI reference and pkg/app architecture
Document the ep CLI binary, its subcommands, and the shared app kernel.
Update references from pkg/server/builder.go to pkg/app/app.go where
plugin registration now lives. Add ethnode plugin to the list.
* feat(skills): update query skill with CLI commands
Add ep CLI usage alongside MCP server references so the skill works
in both contexts. Document all CLI subcommands for discovery, search,
execution, and session management.
* fix(docker): build libllama_go.so from source for all architectures
The prebuilt libllama_go.so from kelindar/search uses AVX-VNNI
instructions (avx_vnni) which are not available on all x86_64 CPUs,
causing SIGILL crashes. Build from source with -DGGML_NATIVE=OFF
for portable binaries that still enable AVX2 SIMD.
* feat(skills): add investigate skill, update create-plugin references
Add investigate skill for CLI-driven devnet debugging with multi-phase
workflow (discovery, Dora collection, Loki logs, root cause analysis).
Update create-plugin skill to reference pkg/app/app.go for registration.
* fix: symlink libllama_go.so to repo root in download-models
The kelindar/search library searches CWD for libllama_go.so at runtime.
Creating a symlink from the repo root to models/libllama_go.so removes
the need for LD_LIBRARY_PATH when running binaries locally.
* add env file
* update gitignore
* fix: schema WaitForReady and vet warning
Add WaitForReady(ctx) to ClickHouseSchemaClient so CLI waits for the
initial async schema fetch before reading results. Fix fmt.Println
redundant newline vet warning in search.go.
* fix(makefile): build libllama_go.so from source instead of downloading prebuilt
The prebuilt binary from kelindar/search uses AVX-VNNI instructions
not available on all x86_64 CPUs. Build from source with
-DGGML_NATIVE=OFF for portable binaries (still enables AVX2).
* feat: add golangci-lint pre-commit hook
Add .githooks/pre-commit that runs golangci-lint on changed files.
Install with `make setup-hooks`. Fix Makefile to install golangci-lint
v2 (matching .golangci.yml config version). Remove unused buildApp().
Fix .gitignore `cli` pattern that incorrectly matched `pkg/cli/`.
* feat(cli): add native CLI commands for all plugins
Add direct CLI access to plugin datasources without requiring the
Python sandbox. Commands make authenticated HTTP calls through the
credential proxy (or directly for Dora), providing instant results.
New commands:
- ep ethnode {syncing,version,health,peers,finality,header,block-number,beacon-get,exec-rpc}
- ep dora {networks,overview,validator,slot,epoch}
- ep clickhouse query
- ep prometheus {query,query-range,labels,label-values}
- ep loki {query,labels,label-values}
All commands support --json for machine-readable output.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pkg/app/) frompkg/server/builder.go— transport-agnostic initialization (plugins, proxy, sandbox, search indices) reused by both MCP server and CLIepCLI binary (cmd/cli/,pkg/cli/) with subcommands:datasources,schema,docs,execute,session,search,version— same capabilities as the MCP server without the protocol layerinvestigate(devnet debugging workflow), updatedquery(CLI + MCP references), updatedcreate-plugin(referencespkg/app/)libllama_go.soindownload-modelsso binaries work withoutLD_LIBRARY_PATHNon-breaking and additive — MCP server code is unchanged in behavior, just delegates initialization to
pkg/app/.Commits
refactor: extract pkg/app from server builder— shared kernelfeat: scaffold cmd/cli and pkg/cli— binary + root command + Makefilefeat(cli): add datasources commandfeat(cli): add schema commandfeat(cli): add docs commandfeat(cli): add execute commandfeat(cli): add session commandfeat(cli): add search commanddocs: update CLAUDE.md with CLI referencefeat(skills): update query skill with CLI commandsfeat(skills): add investigate skill, update create-plugin referencesfix: symlink libllama_go.so to repo root in download-modelsTest plan
make build— MCP server still buildsmake build-cli— CLI binary buildsmake test— existing tests pass./ep version— prints version info./ep datasources --help— shows usage./ep docs— lists Python API modules (no proxy needed)make run)