@khemsok/tunl 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +5 -38
  2. package/dist/cli.js +625 -361
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -21,27 +21,18 @@ Then just run `tunl` from anywhere.
21
21
  3. Progressively reveals animated ASCII art as you stay focused
22
22
  4. Unblocks everything when the session ends
23
23
 
24
- ## Art Themes
25
-
26
- Three animated themes that evolve in real-time:
27
-
28
- - **City Skyline** — buildings rise, windows flicker on, moon glows, stars twinkle, shooting stars streak across, clouds drift
29
- - **Forest** — trees grow from trunks to full canopy, sun rises with rays, birds fly, butterflies flutter, flowers bloom
30
- - **Space** — stars fill the void, planet forms with rings, nebula swirls, rocket builds and launches with animated fire, comets streak past
31
-
32
- The art is procedurally generated and animated every 800ms — stars twinkle, windows flicker, neon signs pulse. Nothing is static.
33
-
34
24
  ## Controls
35
25
 
36
26
  | Key | Action |
37
27
  |-----|--------|
38
28
  | `space` | Start / pause / resume |
39
29
  | `r` | Stop session (back to idle) |
40
- | `q` | Quit app |
30
+ | `q` | Quit |
41
31
  | `+/-` | Adjust time by 5 min (before starting) |
42
32
  | `s` | Edit blocked sites |
43
33
  | `t` | Change art theme |
44
- | `Ctrl+C` | Quit from any screen |
34
+ | `i` | View focus stats |
35
+ | `Ctrl+C` | Force quit from any screen |
45
36
 
46
37
  ## CLI Flags
47
38
 
@@ -51,36 +42,12 @@ tunl --duration 45 # 45 minute session
51
42
  tunl --block "site.com" # add extra sites to block
52
43
  tunl --sites "a.com,b.com" # set the full blocklist
53
44
  tunl --noblock # timer + art only, no blocking
45
+ tunl --stats # show focus stats and streaks
54
46
  tunl --config # show saved config
55
47
  tunl --reset # reset config, re-run onboarding
48
+ tunl --help # show usage help
56
49
  ```
57
50
 
58
- ## How blocking works
59
-
60
- tunl appends entries to `/etc/hosts` mapping blocked domains to `127.0.0.1`. This requires sudo access — you'll be prompted before the timer starts.
61
-
62
- Sites are unblocked when:
63
- - The session completes
64
- - You stop the session with `r`
65
- - You quit with `q` or `Ctrl+C`
66
- - If the process crashes, the next run detects stale entries and cleans up
67
-
68
- **Note:** If your browser uses DNS-over-HTTPS (Chrome, Arc, Firefox), you need to disable it for blocking to work:
69
- - **Chrome/Arc:** `chrome://settings/security` or `arc://settings/privacy` → turn off "Use secure DNS"
70
- - **Firefox:** Settings → Privacy & Security → DNS over HTTPS → Off
71
- - **Safari:** Works by default
72
-
73
- ## Config
74
-
75
- Preferences are saved to `~/.tunl.json` after first run. Edit with `tunl --config` to view, `tunl --reset` to start fresh, or press `s`/`t` in the app.
76
-
77
- ## Tech Stack
78
-
79
- - **Runtime:** Bun
80
- - **Language:** TypeScript
81
- - **TUI Framework:** @opentui/react
82
- - **Art:** Procedurally generated, animated every 800ms
83
-
84
51
  ## License
85
52
 
86
53
  MIT