Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"name": "coco",
"source": "./plugin",
"description": "Unofficial fan mod for Claude Code. A small character who lives in the band above your prompt.",
"version": "1.1.4514.3"
"version": "1.1.4514.4"
}
]
}
56 changes: 56 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Bug report
description: Something Coco does wrong, or does not do.
title: "Bug: "
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thank you for telling me. Please do not paste keys, tokens or anything private. For a security problem, see SECURITY.md instead of filing here.
- type: textarea
id: what
attributes:
label: What happened
description: What you did, what you saw, and what you expected instead. A screenshot helps.
validations:
required: true
- type: dropdown
id: where
attributes:
label: Where
multiple: true
options:
- Terminal
- Desktop app (Code tab)
- VS Code extension
- Coco Pet
- Mac installer
- The claude.ai skin
- The web demo
validations:
required: true
- type: dropdown
id: os
attributes:
label: Operating system
options:
- macOS
- Windows
- Linux
validations:
required: true
- type: textarea
id: versions
attributes:
label: Versions
description: Type `/coco doctor` and paste what it says. It lists the versions of Claude Code, Coco and Coco Pet and the host your API calls go to (remove the host if it is private). It never prints a key.
render: text
validations:
required: false
- type: input
id: language
attributes:
label: Coco's language
description: The language Coco speaks in when it happens, for example English or 简体中文.
validations:
required: false
30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Idea or request
description: Something you would like Coco to do.
title: "Idea: "
labels: ["enhancement"]
body:
- type: textarea
id: what
attributes:
label: What you would like
description: What it would do, and when you would use it.
validations:
required: true
- type: dropdown
id: cost
attributes:
label: Would it call a model or go online?
description: Coco does neither by default. Features that do are switches, off until you turn them on.
options:
- "No"
- "Yes, and a switch is fine"
- Not sure
validations:
required: true
- type: textarea
id: other
attributes:
label: Anything else
description: Sketches, examples from other tools, how you work around it today.
validations:
required: false
16 changes: 16 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## What changes

<!-- What a user would notice, in a sentence or two. Link the issue if there is one. -->

## How it was checked

<!-- The test files you ran, and anything you tried on a real machine (which app, which system). -->

## Checklist

- [ ] The change is in `source/hooks` (not only in `plugin/hooks`), and the hooks are rebuilt
- [ ] A test in `tools/tests` covers it
- [ ] `CHANGELOG.md` has a line under `[Unreleased]` if a user would notice
- [ ] Nothing new calls a model, goes online or spends tokens by default
- [ ] New words on screen are in all 13 languages, or the missing ones are listed above
- [ ] No keys, tokens or private files
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Keeps the actions the workflows use up to date, one pull request a month at most.
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
groups:
actions:
patterns: ["*"]
61 changes: 60 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: CI

# Validates the marketplace and the plugin, then runs the mod tests (the kit). Needs no secrets and no
# Runs the quick checks (versions, the built hooks, shellcheck), validates the marketplace and the plugin,
# then runs the mod tests (the kit). Needs no secrets and no
# sign-in: `claude plugin validate` and the kit work offline. The tree has no generator and none of the
# private checks; tools/public-tree.json lists what it leaves out, and the test runner reports those as skipped.
on:
Expand Down Expand Up @@ -39,6 +40,64 @@ env:
COCO_CPU_SCALE: "6"

jobs:
# The quick checks, a few minutes at most, so a slip shows up long before the kit finishes.
lint:
name: lint
if: github.event_name != 'workflow_dispatch'
runs-on: ubuntu-latest
timeout-minutes: 10
env:
PYTHONDONTWRITEBYTECODE: "1"
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false

# Every tracked file is on the release list, and nothing private or local-only is in the tree.
- name: The release file list covers the tree
run: sh scripts/check.sh --scan-only

- name: Install Bun and TypeScript
run: |
curl -fsSL https://bun.sh/install | bash -s "bun-v$BUN_VERSION"
echo "$HOME/.bun/bin" >> "$GITHUB_PATH"
mkdir -p "$RUNNER_TEMP/typescript"
cd "$RUNNER_TEMP/typescript"
"$HOME/.bun/bin/bun" add "typescript@$TYPESCRIPT_VERSION"
echo "COCO_TYPESCRIPT=$RUNNER_TEMP/typescript/node_modules/typescript/lib/typescript.js" >> "$GITHUB_ENV"

