Skip to content

generate: Usage instructions should be directly below ✔ Generated ... of generator #1737

Open
JGJP/prisma
#1

Description

@janpio

If you use a custom generator, the output currently looks like this:

✔ Generated Prisma Client to .\node_modules\@prisma\client in 287ms

✔ Generated Prisma Test Utils to .\prisma\node_modules\@generated\prisma-test-utils in 3.50s

You can now start using Prisma Client in your code:

´´´
import { PrismaClient } from '@prisma/client'
// or const { PrismaClient } = require('@prisma/client')

const prisma = new PrismaClient()
´´´

Explore the full API: http://pris.ly/d/client

I think the output would make more sense with the "usage instructions" next to the generator that caused them:

✔ Generated Prisma Client to .\node_modules\@prisma\client in 287ms

You can now start using Prisma Client in your code:

´´´
import { PrismaClient } from '@prisma/client'
// or const { PrismaClient } = require('@prisma/client')

const prisma = new PrismaClient()
´´´

Explore the full API: http://pris.ly/d/client

✔ Generated Prisma Test Utils to .\prisma\node_modules\@generated\prisma-test-utils in 3.50s

That could also lead to generators being able to add their own output.

Activity

  1. self-assigned this
    on Mar 4, 2020
  2. added this to the Preview 24 New milestone on Mar 4, 2020
  3. changed the title [-]`generate`: Usage instructions should be next to generator[/-] [+]`generate`: Usage instructions should be directly below "✔ Generated ..." of generator[/+] on Sep 11, 2020
  4. changed the title [-]`generate`: Usage instructions should be directly below "✔ Generated ..." of generator[/-] [+]`generate`: Usage instructions should be directly below `✔ Generated ...` of generator[/+] on Sep 11, 2020
  5. 4 remaining items

  6. timsuchanek commented on Nov 16, 2020

    @timsuchanek
    Contributor

    Thanks @muxahuk! I answered your questions in the PR.

  7. Mbistami commented on Oct 16, 2024

    @Mbistami

    @Jolg42 @matthewmueller Can I handle this issue?

  8. SE7EN2028 commented on Nov 21, 2025

    @SE7EN2028

    Hey! I created a PR that fixes this issue:
    #28628

    Please take a look whenever you get time. Thanks!

  9. added a commit that references this issue on Mar 5, 2026
    b9fad00
  10. added a commit that references this issue on Mar 7, 2026
    c1e1f68
  11. chengyixu commented on Mar 20, 2026

    @chengyixu

    Hi! I'd like to work on this UX improvement.

    Approach: In the Prisma CLI generator runner, after printing the 'Generated X to ...' line for each generator, the usage instructions should be printed immediately beneath that specific generator's output rather than grouped at the end. This means moving the post-generate message emission inside the per-generator loop rather than after all generators have completed. I'd find the relevant code in the packages/cli/src/Generate.ts (or similar) and adjust the output ordering.

    ETA: 1-2 days
    Background: I maintain 35+ npm packages and work extensively in this ecosystem. This is a focused TypeScript CLI output change.

    Happy to discuss before starting. — @chengyixu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    tech/typescripttopic: dxtopic: generatortopic: prisma generate

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions