@ankhorage/devtools

中文文档
2.4.1发布于 2026/11/05MITTypeScriptESM + CJS构建来源已验证近 30 天下载 10.8万

Shared tooling, repository automation, and agent standards for Ankhorage TypeScript projects

原始使用文档
文档目录6 节
  1. Usage
  2. CLI
  3. Standalone package ESLint configuration
  4. Generated documentation
  5. Public API
  6. Utilities

@ankhorage/devtools

license: MIT npm: v2.4.1 runtime: bun typescript: strict eslint: checked prettier: checked build: checked tests: configured paradox: warnings

Shared tooling, repository automation, and agent standards for Ankhorage TypeScript projects

Usage

CLI

Ankhorage packages expose their command-line interface through ankh. Use ankh --help to discover available package commands, or run a package command with --help for package-specific usage.

# Install the Ankhorage CLI
bun add --global @ankhorage/ankh

# Show usage information for devtools
ankh devtools --help

Standalone package ESLint configuration

Configure ESLint for a standalone TypeScript package with the Devtools shared policy.

export default createConfig({
  tsconfigRootDir: __dirname,
  project: ['./tsconfig.json'],
  files: ['src/**/*.{ts,tsx}'],
});

This package contains 1 additional example. See the generated documentation for the complete set.

Generated documentation

Public API

Utilities

validateApmReleaseCandidate
validateApmReleaseCandidate(candidate: ApmPackedReleaseCandidate, options?: ApmReleaseValidationOptions) => ApmReleaseValidationResult

Validate packed owner evidence using the released APM protocol, never a copied schema. Opt-in packages declare ankh.apm with protocolVersion and a package-relative descriptor. No metadata means not applicable, not a claim that no migration is needed. The descriptor declares supported no-migration, required migration, or unsupported/manual history explicitly. Previous descriptors enforce immutable migration checksums and related descriptors validate cross-owner prerequisites. Package-owned source-to-target tests must also cover skipped versions, idempotency, interruption/recovery, and unsupported historical states.

Module: src/features/apm-release-validation/application/validateApmReleaseCandidate.ts Source: src/features/apm-release-validation/application/validateApmReleaseCandidate.ts:31:1 Related symbols: ApmPackedReleaseCandidate, ApmReleaseValidationOptions, ApmReleaseValidationResult

validatePackedApmReleaseAsync
validatePackedApmReleaseAsync(targetDirectory: string, options?: ApmReleaseValidationOptions) => Promise<ApmReleaseValidationResult>

Validate script-free publish bytes and optionally retain that exact accepted archive. Release order is APM protocol, package-owner metadata/code, then consuming applications. Build after Changesets versioning and descriptor synchronization. Execute package-owned acceptance tests, then validate with explicit owner-code consent. The child probe uses the packed package's native public export resolution and installed dependencies, not omitted source. Consent permits trusted executable code; a child process is not a security sandbox. An artifactPath retains accepted bytes exclusively, so publication need not repack or rerun lifecycle scripts. expectedIntegrity rejects a stale candidate before any owner code loads.

Module: src/features/apm-release-validation/composition/validatePackedApmReleaseAsync.ts Source: src/features/apm-release-validation/composition/validatePackedApmReleaseAsync.ts:17:1 Related symbols: ApmReleaseValidationOptions, ApmReleaseValidationResult

版本与发布记录

@ankhorage/devtools 共发布 309 个版本,首次发布于 2026/04/06;过去 12 个月发布了 309 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
2.4.1latest2026/11/051 天前
2.4.02026/11/041 天前
2.3.472026/11/042 天前
2.3.462026/11/023 天前
2.3.452026/11/015 天前
2.3.442026/11/015 天前

关于 @ankhorage/devtools 的常见问题

@ankhorage/devtools 是什么?

Shared tooling, repository automation, and agent standards for Ankhorage TypeScript projects

如何安装 @ankhorage/devtools?

在项目目录运行 npm install @ankhorage/devtools,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 ankhorage-knip、ankhorage-eslint、ankhorage-prettier、ankhorage-changeset、ankhorage-structure、ankhorage-repository、ankhorage-apm-release,可以用 npx ankhorage-knip 直接运行。

@ankhorage/devtools 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@ankhorage/devtools 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@ankhorage/devtools 可以商用吗?

@ankhorage/devtools 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@ankhorage/devtools 的下载量有多少?

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

@ankhorage/devtools 还在维护吗?

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