@tableland/cli v6.1.0
@tableland/cli
Tableland command line tool
Table of Contents
Background
An experimental Tableland command line tool.
Usage
tableland <command>
Commands:
tableland chains List information about supported chains
tableland controller <sub> Get, set, and lock the controller contract for
a given table
tableland create <schema> [prefix] Create a new table
tableland hash <schema> [prefix] Validate a table schema and get the structure
hash
tableland info <name> Get info about a given table by name
tableland init [format, path, yes] Create config file
tableland list [address] List tables by address
tableland read <query> Run a read-only query against a remote table
tableland receipt <hash> Get the receipt of a chain transaction to know
if it was executed, and the execution details
tableland schema <name> Get info about a given table schema
tableland structure <hash> Get table name(s) by schema structure hash
tableland token [uri] Create a SIWE token
tableland write <statement> Run a mutating SQL statement against a remote
table
Options:
--help Show help [boolean]
--version Show version number [boolean]
-k, --privateKey Private key string [string]
-c, --chain The EVM chain to target[string] [default: "polygon-mumbai"]
-r, --rpcRelay Whether writes should be relayed via a validator [boolean]
-p, --providerUrl JSON RPC API provider URL. (e.g., https://eth-rinkeby.alche
myapi.io/v2/123abc123a...) [string]
Install
You can install via npm.
npm install -g @tableland/cli
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 localpackage.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 overriden via environement 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 "polygon-mumbai"
will skip the question about default chain, and use polygon-mumbai
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-2022 Tableland Network Contributors
4 days ago
26 days ago
2 months ago
5 months ago
10 months ago
6 months ago
10 months ago
6 months ago
6 months ago
9 months ago
10 months ago
10 months ago
11 months ago
11 months ago
1 year ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago