Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Include defradb CLI autogenerated docs v0.5 #95

Merged
merged 3 commits into from
Apr 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/references/cli/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"label": "CLI Specification"
}
36 changes: 36 additions & 0 deletions docs/references/cli/defradb.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# defradb

DefraDB Edge Database

## Synopsis

DefraDB is the edge database to power the user-centric future.

Start a database node, issue a request to a local or remote node, and much more.

DefraDB is released under the BSL license, (c) 2022 Democratized Data Foundation.
See https://docs.source.network/BSL.txt for more information.


## Options

```
-h, --help help for defradb
--logformat string Log format to use. Options are csv, json (default "csv")
--logger stringArray Override logger parameters. Usage: --logger <name>,level=<level>,output=<output>,...
--loglevel string Log level to use. Options are debug, info, error, fatal (default "info")
--lognocolor Disable colored log output
--logoutput string Log output path (default "stderr")
--logtrace Include stacktrace in error and fatal logs
--rootdir string Directory for data and configuration to use (default "$HOME/.defradb")
--url string URL of HTTP endpoint to listen on or connect to (default "localhost:9181")
```

## SEE ALSO

* [defradb client](defradb_client.md) - Interact with a running DefraDB node as a client
* [defradb init](defradb_init.md) - Initialize DefraDB's root directory and configuration file
* [defradb server-dump](defradb_server-dump.md) - Dumps the state of the entire database
* [defradb start](defradb_start.md) - Start a DefraDB node
* [defradb version](defradb_version.md) - Display the version information of DefraDB and its components

39 changes: 39 additions & 0 deletions docs/references/cli/defradb_client.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# client

Interact with a running DefraDB node as a client

## Synopsis

Interact with a running DefraDB node as a client.
Execute queries, add schema types, and run debug routines.

## Options

```
-h, --help help for client
```

## Options inherited from parent commands

```
--logformat string Log format to use. Options are csv, json (default "csv")
--logger stringArray Override logger parameters. Usage: --logger <name>,level=<level>,output=<output>,...
--loglevel string Log level to use. Options are debug, info, error, fatal (default "info")
--lognocolor Disable colored log output
--logoutput string Log output path (default "stderr")
--logtrace Include stacktrace in error and fatal logs
--rootdir string Directory for data and configuration to use (default "$HOME/.defradb")
--url string URL of HTTP endpoint to listen on or connect to (default "localhost:9181")
```

## SEE ALSO

* [defradb](defradb.md) - DefraDB Edge Database
* [defradb client blocks](defradb_client_blocks.md) - Interact with the database's blockstore
* [defradb client dump](defradb_client_dump.md) - Dump the contents of a database node-side
* [defradb client peerid](defradb_client_peerid.md) - Get the peer ID of the DefraDB node
* [defradb client ping](defradb_client_ping.md) - Ping to test connection to a node
* [defradb client query](defradb_client_query.md) - Send a DefraDB GraphQL query request
* [defradb client rpc](defradb_client_rpc.md) - Interact with a DefraDB gRPC server
* [defradb client schema](defradb_client_schema.md) - Interact with the schema system of a running DefraDB instance

28 changes: 28 additions & 0 deletions docs/references/cli/defradb_client_blocks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# client blocks

Interact with the database's blockstore

## Options

```
-h, --help help for blocks
```

## Options inherited from parent commands

```
--logformat string Log format to use. Options are csv, json (default "csv")
--logger stringArray Override logger parameters. Usage: --logger <name>,level=<level>,output=<output>,...
--loglevel string Log level to use. Options are debug, info, error, fatal (default "info")
--lognocolor Disable colored log output
--logoutput string Log output path (default "stderr")
--logtrace Include stacktrace in error and fatal logs
--rootdir string Directory for data and configuration to use (default "$HOME/.defradb")
--url string URL of HTTP endpoint to listen on or connect to (default "localhost:9181")
```

## SEE ALSO

* [defradb client](defradb_client.md) - Interact with a running DefraDB node as a client
* [defradb client blocks get](defradb_client_blocks_get.md) - Get a block by its CID from the blockstore.

31 changes: 31 additions & 0 deletions docs/references/cli/defradb_client_blocks_get.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# client blocks get

Get a block by its CID from the blockstore.

```
defradb client blocks get [CID] [flags]
```

