{"id":30127667,"url":"https://github.com/moeki0/kicell","last_synced_at":"2025-09-09T14:03:33.600Z","repository":{"id":301168137,"uuid":"1008398386","full_name":"moeki0/kicell","owner":"moeki0","description":"TypeScriptでオブジェクトを宣言的に書いていくアドベンチャーゲームエディタ","archived":false,"fork":false,"pushed_at":"2025-06-25T23:51:48.000Z","size":106,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-29T10:02:17.659Z","etag":null,"topics":["adv","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moeki0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-25T13:35:42.000Z","updated_at":"2025-06-25T23:51:52.000Z","dependencies_parsed_at":"2025-06-25T15:34:48.589Z","dependency_job_id":null,"html_url":"https://github.com/moeki0/kicell","commit_stats":null,"previous_names":["moekiorg/kycell","moekiorg/kicell"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/moeki0/kicell","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moeki0%2Fkicell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moeki0%2Fkicell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moeki0%2Fkicell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moeki0%2Fkicell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moeki0","download_url":"https://codeload.github.com/moeki0/kicell/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moeki0%2Fkicell/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269756394,"owners_count":24470566,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adv","typescript"],"created_at":"2025-08-10T17:09:01.672Z","updated_at":"2025-08-10T17:09:04.606Z","avatar_url":"https://github.com/moeki0.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kicell\n\nkicell は、テキストアドベンチャーゲームを簡単に作成できる統合開発環境です。直感的な Blueprint DSL でゲーム世界を設計し、高性能なゲームエンジンで実行できます。\n\n## パッケージ構成\n\n- **@kicell/blueprint** - ゲーム世界設計用の Fluent API ＋コンパイラー\n- **@kicell/engine** - Blueprint 実行用ゲームエンジン\n- **@kicell/cli** - コマンドライン実行環境\n\n## クイックスタート\n\n### インストール\n\n```bash\nnpm install @kicell/blueprint @kicell/engine @kicell/cli\n```\n\n### ゲーム作成\n\n```typescript\nimport { k } from \"@kicell/blueprint\";\n\n// 場所の定義\nconst forest = k\n  .room(\"forest\")\n  .name(\"深い森\")\n  .description(\"古い木々に囲まれた薄暗い森。\");\n\nconst clearing = k\n  .room(\"clearing\")\n  .name(\"森の空き地\")\n  .description(\"森の中の小さな空き地。陽光が差し込んでいる。\");\n\n// 場所の接続\nforest.isNorthOf(clearing);\n\n// オブジェクトの定義\nconst key = k\n  .thing(\"golden_key\")\n  .name(\"黄金の鍵\")\n  .description(\"美しく光る黄金の鍵。\")\n  .at(forest)\n  .isPortable();\n\n// キャラクターの定義\nconst sage = k\n  .character(\"wise_sage\")\n  .name(\"賢者\")\n  .description(\"森に住む古い賢者。\")\n  .at(forest)\n  .isConversational({\n    greeting: \"ようこそ、若き冒険者よ。\",\n    topics: {\n      森: \"この森には古い秘密が眠っている。\",\n      鍵: \"その鍵は特別な扉を開く。\",\n    },\n    farewell: \"気をつけて行くのだ。\",\n  });\n\n// ワールドの構築\nexport default k\n  .world(\"森の冒険\")\n  .author(\"作者名\")\n  .add(forest, clearing, key, sage, k.player().at(forest));\n```\n\n### コンパイルと実行\n\n**1. 環境設定**\n\n```bash\n# .envファイルを作成してGemini API keyを設定\ncp .env.example .env\n# .envファイルを編集してAPIキーを設定\n```\n\n**2. コンパイルと実行**\n\n```bash\n# Blueprintをコンパイル\npnpm compile game.ts\n\n# ゲーム実行\npnpm play game.json\n```\n\n## Blueprint DSL 文法\n\n### 基本構造\n\n```typescript\nimport { k } from \"@kicell/blueprint\";\n\nexport default k.world(\"ゲームタイトル\")\n  .author(\"作者名\")\n  .add(/* エンティティやルール */, k.player().at(startingRoom));\n```\n\n### Room（場所）\n\n場所は`Room`クラスとして実装され、プレイヤーやオブジェクトを収容できます。\n\n```typescript\nconst room = k\n  .room(\"room_id\")\n  .name(\"場所の名前\")\n  .description(\"場所の説明\")\n  .isOutdoors() // 屋外フラグ\n  .isDark(); // 暗闇フラグ\n\n// 方向での接続（自動的に双方向接続）\nroomA.isNorthOf(roomB);\nroomA.isSouthOf(roomB);\nroomA.isEastOf(roomB);\nroomA.isWestOf(roomB);\n```\n\n### Thing（オブジェクト）\n\n基本的なオブジェクト：\n\n```typescript\nconst thing = k\n  .thing(\"thing_id\")\n  .name(\"オブジェクトの名前\")\n  .description(\"オブジェクトの説明\")\n  .at(room) // 初期配置場所\n  .isPortable() // 持ち運び可能\n  .isFixed() // 固定（持ち運び不可）\n  .isOpenable() // 開くことができる\n  .isOpen() // 開いた状態\n  .isClosed() // 閉じた状態\n  .isLocked() // 鍵がかかっている\n  .isContainer() // 容器\n  .isSupporter() // 支持体（上に物を置ける）\n  .isClimbable(destination) // 登ることができる\n  .isEnterable(destination) // 中に入ることができる\n  .isReadable(content); // 読むことができる\n```\n\n### 特殊なオブジェクトタイプ\n\n```typescript\n// 背景オブジェクト（複数の部屋に存在）\nconst sky = k\n  .backdrop(\"sky\")\n  .name(\"空\")\n  .description(\"青い空が広がっている。\")\n  .presentInRooms([\"forest\", \"clearing\", \"field\"]);\n\n// 風景オブジェクト（装飾的、固定）\nconst flowers = k\n  .scenery(\"flowers\")\n  .name(\"花\")\n  .description(\"美しい野の花が咲いている。\")\n  .at(clearing);\n\n// 乗り物\nconst horse = k\n  .vehicle(\"horse\", 2) // 容量2人\n  .name(\"馬\")\n  .description(\"立派な白い馬。\")\n  .at(field)\n  .requiresKey(\"bridle\");\n\n// 便利なヘルパー\nconst chest = k.container(\"chest\").name(\"宝箱\").isLocked();\n\nconst table = k.supporter(\"table\").name(\"テーブル\").isFixed();\n```\n\n### Character（キャラクター）\n\n```typescript\nconst character = k\n  .character(\"character_id\")\n  .name(\"キャラクターの名前\")\n  .description(\"キャラクターの説明\")\n  .at(location) // 初期配置場所\n  .has([thing1, thing2]) // 初期所持アイテム\n  .isConversational({\n    // 会話可能キャラクター\n    greeting: \"挨拶メッセージ\",\n    topics: {\n      トピック1: \"応答メッセージ1\",\n      トピック2: \"応答メッセージ2\",\n    },\n    farewell: \"別れのメッセージ\",\n  });\n```\n\n### ルールシステム\n\n```typescript\nconst rule = k\n  .rule()\n  .onEnterRoom(room) // 場所に入った時\n  .everyTurn() // 毎ターン\n  .if([\n    // 条件（オプション）\n    k.flag(\"flag_name\").is(true),\n    k.counter(\"counter_name\").greaterThan(5),\n  ])\n  .then([\n    // 効果\n    k.show(\"表示するメッセージ\"),\n    k.give(thing),\n    k.flag(\"flag_name\").set(false),\n    k.counter(\"counter_name\").add(1),\n  ]);\n```\n\n### 条件と効果\n\n```typescript\n// 条件\nk.player().isAt(room);\nk.flag(\"flag_name\").is(true);\nk.counter(\"counter_name\").equals(5);\nk.counter(\"counter_name\").greaterThan(10);\n\n// 効果\nk.show(\"メッセージ\"); // テキスト表示\nk.give(thing); // アイテムを渡す\nk.flag(\"flag_name\").set(true); // フラグ設定\nk.counter(\"count\").add(5); // カウンター操作\nk.end(\"勝利メッセージ\"); // ゲーム終了\n```\n\n## 特徴\n\n- **直感的な Fluent API** - 自然言語に近い記述でゲーム世界を構築\n- **強力なオブジェクトシステム** - 容器、支持体、登攀可能オブジェクトなど豊富な機能\n- **柔軟なルールエンジン** - 条件と効果の組み合わせで複雑なゲームロジックを実現\n- **会話システム** - NPC との自然な対話機能\n- **統合コンパイラー** - TypeScript から JSON への自動変換\n- **AI 連携** - 自然言語処理による入力解析\n\n## ライセンス\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoeki0%2Fkicell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoeki0%2Fkicell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoeki0%2Fkicell/lists"}