MCPcopy Index your code
hub / github.com/elysiajs/eden

github.com/elysiajs/eden @1.4.10

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.4.10 ↗ · + Follow
81 symbols 200 edges 34 files 1 documented · 1%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

@elysia/eden

Fully type-safe Elysia client refers to the documentation

Installation

bun add elysia @elysia/eden

Example

// server.ts
import { Elysia, t } from 'elysia'

const app = new Elysia()
    .get('/', () => 'Hi Elysia')
    .get('/id/:id', ({ params: { id } }) => id)
    .post('/mirror', ({ body }) => body, {
        schema: {
            body: t.Object({
                id: t.Number(),
                name: t.String()
            })
        }
    })
    .listen(8080)

export type App = typeof app

// client.ts
import { edenTreaty } from '@elysia/eden'
import type { App } from './server'

const app = edenTreaty<App>('http://localhost:8080')

// data: Hi Elysia (fully type-safe)
const { data: pong } = app.index.get()

// data: 1895
const { data: id } = app.id.1895.get()

// data: { id: 1895, name: 'Skadi' }
const { data: nendoroid } = app.mirror.post({
    id: 1895,
    name: 'Skadi'
})

See documentation for more details.

Extension points exported contracts — how you extend this code

Config (Interface)
(no doc)
src/fetch/types.ts
Config (Interface)
(no doc)
src/treaty/types.ts
TreatyParam (Interface)
(no doc)
src/treaty2/types.ts
OnMessage (Interface)
(no doc)
src/treaty/types.ts
Config (Interface)
(no doc)
src/treaty2/types.ts
OnMessage (Interface)
(no doc)
src/treaty2/types.ts

Core symbols most depended-on inside this repo

treaty
called by 64
src/treaty2/index.ts
parseStringifiedDate
called by 15
src/utils/parse.ts
parseStringifiedValue
called by 15
src/utils/parse.ts
edenFetch
called by 12
src/fetch/index.ts
streamResponse
called by 11
src/treaty2/index.ts
resolve
called by 8
test/types/treaty2.ts
parseStringifiedObject
called by 8
src/utils/parse.ts
edenTreaty
called by 6
src/treaty/index.ts

Shape

Function 49
Method 18
Class 8
Interface 6

Languages

TypeScript100%

Modules by API surface

src/treaty/index.ts18 symbols
src/treaty2/index.ts15 symbols
src/treaty2/ws.ts10 symbols
test/treaty2.test.ts6 symbols
src/utils/parse.ts6 symbols
src/fetch/index.ts5 symbols
src/treaty2/types.ts3 symbols
src/errors.ts3 symbols
example/server.ts3 symbols
example/regression.ts3 symbols
test/types/treaty2.ts2 symbols
src/treaty/types.ts2 symbols

For agents

$ claude mcp add eden \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact