Skip to content

Repository files navigation

@cedarjs/console

An interactive Cedar shell -- a REPL with your Cedar project's API side pre-loaded.

Usage

Run directly from your Cedar project root:

# npm
npx @cedarjs/console
# yarn
yarn dlx @cedarjs/console
# pnpm
pnpm dlx @cedarjs/console

The Prisma client is available as db in the REPL:

>awaitdb.user.findMany({take: 5})>awaitdb.post.count()

You can also import your services and lib files:

>const{ users }=awaitimport('./api/src/services/users/users.js')>awaitusers()

Requirements

  • A Cedar project (must be run from the project root)

Version compatibility

@cedarjs/consoleCedar
1.x>= 5.0.0

Background

This package was previously built into the Cedar CLI as yarn cedar console. It was extracted as a standalone tool so it can evolve independently. If you were using cedar console, replace it with the npx/yarn dlx/pnpm dlx invocation above.

About

Interactive Cedar shell

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages