quilltap 4.12.2 → 4.13.0-dev.105
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -1
- package/bin/quilltap.js +17 -1
- package/lib/completion/bash.template +3 -3
- package/lib/completion/fish.template +1 -0
- package/lib/completion/zsh.template +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -37,6 +37,7 @@ quilltap [options]
|
|
|
37
37
|
|
|
38
38
|
Options:
|
|
39
39
|
-p, --port <number> Port to listen on (default: 3000)
|
|
40
|
+
--host <address> Address to bind (default: 127.0.0.1)
|
|
40
41
|
-d, --data-dir <path> Data directory (default: platform-specific)
|
|
41
42
|
-o, --open Open browser after server starts
|
|
42
43
|
-v, --version Show version number
|
|
@@ -56,6 +57,10 @@ quilltap --port 8080
|
|
|
56
57
|
# Use a custom data directory
|
|
57
58
|
quilltap --data-dir /mnt/data/quilltap
|
|
58
59
|
|
|
60
|
+
# Listen on every interface (Quilltap has no login: trusted networks only;
|
|
61
|
+
# reach it by IP address, or list host names in QUILLTAP_ALLOWED_HOSTS)
|
|
62
|
+
quilltap --host 0.0.0.0
|
|
63
|
+
|
|
59
64
|
# Start and open browser automatically
|
|
60
65
|
quilltap --open
|
|
61
66
|
|
|
@@ -96,14 +101,19 @@ Register a data directory once and point the CLI at it by name, instead of repea
|
|
|
96
101
|
```bash
|
|
97
102
|
quilltap instances add Friday ~/iCloud/Quilltap/Friday # Register (prompts for the passphrase if encrypted)
|
|
98
103
|
quilltap instances list # Registered instances (* marks the default)
|
|
104
|
+
quilltap instances show Friday # One instance (passphrase status only, never the value)
|
|
105
|
+
quilltap instances path # Print the path to instances.json
|
|
106
|
+
quilltap instances set-passphrase Friday # Change or clear the stored passphrase (prompts hidden)
|
|
99
107
|
quilltap instances default Friday # Make it the fall-through for flag-free runs
|
|
100
108
|
quilltap instances rename Friday Weekday # Rename, preserving the stored passphrase
|
|
101
|
-
quilltap instances remove Friday # Unregister
|
|
109
|
+
quilltap instances remove Friday # Unregister (aliases: rm, delete)
|
|
102
110
|
quilltap instances restore-key Friday # Rebuild a lost or passphrase-locked .dbkey
|
|
103
111
|
quilltap instances default --clear # Revert to the OS platform default
|
|
104
112
|
quilltap instances list --json # The registry as JSON, for scripts
|
|
105
113
|
```
|
|
106
114
|
|
|
115
|
+
`instances set-passphrase` changes only the passphrase the *registry* remembers for an instance, not the one its `.dbkey` is wrapped with. It first offers to clear the stored passphrase; otherwise it prompts twice, hidden, and checks the new one against the instance's `.dbkey` before saving — a passphrase that does not unlock it, or a `.dbkey` that needs none, is refused. With no `.dbkey` on disk yet, it saves without the check. To change the passphrase the database itself is locked with, use the server's Change Passphrase card.
|
|
116
|
+
|
|
107
117
|
If an instance's `quilltap.dbkey` goes missing — or its passphrase does — `instances restore-key` rebuilds it. The file only *wraps* the pepper; the pepper itself is the database key, so an operator who kept the one printed at first-run setup can get back in. The pepper is read from `ENCRYPTION_MASTER_PEPPER` or prompted for hidden, never passed as a flag, and it is proved against the encrypted databases on disk before anything is written. Run it with the server down — the command refuses while the instance lock is held. Flags: `--passphrase <pass>` / `--no-passphrase` (the new wrapping), `-d, --data-dir <path>`, `--force` (proceed when there is no encrypted database to prove against — a fresh or still-plaintext instance), `-y, --yes`. An existing key file is backed up to `quilltap.dbkey.bak-<timestamp>` first, and a registered instance's stored passphrase is updated to match.
|
|
108
118
|
|
|
109
119
|
**It does not re-encrypt character archive bundles.** Those are keyed on the *passphrase*, not the pepper; only the server's Change Passphrase card rewrites them. Bundles made under a passphrase you have just replaced still want the old one.
|
package/bin/quilltap.js
CHANGED
|
@@ -29,6 +29,7 @@ function getVersion() {
|
|
|
29
29
|
function parseArgs(argv) {
|
|
30
30
|
const opts = {
|
|
31
31
|
port: 3000,
|
|
32
|
+
host: '',
|
|
32
33
|
dataDir: '',
|
|
33
34
|
instance: '',
|
|
34
35
|
open: false,
|
|
@@ -49,6 +50,13 @@ function parseArgs(argv) {
|
|
|
49
50
|
process.exit(1);
|
|
50
51
|
}
|
|
51
52
|
break;
|
|
53
|
+
case '--host':
|
|
54
|
+
opts.host = args[++i];
|
|
55
|
+
if (!opts.host) {
|
|
56
|
+
console.error('Error: --host needs an address (e.g. 127.0.0.1 or 0.0.0.0)');
|
|
57
|
+
process.exit(1);
|
|
58
|
+
}
|
|
59
|
+
break;
|
|
52
60
|
case '--data-dir':
|
|
53
61
|
case '-d':
|
|
54
62
|
opts.dataDir = args[++i];
|
|
@@ -108,6 +116,8 @@ Subcommands:
|
|
|
108
116
|
|
|
109
117
|
Options:
|
|
110
118
|
-p, --port <number> Port to listen on (default: 3000)
|
|
119
|
+
--host <address> Address to bind (default: 127.0.0.1; 0.0.0.0 for every
|
|
120
|
+
interface — there is no login, so only on a trusted network)
|
|
111
121
|
-d, --data-dir <path> Data directory (default: platform-specific)
|
|
112
122
|
-i, --instance <name> Use a registered instance (see 'quilltap instances')
|
|
113
123
|
-o, --open Open browser after server starts
|
|
@@ -358,8 +368,11 @@ async function main() {
|
|
|
358
368
|
...process.env,
|
|
359
369
|
NODE_ENV: 'production',
|
|
360
370
|
PORT: String(opts.port),
|
|
361
|
-
HOSTNAME: '0.0.0.0',
|
|
362
371
|
};
|
|
372
|
+
// Loopback unless asked otherwise: Quilltap has no login.
|
|
373
|
+
const bindHost = opts.host || process.env.QUILLTAP_HOST || '127.0.0.1';
|
|
374
|
+
env.QUILLTAP_HOST = bindHost;
|
|
375
|
+
env.HOSTNAME = bindHost;
|
|
363
376
|
|
|
364
377
|
if (opts.dataDir && opts.instance) {
|
|
365
378
|
console.error('Error: Specify either --instance or --data-dir, not both.');
|
|
@@ -393,6 +406,9 @@ async function main() {
|
|
|
393
406
|
console.log(` Quilltap v${version}`);
|
|
394
407
|
console.log('');
|
|
395
408
|
console.log(` URL: ${url}`);
|
|
409
|
+
if (bindHost !== '127.0.0.1' && bindHost !== 'localhost' && bindHost !== '::1') {
|
|
410
|
+
console.log(` Bind: ${bindHost} — reachable from the network; Quilltap has no login`);
|
|
411
|
+
}
|
|
396
412
|
if (opts.dataDir) {
|
|
397
413
|
console.log(` Data dir: ${env.QUILLTAP_DATA_DIR}`);
|
|
398
414
|
}
|
|
@@ -58,7 +58,7 @@ _quilltap_complete() {
|
|
|
58
58
|
cword=$COMP_CWORD
|
|
59
59
|
|
|
60
60
|
# Global options that can appear before subcommands
|
|
61
|
-
local global_opts="-d --data-dir -i --instance -p --port -o --open -v --version -h --help --update --passphrase"
|
|
61
|
+
local global_opts="-d --data-dir -i --instance -p --port --host -o --open -v --version -h --help --update --passphrase"
|
|
62
62
|
|
|
63
63
|
# Top-level subcommands
|
|
64
64
|
local top_cmds="db docs sync themes instances memories memory-diff recall-replay anchor-probe logs migrations maintenance file-verify completion"
|
|
@@ -68,7 +68,7 @@ _quilltap_complete() {
|
|
|
68
68
|
# reserves -i for --ignore-case rather than --instance. Counting those wrong
|
|
69
69
|
# makes a flag's value look like the subcommand's verb, which is how
|
|
70
70
|
# `quilltap docs --limit 5 <TAB>` used to lose the verb list.
|
|
71
|
-
local vf_global=" -d --data-dir -i --instance -p --port --passphrase "
|
|
71
|
+
local vf_global=" -d --data-dir -i --instance -p --port --host --passphrase "
|
|
72
72
|
local vf_db=" --limit --grep --character --project --about --source --tier --chat --message --field --tail --last --from --type --out --id --count "
|
|
73
73
|
local vf_docs=" --mount --folder --type --ext --limit --max --context --top --threshold --sort --depth --max-nodes --format "
|
|
74
74
|
local vf_sync=" --direction --prefer "
|
|
@@ -146,7 +146,7 @@ _quilltap_complete() {
|
|
|
146
146
|
COMPREPLY=($(compgen -d -- "$cur"))
|
|
147
147
|
return
|
|
148
148
|
fi
|
|
149
|
-
if [[ "$prev" == "-p" ]] || [[ "$prev" == "--port" ]] || [[ "$prev" == "--passphrase" ]]; then
|
|
149
|
+
if [[ "$prev" == "-p" ]] || [[ "$prev" == "--port" ]] || [[ "$prev" == "--host" ]] || [[ "$prev" == "--passphrase" ]]; then
|
|
150
150
|
return
|
|
151
151
|
fi
|
|
152
152
|
if [[ "$prev" == "--instance" ]] || { [[ "$prev" == "-i" ]] && [[ "$subcommand" != "memories" ]]; }; then
|
|
@@ -70,6 +70,7 @@ complete -c quilltap -n '__quilltap_no_subcommand' -f -a 'completion' -d 'Genera
|
|
|
70
70
|
|
|
71
71
|
# Global options
|
|
72
72
|
complete -c quilltap -n '__quilltap_no_subcommand' -l 'port' -s 'p' -d 'Port to listen on' -x
|
|
73
|
+
complete -c quilltap -n '__quilltap_no_subcommand' -l 'host' -d 'Address to bind (default 127.0.0.1)' -x
|
|
73
74
|
complete -c quilltap -n '__quilltap_no_subcommand' -l 'data-dir' -s 'd' -d 'Data directory' -r -F
|
|
74
75
|
complete -c quilltap -n '__quilltap_no_subcommand' -l 'instance' -s 'i' -d 'Use registered instance' -x -a '(__quilltap_instance_names)'
|
|
75
76
|
complete -c quilltap -n '__quilltap_no_subcommand' -l 'open' -s 'o' -d 'Open browser after start'
|
|
@@ -27,6 +27,7 @@ _quilltap() {
|
|
|
27
27
|
'(-d --data-dir)'{-d,--data-dir}'[Data directory]:directory:_directories'
|
|
28
28
|
'(-i --instance)'{-i,--instance}'[Use a registered instance]:instance:_quilltap_instance_names'
|
|
29
29
|
'(-p --port)'{-p,--port}'[Port to listen on]:port:'
|
|
30
|
+
'--host[Address to bind (default 127.0.0.1)]:address:'
|
|
30
31
|
'(-o --open)'{-o,--open}'[Open browser after server starts]'
|
|
31
32
|
'(-v --version)'{-v,--version}'[Show version number]'
|
|
32
33
|
'(-h --help)'{-h,--help}'[Show help message]'
|