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

i-repo

v1.2.1

Published

Modern CLI for ConMas i-Reporter - Built for humans and AI

Readme

i-Repo CLI

Overview

i-Repo CLI は、ConMas i-Reporter のデータ取得・エクスポート・運用自動化を コマンドラインからシンプルに実行できるツールです。

従来の API 直接連携とは異なり、 運用フローに組み込みやすく、AI からも安全に扱える接続点として設計されています。

Why i-Repo CLI?

  1. 運用フローに自然に組み込める
  • バッチ取得
  • 日次エクスポート
  • cron / CI 連携
  • シェルスクリプトやパイプラインとの統合

既存の自動化基盤に、そのまま組み込めます。

DEMO VIDEO

デモムービー

Install

npm install -g i-repo

Quick Start

# 1. 起動(対話形式でエンドポイント・ID・パスワードを入力)
i-repo

# 2. 帳票を一覧
i-repo rep list

# 3. PDF をダウンロード
i-repo rep download 12345 --file-type pdf

これだけ。初回起動時に接続情報を保存すれば、以降はそのまま使える。


Setup

対話的セットアップ(推奨)

i-repo
# › AUTH > login を選択
# ? API Endpoint URL: https://example.com/ConMasAPI/Rests/APIExecute.aspx
# ? Username: admin
# ? Password: ****
# ✔ Authenticated successfully
# ? Where to save config? › User config / Project config / Local config / Don't save
# ? Also save password? › No
# ℹ Saved to ~/.i-repo/i-repo.json

認証成功後、保存先とパスワード保存の有無を選べる。 パスワードも保存すれば、以降は直接コマンドを実行できる:

i-repo rep list --regist-from "2025/01/01 00:00:00"
i-repo rep download 12345 --file-type pdf

Language / 多言語対応

UI の表示言語を英語・日本語で切り替えられる。

# 日本語に切り替え
i-repo config set language ja

# 英語に戻す
i-repo config set language en

対話モード(i-repo)でも即時反映される。 デフォルトは英語。


Configuration

スコープシステム

3 層のスコープ付き設定。上のスコープが下より優先される。

| スコープ | ファイルパス | Git 対象 | 用途 | |---------|-------------|---------|------| | User | ~/.i-repo/i-repo.json | N/A | 個人のデフォルト設定 | | Project | <repo>/.i-repo/i-repo.json | Yes | チーム共有(endpoint 等) | | Local | <repo>/.i-repo/i-repo.local.json | No | 個人の上書き(user, password 等) |

設定の解決順序

全キー共通で以下の順に解決される。上が優先:

CLI フラグ → 環境変数 → Local config → Project config → User config → デフォルト値

設定キー

| キー | 説明 | 値 | |------|------|----| | endpoint | API エンドポイント URL | URL 文字列 | | user | ログインユーザー名 | 文字列 | | password | パスワード | 文字列 | | language | 表示言語 | en / ja | | defaultFormat | デフォルト出力形式 | table / json / csv | | timeout | リクエストタイムアウト(秒) | 正の数値 | | quiet | ID のみ出力モード | true / false |

i-repo config set language ja                    # 日本語に切り替え
i-repo config set defaultFormat json             # デフォルト出力を JSON に
i-repo config set timeout 120                    # タイムアウトを 120 秒に
i-repo config set endpoint https://... -s project  # チーム共有設定に保存
i-repo config list                               # 全設定を表示

セキュリティベストプラクティス

  1. Local スコープを使う: パスワードを設定する場合は Local スコープを使う(.gitignore 対象)
  2. CI/CD では環境変数: IREPO_ENDPOINT / IREPO_USER / IREPO_PASSWORD をシークレットから設定
  3. ファイルパーミッション: 設定ファイルは自動的に 0600 で作成される

Commands

