@rifuki/negi 0.0.0-stage → 0.2.1
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.md +82 -2
- package/bin/negi +0 -0
- package/package.json +11 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 rifuki
|
|
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.md
CHANGED
|
@@ -1,3 +1,83 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="docs/media/negi.webp" width="200" alt="Miku holding a phone and a green onion">
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
<h1 align="center">negi</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center">tmux and your Mac's screen, on your phone.</p>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
<a href="https://github.com/rifuki/negi/releases/latest"><img src="https://img.shields.io/github/v/release/rifuki/negi?color=39c5bb" alt="Latest release"></a>
|
|
11
|
+
<a href="https://crates.io/crates/negi"><img src="https://img.shields.io/crates/v/negi?color=39c5bb" alt="crates.io"></a>
|
|
12
|
+
<a href="https://www.npmjs.com/package/@rifuki/negi"><img src="https://img.shields.io/npm/v/@rifuki/negi?color=39c5bb" alt="npm"></a>
|
|
13
|
+
<a href="LICENSE"><img src="https://img.shields.io/github/license/rifuki/negi?color=39c5bb" alt="MIT"></a>
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
<p align="center">
|
|
17
|
+
<img src="docs/media/demo.webp" width="300" alt="An agent in tmux asks to run the tests; the answer is typed from the phone and the tests pass">
|
|
18
|
+
</p>
|
|
19
|
+
|
|
20
|
+
Your agent stops to ask a question while you are away from the desk. Open negi on your
|
|
21
|
+
phone, read the pane, answer it, and it carries on. One Rust binary on your Mac serves
|
|
22
|
+
the page over your tailnet; nothing goes through anyone else's server.
|
|
23
|
+
|
|
24
|
+
## What it does
|
|
25
|
+
|
|
26
|
+
- Every tmux session, window and pane on your phone, live, with the colours your
|
|
27
|
+
programs print.
|
|
28
|
+
- Type into a pane, with a key row for esc, tab, ctrl, option, command and the arrows.
|
|
29
|
+
- Answer an agent's prompt, scroll back through a pane, send a file into it.
|
|
30
|
+
- See and drive the Mac's own screen as live video, with touch as a trackpad.
|
|
31
|
+
- The Mac's battery and Wi-Fi at a glance, and a speed test of the link to it. While a
|
|
32
|
+
phone is connected the Mac does not sleep for idleness (closing the lid still sleeps it).
|
|
33
|
+
|
|
34
|
+
<p align="center">
|
|
35
|
+
<img src="docs/media/screens.webp" alt="Pairing, the session list, an agent's pane, and the settings">
|
|
36
|
+
</p>
|
|
37
|
+
|
|
38
|
+
## Install
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
brew install rifuki/tap/negi
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
or `npm install -g @rifuki/negi`, or `cargo install negi`. macOS 12.3 or later on Apple silicon; on an Intel Mac, `cargo install negi` builds it.
|
|
45
|
+
|
|
46
|
+
## Get started
|
|
47
|
+
|
|
48
|
+
With [Tailscale](https://tailscale.com) signed in on the Mac and on the phone:
|
|
49
|
+
|
|
50
|
+
```sh
|
|
51
|
+
negi serve # keep it running; brew services start negi does it at login
|
|
52
|
+
negi tailnet # serves it on your tailnet and prints its https address
|
|
53
|
+
negi pair # open that address on the phone and type the code it shows
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
On the phone, Share, Add to Home Screen (or Install app on Android) opens negi full screen
|
|
57
|
+
like an app, and it still opens when the Mac is out of reach.
|
|
58
|
+
|
|
59
|
+
The screen comes as live video from negi itself. macOS asks once for Screen Recording
|
|
60
|
+
(to see it) and Accessibility (to drive it), for negi or the terminal it runs in. Without
|
|
61
|
+
them negi falls back to Screen Sharing (System Settings, General, Sharing), which asks for
|
|
62
|
+
your Mac login.
|
|
63
|
+
|
|
64
|
+
## Safe by default
|
|
65
|
+
|
|
66
|
+
- Other devices reach it only through your tailnet, and only signed in as you.
|
|
67
|
+
- Each phone pairs once with a one-time code that `negi pair` takes back on Ctrl+C;
|
|
68
|
+
`negi revoke` unpairs it.
|
|
69
|
+
- Keys are stored hashed; a kept screen login is sealed by the server for one device.
|
|
70
|
+
- Before live video shows the screen or takes input, each phone gives the Mac's password
|
|
71
|
+
once. macOS checks it; negi does not keep it, and five wrong tries lock that phone out
|
|
72
|
+
for five minutes.
|
|
73
|
+
|
|
74
|
+
[How it works](docs/SPEC.md) · [Development](docs/DEVELOPMENT.md)
|
|
75
|
+
|
|
76
|
+
## License
|
|
77
|
+
|
|
78
|
+
MIT for the code.
|
|
79
|
+
|
|
80
|
+
Hatsune Miku is a character of Crypton Future Media, INC., used here non-commercially
|
|
81
|
+
under the [Piapro Character License](https://piapro.net/intl/en_for_creators.html).
|
|
82
|
+
© Crypton Future Media, INC. www.piapro.net. The drawings of her were made for negi and
|
|
83
|
+
are not covered by the MIT licence.
|
package/bin/negi
ADDED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rifuki/negi",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"description": "tmux and your Mac's screen, on your phone, over your tailnet.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"homepage": "https://github.com/rifuki/negi",
|
|
7
|
+
"repository": { "type": "git", "url": "git+https://github.com/rifuki/negi.git" },
|
|
8
|
+
"keywords": ["tmux", "terminal", "remote", "phone", "tailscale", "vnc"],
|
|
9
|
+
"bin": { "negi": "bin/negi" },
|
|
10
|
+
"files": ["bin/negi", "README.md", "LICENSE"],
|
|
11
|
+
"os": ["darwin"],
|
|
12
|
+
"cpu": ["arm64"]
|
|
13
|
+
}
|