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

ai-nobunaga

v1.1.0

Published

npx 信長 - AI戦国シミュレーションゲーム

Readme

npx 信長

AI戦国シミュレーションゲーム。Google Gemini AIが大名や家臣として思考し、評定(会議)で議論を交わします。

クイックスタート

npx ai-nobunaga

または、グローバルインストールして 信長 コマンドで実行:

npm install -g ai-nobunaga
信長

APIキーの設定

初回起動時にAPIキーの入力を求められます。Google AI Studio で取得してください。

入力したAPIキーは ~/.nobunaga に保存され、次回以降は自動で読み込まれます。

# 環境変数で直接指定することも可能
GEMINI_API_KEY=your_api_key npx ai-nobunaga

スクリーンショット

╔══════════════════════════════════════════════╗
║ npx 信長 - ターン 1 - 織田家 (織田信長)        ║
╚══════════════════════════════════════════════╝
金: 5000 | 兵糧: 8000 | 兵: 3500 | 城: 2 | 行動: 3/3

┌─────────────────────────────────────────────┐
│ 1. 評定を開く                                │
│ 2. 領地を見る                                │
│ 3. 外交                                      │
│ 4. ターン終了                                │
└─────────────────────────────────────────────┘

セットアップ

# 依存パッケージのインストール
npm install

# 環境変数の設定
cp .env.example .env
# .env を編集して GEMINI_API_KEY を設定

# 起動
npm run dev

遊び方

評定(会議)

「評定を開く」から議題を選択すると、家臣たちがAIで議論を行います。

  • 状況報告: 現在の勢力状況をAIが分析
  • 今後の方針: 天下統一への戦略を議論
  • 軍備増強: 徴兵・城郭強化について
  • 隣国への対応: 攻撃か同盟かを検討
  • 調略: 敵武将の引き抜きや流言

議論の後、具体的な行動案が提示され、実行できます。

行動結果

  • 大成功: 予想以上の成果(効果1.5〜2倍)
  • 成功: 通常の成功
  • 失敗: 行動失敗
  • 大失敗: 悪影響が発生

調略と寝返り

敵武将を買収(bribe)すると忠誠度が低下し、30以下になると寝返ります。ただし当主は寝返りません。

操作方法

| キー | 動作 | |------|------| | ↑↓ | 選択移動 | | Enter | 決定 | | 1-9 | クイック選択 | | ESC / BS | 戻る | | Tab | 議論ログ表示(評定中) |

技術スタック

  • UI: Ink (React for CLI)
  • AI: Google Gemini API
  • 言語: TypeScript

開発

# 開発モード(ホットリロード)
npm run dev

# ビルド
npm run build

# プロダクション実行
npm start

ライセンス

ISC