@domdhi/claude-code-tts 1.1.0 → 1.2.0
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/INSTALL.md +2 -2
- package/README.md +1 -1
- package/install.py +14 -12
- package/package.json +1 -1
package/INSTALL.md
CHANGED
|
@@ -43,8 +43,8 @@ The installer automatically:
|
|
|
43
43
|
7. Patches `settings.json` / `settings.local.json` with hook entries (backs up original first)
|
|
44
44
|
|
|
45
45
|
**Local vs global:**
|
|
46
|
-
- Default (no flag):
|
|
47
|
-
- `--global`:
|
|
46
|
+
- Default (no flag): everything goes into `./.claude/` — hook scripts, commands, and `settings.local.json` (gitignored). Good for shipping TTS config alongside a project. Note: the local daemon runs on `localhost:6254`; if you have two local-installed projects open at once, they'll share the port (the first one wins).
|
|
47
|
+
- `--global`: everything goes into `~/.claude/` — hook scripts, commands, and `settings.json`. Recommended for personal use across all projects.
|
|
48
48
|
|
|
49
49
|
### Option B — installer script
|
|
50
50
|
|
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ npx @domdhi/claude-code-tts
|
|
|
18
18
|
npx @domdhi/claude-code-tts --global
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
That's it. The installer copies the hook files
|
|
21
|
+
That's it. The installer copies the hook files into `.claude/hooks/tts/`, enables TTS, optionally installs the offline fallback, installs slash commands, and patches `settings.local.json` — all in the current project directory. Use `--global` to install once for all projects.
|
|
22
22
|
|
|
23
23
|
**Requirements:** Node.js 16+ and Python 3.10+ must both be installed. The hooks run in Python — Node is only used for the install command.
|
|
24
24
|
|
package/install.py
CHANGED
|
@@ -33,15 +33,16 @@ SOURCE_DIR = os.path.dirname(os.path.abspath(__file__))
|
|
|
33
33
|
HOOKS_SOURCE = os.path.join(SOURCE_DIR, '.claude', 'hooks', 'tts')
|
|
34
34
|
COMMANDS_SOURCE = os.path.join(SOURCE_DIR, '.claude', 'commands', 'voice')
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
_home_claude = os.path.join(os.path.expanduser('~'), '.claude')
|
|
37
|
+
_proj_claude = os.path.join(os.getcwd(), '.claude')
|
|
38
38
|
|
|
39
|
-
# Default: project-local
|
|
40
|
-
#
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
39
|
+
# Default: project-local — all files go into ./.claude/ (current project)
|
|
40
|
+
# --global overrides all of these to ~/.claude/
|
|
41
|
+
INSTALL_DIR = os.path.join(_proj_claude, 'hooks', 'tts')
|
|
42
|
+
MODELS_DIR = os.path.join(INSTALL_DIR, 'models')
|
|
43
|
+
COMMANDS_INSTALL_DIR = os.path.join(_proj_claude, 'commands', 'voice')
|
|
44
|
+
# settings.local.json is gitignored — safe for machine-specific absolute paths
|
|
45
|
+
SETTINGS_FILE = os.path.join(_proj_claude, 'settings.local.json')
|
|
45
46
|
|
|
46
47
|
GLOBAL_SCOPE = False
|
|
47
48
|
|
|
@@ -294,7 +295,7 @@ def main():
|
|
|
294
295
|
parser = argparse.ArgumentParser(description='claude-code-tts installer')
|
|
295
296
|
parser.add_argument(
|
|
296
297
|
'--dir', metavar='PATH',
|
|
297
|
-
help='
|
|
298
|
+
help='Override hook install directory (for testing only)'
|
|
298
299
|
)
|
|
299
300
|
parser.add_argument(
|
|
300
301
|
'--global', dest='global_scope', action='store_true',
|
|
@@ -309,9 +310,10 @@ def main():
|
|
|
309
310
|
|
|
310
311
|
if args.global_scope:
|
|
311
312
|
GLOBAL_SCOPE = True
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
313
|
+
INSTALL_DIR = os.path.join(_home_claude, 'hooks', 'tts')
|
|
314
|
+
MODELS_DIR = os.path.join(INSTALL_DIR, 'models')
|
|
315
|
+
COMMANDS_INSTALL_DIR = os.path.join(_home_claude, 'commands', 'voice')
|
|
316
|
+
SETTINGS_FILE = os.path.join(_home_claude, 'settings.json')
|
|
315
317
|
|
|
316
318
|
scope_label = 'global (~/.claude/)' if args.global_scope else 'project-local (.claude/)'
|
|
317
319
|
print(f'\nclaude-code-tts installer [{scope_label}]\n')
|