@godspeedai/cognate-cli

中文文档
0.10.0发布于 2026/11/16Apache-2.0ES Module构建来源已验证近 30 天下载 3214

cognate create (starter generation with profiles) and cognate dev (runtime + Connect + AG-UI + UI server) (spec §37 Phase 10).

原始使用文档
文档目录6 节
  1. Installation
  2. Quick start
  3. Commands
  4. Limitations
  5. Related packages
  6. License

@godspeedai/cognate-cli

The Cognate CLI: scaffold a production-shaped agent app (cognate create) and run it with a live runtime, semantic domain loading, and a built-in UI (cognate dev).

Installation

bun add -g @godspeedai/cognate-cli   # global `cognate` command
# or run without installing:
bunx @godspeedai/cognate-cli --help

Requires Bun >= 1.4.0. Typechecking projects that depend on the CLI (or on generated apps) also needs the ambient type packages: bun add -d @types/bun @types/node.

Quick start

# Scaffold an app from the copilot profile (an interactive chat app).
# Cognate packages resolve from npm at this CLI's version.
cognate create my-app --profile copilot

cd my-app
bun install
bun dev            # serves the app; print the URL and open it

create copies the profile's starter layout (domain/*.sea semantic files, src/{agents,capabilities,components,projections,ui}, cognate.config.ts, package.json), then pins each @godspeedai/cognate-* dependency to this CLI's exact version, which npm resolves. With --source <checkout> it instead vendors every package the profile needs from that checkout into .cognate/vendor/, pinning each with a file: dependency, so the app is self-contained and matches your local edits. Pass --with <name,name> to request optional adapters: anything the profile can't wire yet is reported (unsupported: <name> (<reason>)) and never silently added.

dev loads cognate.config.ts, parses domain/*.sea through the DomainForge adapter, creates the app's SQLite database at .cognate/app.sqlite (state survives restarts), and serves:

  • GET /health — liveness
  • /cognate.v1.RuntimeService/* — the Connect RPC surface (dev-only Bearer <tenant>:<user> auth — fine for local development, replace before exposing)
  • /agui — the AG-UI event stream (copilot profile)
  • / — a chat UI (copilot) or a health JSON page (harness)

Commands

CommandPurpose
cognate create <dir> --profile copilot|harness [--source <checkout>] [--with a,b]Generate a starter app (--source is optional: it vendors packages from a local checkout)
cognate dev [--port N]Run the app from its directory

Run cognate with no arguments to print the usage your installed version supports.

Limitations

  • create without --source resolves packages from npm; the starter template is read from the Cognate checkout the CLI runs from, so the published package alone cannot generate an app yet.
  • dev is a development server: its auth is dev-only and it runs a single process.

License

Apache-2.0

版本与发布记录

@godspeedai/cognate-cli 共发布 20 个版本,首次发布于 2026/10/09;过去 12 个月发布了 20 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.10.0latest2026/11/16今天
0.9.22026/11/152 天前
0.9.12026/11/143 天前
0.9.02026/11/0610 天前
0.8.02026/10/2720 天前
0.7.12026/10/2423 天前

关于 @godspeedai/cognate-cli 的常见问题

@godspeedai/cognate-cli 是什么?

cognate create (starter generation with profiles) and cognate dev (runtime + Connect + AG-UI + UI server) (spec §37 Phase 10).

如何安装 @godspeedai/cognate-cli?

在项目目录运行 npm install @godspeedai/cognate-cli,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 cognate,可以用 npx cognate 直接运行。

@godspeedai/cognate-cli 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/godspeedai__cognate-cli 是否存在。

@godspeedai/cognate-cli 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@godspeedai/cognate-cli 可以商用吗?

@godspeedai/cognate-cli 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@godspeedai/cognate-cli 的下载量有多少?

根据 npm 官方下载统计,@godspeedai/cognate-cli 在 2026/10/17 – 2026/11/15 这 30 天内被下载 3,214 次,日均约 107 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@godspeedai/cognate-cli 还在维护吗?

最新版本 0.10.0 发布于 2026/11/16(今天);至今共发布 20 个版本,其中过去 12 个月发布了 20 个;首次发布于 2026/10/09。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。