nonotify 0.1.6 → 0.1.7
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/README.md +56 -46
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
# nnt
|
|
1
|
+
# nnt
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Use it to send yourself a message when tasks are done, including from coding agents.
|
|
3
|
+
А terminal-first notifier built with [incur](https://github.com/wevm/incur). Use it to send yourself messages from the terminal, including from coding agents and CI jobs.
|
|
6
4
|
|
|
7
5
|
## Install
|
|
8
6
|
|
|
@@ -10,41 +8,54 @@ Use it to send yourself a message when tasks are done, including from coding age
|
|
|
10
8
|
npm install -g nonotify
|
|
11
9
|
```
|
|
12
10
|
|
|
13
|
-
After
|
|
11
|
+
After installation, `nnt` is available globally.
|
|
14
12
|
|
|
15
|
-
##
|
|
13
|
+
## Add profile
|
|
16
14
|
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
```bash
|
|
16
|
+
nnt profile add
|
|
17
|
+
```
|
|
19
18
|
|
|
20
|
-
|
|
19
|
+
Flow:
|
|
20
|
+
|
|
21
|
+
1. Enter profile name.
|
|
22
|
+
2. Enter Telegram bot token.
|
|
23
|
+
3. Send any message to your bot in Telegram.
|
|
24
|
+
4. CLI captures `chatId`, shows connected Telegram `username`, stores the profile, and sends a confirmation message back to chat.
|
|
25
|
+
|
|
26
|
+
The first profile becomes default profile automatically.
|
|
27
|
+
|
|
28
|
+
## Send messages
|
|
29
|
+
|
|
30
|
+
Send with the default profile:
|
|
21
31
|
|
|
22
32
|
```bash
|
|
23
|
-
|
|
33
|
+
nnt "Cool message using nnt"
|
|
24
34
|
```
|
|
25
35
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
## Add profile
|
|
36
|
+
Send with a specific profile:
|
|
29
37
|
|
|
30
38
|
```bash
|
|
31
|
-
nnt profile
|
|
39
|
+
nnt "some urgent message" --profile=important
|
|
32
40
|
```
|
|
33
41
|
|
|
34
|
-
|
|
42
|
+
Typical agent usage:
|
|
35
43
|
|
|
36
44
|
```bash
|
|
37
|
-
|
|
45
|
+
# User: Complete a long task, while I'm away, when finish notify me via nnt
|
|
46
|
+
# Agent: *working*
|
|
47
|
+
# Agent after task completed:
|
|
48
|
+
nnt "Very long task finished. All tests passed, check out result"
|
|
38
49
|
```
|
|
39
50
|
|
|
40
|
-
|
|
51
|
+
## Install skills
|
|
41
52
|
|
|
42
|
-
|
|
43
|
-
2. Enter Telegram bot token.
|
|
44
|
-
3. Send any message to your bot in Telegram.
|
|
45
|
-
4. CLI captures `chat_id`, shows connected Telegram `username`, stores the profile, and sends a confirmation message back to chat.
|
|
53
|
+
You can install agent skills for your agents:
|
|
46
54
|
|
|
47
|
-
|
|
55
|
+
```bash
|
|
56
|
+
nnt skills add # install skills globally
|
|
57
|
+
cp ~/.agents/skills/nnt-* ./.agents/skills/ # install in current project
|
|
58
|
+
```
|
|
48
59
|
|
|
49
60
|
## Manage profiles
|
|
50
61
|
|
|
@@ -54,19 +65,19 @@ List profiles:
|
|
|
54
65
|
nnt profile list
|
|
55
66
|
```
|
|
56
67
|
|
|
57
|
-
Show default profile:
|
|
68
|
+
Show the default profile:
|
|
58
69
|
|
|
59
70
|
```bash
|
|
60
71
|
nnt profile default
|
|
61
72
|
```
|
|
62
73
|
|
|
63
|
-
Set default profile:
|
|
74
|
+
Set the default profile:
|
|
64
75
|
|
|
65
76
|
```bash
|
|
66
77
|
nnt profile default important-profile
|
|
67
78
|
```
|
|
68
79
|
|
|
69
|
-
Edit profile (rename, token/chat update, reconnect):
|
|
80
|
+
Edit a profile (rename, token/chat update, reconnect):
|
|
70
81
|
|
|
71
82
|
```bash
|
|
72
83
|
nnt profile edit
|
|
@@ -76,7 +87,7 @@ nnt profile edit critical-profile --botToken=123:abc
|
|
|
76
87
|
nnt profile edit critical-profile --reconnect
|
|
77
88
|
```
|
|
78
89
|
|
|
79
|
-
`nnt profile edit` starts interactive mode and
|
|
90
|
+
`nnt profile edit` starts interactive mode and prompts you to select a profile first.
|
|
80
91
|
|
|
81
92
|
Delete profile:
|
|
82
93
|
|
|
@@ -84,42 +95,41 @@ Delete profile:
|
|
|
84
95
|
nnt profile delete critical-profile
|
|
85
96
|
```
|
|
86
97
|
|
|
87
|
-
By default, profile commands print human-readable output in terminal. For strict machine-friendly output, use format flags:
|
|
98
|
+
By default, profile commands print human-readable output in terminal. For strict, machine-friendly output, use format flags:
|
|
88
99
|
|
|
89
100
|
```bash
|
|
90
101
|
nnt profile list --format json
|
|
91
102
|
nnt profile default --format=md
|
|
92
103
|
```
|
|
93
104
|
|
|
94
|
-
##
|
|
95
|
-
|
|
96
|
-
Send using default profile:
|
|
105
|
+
## Config location
|
|
97
106
|
|
|
98
|
-
|
|
99
|
-
nnt "Default message"
|
|
100
|
-
```
|
|
107
|
+
Config is stored as JSON at `<config-dir>/nnt.json`.
|
|
101
108
|
|
|
102
|
-
|
|
109
|
+
- Default config dir: `~/.config/nnt`
|
|
110
|
+
- Default config path: `~/.config/nnt/nnt.json`
|
|
111
|
+
- To override it, set `NNT_CONFIG_DIR`
|
|
103
112
|
|
|
104
|
-
|
|
105
|
-
nnt "some message for user" --profile=important-profile
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
Equivalent explicit command:
|
|
113
|
+
Example:
|
|
109
114
|
|
|
110
115
|
```bash
|
|
111
|
-
|
|
116
|
+
export NNT_CONFIG_DIR="$HOME/.custom-config/custom-nnt"
|
|
112
117
|
```
|
|
113
118
|
|
|
114
|
-
|
|
119
|
+
If you run coding agents in a container, mount the config directory as read-only:
|
|
115
120
|
|
|
116
|
-
```
|
|
117
|
-
|
|
121
|
+
```yaml
|
|
122
|
+
services:
|
|
123
|
+
app:
|
|
124
|
+
environment:
|
|
125
|
+
- NNT_CONFIG_DIR=/var/nnt
|
|
126
|
+
volumes:
|
|
127
|
+
- ${HOME}/.config/nnt:/var/nnt:ro
|
|
118
128
|
```
|
|
119
129
|
|
|
120
|
-
##
|
|
130
|
+
## API
|
|
121
131
|
|
|
122
|
-
`
|
|
132
|
+
You can integrate `nnt` into your application. Useful when buildling extensions for coding agents. The `Notifier` automaticly loads profile information, so you can send messages easily.
|
|
123
133
|
|
|
124
134
|
```ts
|
|
125
135
|
import { Notifier } from "nonotify";
|
|
@@ -131,7 +141,7 @@ await notifier.send({
|
|
|
131
141
|
});
|
|
132
142
|
```
|
|
133
143
|
|
|
134
|
-
|
|
144
|
+
Notifier loads config using `EnvConfigLoader` by default, but you can also pass profile data directly.
|
|
135
145
|
|
|
136
146
|
```ts
|
|
137
147
|
import { Notifier } from "nonotify";
|