agent-office-cli 0.1.8 → 0.1.9
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 +168 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# agent-office-cli
|
|
2
|
+
|
|
3
|
+
`agent-office-cli` is the local runtime for AgentOffice.
|
|
4
|
+
|
|
5
|
+
It starts the local session manager, restores tmux-backed AI workers, connects your machine to the hosted relay, and lets you launch or attach to Claude Code / Codex sessions from the terminal.
|
|
6
|
+
|
|
7
|
+
## What This Package Does
|
|
8
|
+
|
|
9
|
+
- Starts the local AgentOffice service with `ato start`
|
|
10
|
+
- Restores existing tmux-backed workers after restart
|
|
11
|
+
- Connects your machine to `agentoffice.top` or a custom relay
|
|
12
|
+
- Launches Claude Code and Codex workers with one command
|
|
13
|
+
- Exposes local worker terminals to the AgentOffice web or mobile UI
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm i -g agent-office-cli
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Requirements
|
|
22
|
+
|
|
23
|
+
- Node.js 18+
|
|
24
|
+
- `tmux`
|
|
25
|
+
- Claude Code and/or Codex CLI if you want to launch those providers
|
|
26
|
+
|
|
27
|
+
Example on macOS:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
brew install tmux
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Quick Start
|
|
34
|
+
|
|
35
|
+
1. Create an API key on `https://agentoffice.top`
|
|
36
|
+
2. Start the local runtime
|
|
37
|
+
3. Launch workers from another terminal
|
|
38
|
+
|
|
39
|
+
Using an environment variable:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
export AGENTOFFICE_API_KEY=sk_your_api_key
|
|
43
|
+
ato start
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Or pass the key directly:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
ato start --key sk_your_api_key
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Launch workers:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
ato claude
|
|
56
|
+
ato codex
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Launch with a custom title:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
ato claude -t "Review PR #42"
|
|
63
|
+
ato codex -t "Fix login bug"
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Attach your local terminal to an existing worker:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
ato attach <sessionId>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Common Commands
|
|
73
|
+
|
|
74
|
+
### `ato start`
|
|
75
|
+
|
|
76
|
+
Starts the local AgentOffice runtime, restores managed sessions, and connects to the hosted relay when an API key is present.
|
|
77
|
+
|
|
78
|
+
Examples:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
ato start
|
|
82
|
+
ato start --key sk_your_api_key
|
|
83
|
+
ato start --key sk_your_api_key --relay https://your-relay.example.com
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Notes:
|
|
87
|
+
|
|
88
|
+
- On macOS, `ato start` keeps the machine awake while the tunnel is active
|
|
89
|
+
- Hosted tunnel logs are written to `~/.agentoffice/logs/tunnel.log`
|
|
90
|
+
|
|
91
|
+
### `ato claude`
|
|
92
|
+
|
|
93
|
+
Launches a Claude Code worker in tmux so it can be supervised from AgentOffice.
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
ato claude
|
|
97
|
+
ato claude -t "Investigate flaky test"
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### `ato codex`
|
|
101
|
+
|
|
102
|
+
Launches a Codex worker in tmux.
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
ato codex
|
|
106
|
+
ato codex -t "Refactor websocket retry logic"
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### `ato attach`
|
|
110
|
+
|
|
111
|
+
Attaches your local shell directly to a worker's tmux session.
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
ato attach <sessionId>
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Hosted Mode
|
|
118
|
+
|
|
119
|
+
When you start the runtime with an API key, the CLI opens a secure tunnel from your local machine to the AgentOffice relay.
|
|
120
|
+
|
|
121
|
+
That tunnel is used to:
|
|
122
|
+
|
|
123
|
+
- show your workers in the Office UI
|
|
124
|
+
- open remote terminals from web or mobile
|
|
125
|
+
- launch workers from the AgentOffice interface
|
|
126
|
+
- proxy requests into the local runtime
|
|
127
|
+
|
|
128
|
+
If the connection drops, the tunnel automatically retries and records reconnect details in the local tunnel log.
|
|
129
|
+
|
|
130
|
+
## Troubleshooting
|
|
131
|
+
|
|
132
|
+
### `tmux is required`
|
|
133
|
+
|
|
134
|
+
Install `tmux` first, then run `ato start` again.
|
|
135
|
+
|
|
136
|
+
### Worker launch commands are missing
|
|
137
|
+
|
|
138
|
+
Make sure the provider CLI is installed and available on `PATH`:
|
|
139
|
+
|
|
140
|
+
- `claude`
|
|
141
|
+
- `codex`
|
|
142
|
+
|
|
143
|
+
### Remote Office shows offline
|
|
144
|
+
|
|
145
|
+
Check the local tunnel log:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
tail -n 100 ~/.agentoffice/logs/tunnel.log
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Look for:
|
|
152
|
+
|
|
153
|
+
- websocket connection errors
|
|
154
|
+
- reconnect attempts
|
|
155
|
+
- auth failures
|
|
156
|
+
- relay disconnect reasons
|
|
157
|
+
|
|
158
|
+
## Package Scope
|
|
159
|
+
|
|
160
|
+
This package is the CLI/runtime portion of AgentOffice only.
|
|
161
|
+
|
|
162
|
+
It does not include the full web app source or product docs. Those live in the main repository:
|
|
163
|
+
|
|
164
|
+
- GitHub: `https://github.com/fakeou/agent-office`
|
|
165
|
+
|
|
166
|
+
## License
|
|
167
|
+
|
|
168
|
+
MIT
|