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
29 lines (28 loc) • 1.2 kB
JavaScript
// 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/.
/**
* Amazon Q Developer CLI (`q`). Headless is `q chat --no-interactive`, which
* prints the reply and exits; `--trust-all-tools` stops it asking before each
* tool. The prompt is the trailing positional, after `--`.
*/
import { withoutLeading, withoutModelFlag, } from "../harness.js";
export class AmazonqHarness {
id = "amazonq";
displayName = "Amazon Q Developer CLI";
profile = { bin: "q", args: [] };
systemPrompt = false;
nativeAgent = false;
confinable = false;
build({ bin, args }, req) {
const authored = withoutLeading(args, "chat");
const base = [bin, "chat", ...(req.model ? withoutModelFlag(authored) : authored)];
const model = req.model ? ["--model", req.model] : [];
if (req.prompt === undefined)
return { argv: [...base, ...model] };
return {
argv: [...base, "--no-interactive", "--trust-all-tools", ...model, "--", req.prompt],
failureStream: "stderr",
};
}
}