pomotty 1.0.1 → 1.2.0
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.
- package/LICENSE +21 -0
- package/README.ja.md +54 -4
- package/README.md +56 -4
- package/dist/cli.js +1621 -0
- package/package.json +16 -11
- package/dist/bin/pomotty.js +0 -483
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 iririn1998
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.ja.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](./README.md) | 日本語
|
|
4
4
|
|
|
5
|
-
Node.js 22
|
|
5
|
+
Node.js `^22.18.0 || >=24.11.0`で利用できる、ターミナル用のポモドーロタイマーです。
|
|
6
6
|
|
|
7
7
|
```shell
|
|
8
8
|
npx pomotty
|
|
@@ -31,15 +31,58 @@ pomotty --work 30 --break 10
|
|
|
31
31
|
pomotty --work=45 --break=15
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
`--
|
|
34
|
+
`--loop`で作業・休憩の繰り返し回数を指定できます。既定値は3で、1以上の整数
|
|
35
35
|
(最大9007199254740991)を受け付けます。開始確認は最初の1回だけで、最後の休憩が
|
|
36
36
|
完了すると終了します。
|
|
37
37
|
|
|
38
38
|
```shell
|
|
39
|
-
pomotty --
|
|
40
|
-
pomotty --work=25 --break=5 --
|
|
39
|
+
pomotty --loop 5
|
|
40
|
+
pomotty --work=25 --break=5 --loop=2
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
+
タイマー実行中は、残り時間を大きな数字で表示し、同じ位置で更新し続けます。
|
|
44
|
+
その下に、現在のフェーズの経過バー(経過時間・割合・合計時間)と、サイクルごとの
|
|
45
|
+
作業・休憩の進み具合を並べたタイムラインを表示します。
|
|
46
|
+
|
|
47
|
+
```text
|
|
48
|
+
🍅 WORK Cycle 2 / 3
|
|
49
|
+
|
|
50
|
+
██████ ██ ██ ██████
|
|
51
|
+
██ ██ ██ ██ ██ ██
|
|
52
|
+
██████ ██████ ██████
|
|
53
|
+
██ ██ ██ ██ ██
|
|
54
|
+
██████ ██ ██████
|
|
55
|
+
|
|
56
|
+
━━━━━━━━━━━━━━━━────────────────────────
|
|
57
|
+
6:18 elapsed 42% 15:00 total
|
|
58
|
+
|
|
59
|
+
#1 ███████████████ █████ ✓
|
|
60
|
+
#2 ██████▎········ ····· ◀ now
|
|
61
|
+
#3 ··············· ·····
|
|
62
|
+
work 15:00 break 5:00
|
|
63
|
+
|
|
64
|
+
[space] pause [s] skip [q] quit
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
作業は赤、休憩は緑で表示します。`NO_COLOR`に空でない値を設定すると色を付けません。
|
|
68
|
+
ターミナルの幅が狭い場合は、残り時間・割合・バーだけのコンパクト表示や1行表示に
|
|
69
|
+
切り替え、起動時のロゴも短い見出しにします。
|
|
70
|
+
|
|
71
|
+
タイマー実行中は次のキーで操作できます。
|
|
72
|
+
|
|
73
|
+
| キー | 動作 |
|
|
74
|
+
| -------- | ------------------------------------------------------------------------------ |
|
|
75
|
+
| `space` | 一時停止 / 再開。一時停止中は時間が進みません |
|
|
76
|
+
| `s` | 現在のフェーズをskipして次へ進みます。音は鳴らさず、作業の完了数にも数えません |
|
|
77
|
+
| `q` | タイマーを止めて終了します(終了コード0) |
|
|
78
|
+
| `Ctrl+C` | タイマーを止めて終了します(終了コード130) |
|
|
79
|
+
|
|
80
|
+
終了予定時刻を過ぎたフェーズでキーを押した場合は、先にそのフェーズを完了として扱ってから
|
|
81
|
+
操作を適用します。`SIGTERM`(143)、`SIGHUP`(129)でも、非表示にしたカーソルと
|
|
82
|
+
キー入力の設定を元に戻してから終了します。
|
|
83
|
+
標準入出力がターミナルでない場合(パイプやリダイレクト)は、キー操作を受け付けず、
|
|
84
|
+
フェーズの開始と完了を1行ずつ出力します。
|
|
85
|
+
|
|
43
86
|
利用可能なオプションは、次のコマンドで確認できます。
|
|
44
87
|
|
|
45
88
|
```shell
|
|
@@ -49,5 +92,12 @@ pomotty --help
|
|
|
49
92
|
作業と休憩の完了時には、それぞれ異なる通知音を再生します。macOSでは
|
|
50
93
|
`afplay`、Linuxでは`paplay`または`aplay`、WindowsではPowerShellを利用し、
|
|
51
94
|
再生できない環境では異なる回数のターミナルベルに切り替わります。
|
|
95
|
+
再生コマンドは起動時に1回だけ絶対パスへ解決します。Linuxでは`PATH`のうち
|
|
96
|
+
絶対パスのディレクトリだけを探索し、作業ディレクトリ配下と`node_modules/.bin`に
|
|
97
|
+
ある同名コマンドは使いません。
|
|
52
98
|
|
|
53
99
|
開発手順とnpmへの公開・更新手順は[開発ガイド](./DEVELOPMENT.ja.md)を参照してください。
|
|
100
|
+
|
|
101
|
+
## ライセンス
|
|
102
|
+
|
|
103
|
+
MIT
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
English | [日本語](./README.ja.md)
|
|
4
4
|
|
|
5
|
-
A Pomodoro timer for the terminal, available on Node.js 22
|
|
5
|
+
A Pomodoro timer for the terminal, available on Node.js `^22.18.0 || >=24.11.0`.
|
|
6
6
|
|
|
7
7
|
```shell
|
|
8
8
|
npx pomotty
|
|
@@ -31,15 +31,60 @@ pomotty --work 30 --break 10
|
|
|
31
31
|
pomotty --work=45 --break=15
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
Use `--
|
|
34
|
+
Use `--loop` to set the number of work and break cycles. It defaults to 3 and
|
|
35
35
|
accepts whole numbers from 1 to 9007199254740991. The start confirmation appears
|
|
36
36
|
only once, and the timer exits after the final break finishes.
|
|
37
37
|
|
|
38
38
|
```shell
|
|
39
|
-
pomotty --
|
|
40
|
-
pomotty --work=25 --break=5 --
|
|
39
|
+
pomotty --loop 5
|
|
40
|
+
pomotty --work=25 --break=5 --loop=2
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
+
While the timer runs, the remaining time is shown in large digits and updated in
|
|
44
|
+
place. Below it are a progress bar for the current phase (elapsed time, percentage,
|
|
45
|
+
and total time) and a timeline showing the work and break progress of each cycle.
|
|
46
|
+
|
|
47
|
+
```text
|
|
48
|
+
🍅 WORK Cycle 2 / 3
|
|
49
|
+
|
|
50
|
+
██████ ██ ██ ██████
|
|
51
|
+
██ ██ ██ ██ ██ ██
|
|
52
|
+
██████ ██████ ██████
|
|
53
|
+
██ ██ ██ ██ ██
|
|
54
|
+
██████ ██ ██████
|
|
55
|
+
|
|
56
|
+
━━━━━━━━━━━━━━━━────────────────────────
|
|
57
|
+
6:18 elapsed 42% 15:00 total
|
|
58
|
+
|
|
59
|
+
#1 ███████████████ █████ ✓
|
|
60
|
+
#2 ██████▎········ ····· ◀ now
|
|
61
|
+
#3 ··············· ·····
|
|
62
|
+
work 15:00 break 5:00
|
|
63
|
+
|
|
64
|
+
[space] pause [s] skip [q] quit
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Work is shown in red and breaks in green. Set `NO_COLOR` to a non-empty value to
|
|
68
|
+
disable colors. In narrow terminals, the timer switches to a compact view with only
|
|
69
|
+
the remaining time, percentage, and bar, or to a single line, and the startup logo
|
|
70
|
+
is replaced with a short title.
|
|
71
|
+
|
|
72
|
+
While the timer runs, you can use these keys:
|
|
73
|
+
|
|
74
|
+
| Key | Action |
|
|
75
|
+
| -------- | ------------------------------------------------------------------------------------ |
|
|
76
|
+
| `space` | Pause or resume. Time does not pass while paused |
|
|
77
|
+
| `s` | Skip the current phase. No sound plays, and skipped work is not counted as completed |
|
|
78
|
+
| `q` | Stop the timer and exit (exit code 0) |
|
|
79
|
+
| `Ctrl+C` | Stop the timer and exit (exit code 130) |
|
|
80
|
+
|
|
81
|
+
If the current phase has already reached its end time when you press a key, the
|
|
82
|
+
phase is completed first and the key then applies to the next phase. On `SIGTERM`
|
|
83
|
+
(143) or `SIGHUP` (129), the timer also restores the hidden cursor and the terminal
|
|
84
|
+
input mode before exiting. When standard input or output is not a terminal (for
|
|
85
|
+
example, a pipe or redirect), keys are not read and the timer prints one line when
|
|
86
|
+
each phase starts and finishes.
|
|
87
|
+
|
|
43
88
|
To see the available options, run:
|
|
44
89
|
|
|
45
90
|
```shell
|
|
@@ -50,5 +95,12 @@ Different notification sounds play when work and break sessions end. Sound
|
|
|
50
95
|
playback uses `afplay` on macOS, `paplay` or `aplay` on Linux, and PowerShell on
|
|
51
96
|
Windows. If audio playback is unavailable, the timer falls back to different
|
|
52
97
|
numbers of terminal bells for work and break notifications.
|
|
98
|
+
Playback commands are resolved to absolute paths once at startup. On Linux, only
|
|
99
|
+
absolute directories in `PATH` are searched, and commands under the working
|
|
100
|
+
directory or `node_modules/.bin` are never used.
|
|
53
101
|
|
|
54
102
|
For development and npm publishing instructions, see the [development guide](./DEVELOPMENT.md).
|
|
103
|
+
|
|
104
|
+
## License
|
|
105
|
+
|
|
106
|
+
MIT
|