i-repo auth              ログイン・ログアウト
i-repo config            設定管理
i-repo definitions       帳票定義の操作        (alias: def)
i-repo reports           レポートの操作         (alias: rep)
i-repo definition-batches 定義の一括操作        (alias: defb)
i-repo report-batches    レポートの一括操作     (alias: repb)
i-repo systems           ユーザー・グループ管理  (alias: sys)
i-repo raw               生XML APIアクセス(上級者向け)

Definitions (帳票定義)

i-repo def list                          # 定義一覧
i-repo def list -w "点検"                 # キーワード検索
i-repo def get 100                       # 詳細表示
i-repo def lock 100                      # 排他ロック
i-repo def unlock 100                    # ロック解除
i-repo def roles download -t csv         # 権限ファイル取得
i-repo def labels download -t csv        # ラベル情報取得

Reports (レポート)

# 一覧取得(日付で絞ること。フィルタなしは件数が膨大になり得る)
i-repo rep list --regist-from "2025/01/01 00:00:00"          # 登録日で絞り込み
i-repo rep list -e completed --update-from "2025/01/01 00:00:00"  # 完了済み+日付
i-repo rep list -d 100                                       # 定義IDで絞り込み

i-repo rep get 12345                     # 詳細表示
i-repo rep download 12345 --file-type pdf          # PDF取得
i-repo rep download 12345 --file-type excel        # Excel取得
i-repo rep copy 12345                    # コピー
i-repo rep lock 12345                    # 排他ロック

Report Batches (一括操作)

i-repo repb generate data.csv -t csv             # CSV から帳票自動作成
i-repo repb update data.xml -t xml               # XML で帳票更新
i-repo repb download -d 100 -o reports.zip       # 一括ダウンロード
i-repo repb download-csv 12345                   # CSV エクスポート
i-repo repb download-merged-pdf --reports '[{"repTopId":"12345"},{"repTopId":"12346"}]'
i-repo repb download-merged-pdf --xml-file request.xml  # XMLファイルで直接指定
i-repo repb delete -d 100                        # 条件に合う帳票を削除(確認プロンプトあり)
i-repo repb delete -d 100 -f                     # 確認をスキップして削除
i-repo repb delete -d 100 --mode logical         # 論理削除("0" も可)
i-repo repb delete -d 100 --mode physical -f     # 物理削除(確認スキップ)

Definition Batches (定義一括操作)

i-repo defb update-select-items data.csv -t csv  # 選択値情報更新
i-repo defb delete -d 100                        # 条件に合う定義を削除(確認プロンプトあり)
i-repo defb delete -d 100 -f                     # 確認をスキップして削除
i-repo defb delete --mode logical                # 論理削除
i-repo defb delete --mode physical -f            # 物理削除(確認スキップ)

Raw (生XML APIアクセス)

SDK がラップしていないコマンドや、生XMLレスポンスの確認に使う上級者向けコマンド。

# 任意のAPIコマンドを実行し、生XMLレスポンスを取得
i-repo raw command=GetReportList labelId=-9

# ファイルアップロード付き(マルチパート)
i-repo raw command=AutoGenerate type=xml --file data.xml

# フィールド名を指定(デフォルト: dataFile)
i-repo raw command=AutoGenerate type=xml --file data.xml --file-param dataFile

# 結果をファイルに保存
i-repo raw command=GetReportList labelId=-9 -o result.xml

デバッグやトラブルシューティングに便利。 公式APIドキュメントのパラメータをそのまま key=value で渡せる。

Systems (管理)

i-repo sys users download -t csv                 # ユーザー一覧
i-repo sys users upload users.csv -t csv         # ユーザー登録
i-repo sys groups download -t csv                # グループ一覧
i-repo sys terminals download -t csv             # 端末情報
i-repo sys url-scheme                            # URLスキーム取得
i-repo sys delete-label --label-type def         # ラベル削除(確認プロンプトあり)
i-repo sys delete-label --label-type def -f      # 確認をスキップして削除

Destructive Operations / 破壊的操作の安全機能

削除系コマンド(repb delete, defb delete, sys delete-label)は実行前に確認プロンプトを表示します。

$ i-repo repb delete -d 100
? This will delete data. Are you sure? (y/N)

