Menu
popagent
publicLatest change 49c9a971df21b51e0662c9d8945b7f7a8af80368 - Add durable Popagent agent CLI by Ólafur Búi Ólafsson
import { describe, expect, test } from "bun:test";
const run = async (...args: string[]) => {
const process = Bun.spawn(["./popagent", ...args], { stdout: "pipe", stderr: "pipe" });
return {
exitCode: await process.exited,
stdout: await new Response(process.stdout).text(),
stderr: await new Response(process.stderr).text(),
};
};
describe("popagent CLI", () => {
test("gives AI agents a complete one-shot command index", async () => {
const result = await run("help");
expect(result.exitCode).toBe(0);
expect(result.stderr).toBe("");
expect(result.stdout).toContain("popagent task-create <workspace> <prompt> [model]");
expect(result.stdout).toContain("popagent api <METHOD> <path> [json]");
expect(result.stdout).toContain("POPAGENT_URL");
expect(result.stdout).toContain("x-popagent-key");
});
});