UNPKG

@2501-ai/cli

Version:

[![npm version](https://img.shields.io/npm/v/@2501-ai/cli.svg)](https://www.npmjs.com/package/@2501-ai/cli) [![HumanEval Score](https://img.shields.io/badge/HumanEval-96.95%25-brightgreen.svg)](https://www.2501.ai/research/full-humaneval-benchmark) [![Lic

30 lines (29 loc) 920 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.setCommand = void 0; const conf_1 = require("../utils/conf"); const logger_1 = __importDefault(require("../utils/logger")); function setCommand() { const config = (0, conf_1.readConfig)(); if (!config) return; const key = process.argv[3]; let value = process.argv[4]; if (!key) { logger_1.default.error('Please provide a key to set.'); return; } if (!value) { logger_1.default.error('Please provide a value to set.'); return; } if (key === 'stream') { value = JSON.parse(value); } (0, conf_1.setValue)(key, value); logger_1.default.log(`${key} set successfully.`); } exports.setCommand = setCommand;