スクリプトやCI/CDなど非対話環境では --force (-f) で確認をスキップできます:

i-repo repb delete -d 100 --force

非TTY環境(パイプ等)では --force なしの場合、自動的にキャンセルされます。

対話モード(i-repo)では、削除コマンドの実行確認画面に警告が表示されます。

人間可読なオプション

バッチ操作の数値オプションには人間可読なエイリアスが使えます:

| オプション | エイリアス | 数値 | |-----------|-----------|------| | --mode | logical / physical | 0 / 1 | | --transaction-mode | batch / per-report / per-definition | 0 / 1 | | --deleted | no / yes | 0 / 1 | | --child-delete | no / yes | 0 / 1 |

従来の数値指定もそのまま使えます。


Output Formats

人間が読むとき。AI が読むとき。用途に応じて切り替える。

注意: rep list / repb download 等の一覧・一括系コマンドは、必ず日付フィルタ (--regist-from / --update-from)で範囲を絞ること。 フィルタなしだと全件取得になり、サーバーに過大な負荷がかかる。

# テーブル(デフォルト - 人間向け)
i-repo rep list --regist-from "2025/01/01 00:00:00"

# JSON(プログラム・AI 向け)
i-repo rep list --regist-from "2025/01/01 00:00:00" --format json

# CSV(Excel・スプレッドシート向け)
i-repo rep list --regist-from "2025/01/01 00:00:00" --format csv

# Quiet(ID だけ - パイプ向け)
i-repo rep list --regist-from "2025/01/01 00:00:00" --quiet

パイプで繋ぐ

bash / zsh (macOS, Linux)

# 今日の完了済みレポートを PDF ダウンロード(必ず日付で絞ること)
i-repo rep list -e completed --update-from "$(date +%Y/%m/%d) 00:00:00" --quiet \
  | xargs -I{} i-repo rep download {} --file-type pdf

# JSON を jq で加工
i-repo rep list --regist-from "2025/01/01 00:00:00" --format json | jq '.[].name'

# CSV をファイルに保存
i-repo rep list --regist-from "2025/01/01 00:00:00" --format csv > reports.csv

PowerShell (Windows)

# 今日の完了済みレポートを PDF ダウンロード
$today = Get-Date -Format "yyyy/MM/dd"
i-repo rep list -e completed --update-from "$today 00:00:00" --quiet `
  | ForEach-Object { i-repo rep download $_ --file-type pdf }

# JSON を PowerShell オブジェクトとして扱う
i-repo rep list --regist-from "2025/01/01 00:00:00" --format json `
  | ConvertFrom-Json | Select-Object -ExpandProperty name

