mirror of
https://github.com/lmstudio-ai/lms.git
synced 2025-09-19 21:40:02 +08:00

* Use .js for imports * WIP * WIP * Finish transitioning to esm * Disable experimental commands * Bring back bootstrap
21 lines
692 B
TypeScript
21 lines
692 B
TypeScript
import { command } from "cmd-ts";
|
|
import { cwd } from "process";
|
|
import { createClient, createClientArgs } from "../createClient.js";
|
|
import { findProjectFolderOrExit } from "../findProjectFolder.js";
|
|
import { createLogger, logLevelArgs } from "../logLevel.js";
|
|
|
|
export const push = command({
|
|
name: "push",
|
|
description: "Uploads the plugin in the current folder to LM Studio Hub.",
|
|
args: {
|
|
...logLevelArgs,
|
|
...createClientArgs,
|
|
},
|
|
handler: async args => {
|
|
const logger = createLogger(args);
|
|
const client = await createClient(logger, args);
|
|
const projectPath = await findProjectFolderOrExit(logger, cwd());
|
|
await client.repository.push(projectPath);
|
|
},
|
|
});
|