arcocode 0.0.0-stage → 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 +111 -2
- package/assets/arco.svg +121 -0
- package/bin/arco.js +57 -0
- package/install.ps1 +52 -0
- package/install.sh +70 -0
- package/package.json +36 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 rishhabhx
|
|
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,112 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<img src="https://cdn.jsdelivr.net/npm/arcocode@0.1.0/assets/arco.svg" alt="arco code" width="720">
|
|
4
|
+
|
|
5
|
+
Run Claude Code, Codex, OpenCode, Antigravity, Grok Build and fx side by side,
|
|
6
|
+
each in its own git worktree, from one terminal.
|
|
7
|
+
|
|
8
|
+
[](https://www.npmjs.com/package/arcocode) [](https://opensource.org/license/mit)
|
|
9
|
+
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
## Why arco
|
|
13
|
+
|
|
14
|
+
- **Parallel by default.** Every agent works in its own git worktree and branch, so agents never step on each other.
|
|
15
|
+
- **One dashboard.** See who is working, waiting for you, finished or failed, with live terminals, diffs, tokens, cost and plan limits.
|
|
16
|
+
- **The real agents.** Each agent runs its own interface in a real terminal. Attach from any terminal, as many views as you like; agents keep running when you close them all.
|
|
17
|
+
- **Nothing slips past.** Agents started in other terminals and editors show up too, and you can adopt one to continue it in arco.
|
|
18
|
+
- **Review, then land.** Agents review each other's work, conflicts are predicted before you merge, and merge, sync, stack and pull requests are one command each.
|
|
19
|
+
- **Your subscriptions, every account.** Keep several logins per provider and move a conversation to another account or model mid-task. Usage numbers say where they came from.
|
|
20
|
+
- **Agents that delegate.** Any agent can start sub-agents of any other kind through arco's built-in tools.
|
|
21
|
+
- **Agent-ready projects.** `arco init` sets up AGENTS.md, shared skills and MCP servers for every agent, and skills and plugins install from one place.
|
|
22
|
+
- **Local and private.** Everything runs on your machine: no account, no telemetry.
|
|
23
|
+
|
|
24
|
+
## Install
|
|
25
|
+
|
|
26
|
+
```sh
|
|
27
|
+
npm install -g arcocode
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Without Node:
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
curl -fsSL https://cdn.jsdelivr.net/npm/arcocode/install.sh | sh # macOS, Linux
|
|
34
|
+
irm https://cdn.jsdelivr.net/npm/arcocode/install.ps1 | iex # Windows PowerShell
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
To try it once, run `npx arcocode`. Update any install with `arco update`.
|
|
38
|
+
|
|
39
|
+
arco needs git and at least one coding agent installed and signed in. `arco doctor` checks
|
|
40
|
+
everything. It runs on Windows, macOS and Linux (x64 and arm64).
|
|
41
|
+
|
|
42
|
+
## Quick start
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
cd your-repo
|
|
46
|
+
arco # open the dashboard
|
|
47
|
+
arco new "fix the flaky auth test" # start an agent in a new worktree
|
|
48
|
+
arco new "add pagination" --agent codex --review # another agent reviews it when done
|
|
49
|
+
arco ls # every session, including ones arco didn't start
|
|
50
|
+
arco attach <id> # work in its terminal (Ctrl+] detaches)
|
|
51
|
+
arco conflicts # overlapping files and predicted merge conflicts
|
|
52
|
+
arco merge <id> # land the work
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Agents
|
|
56
|
+
|
|
57
|
+
| Agent | Command |
|
|
58
|
+
| --- | --- |
|
|
59
|
+
| Claude Code | `claude` |
|
|
60
|
+
| Codex | `codex` |
|
|
61
|
+
| OpenCode | `opencode` |
|
|
62
|
+
| Google Antigravity | `agy` |
|
|
63
|
+
| Grok Build | `grok` |
|
|
64
|
+
| fx (macOS, Linux) | `fx` |
|
|
65
|
+
|
|
66
|
+
`arco new --acp` runs an agent over the [Agent Client Protocol](https://agentclientprotocol.com)
|
|
67
|
+
instead of its terminal interface, so arco answers its permission prompts and knows its exact status.
|
|
68
|
+
|
|
69
|
+
## Commands
|
|
70
|
+
|
|
71
|
+
| Area | Commands |
|
|
72
|
+
| --- | --- |
|
|
73
|
+
| Sessions | `new` `ls` `attach` `open` `send` `stop` `resume` `adopt` `done` `rm` |
|
|
74
|
+
| Review and land | `diff` `conflicts` `review` `merge` `sync` `stack` `pr` `handoff` |
|
|
75
|
+
| Accounts and usage | `account` `switch` `usage` `settings` |
|
|
76
|
+
| Sub-agents and pipelines | `spawn` `wait` `result` `pull` `run` `pipelines` |
|
|
77
|
+
| Projects | `project` `init` `skills` `plugins` `hooks` |
|
|
78
|
+
| Maintenance | `doctor` `update` `daemon` |
|
|
79
|
+
|
|
80
|
+
`arco --help` lists every option. Commands are built for scripts and agents as much as for
|
|
81
|
+
people: `--json` prints one JSON document, stdout holds only the result, and exit codes are
|
|
82
|
+
0 (done), 1 (failed) and 2 (usage error).
|
|
83
|
+
|
|
84
|
+
## Configuration
|
|
85
|
+
|
|
86
|
+
A repository's `arco.toml` is shared with everyone who works on it:
|
|
87
|
+
|
|
88
|
+
```toml
|
|
89
|
+
[worktree]
|
|
90
|
+
copy = [".env"] # untracked files copied into each new worktree
|
|
91
|
+
setup = "bun install" # runs before the agent starts
|
|
92
|
+
|
|
93
|
+
[review]
|
|
94
|
+
agent = "auto" # a different provider reviews by default
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Pipelines (build, review, fix, land, best-of-N) live there too; `arco pipelines` lists them.
|
|
98
|
+
Personal settings are in `~/.arco/config.toml`, and `arco settings` picks the agent, model and
|
|
99
|
+
effort for each kind of task.
|
|
100
|
+
|
|
101
|
+
## Development
|
|
102
|
+
|
|
103
|
+
```sh
|
|
104
|
+
bun install
|
|
105
|
+
bun run arco # run from source
|
|
106
|
+
bun run test # end-to-end tests: real daemon, terminals and git
|
|
107
|
+
bun run build # single executable in dist/
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## License
|
|
111
|
+
|
|
112
|
+
[MIT](https://opensource.org/license/mit)
|
package/assets/arco.svg
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1148" height="212" viewBox="0 0 1148 212" role="img" aria-label="arco code">
|
|
2
|
+
<rect x="0.5" y="0.5" width="1147" height="211" rx="14" fill="#0d1117" stroke="#30363d"/>
|
|
3
|
+
<g shape-rendering="crispEdges">
|
|
4
|
+
<rect x="1024" y="28" width="36" height="12" fill="#d0d7de"/>
|
|
5
|
+
<rect x="1000" y="40" width="72" height="12" fill="#d0d7de"/>
|
|
6
|
+
<rect x="52" y="52" width="60" height="12" fill="#58a6ff"/>
|
|
7
|
+
<rect x="136" y="52" width="84" height="12" fill="#58a6ff"/>
|
|
8
|
+
<rect x="244" y="52" width="84" height="12" fill="#58a6ff"/>
|
|
9
|
+
<rect x="352" y="52" width="84" height="12" fill="#58a6ff"/>
|
|
10
|
+
<rect x="508" y="52" width="84" height="12" fill="#58a6ff"/>
|
|
11
|
+
<rect x="616" y="52" width="84" height="12" fill="#58a6ff"/>
|
|
12
|
+
<rect x="724" y="52" width="60" height="12" fill="#58a6ff"/>
|
|
13
|
+
<rect x="832" y="52" width="84" height="12" fill="#58a6ff"/>
|
|
14
|
+
<rect x="988" y="52" width="36" height="12" fill="#d0d7de"/>
|
|
15
|
+
<rect x="1024" y="52" width="24" height="12" fill="#8b949e"/>
|
|
16
|
+
<rect x="40" y="64" width="72" height="12" fill="#58a6ff"/>
|
|
17
|
+
<rect x="136" y="64" width="84" height="12" fill="#58a6ff"/>
|
|
18
|
+
<rect x="244" y="64" width="84" height="12" fill="#58a6ff"/>
|
|
19
|
+
<rect x="352" y="64" width="84" height="12" fill="#58a6ff"/>
|
|
20
|
+
<rect x="508" y="64" width="84" height="12" fill="#58a6ff"/>
|
|
21
|
+
<rect x="616" y="64" width="84" height="12" fill="#58a6ff"/>
|
|
22
|
+
<rect x="724" y="64" width="72" height="12" fill="#58a6ff"/>
|
|
23
|
+
<rect x="832" y="64" width="84" height="12" fill="#58a6ff"/>
|
|
24
|
+
<rect x="976" y="64" width="24" height="12" fill="#d0d7de"/>
|
|
25
|
+
<rect x="1000" y="64" width="24" height="12" fill="#8b949e"/>
|
|
26
|
+
<rect x="28" y="76" width="24" height="12" fill="#58a6ff"/>
|
|
27
|
+
<rect x="88" y="76" width="24" height="12" fill="#58a6ff"/>
|
|
28
|
+
<rect x="136" y="76" width="24" height="12" fill="#58a6ff"/>
|
|
29
|
+
<rect x="196" y="76" width="24" height="12" fill="#58a6ff"/>
|
|
30
|
+
<rect x="244" y="76" width="24" height="12" fill="#58a6ff"/>
|
|
31
|
+
<rect x="352" y="76" width="24" height="12" fill="#58a6ff"/>
|
|
32
|
+
<rect x="412" y="76" width="24" height="12" fill="#58a6ff"/>
|
|
33
|
+
<rect x="508" y="76" width="24" height="12" fill="#58a6ff"/>
|
|
34
|
+
<rect x="616" y="76" width="24" height="12" fill="#58a6ff"/>
|
|
35
|
+
<rect x="676" y="76" width="24" height="12" fill="#58a6ff"/>
|
|
36
|
+
<rect x="724" y="76" width="24" height="12" fill="#58a6ff"/>
|
|
37
|
+
<rect x="784" y="76" width="24" height="12" fill="#58a6ff"/>
|
|
38
|
+
<rect x="832" y="76" width="24" height="12" fill="#58a6ff"/>
|
|
39
|
+
<rect x="976" y="76" width="24" height="12" fill="#d0d7de"/>
|
|
40
|
+
<rect x="1000" y="76" width="12" height="12" fill="#8b949e"/>
|
|
41
|
+
<rect x="1012" y="76" width="12" height="12" fill="#b07a4a"/>
|
|
42
|
+
<rect x="1024" y="76" width="12" height="12" fill="#7d5332"/>
|
|
43
|
+
<rect x="28" y="88" width="24" height="12" fill="#58a6ff"/>
|
|
44
|
+
<rect x="88" y="88" width="24" height="12" fill="#58a6ff"/>
|
|
45
|
+
<rect x="136" y="88" width="24" height="12" fill="#58a6ff"/>
|
|
46
|
+
<rect x="196" y="88" width="24" height="12" fill="#58a6ff"/>
|
|
47
|
+
<rect x="244" y="88" width="24" height="12" fill="#58a6ff"/>
|
|
48
|
+
<rect x="352" y="88" width="24" height="12" fill="#58a6ff"/>
|
|
49
|
+
<rect x="412" y="88" width="24" height="12" fill="#58a6ff"/>
|
|
50
|
+
<rect x="508" y="88" width="24" height="12" fill="#58a6ff"/>
|
|
51
|
+
<rect x="616" y="88" width="24" height="12" fill="#58a6ff"/>
|
|
52
|
+
<rect x="676" y="88" width="24" height="12" fill="#58a6ff"/>
|
|
53
|
+
<rect x="724" y="88" width="24" height="12" fill="#58a6ff"/>
|
|
54
|
+
<rect x="784" y="88" width="24" height="12" fill="#58a6ff"/>
|
|
55
|
+
<rect x="832" y="88" width="72" height="12" fill="#58a6ff"/>
|
|
56
|
+
<rect x="964" y="88" width="24" height="12" fill="#d0d7de"/>
|
|
57
|
+
<rect x="988" y="88" width="12" height="12" fill="#8b949e"/>
|
|
58
|
+
<rect x="1012" y="88" width="24" height="12" fill="#b07a4a"/>
|
|
59
|
+
<rect x="1036" y="88" width="12" height="12" fill="#7d5332"/>
|
|
60
|
+
<rect x="28" y="100" width="84" height="12" fill="#58a6ff"/>
|
|
61
|
+
<rect x="136" y="100" width="72" height="12" fill="#58a6ff"/>
|
|
62
|
+
<rect x="244" y="100" width="24" height="12" fill="#58a6ff"/>
|
|
63
|
+
<rect x="352" y="100" width="24" height="12" fill="#58a6ff"/>
|
|
64
|
+
<rect x="412" y="100" width="24" height="12" fill="#58a6ff"/>
|
|
65
|
+
<rect x="508" y="100" width="24" height="12" fill="#58a6ff"/>
|
|
66
|
+
<rect x="616" y="100" width="24" height="12" fill="#58a6ff"/>
|
|
67
|
+
<rect x="676" y="100" width="24" height="12" fill="#58a6ff"/>
|
|
68
|
+
<rect x="724" y="100" width="24" height="12" fill="#58a6ff"/>
|
|
69
|
+
<rect x="784" y="100" width="24" height="12" fill="#58a6ff"/>
|
|
70
|
+
<rect x="832" y="100" width="72" height="12" fill="#58a6ff"/>
|
|
71
|
+
<rect x="964" y="100" width="24" height="12" fill="#d0d7de"/>
|
|
72
|
+
<rect x="988" y="100" width="12" height="12" fill="#8b949e"/>
|
|
73
|
+
<rect x="1024" y="100" width="24" height="12" fill="#b07a4a"/>
|
|
74
|
+
<rect x="1048" y="100" width="12" height="12" fill="#7d5332"/>
|
|
75
|
+
<rect x="28" y="112" width="84" height="12" fill="#58a6ff"/>
|
|
76
|
+
<rect x="136" y="112" width="24" height="12" fill="#58a6ff"/>
|
|
77
|
+
<rect x="172" y="112" width="24" height="12" fill="#58a6ff"/>
|
|
78
|
+
<rect x="244" y="112" width="24" height="12" fill="#58a6ff"/>
|
|
79
|
+
<rect x="352" y="112" width="24" height="12" fill="#58a6ff"/>
|
|
80
|
+
<rect x="412" y="112" width="24" height="12" fill="#58a6ff"/>
|
|
81
|
+
<rect x="508" y="112" width="24" height="12" fill="#58a6ff"/>
|
|
82
|
+
<rect x="616" y="112" width="24" height="12" fill="#58a6ff"/>
|
|
83
|
+
<rect x="676" y="112" width="24" height="12" fill="#58a6ff"/>
|
|
84
|
+
<rect x="724" y="112" width="24" height="12" fill="#58a6ff"/>
|
|
85
|
+
<rect x="784" y="112" width="24" height="12" fill="#58a6ff"/>
|
|
86
|
+
<rect x="832" y="112" width="24" height="12" fill="#58a6ff"/>
|
|
87
|
+
<rect x="964" y="112" width="24" height="12" fill="#d0d7de"/>
|
|
88
|
+
<rect x="1036" y="112" width="24" height="12" fill="#b07a4a"/>
|
|
89
|
+
<rect x="1060" y="112" width="12" height="12" fill="#7d5332"/>
|
|
90
|
+
<rect x="28" y="124" width="24" height="12" fill="#58a6ff"/>
|
|
91
|
+
<rect x="88" y="124" width="24" height="12" fill="#58a6ff"/>
|
|
92
|
+
<rect x="136" y="124" width="24" height="12" fill="#58a6ff"/>
|
|
93
|
+
<rect x="184" y="124" width="24" height="12" fill="#58a6ff"/>
|
|
94
|
+
<rect x="244" y="124" width="84" height="12" fill="#58a6ff"/>
|
|
95
|
+
<rect x="352" y="124" width="84" height="12" fill="#58a6ff"/>
|
|
96
|
+
<rect x="508" y="124" width="84" height="12" fill="#58a6ff"/>
|
|
97
|
+
<rect x="616" y="124" width="84" height="12" fill="#58a6ff"/>
|
|
98
|
+
<rect x="724" y="124" width="72" height="12" fill="#58a6ff"/>
|
|
99
|
+
<rect x="832" y="124" width="84" height="12" fill="#58a6ff"/>
|
|
100
|
+
<rect x="976" y="124" width="12" height="12" fill="#d0d7de"/>
|
|
101
|
+
<rect x="1048" y="124" width="24" height="12" fill="#b07a4a"/>
|
|
102
|
+
<rect x="1072" y="124" width="12" height="12" fill="#7d5332"/>
|
|
103
|
+
<rect x="28" y="136" width="24" height="12" fill="#58a6ff"/>
|
|
104
|
+
<rect x="88" y="136" width="24" height="12" fill="#58a6ff"/>
|
|
105
|
+
<rect x="136" y="136" width="24" height="12" fill="#58a6ff"/>
|
|
106
|
+
<rect x="196" y="136" width="24" height="12" fill="#58a6ff"/>
|
|
107
|
+
<rect x="244" y="136" width="84" height="12" fill="#58a6ff"/>
|
|
108
|
+
<rect x="352" y="136" width="84" height="12" fill="#58a6ff"/>
|
|
109
|
+
<rect x="508" y="136" width="84" height="12" fill="#58a6ff"/>
|
|
110
|
+
<rect x="616" y="136" width="84" height="12" fill="#58a6ff"/>
|
|
111
|
+
<rect x="724" y="136" width="60" height="12" fill="#58a6ff"/>
|
|
112
|
+
<rect x="832" y="136" width="84" height="12" fill="#58a6ff"/>
|
|
113
|
+
<rect x="1060" y="136" width="24" height="12" fill="#b07a4a"/>
|
|
114
|
+
<rect x="1084" y="136" width="12" height="12" fill="#7d5332"/>
|
|
115
|
+
<rect x="1072" y="148" width="24" height="12" fill="#b07a4a"/>
|
|
116
|
+
<rect x="1096" y="148" width="12" height="12" fill="#7d5332"/>
|
|
117
|
+
<rect x="1084" y="160" width="24" height="12" fill="#b07a4a"/>
|
|
118
|
+
<rect x="1108" y="160" width="12" height="12" fill="#7d5332"/>
|
|
119
|
+
<rect x="1096" y="172" width="12" height="12" fill="#b07a4a"/>
|
|
120
|
+
</g>
|
|
121
|
+
</svg>
|
package/bin/arco.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// The `arco` command npm installs: runs the arco executable for this machine, from the platform
|
|
3
|
+
// package npm installed beside this one as an optional dependency.
|
|
4
|
+
"use strict"
|
|
5
|
+
const { spawn } = require("node:child_process")
|
|
6
|
+
const fs = require("node:fs")
|
|
7
|
+
|
|
8
|
+
const PACKAGE = "arcocode"
|
|
9
|
+
const SCOPE = "@arcocode"
|
|
10
|
+
|
|
11
|
+
function isMusl() {
|
|
12
|
+
if (process.platform !== "linux") return false
|
|
13
|
+
try {
|
|
14
|
+
const report = process.report && process.report.getReport()
|
|
15
|
+
if (report && report.header) return !report.header.glibcVersionRuntime
|
|
16
|
+
} catch {}
|
|
17
|
+
return fs.existsSync("/etc/alpine-release")
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function findExecutable() {
|
|
21
|
+
if (process.env.ARCO_BINARY) return process.env.ARCO_BINARY
|
|
22
|
+
const name = `${SCOPE}/${process.platform}-${process.arch}${isMusl() ? "-musl" : ""}`
|
|
23
|
+
try {
|
|
24
|
+
return require.resolve(`${name}/bin/${process.platform === "win32" ? "arco.exe" : "arco"}`)
|
|
25
|
+
} catch {
|
|
26
|
+
return null
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const exe = findExecutable()
|
|
31
|
+
if (!exe) {
|
|
32
|
+
console.error(`arco: there is no arco executable for ${process.platform}-${process.arch}${isMusl() ? " (musl)" : ""} in this install.`)
|
|
33
|
+
console.error(`It comes in an optional dependency of ${PACKAGE}: reinstall without --omit=optional or --no-optional.`)
|
|
34
|
+
process.exit(1)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const child = spawn(exe, process.argv.slice(2), { stdio: "inherit" })
|
|
38
|
+
// Ctrl+C reaches the executable from the terminal itself; waiting for it keeps its last output
|
|
39
|
+
// before the prompt. Signals sent to this process alone are passed on.
|
|
40
|
+
process.on("SIGINT", () => {})
|
|
41
|
+
for (const sig of ["SIGTERM", "SIGHUP"]) {
|
|
42
|
+
process.on(sig, () => {
|
|
43
|
+
try {
|
|
44
|
+
child.kill(sig)
|
|
45
|
+
} catch {}
|
|
46
|
+
})
|
|
47
|
+
}
|
|
48
|
+
child.on("error", (e) => {
|
|
49
|
+
console.error(`arco: could not run ${exe}: ${e.message}`)
|
|
50
|
+
process.exit(1)
|
|
51
|
+
})
|
|
52
|
+
child.on("exit", (code, signal) => {
|
|
53
|
+
if (signal && process.platform !== "win32") {
|
|
54
|
+
process.removeAllListeners(signal)
|
|
55
|
+
process.kill(process.pid, signal)
|
|
56
|
+
} else process.exit(code === null ? 1 : code)
|
|
57
|
+
})
|
package/install.ps1
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Install arco without Node: downloads the arco executable for this machine from the npm registry
|
|
2
|
+
# (package @arcocode/win32-<arch>), checks it against the registry's checksum, and puts it in
|
|
3
|
+
# ~\.local\bin (or $env:ARCO_INSTALL_DIR). PATH isn't changed; the command to add it is printed.
|
|
4
|
+
# irm https://cdn.jsdelivr.net/npm/arcocode/install.ps1 | iex
|
|
5
|
+
# & ([scriptblock]::Create((irm https://cdn.jsdelivr.net/npm/arcocode/install.ps1))) next (or a version)
|
|
6
|
+
param([string]$Version = "latest")
|
|
7
|
+
$ErrorActionPreference = "Stop"
|
|
8
|
+
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12
|
|
9
|
+
|
|
10
|
+
$scope = "@arcocode"
|
|
11
|
+
$registry = if ($env:NPM_CONFIG_REGISTRY) { $env:NPM_CONFIG_REGISTRY.TrimEnd("/") } else { "https://registry.npmjs.org" }
|
|
12
|
+
$arch = if ($env:PROCESSOR_ARCHITEW6432) { $env:PROCESSOR_ARCHITEW6432 } else { $env:PROCESSOR_ARCHITECTURE }
|
|
13
|
+
$cpu = switch ($arch) { "AMD64" { "x64" } "ARM64" { "arm64" } default { throw "arco install: unsupported CPU $arch" } }
|
|
14
|
+
$pkg = "$scope/win32-$cpu"
|
|
15
|
+
|
|
16
|
+
$meta = Invoke-RestMethod -UseBasicParsing "$registry/$pkg/$Version"
|
|
17
|
+
if (-not $meta.dist.tarball) { throw "arco install: $pkg $Version isn't in $registry" }
|
|
18
|
+
$tmp = Join-Path ([IO.Path]::GetTempPath()) ("arco-" + [Guid]::NewGuid())
|
|
19
|
+
New-Item -ItemType Directory $tmp | Out-Null
|
|
20
|
+
try {
|
|
21
|
+
$tgz = Join-Path $tmp "pkg.tgz"
|
|
22
|
+
Invoke-WebRequest -UseBasicParsing $meta.dist.tarball -OutFile $tgz
|
|
23
|
+
$sha = [Security.Cryptography.SHA512]::Create()
|
|
24
|
+
$actual = "sha512-" + [Convert]::ToBase64String($sha.ComputeHash([IO.File]::ReadAllBytes($tgz)))
|
|
25
|
+
if ($actual -ne $meta.dist.integrity) { throw "arco install: the download doesn't match the registry's checksum" }
|
|
26
|
+
# tar.exe ships with Windows 10 1803 and later.
|
|
27
|
+
tar -xzf $tgz -C $tmp package/bin/arco.exe
|
|
28
|
+
if ($LASTEXITCODE -ne 0) { throw "arco install: couldn't unpack $tgz" }
|
|
29
|
+
|
|
30
|
+
$dir = if ($env:ARCO_INSTALL_DIR) { $env:ARCO_INSTALL_DIR } else { Join-Path $HOME ".local\bin" }
|
|
31
|
+
New-Item -ItemType Directory -Force $dir | Out-Null
|
|
32
|
+
$target = Join-Path $dir "arco.exe"
|
|
33
|
+
# A running arco.exe (the daemon of an older install) can't be replaced, but it can be renamed aside.
|
|
34
|
+
Get-ChildItem $dir -Filter "arco.exe.old.*" | ForEach-Object { Remove-Item $_.FullName -ErrorAction SilentlyContinue }
|
|
35
|
+
if (Test-Path $target) {
|
|
36
|
+
try { Remove-Item $target } catch { Rename-Item $target ("arco.exe.old." + [DateTimeOffset]::Now.ToUnixTimeMilliseconds()) }
|
|
37
|
+
}
|
|
38
|
+
Move-Item (Join-Path $tmp "package\bin\arco.exe") $target
|
|
39
|
+
Write-Host "installed arco $($meta.version) to $target"
|
|
40
|
+
|
|
41
|
+
$userPath = [Environment]::GetEnvironmentVariable("Path", "User")
|
|
42
|
+
$onPath = ($env:Path + ";" + $userPath).Split(";") | Where-Object { $_ -and ($_.TrimEnd("\") -ieq $dir.TrimEnd("\")) }
|
|
43
|
+
if (-not $onPath) {
|
|
44
|
+
Write-Host ""
|
|
45
|
+
Write-Host "$dir is not on your PATH. To add it:"
|
|
46
|
+
Write-Host " [Environment]::SetEnvironmentVariable(`"Path`", [Environment]::GetEnvironmentVariable(`"Path`", `"User`") + `";$dir`", `"User`")"
|
|
47
|
+
Write-Host " then open a new terminal."
|
|
48
|
+
}
|
|
49
|
+
Write-Host "Next: arco doctor"
|
|
50
|
+
} finally {
|
|
51
|
+
Remove-Item -Recurse -Force $tmp -ErrorAction SilentlyContinue
|
|
52
|
+
}
|
package/install.sh
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# Install arco without Node: downloads the arco executable for this machine from the npm registry
|
|
3
|
+
# (package @arcocode/<platform>-<arch>), checks it against the registry's checksum, and puts it in
|
|
4
|
+
# ~/.local/bin (or $ARCO_INSTALL_DIR). PATH isn't changed; the command to add it is printed.
|
|
5
|
+
# curl -fsSL https://cdn.jsdelivr.net/npm/arcocode/install.sh | sh
|
|
6
|
+
# curl -fsSL https://cdn.jsdelivr.net/npm/arcocode/install.sh | sh -s -- next (or a version)
|
|
7
|
+
set -eu
|
|
8
|
+
|
|
9
|
+
SCOPE=@arcocode
|
|
10
|
+
REGISTRY=${NPM_CONFIG_REGISTRY:-https://registry.npmjs.org}
|
|
11
|
+
REGISTRY=${REGISTRY%/}
|
|
12
|
+
VERSION=${1:-latest}
|
|
13
|
+
DIR=${ARCO_INSTALL_DIR:-$HOME/.local/bin}
|
|
14
|
+
|
|
15
|
+
fail() {
|
|
16
|
+
echo "arco install: $*" >&2
|
|
17
|
+
exit 1
|
|
18
|
+
}
|
|
19
|
+
for tool in curl tar od; do command -v "$tool" >/dev/null 2>&1 || fail "needs $tool"; done
|
|
20
|
+
|
|
21
|
+
case $(uname -s) in
|
|
22
|
+
Darwin) platform=darwin ;;
|
|
23
|
+
Linux) platform=linux ;;
|
|
24
|
+
*) fail "unsupported system $(uname -s) (on Windows: irm https://cdn.jsdelivr.net/npm/arcocode/install.ps1 | iex)" ;;
|
|
25
|
+
esac
|
|
26
|
+
case $(uname -m) in
|
|
27
|
+
x86_64 | amd64) cpu=x64 ;;
|
|
28
|
+
arm64 | aarch64) cpu=arm64 ;;
|
|
29
|
+
*) fail "unsupported CPU $(uname -m)" ;;
|
|
30
|
+
esac
|
|
31
|
+
# A shell running under Rosetta on an Apple Silicon Mac still gets the native build.
|
|
32
|
+
if [ "$platform" = darwin ] && [ "$cpu" = x64 ] && [ "$(sysctl -n sysctl.proc_translated 2>/dev/null || echo 0)" = 1 ]; then cpu=arm64; fi
|
|
33
|
+
libc=
|
|
34
|
+
if [ "$platform" = linux ] && { [ -f /etc/alpine-release ] || (ldd --version 2>&1 || true) | grep -qi musl; }; then libc=-musl; fi
|
|
35
|
+
pkg=$SCOPE/$platform-$cpu$libc
|
|
36
|
+
|
|
37
|
+
meta=$(curl -fsSL "$REGISTRY/$pkg/$VERSION") || fail "$pkg $VERSION isn't in $REGISTRY"
|
|
38
|
+
field() { printf '%s' "$meta" | tr ',{}' '\n\n\n' | sed -n "s/^ *\"$1\" *: *\"\([^\"]*\)\".*/\1/p" | head -n 1; }
|
|
39
|
+
version=$(field version)
|
|
40
|
+
tarball=$(field tarball)
|
|
41
|
+
integrity=$(field integrity)
|
|
42
|
+
[ -n "$tarball" ] && [ -n "$integrity" ] || fail "the registry's record for $pkg $VERSION has no download"
|
|
43
|
+
|
|
44
|
+
tmp=$(mktemp -d)
|
|
45
|
+
trap 'rm -rf "$tmp"' EXIT INT TERM
|
|
46
|
+
curl -fsSL "$tarball" -o "$tmp/pkg.tgz" || fail "download failed: $tarball"
|
|
47
|
+
|
|
48
|
+
# The registry's integrity is sha512 in base64; compare it in hex.
|
|
49
|
+
expected=$(printf '%s' "${integrity#sha512-}" | { base64 -d 2>/dev/null || base64 -D; } | od -An -v -tx1 | tr -d ' \n')
|
|
50
|
+
if command -v sha512sum >/dev/null 2>&1; then actual=$(sha512sum "$tmp/pkg.tgz" | cut -d ' ' -f 1)
|
|
51
|
+
elif command -v shasum >/dev/null 2>&1; then actual=$(shasum -a 512 "$tmp/pkg.tgz" | cut -d ' ' -f 1)
|
|
52
|
+
else fail "needs sha512sum or shasum to check the download"; fi
|
|
53
|
+
[ "$actual" = "$expected" ] || fail "the download doesn't match the registry's checksum"
|
|
54
|
+
|
|
55
|
+
tar -xzf "$tmp/pkg.tgz" -C "$tmp" package/bin/arco
|
|
56
|
+
mkdir -p "$DIR"
|
|
57
|
+
chmod 755 "$tmp/package/bin/arco"
|
|
58
|
+
mv -f "$tmp/package/bin/arco" "$DIR/arco.new"
|
|
59
|
+
mv -f "$DIR/arco.new" "$DIR/arco"
|
|
60
|
+
echo "installed arco $version to $DIR/arco"
|
|
61
|
+
|
|
62
|
+
case ":$PATH:" in
|
|
63
|
+
*":$DIR:"*) ;;
|
|
64
|
+
*)
|
|
65
|
+
echo
|
|
66
|
+
echo "$DIR is not on your PATH. To add it:"
|
|
67
|
+
echo " echo 'export PATH=\"$DIR:\$PATH\"' >> ~/.profile (or your shell's rc file), then open a new terminal."
|
|
68
|
+
;;
|
|
69
|
+
esac
|
|
70
|
+
echo "Next: arco doctor"
|
package/package.json
CHANGED
|
@@ -1,6 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arcocode",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Run Claude Code, Codex, OpenCode and other coding agents in parallel, one git worktree each, from one terminal dashboard.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"coding-agents",
|
|
7
|
+
"claude-code",
|
|
8
|
+
"codex",
|
|
9
|
+
"opencode",
|
|
10
|
+
"git-worktree",
|
|
11
|
+
"terminal",
|
|
12
|
+
"tui",
|
|
13
|
+
"cli"
|
|
14
|
+
],
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"bin": {
|
|
17
|
+
"arco": "bin/arco.js"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"bin/",
|
|
21
|
+
"assets/",
|
|
22
|
+
"install.sh",
|
|
23
|
+
"install.ps1"
|
|
24
|
+
],
|
|
25
|
+
"engines": {
|
|
26
|
+
"node": ">=18"
|
|
27
|
+
},
|
|
28
|
+
"optionalDependencies": {
|
|
29
|
+
"@arcocode/win32-x64": "0.1.0",
|
|
30
|
+
"@arcocode/win32-arm64": "0.1.0",
|
|
31
|
+
"@arcocode/darwin-arm64": "0.1.0",
|
|
32
|
+
"@arcocode/darwin-x64": "0.1.0",
|
|
33
|
+
"@arcocode/linux-x64": "0.1.0",
|
|
34
|
+
"@arcocode/linux-arm64": "0.1.0",
|
|
35
|
+
"@arcocode/linux-x64-musl": "0.1.0",
|
|
36
|
+
"@arcocode/linux-arm64-musl": "0.1.0"
|
|
37
|
+
}
|
|
38
|
+
}
|