@hawkeye-xb.com/imprint-cli 0.2.2 → 0.2.3

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.
Files changed (2) hide show
  1. package/dist/cli.js +7 -1
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -160,7 +160,8 @@ var TOKEN_PREFIX = "imp_";
160
160
  async function login() {
161
161
  const port = await findFreePort();
162
162
  const state = crypto.randomBytes(16).toString("hex");
163
- const name = `${process.env.USER ?? "user"}@${os2.hostname()}`;
163
+ const user = process.env.USER || os2.userInfo().username || "user";
164
+ const name = `${user}@${friendlyHostname()}`;
164
165
  const tokenPromise = waitForCallback(port, state);
165
166
  const url = new URL("/cli-login", DASHBOARD_URL);
166
167
  url.searchParams.set("port", String(port));
@@ -177,6 +178,11 @@ async function login() {
177
178
  console.log(`\u2713 Logged in. Token saved.`);
178
179
  return token;
179
180
  }
181
+ function friendlyHostname() {
182
+ const raw = os2.hostname();
183
+ if (!raw || raw === "bogon" || raw.startsWith("bogon.")) return "local";
184
+ return raw.replace(/\.local$/, "");
185
+ }
180
186
  function waitForCallback(port, expectedState) {
181
187
  return new Promise((resolve, reject) => {
182
188
  const timeout = setTimeout(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hawkeye-xb.com/imprint-cli",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "type": "module",
5
5
  "description": "Imprint CLI — long-term memory for AI coding tools (Claude Code, Cursor, Codex). Installs the imprint MCP server into your tool's settings file via a browser OAuth flow.",
6
6
  "license": "Elastic-2.0",