MCPcopy Index your code
hub / github.com/alii/trisma

github.com/alii/trisma @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
25 symbols 48 edges 9 files 4 documented · 16%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

trisma

[t]ypescript p[risma]

This is an experimental way of creating a Prisma DMMF with TypeScript Decorators.

What does it look like?

@Model()
export class Example {
  @ID()
  @Field()
  @Documentation("This is the ID of the row")
  @Default("uuid()")
  id!: string;

  @Field()
  @Nullable()
  @Array(String)
  names?: string[];

  @Field()
  @Default(0)
  @Unique()
  count!: number;
}

Do it work doe????

Yes, it does generate a valid DMMF... mostly:

Screenshot

Can I actually use it?

Not yet. I have no idea how to convert a Prisma DMMF into a working Prisma Client (including migrations, studio, etc).

When will I be able to?

If any of the Prisma team are reading this, plz halp!!!

Core symbols most depended-on inside this repo

Field
called by 5
src/decorators.ts
Default
called by 2
src/decorators.ts
getFieldNames
called by 1
src/decorators.ts
Documentation
called by 1
src/decorators.ts
Unique
called by 1
src/decorators.ts
ID
called by 1
src/decorators.ts
Array
called by 1
src/decorators.ts
Nullable
called by 1
src/decorators.ts

Shape

Function 15
Class 5
Method 4
Enum 1

Languages

TypeScript100%

Modules by API surface

src/decorators.ts12 symbols
src/deserializers/model.ts6 symbols
example.ts2 symbols
src/util.ts1 symbols
src/schema.ts1 symbols
src/metadata.ts1 symbols
src/deserializers/index.ts1 symbols
src/deserializers/AbstractDeserializer.ts1 symbols

For agents

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

⬇ download graph artifact