npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@einja/dev-cli

v0.1.49

Published

Einja CLI - .claude設定とテンプレート同期をnpxでインストール

Readme

@einja/dev-cli

Claude Code用の.claude設定ディレクトリをnpxでインストールできるCLI。

クイックスタート

npx @einja/dev-cli init

利用シーン

| プロジェクトの状態 | 使うコマンド | 説明 | |-------------------|------------|------| | 新規作成(ゼロから) | npx create-einja-app my-project | テンプレートから完全なプロジェクトを生成 | | 既存プロジェクトに初回導入 | npx @einja/dev-cli init | Claude Code設定を追加+不足依存をインストール | | 設定を最新版に更新 | pnpm einja:sync | テンプレートの更新分をマージ+不足依存をインストール | | 設定を再セットアップ | npx @einja/dev-cli init --force | .claudeを上書き(バックアップ自動作成) |

init vs sync vs create-einja-app の違い

| | create-einja-app | dev-cli init | dev-cli sync | |--|-------------------|----------------|----------------| | 対象 | 新規プロジェクト | 既存(初回導入) | 既存(更新) | | .claude/ | 新規生成 | 上書き | マーカーベースでマージ | | CLAUDE.md | 新規生成 | 上書き | managedのみ更新 | | ユーザーカスタマイズ | — | ⚠️ 上書き | ✅ 保持 | | package.json scripts | 全scripts込み | 不足のみ追加 | 不足のみ追加 | | devDependencies | 全パッケージ | hooks最小限 | hooks最小限 |

ポイント: 設定を更新したいだけならsyncを使ってください。init --forceはユーザーカスタマイズ(seedセクション)を上書きします。

利用シーンのフロー

シナリオ1: ゼロから新規プロジェクト作成

sequenceDiagram
    participant U as ユーザー
    participant C as create-einja-app
    participant D as @einja/dev-cli

    U->>C: npx create-einja-app my-project
    activate C
    C->>C: 対話プロンプト(名前・認証・ツール)
    C->>C: テンプレート展開<br/>apps/, packages/, docker-compose,<br/>package.json, tsconfig, turbo.json...
    C->>C: git init + pnpm install
    C->>D: npx @einja/dev-cli init --force --no-backup
    activate D
    D->>D: .claude/ 生成
    D->>D: docs/einja/ コピー
    D->>D: CLAUDE.md 生成
    D->>D: .mcp.json セットアップ
    D->>D: symlinks 作成
    D->>D: 依存関係インストール
    D-->>C: 完了
    deactivate D
    C-->>U: プロジェクト作成完了
    deactivate C

シナリオ2: テンプレート更新の取り込み

sequenceDiagram
    participant U as ユーザー
    participant C as create-einja-app
    participant D as @einja/dev-cli

    Note over U: CLIバージョンアップ後

    U->>C: npx create-einja-app sync
    activate C
    C->>C: アプリ設定を差分マージ<br/>turbo.json, biome.json,<br/>docker-compose, .github/ 等
    C-->>U: アプリ設定が最新に
    deactivate C

    U->>D: npx @einja/dev-cli sync
    activate D
    D->>D: AI環境を差分マージ<br/>.claude/, docs/einja/,<br/>CLAUDE.md, .mcp.json 等
    D-->>U: AI環境が最新に
    deactivate D

    Note over C,D: 管轄が分離しているため順不同・独立

シナリオ3: 既存プロジェクトに新規導入

sequenceDiagram
    participant U as ユーザー
    participant D as @einja/dev-cli
    participant C as create-einja-app

    Note over U: 既にコードがあるプロジェクト

    U->>D: npx @einja/dev-cli init
    activate D
    D->>D: .claude/ 生成
    D->>D: docs/einja/ コピー
    D->>D: CLAUDE.md 生成
    D->>D: .mcp.json マージ(既存設定を保持)
    D->>D: 依存関係チェック
    D-->>U: AI開発環境セットアップ完了
    deactivate D

    alt アプリ設定も部分導入したい場合
        U->>C: npx create-einja-app sync<br/>--categories tools,env,git
        activate C
        C->>C: 選択したカテゴリのみマージ<br/>biome.json, .envrc, .gitignore
        C-->>U: 部分導入完了
        deactivate C
    end

シナリオ4: 定期的なアップデート

シナリオ2と同じ。dev-cli synccreate-einja-app sync を必要に応じて実行。

インストール

# npx(推奨)
npx @einja/dev-cli init

# グローバルインストール
npm install -g @einja/dev-cli
@einja/dev-cli init

コマンド

init

.claudeディレクトリをセットアップします。

npx @einja/dev-cli init

オプション:

| オプション | 説明 | |-----------|------| | -f, --force | 上書き確認をスキップ | | -y, --yes | 確認プロンプトをスキップ | | --dry-run | 実行内容をプレビュー | | --no-backup | バックアップを作成しない | | --skip-deps | 依存関係のチェック・インストールをスキップ |

依存関係の自動チェック:

init 実行時に preset.yamlrequirements に基づいて不足依存を検出し、インストールを提案します。package.json に不足している scripts も自動追加されます。

sync

テンプレートから更新を同期します。

