LoginSignup
4
2

More than 3 years have passed since last update.

Swift でのコマンドライン引数の解析ツール

Last updated at Posted at 2019-09-01

はじめに

macOS の Calendar を操作する CLI ツールの iCalTool を開発しているのだが、そろそろ手で引数の解析をするのが辛くなってきたので、何か良いライブラリがないか調べてみた。

見つかったライブラリ

見つけたライブラリを辞書順で。

  • Commandant
  • Commander
    • キーワードやエラーメッセージに色が付く
  • Guaka
    • 比較的コンパクト
    • 色はつかない
    • 「コマンド名 フラグ サブコマンド名 各種オプション … 」という形式が使える
  • SPMUtility
    • Swift Package Manager 内部で使われている
    • ArgumentParser を SPMUtility という名前で持ち込むことができる
      • 以前は Utility という名前で利用できたが、改名された
  • Swift Argument Parser
    • 最近リリースされた
  • SwiftCLI
  • Yaap

使用感などは別途。

4
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
2