pi-creel 0.1.0 → 0.1.1
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/package.json +1 -1
- package/src/index.ts +6 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-creel",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "request_secret for the pi coding agent: capture an API key into a local .env via a tmux popup (the creel tool) so it never enters the chat/context.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
package/src/index.ts
CHANGED
|
@@ -52,12 +52,18 @@ function defaultCreelOnPath(): boolean {
|
|
|
52
52
|
function defaultSpawnPopup(tmux: TmuxContext, command: string): void {
|
|
53
53
|
// display-popup returns immediately (the popup runs detached on the server),
|
|
54
54
|
// so completion is observed out-of-band via the status file.
|
|
55
|
+
//
|
|
56
|
+
// -d anchors the popup's working directory to this process's cwd — the folder
|
|
57
|
+
// pi was launched in, i.e. the project being worked on. creel resolves a
|
|
58
|
+
// relative --dest (".env") against that cwd, so the key lands in the project's
|
|
59
|
+
// .env. Without -d, tmux opens the popup in $HOME and the .env goes there.
|
|
55
60
|
execFileSync(
|
|
56
61
|
"tmux",
|
|
57
62
|
[
|
|
58
63
|
"-L", tmux.socket,
|
|
59
64
|
"display-popup",
|
|
60
65
|
"-t", tmux.pane,
|
|
66
|
+
"-d", process.cwd(),
|
|
61
67
|
"-E",
|
|
62
68
|
"-w", POPUP_WIDTH,
|
|
63
69
|
"-h", POPUP_HEIGHT,
|