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

llm-cli-remote-server

v0.0.6

Published

Remote HTTP server for controlling multiple LLM CLIs (Claude, Gemini, opencode, Codex)

Readme

LLM CLI Remote Server

複数の LLM CLI (Claude / Gemini / opencode / Codex) を HTTP 経由で遠隔操作できる最小サーバー。 iPhone やブラウザから LLM CLI を実行・監視できます。

特徴

  • マルチエンジン対応: Claude, Gemini, opencode, Codex を統一 API で操作
  • プロジェクト単位の実行: cwd でコンテキストを自動切り替え
  • iPhone 対応 UI: レスポンシブな簡易 Web UI
  • セキュリティ: パスホワイトリスト、オプション認証
  • ジョブキュー: 同時実行数を制限して安定運用

インストール

npm (グローバル)

npm install -g llm-cli-remote-server
llmcrs

npm (ローカル)

npm install llm-cli-remote-server
npx llmcrs

ソースから

git clone https://github.com/kotsutsumi/llm-cli-remote-server.git
cd llm-cli-remote-server
npm install
npm run build
npm start

サーバーは http://localhost:3000 で起動します。

環境変数

| 変数 | デフォルト | 説明 | |------|-----------|------| | LLMCRS_PORT | 3000 | サーバーポート | | LLMCRS_ALLOWED_PATHS | $HOME | 許可パス (: 区切り) | | LLMCRS_MAX_PROMPT_LENGTH | 100000 | prompt 最大文字数 | | LLMCRS_MAX_CWD_LENGTH | 500 | cwd 最大文字数 | | LLMCRS_MAX_CONCURRENT_JOBS | 1 | 同時実行数 | | LLMCRS_DEFAULT_TIMEOUT | 300000 | タイムアウト (ms) | | LLMCRS_AUTH_TOKEN | - | 認証トークン (任意) | | LLMCRS_DEFAULT_ENGINE | claude | デフォルトエンジン |

設定例

# 複数のプロジェクトディレクトリを許可
export LLMCRS_ALLOWED_PATHS="/Users/you/work:/Users/you/projects"

# 認証を有効化
export LLMCRS_AUTH_TOKEN="your-secret-token"

# 同時実行数を増やす
export LLMCRS_MAX_CONCURRENT_JOBS=3

npm start

API

POST /run

LLM CLI ジョブを実行キューに追加します。

Request:

{
  "engine": "claude",
  "cwd": "/Users/you/work/project-a",
  "prompt": "このリポジトリをレビューして"
}

Response:

{
  "jobId": "abc123",
  "status": "queued"
}

認証が有効な場合:

curl -X POST http://localhost:3000/run \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your-secret-token" \
  -d '{"engine":"claude","cwd":"/tmp","prompt":"hello"}'

GET /jobs/:id

ジョブの状態と結果を取得します。

{
  "id": "abc123",
  "status": "done",
  "engine": "claude",
  "cwd": "/Users/you/work/project-a",
  "prompt": "...",
  "stdout": "...",
  "stderr": "...",
  "startedAt": "2024-01-01T00:00:00.000Z",
  "endedAt": "2024-01-01T00:00:30.000Z"
}

ステータス:

  • queued: キュー待ち
  • running: 実行中
  • done: 完了
  • failed: 失敗

GET /jobs

全ジョブ一覧を取得します。

GET /engines

利用可能なエンジン一覧を取得します。

{
  "engines": ["claude", "gemini", "opencode", "codex"]
}

GET /status

サーバーの実行状況を取得します。

{
  "running": 1,
  "queued": 2,
  "maxConcurrent": 3
}

GET / または /ui

簡易 Web UI を表示します。

プロジェクト設定 (.llmcrs.json)

プロジェクトルートに .llmcrs.json を配置することで、プロジェクト固有の設定を適用できます。

{
  "engine": "claude",
  "model": "claude-3-5-sonnet",
  "timeout": 60000,
  "maxTokens": 4000
}

優先順位:

  1. HTTP リクエストの指定
  2. .llmcrs.json
  3. サーバーデフォルト

セキュリティ

パスホワイトリスト

LLMCRS_ALLOWED_PATHS で指定したディレクトリ配下のみ実行可能です。

パス検証

  • ..~ を含むパスは拒否
  • realpath でシンボリックリンクを解決
  • 絶対パスのみ許可

入力制限

  • prompt: 最大 100,000 文字 (設定可能)
  • cwd: 最大 500 文字 (設定可能)

認証

LLMCRS_AUTH_TOKEN を設定すると、API アクセスに Bearer トークン認証が必要になります。 UI (/, /ui) は認証なしでアクセス可能です。

推奨運用

ローカルネットワーク

  • Tailscale や WireGuard で VPN 経由でアクセス
  • ファイアウォールで外部からのアクセスをブロック

本番運用

  • 必ず LLMCRS_AUTH_TOKEN を設定
  • LLMCRS_ALLOWED_PATHS を最小限に制限
  • リバースプロキシ (nginx, Caddy) で HTTPS 化

開発

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

# 型チェック
npm run typecheck

# ビルド
npm run build

# ESLint
npm run lint

ライセンス

MIT