@archme/cli

中文文档
0.25.3发布于 2026/11/03SEE LICENSE IN LICENSEES Module近 30 天下载 5732

Map your codebase into a living architecture diagram: run archme init in a repo to scan it, archme daemon start to keep it current on every commit.

原始使用文档
文档目录6 节
  1. 1. Scan your repo
  2. 2. Keep it up to date
  3. 3. Remove it
  4. Other commands
  5. Notes
  6. License

@archme/cli

Command-line companion for ArchMe — maps your codebase into a living architecture diagram and keeps it current as you commit.

npm install -g @archme/cli

Requires Node 20+ and Claude Code installed and signed in — scans and updates run on your Claude subscription, on your machine. Your code is never sent to ArchMe's servers; only the resulting architecture is.

1. Scan your repo

cd into the repository you want mapped, then:

archme init

This signs you in, creates a project named after the repo, writes the agent config (.mcp.json, a CLAUDE.md block, the architecture skill), tells you what the scan will cost before spending it, and runs the scan. It prints a link to your board — components appear on it as they're written.

2. Keep it up to date

archme init also starts watching the repo, so every push queues an architecture update — but nothing processes that queue until you run the agent:

archme daemon start

Installs the daemon as a background service (launchd/systemd), enables it at login, and starts it. Run it on a machine that stays on. Each update counts tokens against your Claude account, the same way the scan did.

Watching a repo needs the ArchMe GitHub App installed on it; archme init tells you if that step is still missing. Not up for hosting the agent yourself? Get in touch at archme.io and we'll run it for you.

3. Remove it

archme uninstall

From inside the repo. It lists everything it will change and asks before doing any of it:

  • The agent config — the archme MCP server from .mcp.json, the ArchMe block from CLAUDE.md, the architecture skill. Your own config in those files is left alone, and a file we created is deleted rather than left empty.
  • Watching — so commits stop updating the architecture. Removing the config on its own would leave the board moving while looking uninstalled, which is why this is the default; --keep-watching opts out.
  • The daemon — but only if no other repo is left for it to serve. It's one service per account, so uninstalling one repo never stops the others.

Your architecture on archme.io and this machine's login survive (archme logout for the latter). The ArchMe GitHub App installation is org-wide, so it stays — remove it on github.com if you want it gone.


Other commands

CommandPurpose
archme init [repo-path]Guided setup + scan (see above); --force re-scans
archme uninstall [repo-path]Stop ArchMe for a repo: agent config, watching, and the daemon if idle
archme scan <repo-path>Low-level single-pass scan into an explicit --project / --branch
archme daemon <sub>start · stop · restart · status · logs · enable · disable · install · uninstall · run
archme analyze <sub>Tree-sitter code analysis: outline · repo · diff · match · prefetch
archme login / archme logoutAuthenticate this machine against ArchMe

Every command takes --help. Useful flags:

  • archme init --skip-scan — wire up the repo without scanning; --force re-scans a project that already has an architecture; --yes runs unattended (scans are interactive by default, so you can steer them as they go).
  • archme daemon status — is it installed, running, and signed in? archme daemon logs -f follows the log.
  • archme uninstall --keep-watching — removes the agent config but leaves the repo watched and the daemon running (see above); --yes skips the confirmation. Run it from anywhere in the repo — it resolves the repo root.
  • archme analyze outline <file> — JSON symbol outline for one file; repo outlines everything, diff <range> only what a git range touched. Supports TypeScript, TSX, JavaScript, Python, Go, Java, Ruby, Rust, Swift, and Kotlin. Grammars download on first use to ~/.archme/tools/grammars/.

Notes

  • Credentials: stored in the macOS Keychain when available, otherwise ~/.archme/credentials.json (mode 0600). keytar is an optional dependency — if its native build fails, everything still works via the file store.
  • Configuration: no env setup needed against archme.io; the CLI never reads .env files. Self-hosted deployments can override SUPABASE_URL, SUPABASE_ANON_KEY, ARCHME_DAEMON_CLIENT_ID, ARCHME_MCP_BASE_URL, and CLONE_BASE_DIR (daemon only, defaults to ~/.archme-job-runner/clones).
  • Agent methodology — how an agent scans a repo, anchors components to code, and writes architecture updates — is in the SKILL.md bundled with this package. archme init installs it into your repo for you.

License

Proprietary — see the bundled LICENSE. Use is granted against the archme.io service; bundled open-source components keep their own terms.

版本与发布记录

@archme/cli 共发布 55 个版本,首次发布于 2026/07/28;过去 12 个月发布了 55 个版本。

版本发布日期距今
0.25.3latest2026/11/034 天前
0.25.22026/11/034 天前
0.25.12026/11/034 天前
0.25.02026/10/299 天前
0.24.02026/10/299 天前
0.23.02026/10/2711 天前

关于 @archme/cli 的常见问题

@archme/cli 是什么?

Map your codebase into a living architecture diagram: run archme init in a repo to scan it, archme daemon start to keep it current on every commit.

如何安装 @archme/cli?

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

@archme/cli 支持 TypeScript 吗?

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

@archme/cli 支持 ESM 还是 CommonJS?

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

@archme/cli 需要什么版本的 Node.js?

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

@archme/cli 可以商用吗?

@archme/cli 使用 SEE LICENSE IN LICENSE 许可。许可条款写在包内的独立文件中,请阅读该文件确认可否商用。以上为概括,不构成法律意见,请以许可原文为准。

@archme/cli 的下载量有多少?

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

@archme/cli 还在维护吗?

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