5
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

macを初期化して開発環境にセットアップしてみた

Last updated at Posted at 2024-04-22

はじめに

開発環境用にmacを初期化してセットアップを実施しました。

いつの日かまた再セットアップを行う日が来たときに
何を実施したか思い出せない自信があったのでメモを残します。

この記事そのままの操作でインストールした場合の対象者

  • IntelliJを使う人
  • さらにXcodeを使う人
  • ある程度楽にあれこれHomeBrewでInstallしたい人
  • and more

かなと思います。

結論

  1. ブラウザアプリ(arc)のインストール
  2. HomeBrewをインストール
  3. GitHubのSSH接続設定
  4. brew install dockutil
  5. https://github.com/pivotal/workstation-setup をclone
  6. /scripts/common/configuration-osx.sh のif文周りをコメントアウト(詳細後述)
  7. /workstatiion-setup/ の階層で ./setup.sh java node を実行
  8. sudo npm install -g yarn で yarn を download
  9. brew install postgresql
  10. aws VPN Clientの設定
  11. Intellij の設定(git-duetが使えるようにWrapperの設定)
  12. Intellij の設定(コードスタイルの設定)
  13. Intellij の設定(スニペットの設定・お好みで)
  14. brew install coliima, brew install docker docker-compose
  15. mkdir -p ~/.docker/cli-plugins
  16. ln -sfn /opt/homebrew/opt/docker-compose/bin/docker-compose ~/.docker/cli-plugins/docker-compose で docker compose up のコマンドが使えるようにする
  17. Raycastのインストール
  18. warpのインストール
  19. Googleリモートデスクトップのインストール、設定
  20. brew install tableplus
  21. sudo xcode-select -s /Applications/Xcode.app/Contents/Developer で xed . が使えるようにする
  22. https://github.com/yuta-shoji/IntelliJ-Like-KeyBindings-in-Xcode をclone
  23. XcodeのkeyBindingをReadmeを参照にしながら設定する
  24. https://qiita.com/SNQ-2001/items/8d6ba517987c3d3ae2da を参考にXcodeのテストがSuccessになったタイミングで紙吹雪が舞うように設定する
  25. PostmanやTablePlusの細々とした設定を行う

これで全部のはず…💦
それでも項目が25って多い…ですね🫨

workstation-setupの補足

何も考えずにそのままworkstation-setupのフォルダ直下で ./setup.sh を実行すると、
dockutilをインストールする所でエラーになり、setupができない。

そのため、
scripts/common/configuration-osx.sh

# modify appearance of dock: remove standard icons, add chrome and iTerm
if ! dockutil ; then
  # dockutil is not installed
  brew install --cask hpedrorodrigues/tools/dockutil
fi
dockutil --list | awk -F\t '{print "dockutil --remove \""$1"\" --no-restart"}' | sh
dockutil --add /Applications/Google\ Chrome.app --no-restart
dockutil --add /Applications/iTerm.app

の部分にある、if文周りをコメントアウトしつつ、

# modify appearance of dock: remove standard icons, add chrome and iTerm
# if ! dockutil ; then
#   # dockutil is not installed
#   brew install --cask hpedrorodrigues/tools/dockutil
# fi
dockutil --list | awk -F\t '{print "dockutil --remove \""$1"\" --no-restart"}' | sh
dockutil --add /Applications/Google\ Chrome.app --no-restart
dockutil --add /Applications/iTerm.app

前もって brew install dockutilをしておくことで、
問題となる部分のスクリプトを通過することできるようになるので、
便利アプリケーションがまとめてインストール出来ます。

多分、

if ! dockutil --version ; then
  # dockutil is not installed
  brew install --cask hpedrorodrigues/tools/dockutil
fi

みたいにすることで、
if文の条件式で引数足りねぇぜ!のエラーが回避できてわざわざ別で brew install dockutil をしなくても良い気がしますがこのやり方は未検証なのでコメントアウト側の操作方法を残しておきます。

後書き

一つずつのタスクの詳細が気になる人はお手数ですが、
それぞれの項目にてググってみて頂けたらと思います😅

https://github.com/pivotal/workstation-setup が非常に優秀で、
大体のものがインストールされるから楽でした

皆さんの開発環境によっては、

  • workstationのbashを起動する際の言語が違ったり、
  • aws VPNクライアントが不要だったり、
  • Xcode使わなかったり、
  • IntelliJ使わなかったり違う部分もある

と思いますので、好きにアレンジしてセットアップしてみてください🙇

完全に余談

 この愛すべきリンゴマークは、

mac の方限定で? shift + option + k を押せば入力できます。

5
8
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
5
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?