Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tableland/cli

Package Overview
Dependencies
Maintainers
0
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tableland/cli

Tableland command line tools

  • 7.3.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9
increased by800%
Maintainers
0
Weekly downloads
 
Created
Source

@tableland/cli

Review Test License: MIT AND Apache-2.0 Version standard-readme compliant

Tableland command line tool for interacting with your Tableland database & tables

Table of Contents

Background

The @tableland/cli allows you to interact with your Tableland database & tables from the comfort of the command line. It's a wrapper around the @tableland/sdk along with some additional features, and you can use it to create tables, run queries, and more.

Install

You can install globally via npm:

npm install -g @tableland/cli

Or yarn:

yarn global add @tableland/cli

Usage

Full library documentation is available on our docs site. The available commands include:

  • chains: List information about supported chains.
  • controller <sub>: Get, set, and lock the controller contract for a given table.
  • create [schema] [prefix]: Create a new table.
  • info <name>: Get info about a given table by name.
  • init: Create config file.
  • list [address]: List tables by address.
  • read [statement]: Run a read-only query against a remote table.
  • receipt <hash>: Get the receipt of a chain transaction to know if it was executed, and the execution details.
  • schema <name>: Get info about a given table schema.
  • write [statement]: Run a mutating SQL statement against a remote table.
  • shell [statement]: Interact with tableland via an interactive shell environment.
  • namespace <domain> [mappings..]: Manage ENS names for tables.
  • transfer <name> <receiver>: Transfer a table to another address.

The available options are:

  • --help, -h: Show help.
  • --version, -V: Show version number.
  • --baseUrl: The URL of your Tableland validator.
  • --chain, -c: The EVM chain to target.
  • --enableEnsExperiment: Enable ENS experiment.
  • --ensProviderUrl: Enable ENS experiment.
  • --privateKey, -k: Private key string.
  • --providerUrl, -p: JSON RPC API provider URL (e.g., https://eth-sepolia.g.alchemy.com/v2/123abc123a...).
  • --aliases, -a: Path to table aliases JSON file (e.g., ./tableland.aliases.json).

Config

@tableland/cli uses cosmiconfig for configuration file support. This means you can configure @tableland/cli via (in order of precedence):

  • A .tablelandrc.json, .tablelandrc.yml, or .tablelandrc.yaml file.
  • A .tablelandrc file written in JSON or YAML.
  • A "tableland" key in a local package.json file.

The configuration file will be resolved starting from the current working directory, and searching up the file tree until a config file is (or isn’t) found.

@tableland/cli intentionally doesn’t support any kind of global configuration. This is to make sure that when a project is copied to another computer, @tableland/cli's behavior stays the same. Otherwise, @tableland/cli wouldn’t be able to guarantee that everybody in a team uses the same consistent settings.

The options you can use in the configuration file are the same as the global cli flag options. Additionally, all of these configuration values can be overridden via environment variables (prefixed with TBL_), or via a local .env file. See .env.example for an example.

A configuration file can also be bootstrapped using the tableland init command. This will provide an interactive prompt to setup a config file (you can skip the interactive prompts by using the --yes flag). Global cli flags can be used in combination with the init command to skip specific questions. For example tableland init --chain "local-tableland" will skip the question about default chain, and use local-tableland in the output config file.

Development

Get started with installing and building the project:

npm install
npm run build

Contributing

PRs accepted.

Small note: If editing the README, please conform to the standard-readme specification.

License

MIT AND Apache-2.0, © 2021-2023 Tableland Network Contributors

Keywords

FAQs

Package last updated on 23 Jul 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc