automagik-forge 0.5.6 → 0.5.7

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/bin/cli.js CHANGED
@@ -4,6 +4,16 @@ const { execSync, spawn } = require("child_process");
4
4
  const AdmZip = require("adm-zip");
5
5
  const path = require("path");
6
6
  const fs = require("fs");
7
+ const dotenv = require("dotenv");
8
+
9
+ // Load .env from current working directory if present
10
+ const envPath = path.join(process.cwd(), ".env");
11
+ if (fs.existsSync(envPath)) {
12
+ const result = dotenv.config({ path: envPath });
13
+ if (!result.error) {
14
+ console.log("📝 Loaded environment from .env");
15
+ }
16
+ }
7
17
 
8
18
  // Resolve effective arch for our published 64-bit binaries only.
9
19
  // Any ARM → arm64; anything else → x64. On macOS, handle Rosetta.
@@ -132,7 +142,27 @@ if (isMcpMode) {
132
142
  } else {
133
143
  console.log(`📦 Extracting automagik-forge...`);
134
144
  extractAndRun("automagik-forge", (bin) => {
145
+ // Log port configuration
146
+ const backendPort = process.env.BACKEND_PORT || process.env.PORT;
147
+ const displayPort = backendPort || "8887";
148
+ if (backendPort) {
149
+ console.log(`🔌 Using port: ${backendPort}`);
150
+ } else {
151
+ console.log(`🔌 Using default port: 8887`);
152
+ }
153
+
135
154
  console.log(`🚀 Launching automagik-forge...`);
155
+ console.log();
156
+
157
+ // Ensure RUST_LOG is set to show logs (default to info level)
158
+ if (!process.env.RUST_LOG) {
159
+ process.env.RUST_LOG = "info";
160
+ }
161
+
162
+ const host = process.env.HOST || "127.0.0.1";
163
+ console.log(`http://${host}:${displayPort}/`);
164
+ console.log();
165
+
136
166
  if (platform === "win32") {
137
167
  execSync(`"${bin}"`, { stdio: "inherit" });
138
168
  } else {
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "automagik-forge",
3
3
  "private": false,
4
- "version": "0.5.6",
4
+ "version": "0.5.7",
5
5
  "main": "index.js",
6
6
  "bin": {
7
7
  "automagik-forge": "bin/cli.js"
@@ -11,7 +11,8 @@
11
11
  "license": "",
12
12
  "description": "NPX wrapper around automagik-forge and automagik-forge-mcp",
13
13
  "dependencies": {
14
- "adm-zip": "^0.5.16"
14
+ "adm-zip": "^0.5.16",
15
+ "dotenv": "^16.4.5"
15
16
  },
16
17
  "files": [
17
18
  "dist",