Socket
Socket
Sign inDemoInstall

d1-console

Package Overview
Dependencies
0
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    d1-console

A full query console for Cloudflare's D1 database product.


Version published
Weekly downloads
80
increased by81.82%
Maintainers
1
Install size
350 kB
Created
Weekly downloads
 

Changelog

Source

1.4.8

  • Fixed error when using lowercased in-REPL commands.

Readme

Source

D1 Console

A console/REPL for Cloudflare's D1 Database product.

NPM | GitHub

Supports all the features expected of a modern database client, including:

  • multiline queries
  • table-formatted query outputs
  • command history
  • the ability to save your Cloudflare credentials for later use (opt-in)

Usage

  • First, run d1-console login --account-id <ID> --api-token <TOKEN> to save your credentials for later use. To generate an API token, go to the API Tokens page on the Cloudflare dashboard. Your account ID can be found on any zone (domain) of your Cloudflare account.
  • You can now create a database using d1-console databases create <NAME>.
  • To query your new D1 database, you can use the d1-console -d <NAME> command.

In-REPL Commands

  • Aside from subcommands (such as d1-console databases create <name) you can also create, list, delete, and switch databases from within D1 Console. To view available commands, use the HELP command within D1 Console.

CI/CD

  • If you wish to use D1 Console in CI/CD pipelines, the flag --execute can be used to immediately execute a command passed in (e.g. --execute "SELECT * FROM USERS"). In addition, D1 Console will now prefer CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_API_TOKEN environment variables over the saved authentication (if any).

Community

For more information, to get help, or just to chat about D1 and D1 Console, join us on the Cloudflare Developers Discord!

Keywords

FAQs

Last updated on 28 Aug 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc