krexel 0.1.0
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 +94 -0
- package/bin/krexel +10 -0
- package/dist/cli.d.ts +21 -0
- package/dist/cli.js +167 -0
- package/dist/cli.js.map +1 -0
- package/dist/config-patchers.d.ts +108 -0
- package/dist/config-patchers.js +231 -0
- package/dist/config-patchers.js.map +1 -0
- package/dist/init.d.ts +103 -0
- package/dist/init.js +312 -0
- package/dist/init.js.map +1 -0
- package/dist/login.d.ts +29 -0
- package/dist/login.js +106 -0
- package/dist/login.js.map +1 -0
- package/dist/logs.d.ts +10 -0
- package/dist/logs.js +26 -0
- package/dist/logs.js.map +1 -0
- package/dist/mcp-client.d.ts +168 -0
- package/dist/mcp-client.js +379 -0
- package/dist/mcp-client.js.map +1 -0
- package/dist/output.d.ts +44 -0
- package/dist/output.js +90 -0
- package/dist/output.js.map +1 -0
- package/dist/paths.d.ts +69 -0
- package/dist/paths.js +115 -0
- package/dist/paths.js.map +1 -0
- package/dist/rollback.d.ts +10 -0
- package/dist/rollback.js +34 -0
- package/dist/rollback.js.map +1 -0
- package/dist/ship.d.ts +13 -0
- package/dist/ship.js +49 -0
- package/dist/ship.js.map +1 -0
- package/dist/whoami.d.ts +7 -0
- package/dist/whoami.js +25 -0
- package/dist/whoami.js.map +1 -0
- package/package.json +44 -0
package/dist/output.js
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* output.ts — terminal formatting primitives for the Krexel CLI.
|
|
3
|
+
*
|
|
4
|
+
* All user-facing output goes through these helpers so we get one consistent
|
|
5
|
+
* visual language and so `--json` can swap text for a JSON envelope without
|
|
6
|
+
* touching every subcommand.
|
|
7
|
+
*
|
|
8
|
+
* Conventions:
|
|
9
|
+
* - success / warn / error are bold + colored
|
|
10
|
+
* - dim is for side-notes and context
|
|
11
|
+
* - Spinner factory returns a spinner only when the user is expected to
|
|
12
|
+
* wait > 500ms; short ops just print and move on.
|
|
13
|
+
*/
|
|
14
|
+
import chalk from "chalk";
|
|
15
|
+
import ora from "ora";
|
|
16
|
+
const isTty = Boolean(process.stdout.isTTY);
|
|
17
|
+
/** Strip ANSI when output is being piped (so logs stay readable). */
|
|
18
|
+
const useColor = isTty && !process.env.NO_COLOR;
|
|
19
|
+
/** Boolean --json: every subcommand respects this for machine-readable output. */
|
|
20
|
+
let jsonMode = false;
|
|
21
|
+
export function setJsonMode(on) {
|
|
22
|
+
jsonMode = on;
|
|
23
|
+
}
|
|
24
|
+
export function isJsonMode() {
|
|
25
|
+
return jsonMode;
|
|
26
|
+
}
|
|
27
|
+
/** Print success line. */
|
|
28
|
+
export function success(msg) {
|
|
29
|
+
// eslint-disable-next-line no-console
|
|
30
|
+
console.log(useColor ? chalk.bold.green("✓ ") + msg : `✓ ${msg}`);
|
|
31
|
+
}
|
|
32
|
+
/** Print warning line. */
|
|
33
|
+
export function warn(msg) {
|
|
34
|
+
// eslint-disable-next-line no-console
|
|
35
|
+
console.log(useColor ? chalk.bold.yellow("! ") + msg : `! ${msg}`);
|
|
36
|
+
}
|
|
37
|
+
/** Print dim/secondary line. */
|
|
38
|
+
export function dim(msg) {
|
|
39
|
+
// eslint-disable-next-line no-console
|
|
40
|
+
console.log(useColor ? chalk.dim(msg) : msg);
|
|
41
|
+
}
|
|
42
|
+
/** Print error line on stderr — exits process with code 1. */
|
|
43
|
+
export function error(msg) {
|
|
44
|
+
// eslint-disable-next-line no-console
|
|
45
|
+
console.error("Error:", useColor ? chalk.bold.red(msg) : msg);
|
|
46
|
+
process.exit(1);
|
|
47
|
+
}
|
|
48
|
+
/** Print error without exiting — useful when caller wants to recover. */
|
|
49
|
+
export function printError(msg) {
|
|
50
|
+
// eslint-disable-next-line no-console
|
|
51
|
+
console.error("Error:", useColor ? chalk.bold.red(msg) : msg);
|
|
52
|
+
}
|
|
53
|
+
/** Bordered key/value line for account status / deploy summary. */
|
|
54
|
+
export function kv(key, value) {
|
|
55
|
+
// eslint-disable-next-line no-console
|
|
56
|
+
console.log(`${useColor ? chalk.dim(key.padEnd(16)) : key.padEnd(16)} ${value ?? ""}`);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Run an async operation with a spinner iff the operation is expected to take
|
|
60
|
+
* more than ~500ms. We can't actually measure before we start, so we always
|
|
61
|
+
* show the spinner when called — subcommands decide whether to bother.
|
|
62
|
+
*
|
|
63
|
+
* If --json is set, the spinner is skipped (noise breaks jq pipelines).
|
|
64
|
+
*/
|
|
65
|
+
export async function withSpinner(text, fn, opts = {}) {
|
|
66
|
+
if (!opts.enabled || jsonMode || !isTty) {
|
|
67
|
+
return fn();
|
|
68
|
+
}
|
|
69
|
+
const spinner = ora({ text, color: "blue" }).start();
|
|
70
|
+
try {
|
|
71
|
+
const result = await fn();
|
|
72
|
+
spinner.succeed();
|
|
73
|
+
return result;
|
|
74
|
+
}
|
|
75
|
+
catch (err) {
|
|
76
|
+
spinner.fail();
|
|
77
|
+
throw err;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Monospace block if the terminal reports it can render Unicode + color.
|
|
82
|
+
* Falls back to plain text on dumb pipes (so logs still grep cleanly).
|
|
83
|
+
*/
|
|
84
|
+
export function monospace(block) {
|
|
85
|
+
const out = useColor ? chalk.cyan(block) : block;
|
|
86
|
+
// eslint-disable-next-line no-console
|
|
87
|
+
console.log(out);
|
|
88
|
+
}
|
|
89
|
+
export { chalk };
|
|
90
|
+
//# sourceMappingURL=output.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output.js","sourceRoot":"","sources":["../src/output.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAiB,MAAM,KAAK,CAAC;AAEpC,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAE5C,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C,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IACjD,sCAAsC;IACtC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACnB,CAAC;AAED,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
package/dist/paths.d.ts
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* paths.ts — resolve on-disk locations for every AI-client config file
|
|
3
|
+
* Krexel knows how to patch, plus the user's shell rc file for the master
|
|
4
|
+
* key. Centralised here so `init.ts`, `paths.ts` consumers, and tests all
|
|
5
|
+
* agree on one source of truth.
|
|
6
|
+
*
|
|
7
|
+
* Override hooks:
|
|
8
|
+
* - KREXEL_HOME overrides $HOME for the entire init flow. This is how the
|
|
9
|
+
* smoke test runs init in a temp dir without touching real configs.
|
|
10
|
+
* - KREXEL_PLATFORM overrides `process.platform` ("darwin" | "linux" |
|
|
11
|
+
* "win32") — useful for CI matrices and tests.
|
|
12
|
+
*
|
|
13
|
+
* Every function is pure (no fs calls) so it's trivially unit-testable.
|
|
14
|
+
*/
|
|
15
|
+
export type Platform = "darwin" | "linux" | "win32";
|
|
16
|
+
/**
|
|
17
|
+
* The set of AI clients Krexel can configure. Order matters — `init.ts`
|
|
18
|
+
* walks them in declaration order so the user sees a predictable checklist.
|
|
19
|
+
*/
|
|
20
|
+
export type ClientId = "claude-code" | "cursor" | "claude-desktop" | "continue" | "codex";
|
|
21
|
+
export interface ClientSpec {
|
|
22
|
+
readonly id: ClientId;
|
|
23
|
+
/** Human label printed in the success checklist. */
|
|
24
|
+
readonly label: string;
|
|
25
|
+
/** Where the user's config lives on this platform (null = unsupported). */
|
|
26
|
+
readonly configPath: string | null;
|
|
27
|
+
/** `true` when the file exists on disk right now. Set by `resolveAll()`. */
|
|
28
|
+
readonly present?: boolean;
|
|
29
|
+
}
|
|
30
|
+
/** Resolve the "effective" home/platform — honours overrides for tests. */
|
|
31
|
+
export declare function effectiveHome(): string;
|
|
32
|
+
export declare function effectivePlatform(): Platform;
|
|
33
|
+
/**
|
|
34
|
+
* Claude Code stores its MCP server registry in `~/.claude.json` (note: NOT
|
|
35
|
+
* the same as Claude Desktop, which lives under `Application Support`).
|
|
36
|
+
*/
|
|
37
|
+
export declare function claudeCodePath(home?: string): string;
|
|
38
|
+
export declare function cursorPath(home?: string): string;
|
|
39
|
+
/**
|
|
40
|
+
* Claude Desktop config path varies by OS:
|
|
41
|
+
* - macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
|
|
42
|
+
* - Windows: %APPDATA%/Claude/claude_desktop_config.json
|
|
43
|
+
* - Linux: ~/.config/Claude/claude_desktop_config.json
|
|
44
|
+
*/
|
|
45
|
+
export declare function claudeDesktopPath(platform?: Platform, home?: string): string;
|
|
46
|
+
export declare function continuePath(home?: string): string;
|
|
47
|
+
/**
|
|
48
|
+
* Codex (OpenAI's CLI) stores config as TOML at `~/.codex/config.toml`.
|
|
49
|
+
* No platform variation.
|
|
50
|
+
*/
|
|
51
|
+
export declare function codexPath(home?: string): string;
|
|
52
|
+
/**
|
|
53
|
+
* Return the path to the user's shell rc file where we'll persist
|
|
54
|
+
* `KREXEL_MASTER_KEY`. Order:
|
|
55
|
+
* 1. $ZDOTDIR/.zshrc (when on zsh with a custom ZDOTDIR)
|
|
56
|
+
* 2. ~/.zshrc (mac default)
|
|
57
|
+
* 3. ~/.bashrc (linux default — only consulted if it exists)
|
|
58
|
+
*
|
|
59
|
+
* The function returns the FIRST file we'd *prefer* to write. Callers
|
|
60
|
+
* separately consult `~/.bashrc` for cross-compatibility (see init.ts).
|
|
61
|
+
*/
|
|
62
|
+
export declare function detectShellRc(platform?: Platform, home?: string, opts?: {
|
|
63
|
+
bashrcExists?: boolean;
|
|
64
|
+
}): string;
|
|
65
|
+
/**
|
|
66
|
+
* Resolve the full set of clients we'd attempt to patch on this platform.
|
|
67
|
+
* `present` is filled in by the caller (init.ts) after an fs.existsSync.
|
|
68
|
+
*/
|
|
69
|
+
export declare function resolveAll(platform?: Platform): ClientSpec[];
|
package/dist/paths.js
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* paths.ts — resolve on-disk locations for every AI-client config file
|
|
3
|
+
* Krexel knows how to patch, plus the user's shell rc file for the master
|
|
4
|
+
* key. Centralised here so `init.ts`, `paths.ts` consumers, and tests all
|
|
5
|
+
* agree on one source of truth.
|
|
6
|
+
*
|
|
7
|
+
* Override hooks:
|
|
8
|
+
* - KREXEL_HOME overrides $HOME for the entire init flow. This is how the
|
|
9
|
+
* smoke test runs init in a temp dir without touching real configs.
|
|
10
|
+
* - KREXEL_PLATFORM overrides `process.platform` ("darwin" | "linux" |
|
|
11
|
+
* "win32") — useful for CI matrices and tests.
|
|
12
|
+
*
|
|
13
|
+
* Every function is pure (no fs calls) so it's trivially unit-testable.
|
|
14
|
+
*/
|
|
15
|
+
import * as os from "node:os";
|
|
16
|
+
import * as path from "node:path";
|
|
17
|
+
/** Resolve the "effective" home/platform — honours overrides for tests. */
|
|
18
|
+
export function effectiveHome() {
|
|
19
|
+
return process.env.KREXEL_HOME ?? os.homedir();
|
|
20
|
+
}
|
|
21
|
+
export function effectivePlatform() {
|
|
22
|
+
const raw = process.env.KREXEL_PLATFORM ?? process.platform;
|
|
23
|
+
if (raw === "darwin" || raw === "linux" || raw === "win32")
|
|
24
|
+
return raw;
|
|
25
|
+
// Be loud on a truly unknown platform — caller almost certainly has a bug.
|
|
26
|
+
throw new Error(`Unsupported platform: ${String(raw)}`);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Claude Code stores its MCP server registry in `~/.claude.json` (note: NOT
|
|
30
|
+
* the same as Claude Desktop, which lives under `Application Support`).
|
|
31
|
+
*/
|
|
32
|
+
export function claudeCodePath(home = effectiveHome()) {
|
|
33
|
+
return path.join(home, ".claude.json");
|
|
34
|
+
}
|
|
35
|
+
export function cursorPath(home = effectiveHome()) {
|
|
36
|
+
return path.join(home, ".cursor", "mcp.json");
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Claude Desktop config path varies by OS:
|
|
40
|
+
* - macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
|
|
41
|
+
* - Windows: %APPDATA%/Claude/claude_desktop_config.json
|
|
42
|
+
* - Linux: ~/.config/Claude/claude_desktop_config.json
|
|
43
|
+
*/
|
|
44
|
+
export function claudeDesktopPath(platform = effectivePlatform(), home = effectiveHome()) {
|
|
45
|
+
switch (platform) {
|
|
46
|
+
case "darwin":
|
|
47
|
+
return path.join(home, "Library", "Application Support", "Claude", "claude_desktop_config.json");
|
|
48
|
+
case "win32":
|
|
49
|
+
// On Windows we honour APPDATA first; fall back to the home dir.
|
|
50
|
+
const appData = process.env.APPDATA ?? home;
|
|
51
|
+
return path.join(appData, "Claude", "claude_desktop_config.json");
|
|
52
|
+
case "linux":
|
|
53
|
+
// XDG_CONFIG_HOME respected; defaults to ~/.config
|
|
54
|
+
const xdg = process.env.XDG_CONFIG_HOME ?? path.join(home, ".config");
|
|
55
|
+
return path.join(xdg, "Claude", "claude_desktop_config.json");
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
export function continuePath(home = effectiveHome()) {
|
|
59
|
+
return path.join(home, ".continue", "config.json");
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Codex (OpenAI's CLI) stores config as TOML at `~/.codex/config.toml`.
|
|
63
|
+
* No platform variation.
|
|
64
|
+
*/
|
|
65
|
+
export function codexPath(home = effectiveHome()) {
|
|
66
|
+
return path.join(home, ".codex", "config.toml");
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Return the path to the user's shell rc file where we'll persist
|
|
70
|
+
* `KREXEL_MASTER_KEY`. Order:
|
|
71
|
+
* 1. $ZDOTDIR/.zshrc (when on zsh with a custom ZDOTDIR)
|
|
72
|
+
* 2. ~/.zshrc (mac default)
|
|
73
|
+
* 3. ~/.bashrc (linux default — only consulted if it exists)
|
|
74
|
+
*
|
|
75
|
+
* The function returns the FIRST file we'd *prefer* to write. Callers
|
|
76
|
+
* separately consult `~/.bashrc` for cross-compatibility (see init.ts).
|
|
77
|
+
*/
|
|
78
|
+
export function detectShellRc(platform = effectivePlatform(), home = effectiveHome(), opts = {}) {
|
|
79
|
+
// Allow tests to inject whether ~/.bashrc exists; otherwise guess.
|
|
80
|
+
const bashrcExists = opts.bashrcExists ?? platform === "linux";
|
|
81
|
+
// zsh first — it's mac default and increasingly the linux default too.
|
|
82
|
+
const zdotdir = process.env.ZDOTDIR;
|
|
83
|
+
if (zdotdir) {
|
|
84
|
+
return path.join(zdotdir, ".zshrc");
|
|
85
|
+
}
|
|
86
|
+
const zshrc = path.join(home, ".zshrc");
|
|
87
|
+
// On mac we always write to zshrc; on linux we fall back to bashrc if
|
|
88
|
+
// the user doesn't have one. The caller merges both writes anyway.
|
|
89
|
+
if (platform === "darwin")
|
|
90
|
+
return zshrc;
|
|
91
|
+
if (platform === "linux")
|
|
92
|
+
return bashrcExists ? path.join(home, ".bashrc") : zshrc;
|
|
93
|
+
// win32 — Git Bash users may have one; default to zshrc anyway and let
|
|
94
|
+
// init.ts skip if neither exists.
|
|
95
|
+
return zshrc;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Resolve the full set of clients we'd attempt to patch on this platform.
|
|
99
|
+
* `present` is filled in by the caller (init.ts) after an fs.existsSync.
|
|
100
|
+
*/
|
|
101
|
+
export function resolveAll(platform = effectivePlatform()) {
|
|
102
|
+
const home = effectiveHome();
|
|
103
|
+
return [
|
|
104
|
+
{ id: "claude-code", label: "Claude Code", configPath: claudeCodePath(home) },
|
|
105
|
+
{ id: "cursor", label: "Cursor", configPath: cursorPath(home) },
|
|
106
|
+
{
|
|
107
|
+
id: "claude-desktop",
|
|
108
|
+
label: platform === "darwin" ? "Claude Desktop (mac)" : `Claude Desktop (${platform})`,
|
|
109
|
+
configPath: claudeDesktopPath(platform, home),
|
|
110
|
+
},
|
|
111
|
+
{ id: "continue", label: "Continue", configPath: continuePath(home) },
|
|
112
|
+
{ id: "codex", label: "Codex", configPath: codexPath(home) },
|
|
113
|
+
];
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=paths.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../src/paths.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAyBlC,2EAA2E;AAC3E,MAAM,UAAU,aAAa;IAC3B,OAAO,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;AACjD,CAAC;AAED,MAAM,UAAU,iBAAiB;IAC/B,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,OAAO,CAAC,QAAQ,CAAC;IAC5D,IAAI,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,OAAO,IAAI,GAAG,KAAK,OAAO;QAAE,OAAO,GAAG,CAAC;IACvE,2EAA2E;IAC3E,MAAM,IAAI,KAAK,CAAC,yBAAyB,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAC1D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,IAAI,GAAG,aAAa,EAAE;IACnD,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,IAAI,GAAG,aAAa,EAAE;IAC/C,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AAChD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAC/B,WAAqB,iBAAiB,EAAE,EACxC,IAAI,GAAG,aAAa,EAAE;IAEtB,QAAQ,QAAQ,EAAE,CAAC;QAC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> <deploy_id>`
|
|
3
|
+
*
|
|
4
|
+
* The MCP server currently records intent (sets last_good[domain]); Phase 2
|
|
5
|
+
* will actually repoint the alias. We surface whatever the MCP server tells us.
|
|
6
|
+
*/
|
|
7
|
+
export declare function runRollback(opts: {
|
|
8
|
+
domain: string;
|
|
9
|
+
deployId: string;
|
|
10
|
+
}): Promise<void>;
|
package/dist/rollback.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* rollback.ts — `krexel rollback <domain> <deploy_id>`
|
|
3
|
+
*
|
|
4
|
+
* The MCP server currently records intent (sets last_good[domain]); Phase 2
|
|
5
|
+
* will actually repoint the alias. We surface whatever the MCP server tells us.
|
|
6
|
+
*/
|
|
7
|
+
import { withSpinner, success, dim, error, isJsonMode } from "./output.js";
|
|
8
|
+
import { getClient } from "./mcp-client.js";
|
|
9
|
+
export async function runRollback(opts) {
|
|
10
|
+
const domain = opts.domain.trim();
|
|
11
|
+
const deployId = opts.deployId.trim();
|
|
12
|
+
if (!domain)
|
|
13
|
+
error("domain is required (e.g. `krexel rollback mysite.com dep_abc123_xyz`).");
|
|
14
|
+
if (!deployId)
|
|
15
|
+
error("deploy_id is required (e.g. `krexel rollback mysite.com dep_abc123_xyz`).");
|
|
16
|
+
if (!deployId.startsWith("dep_")) {
|
|
17
|
+
error(`Invalid deploy_id format — must start with "dep_". Got: ${deployId}`);
|
|
18
|
+
}
|
|
19
|
+
const client = getClient();
|
|
20
|
+
const result = await withSpinner(`Rolling back ${domain} to ${deployId}…`, () => client.callTool("rollback", { domain, to: deployId }), { enabled: true });
|
|
21
|
+
if (!result.ok) {
|
|
22
|
+
error(`Rollback reported failure for ${deployId} on ${domain}. ` +
|
|
23
|
+
`Run \`krexel logs ${deployId}\` to investigate.`);
|
|
24
|
+
}
|
|
25
|
+
if (isJsonMode()) {
|
|
26
|
+
// eslint-disable-next-line no-console
|
|
27
|
+
console.log(JSON.stringify(result, null, 2));
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
success(`Rolled back ${domain} to ${deployId}`);
|
|
31
|
+
if (result.note)
|
|
32
|
+
dim(result.note);
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=rollback.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rollback.js","sourceRoot":"","sources":["../src/rollback.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,IAGjC;IACC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IAClC,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;IACtC,IAAI,CAAC,MAAM;QAAE,KAAK,CAAC,wEAAwE,CAAC,CAAC;IAC7F,IAAI,CAAC,QAAQ;QAAE,KAAK,CAAC,2EAA2E,CAAC,CAAC;IAClG,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;QACjC,KAAK,CAAC,2DAA2D,QAAQ,EAAE,CAAC,CAAC;IAC/E,CAAC;IAED,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,MAAM,GAAG,MAAM,WAAW,CAC9B,gBAAgB,MAAM,OAAO,QAAQ,GAAG,EACxC,GAAG,EAAE,CACH,MAAM,CAAC,QAAQ,CAKZ,UAAU,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,EAC1C,EAAE,OAAO,EAAE,IAAI,EAAE,CAClB,CAAC;IAEF,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,KAAK,CACH,iCAAiC,QAAQ,OAAO,MAAM,IAAI;YACxD,qBAAqB,QAAQ,oBAAoB,CACpD,CAAC;IACJ,CAAC;IAED,IAAI,UAAU,EAAE,EAAE,CAAC;QACjB,sCAAsC;QACtC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAC7C,OAAO;IACT,CAAC;IACD,OAAO,CAAC,eAAe,MAAM,OAAO,QAAQ,EAAE,CAAC,CAAC;IAChD,IAAI,MAAM,CAAC,IAAI;QAAE,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACpC,CAAC"}
|
package/dist/ship.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ship.ts — `krexel ship <folder> <domain> [--framework=auto|nextjs|astro|vite|static]`
|
|
3
|
+
*
|
|
4
|
+
* We pre-validate `folder` exists locally before asking the MCP server, so we
|
|
5
|
+
* give an immediate, actionable error instead of waiting for a slow upload.
|
|
6
|
+
* Everything else (zipping, manifest, orchestrator POST) is the MCP server's
|
|
7
|
+
* job — see mcp-server/src/ship.ts.
|
|
8
|
+
*/
|
|
9
|
+
export declare function runShip(opts: {
|
|
10
|
+
folder: string;
|
|
11
|
+
domain: string;
|
|
12
|
+
framework?: string;
|
|
13
|
+
}): Promise<void>;
|
package/dist/ship.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ship.ts — `krexel ship <folder> <domain> [--framework=auto|nextjs|astro|vite|static]`
|
|
3
|
+
*
|
|
4
|
+
* We pre-validate `folder` exists locally before asking the MCP server, so we
|
|
5
|
+
* give an immediate, actionable error instead of waiting for a slow upload.
|
|
6
|
+
* Everything else (zipping, manifest, orchestrator POST) is the MCP server's
|
|
7
|
+
* job — see mcp-server/src/ship.ts.
|
|
8
|
+
*/
|
|
9
|
+
import { existsSync, statSync } from "node:fs";
|
|
10
|
+
import * as path from "node:path";
|
|
11
|
+
import { error, success, dim, withSpinner, isJsonMode } from "./output.js";
|
|
12
|
+
import { getClient } from "./mcp-client.js";
|
|
13
|
+
const FRAMEWORKS = ["auto", "nextjs", "astro", "vite", "static"];
|
|
14
|
+
export async function runShip(opts) {
|
|
15
|
+
const folder = path.resolve(opts.folder);
|
|
16
|
+
if (!existsSync(folder)) {
|
|
17
|
+
error(`Folder does not exist: ${folder}`);
|
|
18
|
+
}
|
|
19
|
+
const stat = statSync(folder);
|
|
20
|
+
if (!stat.isDirectory()) {
|
|
21
|
+
error(`Path is not a directory: ${folder}`);
|
|
22
|
+
}
|
|
23
|
+
const framework = (opts.framework ?? "auto");
|
|
24
|
+
if (!FRAMEWORKS.includes(framework)) {
|
|
25
|
+
error(`Invalid --framework "${opts.framework}". Expected one of: ${FRAMEWORKS.join(", ")}`);
|
|
26
|
+
}
|
|
27
|
+
const domain = opts.domain.trim();
|
|
28
|
+
if (!domain) {
|
|
29
|
+
error("Domain is required (e.g. `krexel ship ./dist mysite.com`).");
|
|
30
|
+
}
|
|
31
|
+
if (!isJsonMode()) {
|
|
32
|
+
dim(`Folder: ${folder}`);
|
|
33
|
+
dim(`Domain: ${domain}`);
|
|
34
|
+
dim(`Framework: ${framework}`);
|
|
35
|
+
}
|
|
36
|
+
const client = getClient();
|
|
37
|
+
const result = await withSpinner(`Shipping ${domain}…`, () => client.callTool("ship_site", { folder, domain, framework }), { enabled: true });
|
|
38
|
+
if (!result.api_ok) {
|
|
39
|
+
// MCP server is explicit that failed orchestrator POSTs are reported here
|
|
40
|
+
// rather than swallowed — we surface that to the user.
|
|
41
|
+
error(`Ship reported an orchestrator error: ${result.api_error ?? "(unknown)"}. ` +
|
|
42
|
+
`Check \`krexel logs ${result.deploy_id}\` and \`krexel whoami\` for details.`);
|
|
43
|
+
}
|
|
44
|
+
success(`Shipped ${domain}`);
|
|
45
|
+
dim(`Deploy ID: ${result.deploy_id}`);
|
|
46
|
+
if (result.preview_url)
|
|
47
|
+
dim(`Preview URL: ${result.preview_url}`);
|
|
48
|
+
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,MAAM,CAAC,IAAI,EAAE,CAAC;IAClC,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,KAAK,CAAC,4DAA4D,CAAC,CAAC;IACtE,CAAC;IAED,IAAI,CAAC,UAAU,EAAE,EAAE,CAAC;QAClB,GAAG,CAAC,WAAW,MAAM,EAAE,CAAC,CAAC;QACzB,GAAG,CAAC,WAAW,MAAM,EAAE,CAAC,CAAC;QACzB,GAAG,CAAC,cAAc,SAAS,EAAE,CAAC,CAAC;IACjC,CAAC;IAED,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,MAAM,GAAG,MAAM,WAAW,CAC9B,YAAY,MAAM,GAAG,EACrB,GAAG,EAAE,CACH,MAAM,CAAC,QAAQ,CAMZ,WAAW,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,EAChD,EAAE,OAAO,EAAE,IAAI,EAAE,CAClB,CAAC;IAEF,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;QACnB,0EAA0E;QAC1E,uDAAuD;QACvD,KAAK,CACH,wCAAwC,MAAM,CAAC,SAAS,IAAI,WAAW,IAAI;YACzE,uBAAuB,MAAM,CAAC,SAAS,uCAAuC,CACjF,CAAC;IACJ,CAAC;IAED,OAAO,CAAC,WAAW,MAAM,EAAE,CAAC,CAAC;IAC7B,GAAG,CAAC,eAAe,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC;IACvC,IAAI,MAAM,CAAC,WAAW;QAAE,GAAG,CAAC,gBAAgB,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC;AACpE,CAAC"}
|
package/dist/whoami.d.ts
ADDED
package/dist/whoami.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* whoami.ts — `krexel whoami`
|
|
3
|
+
*
|
|
4
|
+
* Pretty-prints the orchestrator-agnostic account status that the MCP
|
|
5
|
+
* server's `get_status` tool returns from $KREXEL_HOME/state.json.
|
|
6
|
+
*/
|
|
7
|
+
import { withSpinner, kv, dim, isJsonMode } from "./output.js";
|
|
8
|
+
import { getClient } from "./mcp-client.js";
|
|
9
|
+
export async function runWhoami() {
|
|
10
|
+
const client = getClient();
|
|
11
|
+
const result = await withSpinner("Looking up account status…", () => client.callTool("get_status", {}), { enabled: true });
|
|
12
|
+
if (isJsonMode()) {
|
|
13
|
+
// eslint-disable-next-line no-console
|
|
14
|
+
console.log(JSON.stringify(result, null, 2));
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
kv("Account", result.account?.email ?? "(not logged in)");
|
|
18
|
+
kv("Provider", result.account?.provider ?? "—");
|
|
19
|
+
kv("Deploys", String(result.deploy_count ?? 0));
|
|
20
|
+
kv("Platform", result.platform);
|
|
21
|
+
kv("API URL", result.api_url);
|
|
22
|
+
kv("State dir", result.state_dir);
|
|
23
|
+
dim(`MCP server binary: ${client.describeServer()}`);
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=whoami.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"whoami.js","sourceRoot":"","sources":["../src/whoami.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,WAAW,EAAE,EAAE,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAc5C,MAAM,CAAC,KAAK,UAAU,SAAS;IAC7B,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,MAAM,GAAG,MAAM,WAAW,CAC9B,4BAA4B,EAC5B,GAAG,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAe,YAAY,EAAE,EAAE,CAAC,EACrD,EAAE,OAAO,EAAE,IAAI,EAAE,CAClB,CAAC;IAEF,IAAI,UAAU,EAAE,EAAE,CAAC;QACjB,sCAAsC;QACtC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAC7C,OAAO;IACT,CAAC;IAED,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC,OAAO,EAAE,KAAK,IAAI,iBAAiB,CAAC,CAAC;IAC1D,EAAE,CAAC,UAAU,EAAE,MAAM,CAAC,OAAO,EAAE,QAAQ,IAAI,GAAG,CAAC,CAAC;IAChD,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY,IAAI,CAAC,CAAC,CAAC,CAAC;IAChD,EAAE,CAAC,UAAU,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;IAChC,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IAC9B,EAAE,CAAC,WAAW,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;IAClC,GAAG,CAAC,sBAAsB,MAAM,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;AACvD,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "krexel",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Krexel CLI — login, ship, and manage deploys from the terminal. Spawns the Krexel MCP server over stdio.",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/Syfer-web/krexel.git"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://krexel.com",
|
|
10
|
+
"type": "module",
|
|
11
|
+
"main": "./dist/cli.js",
|
|
12
|
+
"bin": {
|
|
13
|
+
"krexel": "./bin/krexel"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"bin",
|
|
17
|
+
"dist",
|
|
18
|
+
"README.md"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"dev": "tsx src/cli.ts",
|
|
22
|
+
"build": "tsc -p tsconfig.json",
|
|
23
|
+
"test": "node --test --import tsx/esm test/*.test.ts",
|
|
24
|
+
"lint": "tsc --noEmit -p tsconfig.json"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"chalk": "^5.3.0",
|
|
28
|
+
"commander": "^12.1.0",
|
|
29
|
+
"nanoid": "^5.0.9",
|
|
30
|
+
"open": "^10.1.0",
|
|
31
|
+
"ora": "^7.0.1",
|
|
32
|
+
"smol-toml": "1.7.0",
|
|
33
|
+
"undici": "^7.1.0",
|
|
34
|
+
"zod": "^3.23.8"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@types/node": "^22.10.0",
|
|
38
|
+
"tsx": "^4.19.2",
|
|
39
|
+
"typescript": "^5.6.3"
|
|
40
|
+
},
|
|
41
|
+
"engines": {
|
|
42
|
+
"node": ">=20"
|
|
43
|
+
}
|
|
44
|
+
}
|