# Comet for Claude Code

Open a project in a local Claude Desktop Code session. Install the Comet CLI version that matches the plugin and a Node.js version supported by the Comet package. Verify that `node --version` and `comet --version` work from the desktop session. If they work only in a separate terminal, check the desktop process's PATH and open a new Code session.

## Add the marketplace

Run `pnpm build:claude-plugin --language en` from the Comet repository. The generated marketplace is at `dist/claude-plugin/<version>-en` and contains `.claude-plugin/marketplace.json` and `comet/`.

Add the directory from the local Code session's plugin browser and install Comet. You can also install it from Claude Code CLI on the same machine and then open a desktop Code session:

```sh
claude plugin validate <marketplace-directory>
claude plugin validate <marketplace-directory>/comet
claude plugin marketplace add <marketplace-directory>
claude plugin install comet@comet-market --scope project
```

Choose user or local scope instead if appropriate. To distribute it to a team, place the complete build output at the root of your GitHub marketplace repository and add that repository in the plugin browser. The build command produces a local artifact.

Use the plugin manager to upgrade, disable, or uninstall Comet. Open a new local Code session after changing hook or plugin settings.

## Switch from a file-based installation

If you already use `comet init`, start with the plugin disabled. On first project activation, `comet workflow resolve . --activate --json` copies an installed user-level file-based Router into the project. If that installation exists and the project has no Comet configuration, run the command once before removing the old Router as described below. For a configured project, proceed directly to reviewing the hooks. In the Claude Code Hooks view, identify the existing Comet Router and locate its source in the project's `.claude/settings.local.json`, `.claude/settings.json`, or the user's `~/.claude/settings.json` (or the equivalent file in the configured directory). Back up the relevant settings. Remove only the `PreToolUse` entries you identify as managed by your old Comet installation. Those entries invoke `comet-hook-router.mjs` or a legacy Comet Guard from the Comet installation. Keep custom hooks in the same group, other settings, and project state under `.comet`. Enable the plugin and start a new Code session. Confirm in the Hooks view that `Write` and `Edit` use the plugin's Router. Keep the plugin disabled in projects that continue to use the file-based installation. Use the Claude Code plugin manager for future plugin upgrades. A file-based `comet init` or `comet update` targeting Claude Code installs the original Router again.

## Workflows and Dashboard

Run `/comet:comet` to start or resume work. Comet selects Native or Classic from the project configuration. Classic projects continue using their existing dependencies.

Run `/comet:dashboard` and open the returned Dashboard URL in the Code tab's Browser. The Browser menu can route links to the built-in browser. The Dashboard serves the current project from the local session and closes when that session ends.

This plugin targets local Claude Code sessions. Desktop support depends on validation against the specific operating system and client version.