- name: Every copy of the version agrees
run: python3 scripts/check-version.py

# plugin/hooks is built from source/hooks; this rebuilds it in scratch and compares every byte.
- name: The loaded hooks match their source
run: python3 tools/build-hooks-graph.py --check --source source/hooks --output plugin --typescript "$COCO_TYPESCRIPT"

# Errors only. SC2066 is the one-file loop in companion-macos.sh, which runs as written.
- name: Shell scripts pass shellcheck
run: shellcheck -s sh -S error -e SC2066 plugin/bin/*.sh plugin/assets/icon/*.sh scripts/*.sh

- name: Python tools and JSON files parse
run: |
python3 - <<'PY'
import ast, json, subprocess, sys, warnings
warnings.simplefilter('ignore')
bad = 0
for name in subprocess.run(['git', 'ls-files', '-z', '*.py', '*.json'], capture_output=True, text=True, check=True).stdout.split('\0'):
if not name or name.startswith('tools/tests/fixtures/'): # some fixtures are broken on purpose
continue
try:
text = open(name, encoding='utf-8').read()
ast.parse(text, name) if name.endswith('.py') else json.loads(text)
except (SyntaxError, ValueError) as error:
bad += 1
print(f'{name}: {error}')
sys.exit(1 if bad else 0)
PY

check:
name: check (${{ matrix.os }})
if: github.event_name != 'workflow_dispatch'
Expand Down
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,28 @@ old behavior back.

## [Unreleased]

## [1.1.4514.4] - 2026-11-21

This update publishes plugin and source changes. The bundled Mac pet and downloadable installers remain at 1.1.4514.2.

### Added

- Coco recognizes more keys and passwords before saving sticky notes and window notes, and when checking a commit or push: npm, PyPI, Slack app and refresh tokens, Google OAuth, DigitalOcean, xAI, Groq, Telegram bots, Stripe test keys and webhook secrets, and HTTP Basic sign-in.
- A password inside a URL, such as `postgres://user:password@host`, is masked while the rest of the address stays readable. Placeholders such as `${DB_PASSWORD}` are left as written.
- Names that end a longer name, such as `DB_PASSWORD`, `MY_API_KEY`, `aws_secret_access_key` and `AccountKey`, are now treated like `password` and `api_key`.
- `CONTRIBUTING.md`, `SECURITY.md`, a pull request template, and issue forms for bugs and ideas.

### Changed

- Token counts of a million or more on the Quota page read in M (`1.2M`), and in 亿 or 億 for Chinese and Japanese (`1.2亿`), instead of `1,234.5k` and `12,345万`.
- CI runs a quick `lint` job before the tests: every copy of the version agrees (`scripts/check-version.py`, also part of `scripts/check.sh`), the built hooks match their source, shellcheck finds no errors, every Python and JSON file parses, and every file is on the release list. Dependabot keeps the workflow actions up to date.

### Fixed

- The installer link on the [install page](https://ninondev.github.io/cc-coco/install.html) led to a missing file. It now downloads from GitHub Releases.
- `scripts/check.sh` failed on a clean checkout because the release list did not know the line supplement files added in 1.1.4514.3.
- The README lists Claude Code 2.1.317, the version the full test suite runs on.

## [1.1.4514.3] - 2026-11-14

This update publishes the plugin and source changes. The bundled Mac pet and downloadable installers remain at 1.1.4514.2; the new Mac pet build will ship after notarization.
Expand Down
68 changes: 68 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Contributing

Thank you for wanting to help Coco. Bug reports, ideas and pull requests are all welcome. If the change is large, open an issue first so we can agree on it before you spend the time.

## What is in this repository

- `plugin/`: the plugin as Claude Code installs it. `plugin/hooks` is built; do not edit it by hand.
- `source/hooks/`: the source of the hooks. This is where code changes go.
- `source/companion-rs/`, `source/talk-key/`: the Rust source of Coco Pet for Windows and Linux and of the API key helper. See [source/README.md](source/README.md) for how they are built.
- `tools/`: the build scripts and the tests (the kit), in `tools/tests`.
- `scripts/`: the checks that run before a release.
- `docs/`: the web demo that GitHub Pages serves.

Some generators and checks read private sources and are not here; `tools/public-tree.json` lists them, and the test runner reports them as skipped.

## Setting up

You need Python 3, [Bun](https://bun.sh) 1.4.2, TypeScript 5.9.3 and Claude Code. CI pins Claude Code 2.1.317; the versions are at the top of [.github/workflows/ci.yml](.github/workflows/ci.yml).

```bash
mkdir -p ~/.cache/coco-typescript && cd ~/.cache/coco-typescript && bun add typescript@5.9.3
export COCO_TYPESCRIPT=~/.cache/coco-typescript/node_modules/typescript/lib/typescript.js
```

On Windows, also set `PYTHONUTF8=1`.

## Making a change

1. Edit the source in `source/hooks`, and add or update a test in `tools/tests`.
2. Rebuild the hooks the plugin loads:

```bash
python3 tools/build-hooks-graph.py --source source/hooks --output plugin --typescript "$COCO_TYPESCRIPT"
```

3. Run the tests for what you touched, by file name:

```bash
python3 tools/run-tests.py --stage kit --test-file numbers-c1.test.tsx
```

4. Run the quick checks. CI runs the same ones in its `lint` job:

```bash
python3 scripts/check-version.py
python3 tools/build-hooks-graph.py --check --source source/hooks --output plugin --typescript "$COCO_TYPESCRIPT"
shellcheck -s sh -S error -e SC2066 plugin/bin/*.sh plugin/assets/icon/*.sh scripts/*.sh
claude plugin validate . && claude plugin validate plugin
```

The whole kit (`python3 tools/run-tests.py --stage kit`) takes an hour or more. You do not have to run it yourself: CI runs it on Linux, macOS and Windows for every pull request.

## What a pull request needs

- One subject per pull request, and a line in `CHANGELOG.md` under `[Unreleased]` for anything a user would notice.
- No secrets, and no real keys in tests: build key-shaped test strings from parts, the way `tools/tests/m1-bookmark-secrets.test.tsx` does.
- Nothing that makes a network call, calls a model or spends tokens by default. Features that do are off until the user turns them on, and they say what they cost.
- Changes to how Coco, Claudie or DeepSeek-chan talk or act are persona changes. Please open an issue before writing them; they get their own part in the changelog and a way back to the old behaviour.
- New words on screen need all 13 languages. If you cannot write them all, say which ones are missing.

## Things I cannot merge as they are

- A rebuilt `plugin/bin/Coco Pet.app`. The Mac pet is signed with my Developer ID and notarized by Apple, so I rebuild it myself from your source change.
- Art made from someone else's character or work without their permission. The art licence is in [ART-LICENSE.md](ART-LICENSE.md).

## Versions

The plugin's version is in `plugin/.claude-plugin/plugin.json`. The same number is in `.claude-plugin/marketplace.json`, `source/hooks/plugin-version.ts`, `source/hooks/book-text.ts` and the latest heading of `CHANGELOG.md`; `scripts/check-version.py` fails when they disagree. A fourth number, as in 1.1.4514.4, means small changes only.
8 changes: 6 additions & 2 deletions README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

Macでは、[Cocoインストーラー](https://github.com/ninondev/cc-coco/releases/download/v1.1.4514.2/Coco-Installer-1.1.4514.2-macos.zip)をダウンロードして解凍し、アプリを開いて「安装」(インストール)を押してください。インストーラーの表示は中国語です。macOS 13以降のIntel MacとAppleシリコンMacに対応しています。

[1.1.4514.3の更新](CHANGELOG.md#1145143---2026-11-14)はプラグインとソースコードに反映されています。Mac版Coco Petの配布は1.1.4514.2のままです。新版はAppleの公証完了後に公開します。
[1.1.4514.4の更新](CHANGELOG.md#1145144---2026-11-21)はプラグインとソースコードに反映されています。Mac版Coco Petの配布は1.1.4514.2のままです。新版はAppleの公証完了後に公開します。

```bash
claude plugin marketplace add ninondev/cc-coco
Expand Down Expand Up @@ -165,6 +165,10 @@ Cocoは男の娘で、あなたの同僚です。くわしい設定は[LORE.ja.m

私の中で「こういう姿もありだな、けっこう可愛いじゃん」と思ったからです。Codexのほうでは関連する機能がひと通り揃っていたので、じゃあ自分でも1つ作ってみようかな、と思って作りました。

## コントリビュート

バグ報告、アイデア、プルリクエストを歓迎します。手順は[CONTRIBUTING.md](CONTRIBUTING.md)(英語)をご覧ください。セキュリティ上の問題は[SECURITY.md](SECURITY.md)をご覧ください。

## 免責事項とライセンス

非公式のファンメイド作品であり、Anthropicとは一切関係なく、公認されたものでもありません。Claude、Claude Code、およびClawdはAnthropic, PBCの商標です。私がこれらの名前を使っているのは、どの製品と組み合わせて使うのか、そしてこのキャラクターが誰に敬意を表しているのかを説明するためだけです。リポジトリにAnthropicのロゴファイルはなく、これで収益を得ることもしていません。Anthropicの方で変えてほしい箇所があれば、「Brand or trademark concern」テンプレートでissueを立ててください。優先して対応します。
Expand All @@ -173,6 +177,6 @@ Claudeさまの姿は、ZipZipPipeさんのClaude娘「[Claude 拟人立绘·橘

コードにはMITライセンスを適用しています。キャラクターのイラストにはCC BY-NC 4.0を適用しています。ただし、Cocoの部屋にいるDeepSeekちゃんの2ファイルはCC BY-NC-SA 4.0です([ART-LICENSE.md](ART-LICENSE.md)を参照)。イラストは私が画像生成モデルを使って作ったものです。

動作確認したバージョン:Claude Code 2.1.308(全テスト)と2.1.299。デスクトップ版とVS Code拡張機能を最後に実機で確認した日:2026年10月20日。
動作確認したバージョン:Claude Code 2.1.317(全テスト)と2.1.299。デスクトップ版とVS Code拡張機能を最後に実機で確認した日:2026年10月20日。

[English](README.md)、[中文](README.zh.md)
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Meet your cutest coding partner. Coco peeks at every bug you hit, and makes sure

On a Mac, download the [Coco installer](https://github.com/ninondev/cc-coco/releases/download/v1.1.4514.2/Coco-Installer-1.1.4514.2-macos.zip), unzip it, open the app and click 安装 (Install). The installer is in Chinese. It supports Intel and Apple silicon Macs running macOS 13 or later.

The [1.1.4514.3 update](CHANGELOG.md#1145143---2026-11-14) is available in the plugin and source. Mac pet downloads remain at 1.1.4514.2 until the new build is notarized.
The [1.1.4514.4 update](CHANGELOG.md#1145144---2026-11-21) is available in the plugin and source. Mac pet downloads remain at 1.1.4514.2 until the new build is notarized.

You can also install the plugin from a terminal:

Expand Down Expand Up @@ -166,6 +166,10 @@ Coco is your coworker. The long version is in [LORE.md](LORE.md).

Because in my head it could look like this, and it's pretty cute. Codex already has features like this, so I thought I'd make one too.

## Contributing

Bug reports, ideas and pull requests are welcome: see [CONTRIBUTING.md](CONTRIBUTING.md). For a security problem, see [SECURITY.md](SECURITY.md).

## Disclaimer

Unofficial fan project, not affiliated with or endorsed by Anthropic. Claude, Claude Code and Clawd are trademarks of Anthropic, PBC. I use those names only to say what this works with and who the character pays tribute to. There are no Anthropic logo files here, and I make no money from it. If you are with Anthropic and would like anything changed, please open an issue with the **Brand or trademark concern** template and I'll give it priority.
Expand All @@ -174,4 +178,4 @@ Claudie's look follows ZipZipPipe's Claude girl, [Claude 拟人立绘·橘白礼

Code: MIT. Character art: CC BY-NC 4.0, except the two DeepSeek-chan files in Coco's room, which are CC BY-NC-SA 4.0; see [ART-LICENSE.md](ART-LICENSE.md). I made the art with an image model.

Tested with Claude Code 2.1.308 (the full test suite) and 2.1.299. The desktop app and the VS Code extension were last checked on a real machine on October 20, 2026.
Tested with Claude Code 2.1.317 (the full test suite) and 2.1.299. The desktop app and the VS Code extension were last checked on a real machine on October 20, 2026.
Loading
Loading