@layorixinc/axterm 0.1.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.md +128 -0
- package/dist/cli.js +13932 -0
- package/package.json +50 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Layorix Inc.
|
|
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
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# axterm
|
|
2
|
+
|
|
3
|
+
Run CLI coding agents as managed background sessions, and drive them from a messenger.
|
|
4
|
+
|
|
5
|
+
An agent in a terminal tab dies when you close the tab, and you can only watch it while you are
|
|
6
|
+
sitting in front of it. axterm keeps the agent in a daemon-owned PTY, mirrors it into a Telegram
|
|
7
|
+
topic, and lets you approve tool calls, answer questions, and send new prompts from your phone.
|
|
8
|
+
No cloud relay: each machine only makes outbound connections.
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
┌─────────┐
|
|
12
|
+
Telegram ◀────▶│ daemon │────▶ PTY ──▶ agent (omp)
|
|
13
|
+
CLI ◀────▶│ │────▶ PTY ──▶ agent (worktree: feat-a)
|
|
14
|
+
└─────────┘────▶ PTY ──▶ agent (worktree: feat-b)
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## What it does
|
|
18
|
+
|
|
19
|
+
- **Sessions outlive your terminal.** The daemon owns the PTY; attach and detach with `Ctrl+X Ctrl+X`.
|
|
20
|
+
- **Telegram as a control surface.** One forum topic per session: streamed output, approval buttons,
|
|
21
|
+
structured questions with multi-select and free text, and plain messages delivered as prompts.
|
|
22
|
+
- **Parallel work on git worktrees.** `--worktree` gives each session its own branch and checkout;
|
|
23
|
+
`fanout` starts the same prompt on several branches; `diff` summarizes the result, untracked files
|
|
24
|
+
included.
|
|
25
|
+
- **Resume.** A killed session — or one lost to a daemon restart — restarts with its conversation
|
|
26
|
+
intact and keeps the same Telegram topic.
|
|
27
|
+
- **Several machines, one group.** Address a specific PC with `machine:project`; each machine runs
|
|
28
|
+
its own bot.
|
|
29
|
+
- **English and Korean** for every user-facing string.
|
|
30
|
+
|
|
31
|
+
## Requirements
|
|
32
|
+
|
|
33
|
+
[Bun](https://bun.sh) 1.3.14+, git 2.25+, and an agent CLI on `PATH`. No Node, and nothing to compile.
|
|
34
|
+
[omp](https://github.com/can1357/oh-my-pi) is the fully integrated agent today.
|
|
35
|
+
|
|
36
|
+
## Quick start
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
bun install -g @layorixinc/axterm
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
The command is `axterm`; the package is scoped because npm refuses the bare name as too close to
|
|
43
|
+
`xterm`. `bunx @layorixinc/axterm` works for a one-off, but a global install is what you want for
|
|
44
|
+
real use: the daemon bakes its own path into the hook configs it writes, and a package cache is not
|
|
45
|
+
a stable home for that.
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
axterm run # start an agent here and attach
|
|
49
|
+
axterm list # what is running
|
|
50
|
+
axterm resume <id> # bring an exited session back
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
From a checkout instead — [Bun](https://bun.sh) runs the TypeScript directly, so there is no build
|
|
54
|
+
step:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
git clone https://github.com/layorixinc/axterm && cd axterm
|
|
58
|
+
bun install
|
|
59
|
+
|
|
60
|
+
# convenience alias
|
|
61
|
+
alias axterm='bun "$PWD/packages/cli/src/index.ts"' # bash/zsh
|
|
62
|
+
# function axterm { bun $PWD\packages\cli\src\index.ts @args } # PowerShell
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Or build a single self-contained executable — no runtime required to run it:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
bun run build # this platform, into dist/bin/
|
|
69
|
+
bun run build:all # every platform (from Linux; see AGENTS.md §4.36)
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Detach with `Ctrl+X Ctrl+X`; the session keeps running.
|
|
73
|
+
|
|
74
|
+
The first interactive run offers a short setup wizard — language, machine name, agent, and
|
|
75
|
+
optionally Telegram. It never appears in a pipe or a CI job, `--no-setup` skips it, and
|
|
76
|
+
`axterm setup` re-runs it at any time. axterm works with no configuration at all; only channels
|
|
77
|
+
need settings.
|
|
78
|
+
|
|
79
|
+
## Telegram (optional)
|
|
80
|
+
|
|
81
|
+
Create a bot with [@BotFather](https://t.me/BotFather), make a group, turn **Topics** on, add the bot
|
|
82
|
+
as an administrator with the *Manage Topics* permission, then:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
axterm config set channels.telegram.botToken <token>
|
|
86
|
+
axterm config set channels.telegram.groupId <group id>
|
|
87
|
+
axterm config set channels.telegram.allowUserIds <your user id>
|
|
88
|
+
axterm telegram doctor # checks forum mode and bot permissions
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Only the listed user ids are accepted; everything else is ignored. Tokens are stored in a `0600`
|
|
92
|
+
secrets file, never in the shareable config.
|
|
93
|
+
|
|
94
|
+
## Language
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
axterm config set locale ko # persistent, applied without a restart
|
|
98
|
+
AXTERM_LANG=en axterm list # one-shot override
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Resolution order: `AXTERM_LANG` > config `locale` > `LC_ALL`/`LANG` > English.
|
|
102
|
+
|
|
103
|
+
## Status
|
|
104
|
+
|
|
105
|
+
Used daily on Windows and Linux, and verified on macOS (Apple Silicon): the full suite passes on
|
|
106
|
+
all three, with a live session, the documented file layout, and the `0600`/`0700` permissions
|
|
107
|
+
checked on each. Interfaces are still moving, and the version number is honest: this is `0.1.x`.
|
|
108
|
+
Agents other than omp have profiles for titles and resume, but not yet the status hooks.
|
|
109
|
+
|
|
110
|
+
## Documentation
|
|
111
|
+
|
|
112
|
+
| | |
|
|
113
|
+
|---|---|
|
|
114
|
+
| [`docs/USAGE.md`](docs/USAGE.md) | day-to-day guide |
|
|
115
|
+
| [`AGENTS.md`](AGENTS.md) | architecture decisions and the list of traps found by measurement |
|
|
116
|
+
| [`docs/design/`](docs/design/) | design notes per subsystem |
|
|
117
|
+
| [`CONTRIBUTING.md`](CONTRIBUTING.md) | how to build, test, and what this project expects of a change |
|
|
118
|
+
| [`CODE_OF_CONDUCT.md`](CODE_OF_CONDUCT.md) | Contributor Covenant 2.1 |
|
|
119
|
+
|
|
120
|
+
## Security
|
|
121
|
+
|
|
122
|
+
Report vulnerabilities privately to **lordkeios@layorix.ai** — see
|
|
123
|
+
[SECURITY.md](SECURITY.md) for the trust boundaries and what does not count
|
|
124
|
+
(running arbitrary commands is the product, not a bug).
|
|
125
|
+
|
|
126
|
+
## License
|
|
127
|
+
|
|
128
|
+
MIT © Layorix Inc. — see [LICENSE](LICENSE).
|