This package has been deprecated

Author message:

This command is now included in the CLI. Install @xata.io/cli instead

@xata.io/shell
TypeScript icon, indicating that this package has built-in type declarations

0.1.4 • Public • Published

Shell

The shell opens a REPL with a xata global variable containing an initialized XataClient generated for your current database and branch.

# The shell will use the env variables XATA_DATABASE_URL and XATA_API.
# You can define them in an `.env` file in the current directory.
npx @xata.io/shell

The shell uses the Node.js repl package with a couple of additions:

  • Expressions that return a promise are resolved automatically.
  • If you end an expression with \t, it will be printed with console.table().

Example:

// You can do
xata.db.teams.getMany() \t
// Which is equivalent to
console.table(await xata.db.teams.getMany())

Readme

Keywords

none

Package Sidebar

Install

npm i @xata.io/shell

Weekly Downloads

0

Version

0.1.4

License

MIT

Unpacked Size

56.1 kB

Total Files

12

Last publish

Collaborators

  • tudorg
  • sferadev