## Options

```
-h, --help help for get
```

## Options inherited from parent commands

```
--logformat string Log format to use. Options are csv, json (default "csv")
--logger stringArray Override logger parameters. Usage: --logger <name>,level=<level>,output=<output>,...
--loglevel string Log level to use. Options are debug, info, error, fatal (default "info")
--lognocolor Disable colored log output
--logoutput string Log output path (default "stderr")
--logtrace Include stacktrace in error and fatal logs
--rootdir string Directory for data and configuration to use (default "$HOME/.defradb")
--url string URL of HTTP endpoint to listen on or connect to (default "localhost:9181")
```

## SEE ALSO

* [defradb client blocks](defradb_client_blocks.md) - Interact with the database's blockstore

31 changes: 31 additions & 0 deletions docs/references/cli/defradb_client_dump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# client dump

Dump the contents of a database node-side

```
defradb client dump [flags]
```

## Options

```
-h, --help help for dump
```

## Options inherited from parent commands

```
--logformat string Log format to use. Options are csv, json (default "csv")
--logger stringArray Override logger parameters. Usage: --logger <name>,level=<level>,output=<output>,...
--loglevel string Log level to use. Options are debug, info, error, fatal (default "info")
--lognocolor Disable colored log output
--logoutput string Log output path (default "stderr")
--logtrace Include stacktrace in error and fatal logs
--rootdir string Directory for data and configuration to use (default "$HOME/.defradb")
--url string URL of HTTP endpoint to listen on or connect to (default "localhost:9181")
```

## SEE ALSO

* [defradb client](defradb_client.md) - Interact with a running DefraDB node as a client

31 changes: 31 additions & 0 deletions docs/references/cli/defradb_client_peerid.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# client peerid

Get the peer ID of the DefraDB node

```
defradb client peerid [flags]
```

## Options

```
-h, --help help for peerid
```

## Options inherited from parent commands

```
--logformat string Log format to use. Options are csv, json (default "csv")
--logger stringArray Override logger parameters. Usage: --logger <name>,level=<level>,output=<output>,...
--loglevel string Log level to use. Options are debug, info, error, fatal (default "info")
--lognocolor Disable colored log output
--logoutput string Log output path (default "stderr")
--logtrace Include stacktrace in error and fatal logs
--rootdir string Directory for data and configuration to use (default "$HOME/.defradb")
--url string URL of HTTP endpoint to listen on or connect to (default "localhost:9181")
```

## SEE ALSO

* [defradb client](defradb_client.md) - Interact with a running DefraDB node as a client

31 changes: 31 additions & 0 deletions docs/references/cli/defradb_client_ping.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# client ping

Ping to test connection to a node

```
defradb client ping [flags]
```

## Options

```
-h, --help help for ping
```

## Options inherited from parent commands

```
--logformat string Log format to use. Options are csv, json (default "csv")
--logger stringArray Override logger parameters. Usage: --logger <name>,level=<level>,output=<output>,...
--loglevel string Log level to use. Options are debug, info, error, fatal (default "info")
--lognocolor Disable colored log output
--logoutput string Log output path (default "stderr")
--logtrace Include stacktrace in error and fatal logs
--rootdir string Directory for data and configuration to use (default "$HOME/.defradb")
--url string URL of HTTP endpoint to listen on or connect to (default "localhost:9181")
```

## SEE ALSO

* [defradb client](defradb_client.md) - Interact with a running DefraDB node as a client

46 changes: 46 additions & 0 deletions docs/references/cli/defradb_client_query.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# client query

Send a DefraDB GraphQL query request

## Synopsis

Send a DefraDB GraphQL query request to the database.

A query request can be sent as a single argument. Example command:
defradb client query 'query { ... }'

Or it can be sent via stdin by using the '-' special syntax. Example command:
cat request.graphql | defradb client query -

