npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@tableland/cli

v7.3.1

Published

Tableland command line tools

Downloads

79

Readme

@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