UNPKG

akm-cli

Version:

akm (Agent Knowledge Manager) — a portable, local-first capability library for AI agents. Discover, load, share, and improve reusable skills, scripts, workflows, and knowledge across any shell-capable coding agent, including Claude Code, OpenCode, and Cur

32 lines (31 loc) • 1.46 kB
// This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at https://mozilla.org/MPL/2.0/. /** * Setup wizard step: choose the default output format + detail level. */ import * as p from "../../cli/clack.js"; import { DEFAULT_CONFIG } from "../../core/config/config.js"; import { prompt } from "../prompt.js"; export async function stepOutputConfig(current) { const defaultOutput = current.output ?? DEFAULT_CONFIG.output ?? { format: "json", detail: "brief" }; const format = await prompt(() => p.select({ message: "Default output format?", options: [ { value: "json", label: "json", hint: "structured default" }, { value: "text", label: "text", hint: "human-readable CLI output" }, { value: "yaml", label: "yaml", hint: "structured text" }, ], initialValue: defaultOutput.format ?? "json", })); const detail = await prompt(() => p.select({ message: "Default output detail level?", options: [ { value: "brief", label: "brief", hint: "compact summaries" }, { value: "normal", label: "normal", hint: "balanced detail" }, { value: "full", label: "full", hint: "max available detail" }, ], initialValue: defaultOutput.detail ?? "brief", })); return { format: format, detail: detail }; }