A GraphQL client such as GraphiQL (https://github.com/graphql/graphiql) can be used to interact
with the database more conveniently.

To learn more about the DefraDB GraphQL Query Language, refer to https://docs.source.network.

```
defradb client query [query request] [flags]
```

## Options

```
-h, --help help for query
```

## Options inherited from parent commands

```
--logformat string Log format to use. Options are csv, json (default "csv")
--logger stringArray Override logger parameters. Usage: --logger <name>,level=<level>,output=<output>,...
--loglevel string Log level to use. Options are debug, info, error, fatal (default "info")
--lognocolor Disable colored log output
--logoutput string Log output path (default "stderr")
--logtrace Include stacktrace in error and fatal logs
--rootdir string Directory for data and configuration to use (default "$HOME/.defradb")
--url string URL of HTTP endpoint to listen on or connect to (default "localhost:9181")
```

## SEE ALSO

* [defradb client](defradb_client.md) - Interact with a running DefraDB node as a client

34 changes: 34 additions & 0 deletions docs/references/cli/defradb_client_rpc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# client rpc

Interact with a DefraDB gRPC server

## Synopsis

Interact with a DefraDB gRPC server.

## Options

```
--addr string gRPC endpoint address (default "0.0.0.0:9161")
-h, --help help for rpc
```

## Options inherited from parent commands

```
--logformat string Log format to use. Options are csv, json (default "csv")
--logger stringArray Override logger parameters. Usage: --logger <name>,level=<level>,output=<output>,...
--loglevel string Log level to use. Options are debug, info, error, fatal (default "info")
--lognocolor Disable colored log output
--logoutput string Log output path (default "stderr")
--logtrace Include stacktrace in error and fatal logs
--rootdir string Directory for data and configuration to use (default "$HOME/.defradb")
--url string URL of HTTP endpoint to listen on or connect to (default "localhost:9181")
```

## SEE ALSO

* [defradb client](defradb_client.md) - Interact with a running DefraDB node as a client
* [defradb client rpc p2pcollection](defradb_client_rpc_p2pcollection.md) - Interact with the P2P collection system
* [defradb client rpc replicator](defradb_client_rpc_replicator.md) - Interact with the replicator system

37 changes: 37 additions & 0 deletions docs/references/cli/defradb_client_rpc_addreplicator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# client rpc addreplicator

Add a new replicator

## Synopsis

Use this command if you wish to add a new target replicator
for the p2p data sync system.

```
defradb client rpc addreplicator <collection> <peer> [flags]
```

## Options

```
-h, --help help for addreplicator
```

## Options inherited from parent commands

```
--addr string gRPC endpoint address (default "0.0.0.0:9161")
--logformat string Log format to use. Options are csv, json (default "csv")
--logger stringArray Override logger parameters. Usage: --logger <name>,level=<level>,output=<output>,...
--loglevel string Log level to use. Options are debug, info, error, fatal (default "info")
--lognocolor Disable colored log output
--logoutput string Log output path (default "stderr")
--logtrace Include stacktrace in error and fatal logs
--rootdir string Directory for data and configuration to use (default "$HOME/.defradb")
--url string URL of HTTP endpoint to listen on or connect to (default "localhost:9181")
```

## SEE ALSO

* [defradb client rpc](defradb_client_rpc.md) - Interact with a DefraDB gRPC server

35 changes: 35 additions & 0 deletions docs/references/cli/defradb_client_rpc_p2pcollection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# client rpc p2pcollection

Interact with the P2P collection system

## Synopsis

Add, delete, or get the list of P2P collections

## Options

```
-h, --help help for p2pcollection
```

## Options inherited from parent commands

```
--addr string gRPC endpoint address (default "0.0.0.0:9161")
--logformat string Log format to use. Options are csv, json (default "csv")
--logger stringArray Override logger parameters. Usage: --logger <name>,level=<level>,output=<output>,...
--loglevel string Log level to use. Options are debug, info, error, fatal (default "info")
--lognocolor Disable colored log output
--logoutput string Log output path (default "stderr")
--logtrace Include stacktrace in error and fatal logs
--rootdir string Directory for data and configuration to use (default "$HOME/.defradb")
--url string URL of HTTP endpoint to listen on or connect to (default "localhost:9181")
```

## SEE ALSO

* [defradb client rpc](defradb_client_rpc.md) - Interact with a DefraDB gRPC server
* [defradb client rpc p2pcollection add](defradb_client_rpc_p2pcollection_add.md) - Add P2P collections
* [defradb client rpc p2pcollection getall](defradb_client_rpc_p2pcollection_getall.md) - Get all P2P collections
* [defradb client rpc p2pcollection remove](defradb_client_rpc_p2pcollection_remove.md) - Add P2P collections

Loading