macOS ์คํฌ๋ฆฐ ํ์ ์ถ์ ๋๊ตฌ. ์ฑ ์ฌ์ฉ ์๊ฐ๊ณผ ์ฐฝ ์ ๋ชฉ์ ์๋์ผ๋ก ๊ธฐ๋กํฉ๋๋ค.
swift build -c release
cp .build/release/focus "$HOME/.local/bin/"
cp .build/release/focusd "$HOME/.local/bin/"# launchd ์์ด์ ํธ ์ค์น (๋ก๊ทธ์ธ ์ ์๋ ์์)
focus install
# launchd ์์ด์ ํธ ์ ๊ฑฐ
focus uninstall# ์ค๋ ์ฑ๋ณ ์์ฝ
focus
focus summary
# ํน์ ๋ ์ง
focus summary 2026-01-29
# ๋ ์ง ๋ฒ์
focus summary --from 2026-01-27 --to 2026-01-29
# ์ฐฝ๋ณ ์์ฝ
focus summary --window
# JSON ์ถ๋ ฅ
focus summary --json# ์ต๊ทผ ์ธ์
focus log
# ๊ฒ์ (์ฑ ์ด๋ฆ ๋๋ ์ฐฝ ์ ๋ชฉ)
focus log "Safari"
focus log "GitHub"
# ์ฑ ํํฐ
focus log --app Safari
# ๋ ์ง ํํฐ
focus log --date 2026-01-29
focus log --from 2026-01-27 --to 2026-01-29
# ๊ฒฐ๊ณผ ์ ์ ํ
focus log --limit 20
# ์์ธ ์ถ๋ ฅ
focus log --verbose
# JSON ์ถ๋ ฅ
focus log --json# dry run (์ญ์ ๋์ ๋ฏธ๋ฆฌ๋ณด๊ธฐ)
focus delete --id 42
focus delete --app Safari
focus delete --date 2026-01-29
focus delete --from 2026-01-27 --to 2026-01-29
focus delete --all
# ์ค์ ์ญ์ (-y ๋๋ --yes)
focus delete --id 42 -y
focus delete --app Safari --date 2026-01-29 -y- ๋ฐ์ดํฐ๋ฒ ์ด์ค:
~/.local/share/focus/focus.db - PID ํ์ผ:
~/.local/share/focus/focusd.pid - ๋ก๊ทธ ํ์ผ:
~/.local/share/focus/focusd.log - ์ค์ ํ์ผ:
~/.config/focus/config.json
ํน์ ์ฑ์ด๋ ์๋์ฐ๋ฅผ ์ถ์ ์์ ์ ์ธํ ์ ์์ต๋๋ค. ์ค์ ํ์ผ์ ์์ ํ๋ฉด ๋ฐ๋ชฌ ์ฌ์์ ์์ด ์ค์๊ฐ ๋ฐ์๋ฉ๋๋ค.
~/.config/focus/config.json
์ค์ ํ์ผ์ด ์์ผ๋ฉด ๋ค์ ๊ธฐ๋ณธ๊ฐ์ด ์ ์ฉ๋ฉ๋๋ค:
- ์ ์ธ ์ฑ:
com.apple.loginwindow(์์คํ ๋ก๊ทธ์ธ ํ๋ฉด) - ์ ์ธ ์๋์ฐ: ์์
{
"excludedApps": [
{ "bundleId": "com.apple.loginwindow", "comment": "System login" },
{ "bundleId": "com.1password.1password", "comment": "Password manager" }
],
"excludedWindows": [
{
"bundleId": "com.apple.Safari",
"titlePattern": "*Private*",
"comment": "Safari private browsing"
},
{
"bundleId": "*",
"titlePattern": "*password*",
"caseSensitive": false,
"comment": "Any password window"
}
]
}excludedApps
bundleId: ์ ์ธํ ์ฑ์ Bundle ID (ํ์)comment: ์ค๋ช (์ ํ)
excludedWindows
bundleId: ๋์ ์ฑ์ Bundle ID,*๋ ๋ชจ๋ ์ฑ (ํ์)titlePattern: ์๋์ฐ ์ ๋ชฉ ํจํด (ํ์)*: 0๊ฐ ์ด์์ ๋ฌธ์?: ๋จ์ผ ๋ฌธ์
caseSensitive: ๋์๋ฌธ์ ๊ตฌ๋ถ ์ฌ๋ถ (๊ธฐ๋ณธ๊ฐ:true)comment: ์ค๋ช (์ ํ)
- ์ฑ ์ ํ ์ถ์ : ๊ถํ ๋ถํ์
- ์ฐฝ ์ ๋ชฉ ์ถ์ : ์์คํ ์ค์ > ๊ฐ์ธ์ ๋ณด ๋ณดํธ ๋ฐ ๋ณด์ > ์์ฌ์ด ์ฌ์ฉ ๊ถํ ํ์
# ๋น๋
swift build
# ํ
์คํธ
swift test
# ๋ฆด๋ฆฌ์ค ๋น๋
swift build -c release