forked from terminusdb/terminusdb-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathterminusdb.1
More file actions
453 lines (453 loc) · 13.8 KB
/
terminusdb.1
File metadata and controls
453 lines (453 loc) · 13.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
.\" generated with Ronn-NG/v0.9.1
.\" http://github.com/apjanke/ronn-ng/tree/0.9.1
.TH "TERMINUSDB" "1" "August 2021" ""
.SH "NAME"
\fBterminusdb\fR \- command line interface to the terminusdb Graph DBMS
.SH "SYNOPSIS"
\fBterminusdb [command subcommand positional_arguments] flags\fR
.SH "DESCRIPTION"
The terminusdb(1) command line tool allows users to interact with a database, allowing common operations such as querying (and updating), database creation, data ingestion and maintainence\.
.SH "COMMANDS"
terminusdb accepts a command, sometimes followed by a subcommand\. The accepted commands are given here, along with their arguments\.
.SS "help"
\fBterminusdb help\fR
.P
Display help regarding terminusdb\.
.TP
\fB\-m\fR, \fB\-\-markdown\fR=[value]
generate help as markdown
.SS "test"
\fBterminusdb test OPTIONS\fR
.P
Run internal TerminusDB tests\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for \fBtest\fR command
.TP
\fB\-t\fR, \fB\-\-test\fR=[value]
Run a specific test
.SS "serve"
\fBterminusdb serve OPTIONS\fR
.P
Run the TerminusDB server\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
Print help for \fBserve\fR command
.TP
\fB\-i\fR, \fB\-\-interactive\fR=[value]
Run server in interactive mode
.TP
\fB\-m\fR, \fB\-\-memory\fR=[value]
Run server in\-memory, without a persistent store\. Takes a password as an optional argument\. The in\-memory store will be initialized with an admin account with the given password\. If absent, the admin account will have 'root' as a password\.
.SS "list"
\fBterminusdb list OPTIONS\fR
.P
List databases\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBlist\fR command
.TP
\fB\-j\fR, \fB\-\-json\fR=[value]
Return a JSON as the result of the \fBlist\fR command
.SS "optimize"
\fBterminusdb optimize OPTIONS\fR
.P
Optimize a database (including _system and _meta)\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBoptimize\fR command
.SS "query"
\fBterminusdb query DB_SPEC QUERY OPTIONS\fR
.P
Query a database\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBquery\fR command
.TP
\fB\-m\fR, \fB\-\-message\fR=[value]
message to associate with the commit
.TP
\fB\-a\fR, \fB\-\-author\fR=[value]
author to place on the commit
.SS "push"
\fBterminusdb push DB_SPEC\fR
.P
Push a branch\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBpush\fR command
.TP
\fB\-b\fR, \fB\-\-branch\fR=[value]
set the origin branch for push
.TP
\fB\-e\fR, \fB\-\-remote\-branch\fR=[value]
set the branch on the remote for push
.TP
\fB\-r\fR, \fB\-\-remote\fR=[value]
the name of the remote to use
.TP
\fB\-x\fR, \fB\-\-prefixes\fR=[value]
send prefixes for database
.TP
\fB\-u\fR, \fB\-\-user\fR=[value]
the user on the remote
.TP
\fB\-p\fR, \fB\-\-password\fR=[value]
the password on the remote
.SS "clone"
\fBterminusdb clone URI <DB_SPEC>\fR
.P
Clone a database (into DB_SPEC)\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBclone\fR command
.TP
\fB\-u\fR, \fB\-\-user\fR=[value]
the user on the remote
.TP
\fB\-p\fR, \fB\-\-password\fR=[value]
the password on the remote
.TP
\fB\-o\fR, \fB\-\-organization\fR=[value]
organizational owner of the cloned database
.TP
\fB\-l\fR, \fB\-\-label\fR=[value]
label to use for this database
.TP
\fB\-c\fR, \fB\-\-comment\fR=[value]
long description of the cloned database
.TP
\fB\-b\fR, \fB\-\-public\fR=[value]
whether the cloned database is to be public
.SS "pull"
\fBterminusdb pull BRANCH_SPEC\fR
.P
Pull a branch from a database\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBpull\fR command
.TP
\fB\-e\fR, \fB\-\-remote\-branch\fR=[value]
set the branch on the remote for push
.TP
\fB\-r\fR, \fB\-\-remote\fR=[value]
the name of the remote to use
.TP
\fB\-u\fR, \fB\-\-user\fR=[value]
the user on the remote
.TP
\fB\-p\fR, \fB\-\-password\fR=[value]
the password on the remote
.SS "fetch"
\fBterminusdb fetch BRANCH_SPEC\fR
.P
fetch data from a remote\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBfetch\fR command
.TP
\fB\-r\fR, \fB\-\-remote\fR=[value]
the name of the remote to use
.TP
\fB\-u\fR, \fB\-\-user\fR=[value]
the user on the remote
.TP
\fB\-p\fR, \fB\-\-password\fR=[value]
the password on the remote
.SS "rebase"
\fBterminusdb rebase TO_DATABASE_SPEC FROM_DATABASE_SPEC OPTIONS\fR
.P
Rebase a database with commits from FROM_DATABASE_SPEC into TO_DATABASE_SPEC\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBrebase\fR command
.TP
\fB\-a\fR, \fB\-\-author\fR=[value]
The author of the rebase
.SS "rollup"
\fBterminusdb rollup DATABASE_SPEC OPTIONS\fR
.P
Creates an optimisation layer for queries on the given commit\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBrollup\fR command
.SS "bundle"
\fBterminusdb bundle DATABASE_SPEC OPTIONS\fR
.P
Create a pack for a given DATABASE_SPEC that can then be reconsistuted with \fBterminusdb unpack\fR\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBbundle\fR command
.TP
\fB\-o\fR, \fB\-\-output\fR=[value]
file name to use for pack output file (defaults to descriptor based name)\.
.SS "unbundle"
\fBterminusdb unbundle DATABASE_SPEC FILE OPTIONS\fR
.P
Unbundle a bundle file\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBunbundle\fR command
.SS "branch create"
\fBterminusdb branch create BRANCH_SPEC OPTIONS\fR
.P
Create a branch\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBbranch create\fR sub command
.TP
\fB\-o\fR, \fB\-\-origin\fR=[value]
the origin branch to use
.SS "branch delete"
\fBterminusdb branch delete BRANCH_SPEC OPTIONS\fR
.P
Delete a branch\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBbranch delete\fR sub command
.SS "db create"
\fBterminusdb db create DATABASE_SPEC OPTIONS\fR
.P
Create a database\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBdb create\fR sub command
.TP
\fB\-o\fR, \fB\-\-organization\fR=[value]
organizational owner of the database
.TP
\fB\-l\fR, \fB\-\-label\fR=[value]
label to use for this database
.TP
\fB\-c\fR, \fB\-\-comment\fR=[value]
long description of this database
.TP
\fB\-p\fR, \fB\-\-public\fR=[value]
whether this database is to be public
.TP
\fB\-k\fR, \fB\-\-schema\fR=[value]
whether to use a schema
.TP
\fB\-d\fR, \fB\-\-data\-prefix\fR=[value]
uri prefix to use for data
.TP
\fB\-s\fR, \fB\-\-schema\-prefix\fR=[value]
uri prefix to use for schema
.TP
\fB\-x\fR, \fB\-\-prefixes\fR=[value]
additional defined prefixes in JSON
.SS "db delete"
\fBterminusdb db delete DATABASE_SPEC OPTIONS\fR
.P
Delete a database\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBdb delete\fR sub command
.TP
\fB\-o\fR, \fB\-\-organization\fR=[value]
organizational owner of the database
.TP
\fB\-f\fR, \fB\-\-force\fR=[value]
force the deletion of the database (unsafe)
.SS "store init"
\fBterminusdb store init OPTIONS\fR
.P
Initialize a store for TerminusDB\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBstore init\fR sub command
.TP
\fB\-k\fR, \fB\-\-key\fR=[value]
key to use for admin login
.TP
\fB\-f\fR, \fB\-\-force\fR=[value]
force the creation of a new store even when one already exists
.SS "triples dump"
\fBterminusdb triples dump GRAPH_SPEC\fR
.P
Dump an RDF string\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBtriples dump\fR sub command
.TP
\fB\-f\fR, \fB\-\-format\fR=[value]
format of RDF (can be one of: [turtle])
.SS "triples update"
\fBterminusdb triples update GRAPH_SPEC FILE\fR
.P
Update from an RDF file (replaces current content)\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBtriples update\fR sub command
.TP
\fB\-m\fR, \fB\-\-message\fR=[value]
message to associate with the commit
.TP
\fB\-a\fR, \fB\-\-author\fR=[value]
author to place on the commit
.TP
\fB\-f\fR, \fB\-\-format\fR=[value]
format of RDF (can be one of: [turtle])
.SS "triples load"
\fBterminusdb triples load GRAPH_SPEC FILE\fR
.P
Load triples from RDF file (Appending new)\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBtriples load\fR sub command
.TP
\fB\-m\fR, \fB\-\-message\fR=[value]
message to associate with the commit
.TP
\fB\-a\fR, \fB\-\-author\fR=[value]
author to place on the commit
.TP
\fB\-f\fR, \fB\-\-format\fR=[value]
format of RDF (can be one of: [turtle])
.SS "remote add"
\fBterminusdb remote add DATABASE_SPEC REMOTE_NAME REMOTE_LOCATION OPTIONS\fR
.P
Add a remote\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBremote add\fR sub command
.SS "remote remove"
\fBterminusdb remote delete DATABASE_SPEC REMOTE_NAME OPTIONS\fR
.P
Remove a remote\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBremote remove\fR sub command
.SS "remote set\-url"
\fBterminusdb remote set\-url DATABASE_SPEC REMOTE_NAME REMOTE_LOCATION OPTIONS\fR
.P
Set the URL of a remote\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBremote set\-url\fR sub command
.SS "remote get\-url"
\fBterminusdb remote get\-url DATABASE_SPEC REMOTE_NAME OPTIONS\fR
.P
Get the URL of a remote\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBremote get\-url\fR sub command
.TP
\fB\-r\fR, \fB\-\-remote\fR=[value]
the name of the remote to use
.SS "remote list"
\fBterminusdb remote list DATABASE_SPEC OPTIONS\fR
.P
List remotes\.
.TP
\fB\-h\fR, \fB\-\-help\fR=[value]
print help for the \fBremote list\fR sub command
.SH "SYNTAX"
The designation of databases, repositories, the associated commit graph of a database, and various graphs as used in the above command requires the use of an appropriate descriptor path\.
.TP
\fB_system\fR
This is the system meta\-data, which contains the user information, organization information and database records\.
.TP
\fB<organization>/<database>\fR
This is the most basic descriptor path and actually refers to the more specific default path \fB<organization>/<database>/local/branch/main\fR\.
.TP
\fB<organization>/<database>/_meta\fR
This is the repository graph associated with \fBdatabase\fR\. It contains information about the local repository and all known remotes\.
.TP
\fB<organization>/<database>/<repository>\fR
This is a longer form database designator which specifies which respository we would like to address\. It refers implicitly to \fB<organization>/<database>/<repository>/branch/main\fR\.
.TP
\fB<organization>/<database>/<repository>/_commits\fR
The commit graph associated with a given database\. This graph contains metadata about branch histories with their commit objects including the authorship and time\.
.TP
\fB<organization>/<database>/<repository>/branch/<branch>\fR
The most specific branch descriptor, allows you to address a branch other than main\.
.TP
\fB<organization>/<database>/<repository>/commit/<commit>\fR
The descriptor which allows an individual commit to be addressed directly\.
.SH "ENVIRONMENT"
.TP
\fBTERMINUSDB_SERVER_NAME\fR
Set the servername to use for\fBterminusdb serve\fR\. Default is \fB127\.0\.0\.1\fR\.
.TP
\fBTERMINUSDB_SERVER_PORT\fR
Set the port to use for\fBterminusdb serve\fR\. Default is \fB6363\fR\.
.TP
\fBTERMINUSDB_SERVER_WORKERS\fR
Set the number of worker threads to use for \fBterminusdb serve\fR\. Default is \fB8\fR\.
.TP
\fBTERMINUSDB_SERVER_MAX_TRANSACTION_RETRIES\fR
Set the transaction retry count\. Default is \fB3\fR\.
.TP
\fBTERMINUSDB_SERVER_DB_PATH\fR
Set the location of the storage volume to be used by \fBterminusdb\fR operations\. Can be addressed relative to current path using \fB\./\fR\fIpath\fR\. Default is \fB\./storage/db\fR\.
.TP
\fBTERMINUSDB_SERVER_JWT_PUBLIC_KEY_PATH\fR
Set the public key path for JWT\. Default is \fB''\fR\.
.TP
\fBTERMINUSDB_SERVER_JWT_PUBLIC_KEY_ID\fR
Set the public key identifier for JWT\. Default is \fB''\fR\.
.TP
\fBTERMINUSDB_CONSOLE_BASE_URL\fR
Set the console javascript load URL\. Default is \fBhttps://cdn\.terminusdb\.com/js_libs/terminusdb_console/dev\fR\.
.TP
\fBTERMINUSDB_AUTOLOGIN_ENABLED\fR
If \fBtrue\fR then attempt to login automatically with default password\. Default is \fBtrue\fR\.
.TP
\fBTERMINUSDB_SERVER_PACK_DIR\fR
Location of the prolog pack directory if loading third party modules\.
.TP
\fBTERMINUSDB_SERVER_TMP_PATH\fR
Path to use for temporary files\.
.TP
\fBTERMINUSDB_IGNORE_REF_AND_REPO_SCHEMA\fR
Assume that ref and repo operations are inherently correct\.
.SH "EXIT STATUS"
.TP
0
Successfully program execution\. Associated with \fBapi:success\fR\.
.TP
1
A generic failure of the API to carry out the operation\. Associated with \fBapi:failure\fR\.
.TP
2
The resource which was being requested was not found\. Associated with \fBapi:not_found\fR\.
.TP
13
The user attempted to carry out an operation without appropriately authorizing or without permission\. Associated with \fBapi:unauthorized\fR or \fBapi:forbidden\fR\.
.TP
13
Unauthorized access attempted\. Associated with \fBapi:unauthorized\fR\.
.TP
126
An api command was attempted which is not possible\. Associated with \fBapi:method_not_allowed\fR\.
.TP
131
Internal server error\. Associated with \fBapi:server_error\fR\.
.SH "EXAMPLES"
.TP
\fBterminusdb db create admin/foo\fR
Create a database in the organization \fBadmin\fR with the identifier \fBfoo\fR\.
.TP
\fBterminusdb db create admin/foo \-\-label="Foo"\fR
Create a database in the organization \fBadmin\fR with the identifier \fBfoo\fR and name \fBFoo\fR\.
.SH "COPYRIGHT"
Copyright 2021 TerminusDB
.P
Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at
.P
http://www\.apache\.org/licenses/LICENSE\-2\.0
.P
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\. See the License for the specific language governing permissions and limitations under the License\.
.SH "AUTHORS"
Gavin Mendel\-Gleason \fIgavin@terminusdb\.com\fR
.P
Matthijs van Otterdijk \fImatthijs@terminusdb\.com\fR
.P
Robin de Rooij \fIrobin@terminusdb\.com\fR
.P
Anne Ogborn \fIanne@swi\-prolog\.org\fR
.P
Dmytri Kleiner \fIdk@terminusdb\.com\fR
.P
Paulo Moura \fIhttps://github\.com/pmoura\fR