靈活的命令行工具,用於立即部署簡單命令和腳本的用戶界面。
手提箱是一個命令行工具,可以“編程”顯示可以觸發命令和腳本的SwiftUI接口。
?手提箱直接下載
它類似於快捷方式,但對於MacOS,由命令行驅動。

由於其Swiftui的基礎,手提箱是一流的Mac公民。開箱即用,黑暗模式,梅納布爾和拖放。
它的功率和靈活性形成了久經考驗的UNIX命令行。您可以在手提箱中可以做的任何事情都可以做,但是使用UI並將命令導出為.command文件,以簽到項目或與世界共享。
OVERVIEW: A flexible command line tool for instantly deploying user interfaces
for simple commands and scripts.
USAGE: Suitcase <subcommand>
OPTIONS:
--version Show the version.
-h, --help Show help information.
SUBCOMMANDS:
basic Launch a basic Suitcase process, that has a main menu
and an icon in the Dock when running.
utility Launch a utility Suitcase process, without a Dock
icon or main menu.
basic運行時, basic手提箱過程在碼頭中有一個主菜單和圖標。
請參閱完整的文檔。
utility程序手提箱過程沒有碼頭圖標或主菜單。它僅由一個主窗口組成。
請參閱完整的文檔。
這些示例非常基本,但應該很好地了解如何使用手提箱。更多詳細信息可以在集市上找到。如果您有任何疑問,請創建一個問題。如果您創建命令並想分享,請在集市上打開PR。

一個簡單的示例,該示例由一個按鈕組成,當單擊時調用say命令。觀看此示例中的視頻,在行李箱集市上有一個詳細的say示例。
$ Suitcase --name= " Demo App " --window-title= " Hello World "
--window-width= " 200 " --window-height= " 200 "
--control-type= " label " --control-title= " Give a face to every voice… "
--control-type= " button "
--control-title= " ? Say hello "
--control-action= " /usr/bin/say Hello World " 
一個更高級的示例使用按鈕並將參數傳遞給say命令。戰爭遊戲的詳細解釋可以在手提箱集市上找到。
$ Suitcase --name= " War Games "
--control-title= " Shall we play a game? "
--control-type= " text-field "
--control-identifier= " say.textfield "
--control-title= " Daniel "
--control-type= " button "
--control-group-identifier= " g.btns "
--control-action= " /usr/bin/say "
--control-action-parameter= " -v,Daniel,say.textfield "
--control-title= " Samantha "
--control-type= " button "
--control-group-identifier= " g.btns "
--control-action= " /usr/bin/say "
--control-action-parameter= " -v,Samantha,say.textfield "
--control-title= " Veena "
--control-type= " button "
--control-group-identifier= " g.btns "
--control-action= " /usr/bin/say "
--control-action-parameter= " -v,Veena,say.textfield " 
此示例顯示瞭如何創建菜單和子菜單。操作可以以與button s相同的方式附加到任何菜單項上。觀看此示例的視頻。
菜單項也可以分配一個鍵盤快捷鍵。有關更多詳細信息,請參見完整的文檔。
$ Suitcase --name= " Demo App " --window-title= " Menus "
--control-title= " UUID "
--control-type= " label " --control-identifier= " com.label.uuid "
--menu-title= " Action>Generate>UUID "
--menu-action= " /usr/bin/uuidgen "
--menu-action-destination= " com.label.uuid "
--menu-title= " Action>Copy UUID "
--menu-shortcut= " k "
--menu-action= " /usr/bin/printenv com.label.uuid | /usr/bin/pbcopy " 
這是一個更有參與的示例,它使用defaults讀取MacOS用戶默認系統並使用sed設置狀態label 。觀看此示例的視頻。
$ Suitcase --name= " Hidden Finder Settings "
--control-title= " Hidden Files & Folders: "
--control-group-identifier= " com.finder.hidden "
--control-type= " label "
--control-title= " unknown "
--control-group-identifier= " com.finder.hidden "
--control-type= " label "
--control-identifier= " com.label.hidden.state "
--control-title= " Refresh "
--control-group-identifier= " com.finder.hidden "
--control-type= " button "
--control-action= " /usr/bin/defaults read com.apple.finder AppleShowAllFiles | /usr/bin/sed s/1/Visible/g;s/0/Hidden/g "
--control-action-destination= " com.label.hidden.state "
--control-title= " Enable "
--control-type= " button "
--control-group-identifier= " com.finder.hidden.buttons "
--control-action= " /usr/bin/defaults write com.apple.finder AppleShowAllFiles -bool TRUE & /usr/bin/killall Finder "
--control-title= " Disable "
--control-type= " button "
--control-group-identifier= " com.finder.hidden.buttons "
--control-action= " /usr/bin/defaults write com.apple.finder AppleShowAllFiles -bool FALSE & /usr/bin/killall Finder "這就是命令在終端運行的方式。
$ defaults read com.apple.finder AppleShowAllFiles | sed ' s/1/Visible/g;s/0/Hidden/g '該按鈕使用&運行兩個命令,一個用於寫入用戶默認值,第二個要重新啟動Finder:
$ defaults write com.apple.finder AppleShowAllFiles -bool TRUE殺死發現者並重新啟動:
$ killall Finder.command任何手提箱命令都可以作為自動運行.command文件導出。您可以雙擊此文件以啟動手提箱或共享文件(僅是純文本)。

請創建一個問題。
發行和新聞(@suitcasecli)Richard Stelling(@rjstelling)