Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
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
31 changes: 0 additions & 31 deletions .github/workflows/release-please.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/tauri-build.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: "tauri-build"

# Fork note: auto-build on push / release disabled to avoid burning CI on every
# commit while signing secrets are not configured for this fork. Trigger
# manually from the Actions tab when a desktop build is needed.
on:
workflow_dispatch:
push:
release:
types: [published]

jobs:
publish-tauri:
Expand Down
99 changes: 99 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# CLAUDE.md

このファイルは、Claude Code がこのリポジトリで作業するときの方針を定めるものです。人間の読者(≒将来の自分)も読む前提で書いています。

---

## このプロジェクトの性格

- **個人用フォーク (personal fork)** です。商業化はしません。
- サポート・SLA・長期メンテの保証はありません。
- 上流 [zmkfirmware/zmk-studio](https://github.com/zmkfirmware/zmk-studio) の代替ではなく、上流に「足りないと感じた小さな機能」を私的に試す場です。

## コミュニティへの敬意(最重要)

このフォークは、ZMK プロジェクトの善意の上に成り立っています。次のことを必ず守ってください。

- **クレジットを残す**: README / コミットメッセージ / PR 説明で、上流 (`zmkfirmware/zmk-studio`, Apache-2.0) への謝意とリンクを明示する。
- **上流をネガティブに書かない**: 「公式が遅いから」「メンテナが対応しないから」といったニュアンスは避ける。フォークの動機は「個人的な使い勝手の追求」として記述する。
- **upstream に還元する姿勢を保つ**: 機能ができたら upstream にも PR を投げる。取り込まれなくても、投げたという事実が大事。
- **関連プロジェクトのライセンスと規約を尊重**: [`zmk-studio-ts-client`](https://github.com/zmkfirmware/zmk-studio-ts-client) と [`zmk-studio-messages`](https://github.com/zmkfirmware/zmk-studio-messages) も同様。
- **囲い込みにしない**: フォークでの改造は常に公開する。private にして抱え込まない。

## 開発スタンス

### 最小限主義

不満を解消する**最小限**の改修にとどめます。

- 大規模リファクタや独自路線の追求はしない。
- 既存の `src/` ディレクトリ構造(`keyboard/`, `behaviors/`, `rpc/`, `tauri/` ほか)を尊重する。
- 「ついでにこれも直す」と差分を膨らませない。1 PR / 1 機能。

### upstream 追従

- `upstream` remote: `https://github.com/zmkfirmware/zmk-studio.git`
- 定期的に `git fetch upstream` して、`main` に rebase で取り込む(merge ではなく rebase 推奨。履歴を直線に保つ)。
- 上流の `main` が動いた直後は、こちらの作業ブランチも早めに rebase する。

### 上流 PR の取り込み積極性

特に下記の open PR / issue は、Planned tweaks と直結しているので状況を観察すること。

- [PR #171](https://github.com/zmkfirmware/zmk-studio/pull/171) — keymap import/export(Planned ① と直結)
- [PR #159](https://github.com/zmkfirmware/zmk-studio/pull/159) — Grid Picker for HID Usage(Planned ② と関連)
- [issue #166](https://github.com/zmkfirmware/zmk-studio/issues/166) — Import keymap file
- [issue #168](https://github.com/zmkfirmware/zmk-studio/issues/168) — Mouse Emulation Support
- [issue #169](https://github.com/zmkfirmware/zmk-studio/issues/169) — Tog-Tap Mo-Hold Support

近い実装が upstream にあれば、ゼロから書かずに参考にする / 取り込む。

## 作業時のルール

### 不可逆な操作の前は必ず確認

- `git push`, deploy, リポジトリ設定変更, force push, ブランチ削除 などは、実行前にユーザに一声かける。
- 「許可済み」と勝手に拡大解釈しない。スコープ外の操作は毎回確認。

### ブランチ運用

- `main` への直 push は避ける。機能ブランチを切る: `feature/<name>` または `chore/<name>`。
- PR ベースで `main` に入れる(self-merge でも PR を経由)。

### コミット

- メッセージは upstream のスタイル(Conventional Commits 風: `feat:`, `fix:`, `ci:`, `chore:`, `refactor:`, `docs:` 等)に合わせる。
- すべての Claude による commit には `Co-Authored-By: Claude <noreply@anthropic.com>` を含める。
- `.env` や認証情報、巨大なバイナリを誤って add しない(`git add -A` / `git add .` は避け、ファイル指定で add する)。

### ライセンス遵守

- 上流は **Apache License 2.0**。MIT ではない。
- 改変ファイルには Apache 2.0 §4(b) に従い、変更があった旨を残す(ファイル先頭の copyright 注記など)。
- `NOTICE` ファイルは派生物にも保持する義務がある。削除・改竄しない。
- 新規ファイル冒頭に独自の copyright を追加するのは OK だが、Apache 2.0 のままにする。

## スタック(参考)

- **フロント**: React 18 + TypeScript 5 + Vite 5 + Tailwind CSS 3 + react-aria-components
- **デスクトップ版**: Tauri 2 (Rust) — `src-tauri/`、`bluest` で BLE GATT、`tokio-serial` でシリアル
- **RPC クライアント**: [`@zmkfirmware/zmk-studio-ts-client`](https://github.com/zmkfirmware/zmk-studio-ts-client)
- **メッセージ定義**: [`zmkfirmware/zmk-studio-messages`](https://github.com/zmkfirmware/zmk-studio-messages)(protobuf v3)
- **HID テーブル**: `src/HidUsageTables-1.5.json` 等の静的 JSON
- **firmware 側 RPC サーバ**: [`zmkfirmware/zmk`](https://github.com/zmkfirmware/zmk) の `app/src/studio/`(C/Zephyr、USB UART と BLE GATT の 2 トランスポート)

## デプロイ

- 静的 SPA を **Cloudflare Pages** に公開予定(`npm run build` → `dist/`)。
- GitHub `main` への push でビルド & デプロイ自動化(未設定)。
- Web Serial API のため、配布先のブラウザは Chromium 系限定であることを明示する。

## 起動コマンド早見

```bash
npm install
npm run dev # Web 版(要 Chromium 系)
npm run tauri dev # デスクトップ版
npm run build # 静的ビルド → dist/
npm run lint
```
74 changes: 72 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,73 @@
# ZMK Studio
# zmk-studio-tweaks

Initial work on the ZMK Studio UI.
A community fork of [zmk-studio](https://github.com/zmkfirmware/zmk-studio).
Planned tweaks: keymap import/export, type-to-search key picker, and host-layout localization.

> ⚠️ **Personal fork / Work in progress** — none of the tweaks below are implemented yet.
> This repo exists to track ideas, experiment, and (where possible) feed changes back upstream.
> It is **not** a replacement for upstream ZMK Studio.

## Based on

This project is a fork of **[zmkfirmware/zmk-studio](https://github.com/zmkfirmware/zmk-studio)**,
the official keymap editor for [ZMK Firmware](https://zmk.dev/). All credit for the underlying
application, design, and protocol work belongs to the upstream maintainers and contributors.

This fork is maintained independently and is **not affiliated with or endorsed by** the ZMK project.

## Why this fork exists

A handful of features would make day-to-day use a little smoother for me personally.
Some of these are already being discussed in upstream issues/PRs; this fork is a place to
prototype them without blocking on upstream review cycles. Where a feature lands cleanly,
the intent is to send it back upstream as a PR.

## Planned tweaks

| # | Feature | Status | Related upstream |
| - | ------- | ------ | ---------------- |
| 1 | **Keymap import/export** — round-trip a keymap as a JSON file | Planned | [PR #171](https://github.com/zmkfirmware/zmk-studio/pull/171), [issue #166](https://github.com/zmkfirmware/zmk-studio/issues/166) |
| 2 | **Type-to-search key picker** — replace dropdown navigation with incremental search | Planned | [PR #159](https://github.com/zmkfirmware/zmk-studio/pull/159) |
| 3 | **Host-layout localization** — choose how the host OS interprets keys (e.g. JIS / Japanese) | Planned | — |

Roadmap only — nothing is shipped yet. See `CLAUDE.md` for the working stance behind these choices.

## Getting started (development)

The build setup is the same as upstream — see [zmk-studio's own README](https://github.com/zmkfirmware/zmk-studio#readme) for the canonical instructions.

```bash
npm install
npm run dev
```

The web build talks to keyboards over the **Web Serial API**, which is only available in
Chromium-based browsers (Chrome, Edge, Brave, …). A native build is also available via Tauri:

```bash
npm run tauri dev
```

## Related upstream projects

- [`zmkfirmware/zmk-studio-ts-client`](https://github.com/zmkfirmware/zmk-studio-ts-client) — the TypeScript RPC client this app depends on.
- [`zmkfirmware/zmk-studio-messages`](https://github.com/zmkfirmware/zmk-studio-messages) — the protobuf message definitions shared with ZMK firmware.
- [`zmkfirmware/zmk`](https://github.com/zmkfirmware/zmk) — the ZMK firmware itself, which hosts the Studio RPC server.

## License

Distributed under the **Apache License 2.0**, the same license as upstream. See [`LICENSE`](LICENSE)
and [`NOTICE`](NOTICE) for the full text and required attribution. Modifications in this fork are
also released under Apache 2.0.

## Acknowledgments

Huge thanks to the ZMK project maintainers and the wider ZMK community for building and
freely sharing the firmware, the Studio app, and the surrounding ecosystem. This fork would
not exist without their work.

## Disclaimer

This is a personal fork with no warranty, no support guarantee, and no roadmap commitments.
If you need a stable, supported Studio, use the official one at
[zmkfirmware/zmk-studio](https://github.com/zmkfirmware/zmk-studio).
Loading