Skip to main content

password-gl PyPI version PyPI Downloads License: MIT

セキュアなパスワード / パスフレーズを1コマンドで生成する CLI ツール。

  • 暗号的に安全な乱数 (secrets モジュール) を使用
  • パスワード強度をエントロピー(bit)で可視化
  • パスワード / パスフレーズ / PIN の3モード
  • プロファイル保存・読み込み
  • 対話モード (-i) で全オプションをガイド付き設定
  • i18n(日本語 / English)対応
  • 新バージョン検出時に自動更新

インストール

npm(推奨)

npm i -g @lapius/password-gl

password-gl と短縮名 pgl の 2 つのコマンドが使えるようになります(Node.js 18 以降と Python 3.9 以降が必要。Python はシステムのものをそのまま使います)。 更新も同じコマンドで行えます。npm で入れた場合は pgl -u も npm 経由で更新します。

pip

pip install password-gl

更新は pip install --upgrade password-gl または pgl -u です。

クリップボードコピー(任意)

--copy を使う場合は、どちらの入れ方でも pyperclip を追加で入れてください:

pip install pyperclip

クイックスタート

pgl                        # info 画面
pgl -l 20 --strict         # 20文字・全種類必須
pgl --pin 6                # 6桁PIN
pgl --passphrase --words 5 # 5単語パスフレーズ
pgl --count 5 --copy       # 5個生成して最後をコピー
pgl -i                     # 対話モード(全設定をガイド付きで)

出力例

  🔑  K7#mPx@2qR!v
       強度  ████████░░  強い  72 bit

  🔑  1.  aB3$nQ9@wZ!r
       強度  ████████░░  強い  72 bit

  🔑  2.  mX4#pK7!vN2@
       強度  ████████░░  強い  72 bit

オプション一覧

モード

オプション 説明 デフォルト
-i, --interactive 対話モード(全設定をガイド付きで設定) —
--pin <n> 数字のみの PIN を生成 4
--passphrase 単語リストからパスフレーズを生成 —

パスワード設定

オプション 説明 デフォルト
-l, --length <n> 文字数 12
--count <n> 生成する数 1
--strict 全種類(大文字・小文字・数字・記号)を必ず含める —
--no-upper 大文字を使わない —
--no-lower 小文字を使わない —
--no-digits 数字を使わない —
--no-symbols 記号を使わない —
--no-similar 類似文字を除外 (O 0 l 1 I |) —
--exclude-chars <s> 指定した文字を除外 —
--charset <s> 使用文字を直接指定(他の文字種フラグより優先) —
--starts-with <v> 先頭文字の制約 (lower / upper) —
--prefix <s> 先頭に追加する文字列 —
--suffix <s> 末尾に追加する文字列 —
--separator <s> 区切り文字 —
--every <n> N 文字ごとに区切り文字を挿入(--separator と組み合わせて使用) —

パスフレーズ設定

オプション 説明 デフォルト
--words <n> 単語数 4
--wordlist <path> 単語リストファイルのパス 内蔵リスト
--separator <s> 単語の区切り文字 -

出力設定

オプション 説明
--copy 最後の生成結果をクリップボードにコピー
--output-file <path> ファイルに保存
--output-format <fmt> 出力形式 (text / json / csv)
--add-date 日付 (YYYYMMDD) をプレフィックスに追加
--add-user ユーザー名をプレフィックスに追加

プロファイル

よく使う設定を名前付きで保存・呼び出しできます。

pgl -l 20 --strict --no-similar --save-profile work   # 保存
pgl --profile work                                     # 呼び出し
pgl --list-profiles                                    # 一覧

プロファイルは ~/.pgl/profiles.json に保存されます。

その他

オプション 説明
-u, --update 最新バージョンに更新(npm で入れた場合は npm、pip の場合は pip で更新)
--lang <ja|en> 表示言語(環境変数 PGL_LANG でも設定可)
-v, --version バージョンを表示
-h, --help ヘルプを表示

使用例

# 16文字・記号なし・全種類必須を3つ生成
pgl -l 16 --no-symbols --strict --count 3

# 4文字ごとにハイフンで区切る
pgl -l 16 --separator - --every 4
# → abcd-EFGH-1234-!@#$

# 日付+ユーザー名をプレフィックスに
pgl --add-date --add-user -l 8

# 5単語パスフレーズをクリップボードにコピー
pgl --passphrase --words 5 --copy

# JSON形式でファイルに保存
pgl --count 10 --output-format json --output-file passwords.json

# プロファイルに保存して再利用
pgl -l 24 --strict --no-similar --save-profile strong
pgl --profile strong --count 3

開発者

Lapius7 — https://dev.lapius7.com

ライセンス

MIT

Metadata

Release files for password-gl 2.2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for password-gl 2.2.5
File Size Uploaded
password_gl-2.2.5.tar.gz 18.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for password-gl 2.2.5
File Interpreter ABI Platform
password_gl-2.2.5-py3-none-any.whl Python 3 none any Details

Total release size: 35.0 kB

Release files / password_gl-2.2.5.tar.gz

Download URL password_gl-2.2.5.tar.gz
Size 18.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d0cfb2dac1b0149c92849dee50460c348a9e07d16152bcc8cc2728920b3bb551
BLAKE2b-256 checksum
How to use checksums
5833b15424c1fcda2120243fb1b18253b91db80ceca2ceab8a9938fe532daae7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.

Transparency log

Release files / password_gl-2.2.5-py3-none-any.whl

Download URL password_gl-2.2.5-py3-none-any.whl
Size 16.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bdfd5e8437a3d284aee0adfed71ce1db5336221ba9edf6b6e2c00b30a32abba7
BLAKE2b-256 checksum
How to use checksums
b995b25558f6f0454499688aecd6d0e42a7018aa83a08a0f266496c5c22439c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.

Transparency log

Release history Release notifications | RSS feed

2.2.6

2 release files

This release

2.2.5 This release

2 release files

2.2.4

2 release files

2.2.3

2 release files

2.2.2

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.3

2 release files

2.1.2

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page