@capotej/create-content-repo

中文文档
0.18.0发布于 2026/10/27BSD-3-ClauseES Module零依赖构建来源已验证近 30 天下载 2447

Scaffold a content-repo: .typ sources + agent skills + stdlib-Python build orchestrator. Run via npx @capotej/create-content-repo .

原始使用文档
文档目录7 节
  1. Usage
  2. Architecture
  3. Adding to the scaffold
  4. Package Manager
  5. Tool Versions
  6. Formatting / Linting
  7. Releases

@capotej/create-content-repo

Scaffold a content-repo: Typst (.typ) content, agent skills with a stdlib-Python build orchestrator, a mise-pinned toolchain, and Netlify deploy. Run via npx @capotej/create-content-repo <name>.

Usage

npx @capotej/create-content-repo my-blog

That's the whole setup. If git is on PATH the scaffolder already ran git init (branch main) and made the initial commit; otherwise it prints the manual step in its next-steps output.

From there, point your agent harness at the generated repo — the skills inside it are the interface. The repo's AGENTS.md contract plus .agents/skills/{build,new-content,serve,publish}/ tell the agent how to create content, build and verify, run the dev loop, and publish; no raw python or typst commands needed. A typical first session: ask for a new post (new-content), watch it locally (serve on :3000), then publish.

The generated repo:

  • content/{posts,links,papers,pages}/ — one .typ example each (#let meta dict + #context metadata((meta)) marker)
  • .agents/skills/{build,new-content,serve,publish}/ — the agent interface: build orchestrator at .agents/skills/build/scripts/build.py (python3 stdlib only, invokes the pinned typst for HTML; --verify checks build/ is byte-identical on rebuild), dev server + watch at .agents/skills/serve/scripts/serve.py (:3000, rebuild-on-change)
  • .pre-commit-config.yaml + .typos.toml — prek hooks (typstyle format + typos spelling on .typ content), all tools pinned via mise
  • AGENTS.md — the content contract for agents
  • mise.toml — pinned typst, typstyle, typos, prek
  • netlify.toml — self-bootstrapping build (mise if present, else mise.run) → publish build/

Options: --typst-version <ver> (default 0.15.1), --force.

Architecture

Zero-dependency TypeScript CLI (tsc-compiled). No subcommands, no runtime deps — argv parsing only, like create-react-app. Template file bodies are real files under template/, shipped in the npm package (files: ["dist", "template"]).

  • Entry point: src/cli.ts → dist/cli.js (the bin target)
  • src/scaffold.ts copies template/ into ./<name>, substituting {{NAME}} / {{TYPST_VERSION}} / {{DATE}} and renaming DATE-*.typ example files to today's date; template/gitignore ships dotless (npm strips a root .gitignore) and is written as real .gitignore
  • template/ holds every generated file body

Adding to the scaffold

  1. Edit files under template/ — that's the entire generated repo.
  2. pnpm build && node dist/cli.js test-repo and inspect the tree.
  3. Run the generated repo's build to prove the templates compile: cd test-repo && mise install && python3 .agents/skills/build/scripts/build.py

Package Manager

This project uses pnpm, declared via the packageManager field in package.json. Do not use npm or yarn.

All dependencies are pinned to exact versions — no floating ranges (^, ~). pnpm enforces a 7-day release cooldown via minimumReleaseAge: 7 in pnpm-workspace.yaml as a supply-chain guard.

Tool Versions

This project uses mise.toml as the single source of truth for all tool and language versions. Do not install tools globally or via ad-hoc commands — use mise instead.

Formatting / Linting

oxfmt formats, oxlint lints. CI runs lint, typecheck, format:check, build, and an E2E scaffold+build step.

Releases

OIDC trusted publishing — pushing a v* tag triggers .github/workflows/release.yml which publishes to npm. No npm token. See .agents/skills/release/SKILL.md for the full release procedure.

版本与发布记录

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

版本发布日期距今
0.18.0latest2026/10/2713 天前
0.17.02026/10/2713 天前
0.16.02026/10/2713 天前
0.15.02026/10/2713 天前
0.14.02026/10/2713 天前
0.13.02026/10/2614 天前

关于 @capotej/create-content-repo 的常见问题

@capotej/create-content-repo 是什么?

Scaffold a content-repo: .typ sources + agent skills + stdlib-Python build orchestrator. Run via npx @capotej/create-content-repo .

如何安装 @capotej/create-content-repo?

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

@capotej/create-content-repo 支持 TypeScript 吗?

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

@capotej/create-content-repo 支持 ESM 还是 CommonJS?

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

@capotej/create-content-repo 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=24。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@capotej/create-content-repo 可以商用吗?

@capotej/create-content-repo 使用 BSD-3-Clause 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。另外不得用原作者名义为衍生产品背书。以上为概括,不构成法律意见,请以许可原文为准。

@capotej/create-content-repo 的下载量有多少?

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

@capotej/create-content-repo 还在维护吗?

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