# 全カテゴリを同期
npx @einja/dev-cli sync

# 特定カテゴリのみ同期
npx @einja/dev-cli sync --only commands,agents
npx @einja/dev-cli sync --only hooks

オプション:

| オプション | 説明 | |-----------|------| | -o, --only <categories> | 同期するカテゴリをカンマ区切りで指定 | | -d, --dry-run | 実際の変更を行わず、差分のみ表示 | | -f, --force | ローカル変更を無視してテンプレートで上書き | | -y, --yes | 確認プロンプトをスキップ | | --skip-deps | 依存関係のチェック・インストールをスキップ |

同期可能なカテゴリ:

  • commands - Claude Code コマンド
  • agents - エージェント定義
  • skills - スキル定義
  • hooks - Git Hooks
  • docs - ステアリングドキュメント
  • scripts - ユーティリティスクリプト
  • env - 環境設定ファイル(.envrc
  • tools - 開発ツール設定(.vscode/settings.json

マーカーによる部分同期:

ファイルには、同期動作を制御するマーカーがあります:

  • @einja:managed - 常にテンプレート版で上書き(共通ルール)
  • @einja:project-private - 初回のみ追加、以降はローカル編集を保持(プロジェクト固有設定)
  • @einja:excluded - テンプレートのみに存在し、syncでコピーされない(テンプレート専用設定)

詳細は マーカー仕様書 を参照してください。

JSONマージ設定:

.einja-sync.jsonjsonPathsを設定することで、JSONファイルのマージ動作を制御できます:

{
  "version": "1.0.0",
  "lastSync": "2024-01-11T00:00:00Z",
  "templateVersion": "1.0.0",
  "files": {},
  "jsonPaths": {
    "managed": {
      "package.json": ["scripts.dev", "scripts.build", "scripts.lint"]
    },
    "seed": {
      "package.json": ["scripts.custom"]
    }
  }
}
  • managed パス: 常にテンプレート値で上書き
  • seed パス: ローカルに存在しない場合のみテンプレート値をコピー
  • その他: ローカル優先(ユーザー追加分を保持)

注意: jsonPaths設定はcreate-einja-app addコマンドと共通です。

task:loop

GitHub Issueのタスクを自動実行します(Claude Code経由)。 Phase毎に親Issueを作成し、タスクグループをサブIssueとして階層管理します。

# pnpm scripts経由(推奨)
pnpm task:loop 123
pnpm task:loop 123 --max-group 1.3

# npx直接実行
npx @einja/dev-cli task:loop 123

オプション:

| オプション | 説明 | |-----------|------| | -m, --max-group <number> | 最大タスクグループ番号 | | -b, --branch <name> | ベースブランチ |

前提条件:

  • gh CLI がインストール済み(GitHub Issue操作に必要)
  • Vibe-Kanbanが起動している(npx vibe-kanban

配布内容

Einja ATDDワークフロー構成(Next.js、Vibe-Kanban統合)を配布します。

.claude/
├── settings.json
├── agents/
│   ├── specs/           # 仕様書生成 (3)
│   ├── task/            # タスク実行 (6)
│   └── einja/frontend/  # フロントエンド (3)
├── commands/
│   ├── spec-create.md
│   ├── task-exec.md
│   └── einja-*/         # Einja固有コマンド
├── skills/
│   └── einja-*/         # コーディング規約、設計ガイド
└── hooks/               # Git Hooks (9個)
    ├── biome-format.sh
    ├── typecheck.sh
    └── ...

docs/
├── templates/           # ドキュメントテンプレート
└── steering/            # プロジェクト基本方針

含まれるMCPサーバー設定:

  • codex, context7, playwright, serena, github, vibe_kanban

カスタマイズ

settings.local.json

プロジェクト固有の設定はsettings.local.jsonに記述します。

{
  "permissions": {
    "allow": ["Bash(custom-script:*)"]
  }
}

CLAUDE.md

プロジェクトルートにCLAUDE.mdを作成してプロジェクト固有の指示を追加できます。

開発

# ビルド
pnpm build

# テスト
pnpm test

# 型チェック
pnpm typecheck

前提となる依存関係

initおよびsyncコマンドは以下を自動チェックし、不足分のインストールを提案します。

npmパッケージ(自動インストール)

| パッケージ | 用途 | |-----------|------| | @biomejs/biome | フォーマット・lint(biome-format.sh) | | typescript | 型チェック(typecheck.sh) |

npm scripts(自動追加)

| スクリプト | デフォルト値 | |-----------|------------| | lint | biome check . | | lint:fix | biome check --write . | | format | biome format . | | format:fix | biome format --write . | | typecheck | tsc --noEmit | | prepush | {pm} run lint && {pm} run typecheck | | task:loop | npx @einja/dev-cli task:loop | | einja:sync | npx @einja/dev-cli sync |

※ 既存scriptsは上書きされません。--skip-depsでスキップ可能。

システムコマンド(手順表示のみ)

| コマンド | 用途 | macOS | |---------|------|-------| | jq | hooks JSON入力パース | brew install jq |

要件

  • Node.js >= 20.0.0

ライセンス

MIT