developing-the-cli
БесплатноБез исполняемых скриптовНе проверенChanges PostHog's command line in this repo, which ships as two CLIs that must stay in step: posthog-cli, the Rust CLI in `cli/`, and hog, its TypeScript…
от PostHog★ 41 278 звёзд на GitHubОб этом скилле
Developing the CLI
PostHog has two command lines in this repo:
| CLI | Folder | Language | Status |
|---|---|---|---|
posthog-cli |
cli/ |
Rust | Published. Customers and the SDK build integrations run it today |
hog |
hog/ |
TypeScript, Bun | The successor, published as hog on npm, Homebrew and the install script. See hog/README.md |
hog hands the file work of hog error-tracking to hog-worker, a Rust program in hog/worker/ that ships next to the hog binary.
Both stay in use until every caller moves to hog, so both must behave the same.
Change both CLIs
A change to one CLI is REQUIRED to land in the other one, in the same PR.
This covers features, bug fixes, error handling, new flags, and security fixes.
A fix that lands only in cli/ leaves the bug in hog, and the reverse ships a hog that posthog-cli users never get.
The only exceptions are commands that exist on one side:
- hog-only commands, such as
hog setup,hog api,hog ciandhog auth migrate, have no Rust counterpart. - The migration guide lists the posthog-cli commands that don't come to hog. A change to those touches only
cli/. The guide lives incontents/docs/cli/migrating.mdxin PostHog/posthog.com.
Symbol code is copied, not shared.
A file in hog/worker/src/ that copies posthog-cli code names its cli/ source files in its first comment.
A change to one of those cli/ files must land in the matching hog/worker/src/ file in the same PR, the reverse too, and hog/test/parity/ must pass.
A crate that decides a written byte, such as sourcemap or posthog-symbol-data, is pinned in hog/worker/Cargo.toml to its version in cli/Cargo.lock, and hog/test/parity/worker-pins.test.ts fails until both sides match. Raise both together.
When a change does not apply to the other CLI, say why in the PR description, for example "hog prints only the error message, which never contains the URL".
Reviewers: a PR that touches cli/src/ or hog/src/ without the other side, and without that sentence, is incomplete.
Find the matching code
Port the behavior, not the code. The two CLIs are laid out differently. The one exception is the symbol code in hog/worker/, which is copied.
Map the command with the commands table in the migration guide (
sourcemap uploadbecomeserror-tracking upload, and so on).Find the hog side with the layout table in
hog/AGENTS.md. Common pairs:posthog-cli hog cli/src/api/symbol_sets.rs(upload protocol)hog/src/error-tracking/upload.tscli/src/sourcemaps/,debug_symbols/,dsym/,proguard/(reading, rewriting and packing files)hog/worker/src/, copiedThe flags, skips, warnings and output of those commands hog/src/error-tracking/run.ts,pairs.ts,native.tscli/src/release/,cli/src/utils/git.rshog/src/error-tracking/release.ts,git.tscli/src/login.rshog/src/commands/auth/,hog/src/posthog/cli/src/experimental/hog/src/commands/query/,endpoints/,schema/Check how the runtimes differ before copying a fix. For example, reqwest puts the request URL in its error text, while Bun's
fetchkeeps it offerror.message, so a redaction needed in Rust may not be needed in hog. Verify such a difference, then name it in the PR.
Follow each side's rules
- hog: read
hog/AGENTS.mdbefore the first edit. It holds the command, output, error and typed-boundary rules, and the rules for hog-worker and its protocol. - Uploads: hog must send the same bytes, content hashes and requests as posthog-cli, or re-uploads fail with
content_hash_mismatch. Readhog/test/parity/README.mdbefore changing anything that reaches an upload. When a Rust change alters what posthog-cli uploads, regenerate the goldens from the new binary as that README describes, and review the diff. - Releases: every user-visible c
Установить developing-the-cli в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл developing-the-cli?
Changes PostHog's command line in this repo, which ships as two CLIs that must stay in step: posthog-cli, the Rust CLI in `cli/`, and hog, its TypeScript successor in `hog/`. Use before writing, fixing, or reviewing code under `cli/` or `hog/`, including symbol and sourcemap uploads, dSYM, Hermes and ProGuard handling, releases, login and credentials, query, endpoints, and schema commands, or a security fix in either CLI. Carries the rule that every change lands in both CLIs, how to find the matching code on the other side, the upload parity goldens, and the test and release steps for each. Trigger terms: posthog-cli, hog CLI, cli/, hog/, cargo, bun, symbol_sets.rs, upload.ts, parity golden, sampo changeset, port to hog.
Как установить скилл developing-the-cli?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл developing-the-cli запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic