@astrofoundry/pi-astro 0.21.1 → 0.21.2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrofoundry/pi-astro",
3
- "version": "0.21.1",
3
+ "version": "0.21.2",
4
4
  "description": "Personal pi customizations (extensions, subagents, skills, prompts, themes) for the pi coding agent.",
5
5
  "keywords": [
6
6
  "pi-package"
@@ -30,7 +30,8 @@ export const REPO_HELP = ` git status branch, ahead/behind, ch
30
30
  git log [n] last n commits (default 10)
31
31
  git write <path> <content> write a file inside the checkout (creates folders)
32
32
  git commit <message> stage everything and commit
33
- git push push the branch to origin`;
33
+ git push push the branch to origin
34
+ git key public key and fingerprint of the deploy key in use`;
34
35
 
35
36
  const TIMEOUT_MS = 240_000;
36
37
 
@@ -115,6 +116,16 @@ export async function trackedFile(spec: RepoSpec, rel: string): Promise<string>
115
116
 
116
117
  export async function repoCommand(spec: RepoSpec, args: string[]): Promise<number> {
117
118
  const [sub, ...rest] = args;
119
+ if (sub === "key") {
120
+ const key = secretPath(spec.service, spec.deployKeyField);
121
+ const [pub, fingerprint] = await Promise.all([
122
+ run("/usr/bin/ssh-keygen", ["-y", "-f", key], { timeoutMs: 10_000 }),
123
+ run("/usr/bin/ssh-keygen", ["-l", "-f", key], { timeoutMs: 10_000 }),
124
+ ]);
125
+ if (pub.code !== 0) throw new ServiceError(`deploy key unreadable: ${pub.stderr.trim()}`);
126
+ printJson({ publicKey: pub.stdout.trim(), fingerprint: fingerprint.stdout.trim() });
127
+ return 0;
128
+ }
118
129
  const dir = await ensureCheckout(spec);
119
130
  switch (sub) {
120
131
  case "status":