# CSV をファイルに保存
i-repo rep list --regist-from "2025/01/01 00:00:00" --format csv `
  | Out-File -Encoding utf8 reports.csv

コマンドプロンプト (Windows)

REM CSV をファイルに保存(日付で絞ること)
i-repo rep list --regist-from "2025/01/01 00:00:00" --format csv > reports.csv

REM 今日の完了済みレポートを PDF ダウンロード
for /f %i in ('i-repo rep list -e completed --update-from "%date:~0,4%/%date:~5,2%/%date:~8,2% 00:00:00" --quiet') do i-repo rep download %i --file-type pdf

AI から使う

i-Repo CLI は --format json--quiet で AI ツールとの連携に最適化されている。

Claude Code / Claude Desktop

AGENTS.md に以下を記載:

## i-Reporter 操作

i-Reporter の操作には `i-repo` CLI を使用する。

### 認証
環境変数で設定済み:
- IREPO_ENDPOINT: APIエンドポイント
- IREPO_USER / IREPO_PASSWORD: 認証情報

### 使い方
- 一覧取得: `i-repo rep list --regist-from "2025/01/01 00:00:00" --format json`
- 詳細取得: `i-repo rep get 12345 --format json`
- ダウンロード: `i-repo rep download 12345 --file-type pdf -o ./out.pdf`
- 定義一覧: `i-repo def list -w "点検" --format json`
- 一括操作: `i-repo repb generate data.csv -t csv`
- 削除操作: `i-repo repb delete -d 100 --force --format json`

### ルール
- 一覧取得には必ず日付フィルタ(`--regist-from` / `--update-from`)を付けること
- 必ず `--format json` を付けて構造化データで受け取ること
- 削除操作には必ず `--force` を付けること(非対話環境のため)
- 削除・更新前に `--format json` で対象を確認すること
- ファイル操作は `-o` で保存先を明示すること

CLI からパイプで AI に渡す

# Claude(日付で絞って渡す)
i-repo rep list --update-from "2025/01/01 00:00:00" --format json \
  | claude "このレポート一覧を分析して、未完了のものをリストアップして"

# Gemini
i-repo rep list --update-from "2025/06/01 00:00:00" --format json \
  | gemini -p "このデータから今週更新されたレポートを教えて"

# ChatGPT (openai CLI)
i-repo rep list --regist-from "2025/01/01 00:00:00" --format json \
  | openai api chat.completions.create -m gpt-4o -g user "このレポート一覧を要約して"

# ワンライナーで分析 (bash)
claude "$(i-repo rep list --regist-from "2025/01/01 00:00:00" --format json | head -50) このデータから未完了レポートを教えて"

Batch / CI/CD

シェルスクリプト

#!/bin/bash
# daily-export.sh - 日次レポートエクスポート

set -euo pipefail

DATE=$(date +%Y%m%d)
OUTDIR="./exports/${DATE}"
mkdir -p "${OUTDIR}"

# 今日更新されたレポートを PDF で取得
i-repo rep list \
  --update-from "$(date +%Y/%m/%d) 00:00:00" \
  --quiet \
| while read -r id; do
    i-repo rep download "${id}" --file-type pdf -o "${OUTDIR}/${id}.pdf"
    echo "Downloaded: ${id}"
  done

echo "Exported to ${OUTDIR}"

cron

# 毎日 23:00 にレポートをバックアップ
0 23 * * * IREPO_ENDPOINT=https://... IREPO_USER=admin IREPO_PASSWORD=secret /usr/local/bin/i-repo repb download -d 100 -o /backup/reports-$(date +\%Y\%m\%d).zip

GitHub Actions

- name: Export i-Reporter data
  env:
    IREPO_ENDPOINT: ${{ secrets.IREPO_ENDPOINT }}
    IREPO_USER: ${{ secrets.IREPO_USER }}
    IREPO_PASSWORD: ${{ secrets.IREPO_PASSWORD }}
  run: |
    npx i-repo rep list --update-from "$(date -u +%Y/%m/%d) 00:00:00" --format csv > reports.csv
    npx i-repo sys users download -t csv -o users.csv

Interactive Mode / 対話モード

引数なしで i-repo を起動すると、対話的な TUI(Ink ベース)が立ち上がります。

  • カーソルキーでコマンドを選択
  • フォーム形式でオプションを入力
  • 削除コマンドでは実行前に警告を表示
  • 入力内容は CLI コマンドとして表示されるのでコピー&ペーストで再利用可能
i-repo

Global Options

| Option | Short | Description | |--------|-------|-------------| | --format <format> | | 出力形式: table / json / csv | | --quiet | -q | ID のみ出力(パイプ向け) | | --endpoint <url> | | API エンドポイント | | --user <user> | -u | ユーザー名 | | --password <pw> | -p | パスワード | | --timeout <seconds> | | タイムアウト(秒、例: 60) | | --version | -v | バージョン表示 | | --help | -h | ヘルプ表示 |


Exit Codes

| Code | 意味 | |------|------| | 0 | 成功 | | 1 | 認証エラー | | 2 | セッション切れ | | 3 | API エラー | | 4 | HTTP エラー | | 5 | ネットワークエラー | | 10 | 設定不備 | | 11 | 引数エラー |

i-repo rep list || echo "Failed with exit code: $?"

License

MIT