-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathllms.txt
More file actions
75 lines (52 loc) · 2.8 KB
/
llms.txt
File metadata and controls
75 lines (52 loc) · 2.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# r-cli
RethinkDB command-line client. Execute ReQL queries, manage databases, tables, indexes, users, and permissions from the terminal. Includes an interactive REPL with tab completion.
## Installation
```bash
go install r-cli/cmd/r-cli@latest
```
## Quick Usage
```bash
# interactive REPL
r-cli
# execute ReQL expression
r-cli 'r.db("test").tableList()'
# pipe
echo 'r.table("users").count()' | r-cli -d test
# database/table management
r-cli db list
r-cli db create mydb
r-cli table list --db mydb
r-cli table create users --db mydb
# bulk insert
cat data.jsonl | r-cli insert mydb.users
r-cli insert mydb.users -F data.json --conflict replace
# server status
r-cli status
```
## Commands
- (default) - execute expression arg or start REPL on TTY
- query [expr] - execute a ReQL expression; -F/--file reads from file (--- separates multiple queries); --stop-on-error stops on first failure
- run [term] - execute a raw ReQL JSON term from arg or stdin
- repl - start interactive REPL
- db list|create|drop - database management; drop has --yes/-y
- table list|create|drop|info|reconfigure|rebalance|wait|sync - table management; requires --db; reconfigure accepts --shards, --replicas, --dry-run
- index list|create|drop|rename|status|wait - index management; requires --db; create accepts --geo, --multi
- user list|create|delete|set-password - user management; create accepts --new-password (prompts on TTY if omitted)
- grant <user> - grant/revoke permissions; --read, --write; scope: global / --db / --db --table; --read=false revokes
- insert <db.table> - bulk insert; -F/--file, --batch-size (200), --conflict error|replace|update; reads JSONL from stdin or JSON/JSONL from file
- status - server info as JSON
- completion bash|zsh|fish - generate shell completions
## Global Flags
-H/--host (localhost), -P/--port (28015), -d/--db, -u/--user (admin), -p/--password, --password-file, -t/--timeout (30s), -f/--format (auto: json on TTY, jsonl piped), --profile, --time-format native|raw, --binary-format native|raw, --quiet, --verbose, --tls-cert, --tls-client-cert, --tls-key, --insecure-skip-verify
## Environment Variables
RETHINKDB_HOST, RETHINKDB_PORT, RETHINKDB_USER, RETHINKDB_PASSWORD, RETHINKDB_DATABASE override defaults. CLI flags win. NO_COLOR disables color.
## Output Formats
- json - pretty-printed (default on TTY)
- jsonl - one compact JSON per line (default when piped)
- raw - strings unquoted, others compact JSON
- table - aligned ASCII table for object results
## Interactive REPL
Starts when invoked on TTY with no args, or via `r-cli repl`. Tab completion for databases, tables, and ReQL methods. Multiline input with auto-detection. History saved to ~/.r-cli_history.
Dot-commands: .use <db>, .format <fmt>, .help, .exit/.quit
## Exit Codes
0 ok, 1 connection error, 2 query error, 3 auth error, 130 SIGINT/SIGTERM