@kernelius/forge-cli 0.1.0 → 0.1.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/README.md +2 -2
- package/dist/index.js +12 -4
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -143,10 +143,10 @@ See [SKILL.md](./SKILL.md) for full OpenClaw integration details.
|
|
|
143
143
|
|
|
144
144
|
## API URL
|
|
145
145
|
|
|
146
|
-
By default, the CLI connects to `
|
|
146
|
+
By default, the CLI connects to `https://forge-api.kernelius.com`. For local development, you can override the API URL:
|
|
147
147
|
|
|
148
148
|
```bash
|
|
149
|
-
forge auth login --token forge_agent_xxx... --api-url
|
|
149
|
+
forge auth login --token forge_agent_xxx... --api-url http://localhost:3001
|
|
150
150
|
```
|
|
151
151
|
|
|
152
152
|
## Development
|
package/dist/index.js
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
// src/index.ts
|
|
4
4
|
import { Command as Command5 } from "commander";
|
|
5
|
+
import { readFileSync } from "fs";
|
|
6
|
+
import { fileURLToPath } from "url";
|
|
7
|
+
import { dirname, join as join2 } from "path";
|
|
5
8
|
|
|
6
9
|
// src/commands/auth.ts
|
|
7
10
|
import { Command } from "commander";
|
|
@@ -17,7 +20,7 @@ var CONFIG_PATH = join(CONFIG_DIR, "config.json");
|
|
|
17
20
|
async function getConfig() {
|
|
18
21
|
if (!existsSync(CONFIG_PATH)) {
|
|
19
22
|
return {
|
|
20
|
-
apiUrl: "
|
|
23
|
+
apiUrl: "https://forge-api.kernelius.com"
|
|
21
24
|
};
|
|
22
25
|
}
|
|
23
26
|
try {
|
|
@@ -37,7 +40,7 @@ async function saveConfig(config) {
|
|
|
37
40
|
}
|
|
38
41
|
async function clearConfig() {
|
|
39
42
|
const config = {
|
|
40
|
-
apiUrl: "
|
|
43
|
+
apiUrl: "https://forge-api.kernelius.com"
|
|
41
44
|
};
|
|
42
45
|
await saveConfig(config);
|
|
43
46
|
}
|
|
@@ -113,7 +116,7 @@ async function apiPatch(endpoint, data) {
|
|
|
113
116
|
// src/commands/auth.ts
|
|
114
117
|
function createAuthCommand() {
|
|
115
118
|
const auth = new Command("auth").description("Manage authentication");
|
|
116
|
-
auth.command("login").description("Login with an API key").requiredOption("--token <key>", "Agent API key (forge_agent_...)").option("--api-url <url>", "Forge API URL", "
|
|
119
|
+
auth.command("login").description("Login with an API key").requiredOption("--token <key>", "Agent API key (forge_agent_...)").option("--api-url <url>", "Forge API URL", "https://forge-api.kernelius.com").action(async (options) => {
|
|
117
120
|
try {
|
|
118
121
|
const { token, apiUrl } = options;
|
|
119
122
|
if (!token.startsWith("forge_agent_")) {
|
|
@@ -602,8 +605,13 @@ function parseRepoArg3(arg) {
|
|
|
602
605
|
}
|
|
603
606
|
|
|
604
607
|
// src/index.ts
|
|
608
|
+
var __filename2 = fileURLToPath(import.meta.url);
|
|
609
|
+
var __dirname2 = dirname(__filename2);
|
|
610
|
+
var packageJson = JSON.parse(
|
|
611
|
+
readFileSync(join2(__dirname2, "../package.json"), "utf-8")
|
|
612
|
+
);
|
|
605
613
|
var program = new Command5();
|
|
606
|
-
program.name("forge").description("CLI tool for Kernelius Forge - the agent-native Git platform").version(
|
|
614
|
+
program.name("forge").description("CLI tool for Kernelius Forge - the agent-native Git platform").version(packageJson.version);
|
|
607
615
|
program.addCommand(createAuthCommand());
|
|
608
616
|
program.addCommand(createReposCommand());
|
|
609
617
|
program.addCommand(createIssuesCommand());
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kernelius/forge-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Command-line tool for Kernelius Forge - the agent-native Git platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
|
-
"forge": "
|
|
7
|
+
"forge": "dist/index.js"
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
10
|
"dist",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
],
|
|
38
38
|
"repository": {
|
|
39
39
|
"type": "git",
|
|
40
|
-
"url": "https://github.com/kernelius-hq/forge-cli"
|
|
40
|
+
"url": "git+https://github.com/kernelius-hq/forge-cli.git"
|
|
41
41
|
},
|
|
42
42
|
"bugs": {
|
|
43
43
|
"url": "https://github.com/kernelius-hq/forge-cli/issues"
|