@xuanwo/xurl 0.0.24 → 0.0.26-darwin-x64
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 +66 -49
- package/package.json +10 -16
- package/vendor/x86_64-apple-darwin/xurl/xurl +0 -0
- package/bin/xurl.js +0 -141
package/README.md
CHANGED
|
@@ -1,66 +1,90 @@
|
|
|
1
1
|
# xURL
|
|
2
2
|
|
|
3
|
-
`xURL` is a
|
|
3
|
+
`xURL` is a CLI that reads, queries, and writes AI agent conversations through a unified `agents://` URI scheme.
|
|
4
4
|
|
|
5
5
|
> Also known as **Xuanwo's URL**.
|
|
6
6
|
|
|
7
7
|
## What xURL Can Do
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
- Query recent threads and keyword matches for a provider.
|
|
11
|
-
- Query conversations by local path across providers.
|
|
12
|
-
- Query role-scoped threads with `agents://<provider>/<role>`.
|
|
13
|
-
- Discover subagent/branch navigation targets.
|
|
14
|
-
- Start a new conversation with agents.
|
|
15
|
-
- Continue an existing conversation with follow-up prompts.
|
|
9
|
+
xURL gives you one URI scheme (`agents://`) to **read**, **query**, **discover**, and **write** conversations across multiple AI agent CLIs.
|
|
16
10
|
|
|
17
|
-
|
|
11
|
+
- **Read** a conversation as markdown — `xurl agents://codex/<id>`
|
|
12
|
+
- **Query** threads by provider, keyword, local path, or role — `xurl 'agents://codex?q=refactor'`
|
|
13
|
+
- **Discover** child targets and metadata before drilling down — `xurl -I agents://codex/<id>`
|
|
14
|
+
- **Write** to start or continue a conversation — `xurl agents://codex -d "hello"`
|
|
15
|
+
|
|
16
|
+
## Providers
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
<table>
|
|
19
|
+
<tr>
|
|
20
|
+
<td align="center"><img src="https://ampcode.com/amp-mark-color.svg" alt="Amp" width="36" height="36" /><br /><code>agents://amp</code></td>
|
|
21
|
+
<td align="center"><img src="https://cdn.simpleicons.org/claude" alt="Claude" width="36" height="36" /><br /><code>agents://claude</code></td>
|
|
22
|
+
<td align="center"><img src="https://avatars.githubusercontent.com/u/14957082?s=200&v=4" alt="Codex" width="36" height="36" /><br /><code>agents://codex</code></td>
|
|
23
|
+
<td align="center"><img src="https://cdn.simpleicons.org/githubcopilot" alt="GitHub Copilot" width="36" height="36" /><br /><code>agents://copilot</code></td>
|
|
24
|
+
<td align="center"><img src="https://www.cursor.com/favicon.ico" alt="Cursor" width="36" height="36" /><br /><code>agents://cursor</code></td>
|
|
25
|
+
</tr>
|
|
26
|
+
<tr>
|
|
27
|
+
<td align="center"><img src="https://cdn.simpleicons.org/googlegemini" alt="Gemini" width="36" height="36" /><br /><code>agents://gemini</code></td>
|
|
28
|
+
<td align="center"><img src="https://avatars.githubusercontent.com/u/129152888?s=200&v=4" alt="Kimi" width="36" height="36" /><br /><code>agents://kimi</code></td>
|
|
29
|
+
<td align="center"><img src="https://avatars.githubusercontent.com/u/208539476?s=200&v=4" alt="OpenCode" width="36" height="36" /><br /><code>agents://opencode</code></td>
|
|
30
|
+
<td align="center"><img src=".github/assets/pi-logo-dark.svg" alt="Pi" width="36" height="36" /><br /><code>agents://pi</code></td>
|
|
31
|
+
</tr>
|
|
32
|
+
</table>
|
|
33
|
+
|
|
34
|
+
## Installation
|
|
35
|
+
|
|
36
|
+
Install as an agent skill:
|
|
20
37
|
|
|
21
38
|
```bash
|
|
22
39
|
npx skills add Xuanwo/xurl
|
|
23
40
|
```
|
|
24
41
|
|
|
25
|
-
|
|
42
|
+
Or install the standalone CLI:
|
|
26
43
|
|
|
27
|
-
```
|
|
28
|
-
|
|
44
|
+
```bash
|
|
45
|
+
brew tap xuanwo/tap && brew install xurl # Homebrew
|
|
46
|
+
cargo install xurl-cli # Cargo
|
|
47
|
+
uv tool install xuanwo-xurl # Python / uv
|
|
48
|
+
npm install -g @xuanwo/xurl # npm
|
|
29
49
|
```
|
|
30
50
|
|
|
31
|
-
##
|
|
51
|
+
## Quick Start
|
|
52
|
+
|
|
53
|
+
Ask your agent to summarize a thread:
|
|
32
54
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
| <img src="https://avatars.githubusercontent.com/u/14957082?s=24&v=4" alt="Codex logo" width="16" height="16" /> Codex | Yes | Yes | Yes |
|
|
37
|
-
| <img src="https://www.anthropic.com/favicon.ico" alt="Claude logo" width="16" height="16" /> Claude | Yes | Yes | Yes |
|
|
38
|
-
| <img src="https://www.google.com/favicon.ico" alt="Gemini logo" width="16" height="16" /> Gemini | Yes | Yes | No |
|
|
39
|
-
| <img src=".github/assets/pi-logo-dark.svg" alt="Pi logo" width="16" height="16" /> Pi | Yes | Yes | No |
|
|
40
|
-
| <img src="https://opencode.ai/favicon.ico" alt="OpenCode logo" width="16" height="16" /> OpenCode | Yes | Yes | Yes |
|
|
55
|
+
```text
|
|
56
|
+
Please summarize this thread: agents://codex/xxx_thread
|
|
57
|
+
```
|
|
41
58
|
|
|
42
59
|
## Usage
|
|
43
60
|
|
|
44
|
-
|
|
61
|
+
> **Note:** The `agents://` scheme prefix is optional — `codex/...` is equivalent to `agents://codex/...`.
|
|
62
|
+
|
|
63
|
+
### Read
|
|
45
64
|
|
|
46
65
|
```bash
|
|
47
66
|
xurl agents://codex/019c871c-b1f9-7f60-9c4f-87ed09f13592
|
|
48
|
-
|
|
49
|
-
xurl codex/019c871c-b1f9-7f60-9c4f-87ed09f13592
|
|
67
|
+
xurl agents://copilot/688628a1-407a-4b4e-b24a-1a250ebf864f
|
|
50
68
|
```
|
|
51
69
|
|
|
52
|
-
|
|
70
|
+
Save output to a file:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
xurl -o /tmp/conversation.md agents://codex/019c871c-b1f9-7f60-9c4f-87ed09f13592
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Query
|
|
77
|
+
|
|
78
|
+
By provider:
|
|
53
79
|
|
|
54
80
|
```bash
|
|
55
81
|
xurl agents://codex
|
|
56
82
|
xurl 'agents://codex?q=spawn_agent'
|
|
57
83
|
xurl 'agents://claude?q=agent&limit=5'
|
|
58
|
-
|
|
59
|
-
xurl codex
|
|
60
|
-
xurl 'codex?q=spawn_agent'
|
|
84
|
+
xurl 'agents://copilot?q=resume&limit=5'
|
|
61
85
|
```
|
|
62
86
|
|
|
63
|
-
|
|
87
|
+
By local path:
|
|
64
88
|
|
|
65
89
|
```bash
|
|
66
90
|
xurl agents:///Users/alice/work/xurl
|
|
@@ -69,23 +93,21 @@ xurl 'agents://.?q=refactor&providers=codex,claude'
|
|
|
69
93
|
xurl 'agents://~/work/xurl?providers=opencode'
|
|
70
94
|
```
|
|
71
95
|
|
|
72
|
-
|
|
96
|
+
By role:
|
|
73
97
|
|
|
74
98
|
```bash
|
|
75
99
|
xurl agents://codex/reviewer
|
|
76
|
-
# equivalent shorthand:
|
|
77
|
-
xurl codex/reviewer
|
|
78
100
|
```
|
|
79
101
|
|
|
80
|
-
Query results include
|
|
102
|
+
Query results include reduced thread metadata when available, so you can inspect fields like `payload.git.branch` without opening each thread individually.
|
|
81
103
|
|
|
82
|
-
Discover
|
|
104
|
+
### Discover
|
|
83
105
|
|
|
84
106
|
```bash
|
|
85
107
|
xurl -I agents://codex/019c871c-b1f9-7f60-9c4f-87ed09f13592
|
|
86
108
|
```
|
|
87
109
|
|
|
88
|
-
Frontmatter includes
|
|
110
|
+
Frontmatter includes provider metadata flattened into readable key-value lines (e.g. `payload.git.branch = ...`), and skips oversized instruction-like fields.
|
|
89
111
|
|
|
90
112
|
Drill down into a discovered child target:
|
|
91
113
|
|
|
@@ -93,18 +115,19 @@ Drill down into a discovered child target:
|
|
|
93
115
|
xurl agents://codex/019c871c-b1f9-7f60-9c4f-87ed09f13592/019c87fb-38b9-7843-92b1-832f02598495
|
|
94
116
|
```
|
|
95
117
|
|
|
96
|
-
|
|
118
|
+
### Write
|
|
119
|
+
|
|
120
|
+
Start a new conversation:
|
|
97
121
|
|
|
98
122
|
```bash
|
|
99
123
|
xurl agents://codex -d "Draft a migration plan"
|
|
100
|
-
# equivalent shorthand:
|
|
101
|
-
xurl codex -d "Draft a migration plan"
|
|
102
124
|
```
|
|
103
125
|
|
|
104
|
-
Start a
|
|
126
|
+
Start with a role URI:
|
|
105
127
|
|
|
106
128
|
```bash
|
|
107
129
|
xurl agents://codex/reviewer -d "Review this patch"
|
|
130
|
+
xurl agents://copilot/research -d "Investigate the failing integration test"
|
|
108
131
|
```
|
|
109
132
|
|
|
110
133
|
Continue an existing conversation:
|
|
@@ -113,18 +136,12 @@ Continue an existing conversation:
|
|
|
113
136
|
xurl agents://codex/019c871c-b1f9-7f60-9c4f-87ed09f13592 -d "Continue"
|
|
114
137
|
```
|
|
115
138
|
|
|
116
|
-
|
|
139
|
+
Pass extra parameters to the provider CLI via query string:
|
|
117
140
|
|
|
118
141
|
```bash
|
|
119
142
|
xurl "agents://codex?cd=%2FUsers%2Falice%2Frepo&add-dir=%2FUsers%2Falice%2Fshared&model=gpt-5" -d "Review this patch"
|
|
120
143
|
```
|
|
121
144
|
|
|
122
|
-
Save output:
|
|
123
|
-
|
|
124
|
-
```bash
|
|
125
|
-
xurl -o /tmp/conversation.md agents://codex/019c871c-b1f9-7f60-9c4f-87ed09f13592
|
|
126
|
-
```
|
|
127
|
-
|
|
128
145
|
## Command Reference
|
|
129
146
|
|
|
130
147
|
```bash
|
|
@@ -150,7 +167,7 @@ xurl [OPTIONS] <URI>
|
|
|
150
167
|
```
|
|
151
168
|
|
|
152
169
|
- `scheme`: optional `agents://` prefix. If omitted, `xurl` treats input as an `agents` URI shorthand.
|
|
153
|
-
- `provider`: target provider name, such as `
|
|
170
|
+
- `provider`: target provider name, such as `amp`, `claude`, `codex`, `copilot`, `cursor`, `gemini`, `kimi`, `opencode`, `pi`.
|
|
154
171
|
- `token`: main conversation identifier or role name.
|
|
155
172
|
- `child_id`: child/subagent identifier under a main conversation.
|
|
156
173
|
- `query`: optional key-value parameters, interpreted by context.
|
|
@@ -187,7 +204,7 @@ Examples:
|
|
|
187
204
|
agents://codex?q=spawn_agent&limit=10
|
|
188
205
|
agents:///Users/alice/work/xurl?q=refactor&providers=codex,claude
|
|
189
206
|
agents://.?q=refactor&providers=codex
|
|
190
|
-
agents://codex
|
|
207
|
+
agents://codex/<conversation_id>
|
|
191
208
|
agents://codex/reviewer
|
|
192
209
|
agents://codex?cd=%2FUsers%2Falice%2Frepo&add-dir=%2FUsers%2Falice%2Fshared
|
|
193
210
|
```
|
package/package.json
CHANGED
|
@@ -1,27 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xuanwo/xurl",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.26-darwin-x64",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
},
|
|
5
|
+
"os": [
|
|
6
|
+
"darwin"
|
|
7
|
+
],
|
|
8
|
+
"cpu": [
|
|
9
|
+
"x64"
|
|
10
|
+
],
|
|
12
11
|
"files": [
|
|
13
|
-
"
|
|
12
|
+
"vendor"
|
|
14
13
|
],
|
|
15
14
|
"repository": {
|
|
16
15
|
"type": "git",
|
|
17
16
|
"url": "git+https://github.com/Xuanwo/xurl.git"
|
|
18
17
|
},
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"@xuanwo/xurl-linux-arm64": "npm:@xuanwo/xurl@0.0.24-linux-arm64",
|
|
22
|
-
"@xuanwo/xurl-darwin-x64": "npm:@xuanwo/xurl@0.0.24-darwin-x64",
|
|
23
|
-
"@xuanwo/xurl-darwin-arm64": "npm:@xuanwo/xurl@0.0.24-darwin-arm64",
|
|
24
|
-
"@xuanwo/xurl-win32-x64": "npm:@xuanwo/xurl@0.0.24-win32-x64",
|
|
25
|
-
"@xuanwo/xurl-win32-arm64": "npm:@xuanwo/xurl@0.0.24-win32-arm64"
|
|
18
|
+
"engines": {
|
|
19
|
+
"node": ">=16"
|
|
26
20
|
}
|
|
27
21
|
}
|
|
Binary file
|
package/bin/xurl.js
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// Unified entry point for the xurl CLI.
|
|
3
|
-
|
|
4
|
-
import { spawn } from "node:child_process";
|
|
5
|
-
import { existsSync } from "node:fs";
|
|
6
|
-
import { createRequire } from "node:module";
|
|
7
|
-
import path from "node:path";
|
|
8
|
-
import { fileURLToPath } from "node:url";
|
|
9
|
-
|
|
10
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
11
|
-
const __dirname = path.dirname(__filename);
|
|
12
|
-
const require = createRequire(import.meta.url);
|
|
13
|
-
|
|
14
|
-
const PLATFORM_PACKAGE_BY_TARGET = {
|
|
15
|
-
"x86_64-unknown-linux-gnu": "@xuanwo/xurl-linux-x64",
|
|
16
|
-
"aarch64-unknown-linux-gnu": "@xuanwo/xurl-linux-arm64",
|
|
17
|
-
"x86_64-apple-darwin": "@xuanwo/xurl-darwin-x64",
|
|
18
|
-
"aarch64-apple-darwin": "@xuanwo/xurl-darwin-arm64",
|
|
19
|
-
"x86_64-pc-windows-msvc": "@xuanwo/xurl-win32-x64",
|
|
20
|
-
"aarch64-pc-windows-msvc": "@xuanwo/xurl-win32-arm64",
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
function detectTargetTriple(platformName, archName) {
|
|
24
|
-
switch (platformName) {
|
|
25
|
-
case "linux":
|
|
26
|
-
if (archName === "x64") {
|
|
27
|
-
return "x86_64-unknown-linux-gnu";
|
|
28
|
-
}
|
|
29
|
-
if (archName === "arm64") {
|
|
30
|
-
return "aarch64-unknown-linux-gnu";
|
|
31
|
-
}
|
|
32
|
-
break;
|
|
33
|
-
case "darwin":
|
|
34
|
-
if (archName === "x64") {
|
|
35
|
-
return "x86_64-apple-darwin";
|
|
36
|
-
}
|
|
37
|
-
if (archName === "arm64") {
|
|
38
|
-
return "aarch64-apple-darwin";
|
|
39
|
-
}
|
|
40
|
-
break;
|
|
41
|
-
case "win32":
|
|
42
|
-
if (archName === "x64") {
|
|
43
|
-
return "x86_64-pc-windows-msvc";
|
|
44
|
-
}
|
|
45
|
-
if (archName === "arm64") {
|
|
46
|
-
return "aarch64-pc-windows-msvc";
|
|
47
|
-
}
|
|
48
|
-
break;
|
|
49
|
-
default:
|
|
50
|
-
break;
|
|
51
|
-
}
|
|
52
|
-
return null;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
function detectPackageManager() {
|
|
56
|
-
const userAgent = process.env.npm_config_user_agent || "";
|
|
57
|
-
if (/\bbun\//.test(userAgent)) {
|
|
58
|
-
return "bun";
|
|
59
|
-
}
|
|
60
|
-
return userAgent ? "npm" : null;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
const targetTriple = detectTargetTriple(process.platform, process.arch);
|
|
64
|
-
if (!targetTriple) {
|
|
65
|
-
throw new Error(`Unsupported platform: ${process.platform} (${process.arch})`);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
const platformPackage = PLATFORM_PACKAGE_BY_TARGET[targetTriple];
|
|
69
|
-
if (!platformPackage) {
|
|
70
|
-
throw new Error(`Unsupported target triple: ${targetTriple}`);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
const binaryName = process.platform === "win32" ? "xurl.exe" : "xurl";
|
|
74
|
-
const localVendorRoot = path.join(__dirname, "..", "vendor");
|
|
75
|
-
const localBinaryPath = path.join(localVendorRoot, targetTriple, "xurl", binaryName);
|
|
76
|
-
|
|
77
|
-
let vendorRoot;
|
|
78
|
-
try {
|
|
79
|
-
const packageJsonPath = require.resolve(`${platformPackage}/package.json`);
|
|
80
|
-
vendorRoot = path.join(path.dirname(packageJsonPath), "vendor");
|
|
81
|
-
} catch {
|
|
82
|
-
if (existsSync(localBinaryPath)) {
|
|
83
|
-
vendorRoot = localVendorRoot;
|
|
84
|
-
} else {
|
|
85
|
-
const manager = detectPackageManager();
|
|
86
|
-
const updateCommand =
|
|
87
|
-
manager === "bun"
|
|
88
|
-
? "bun install -g @xuanwo/xurl@latest"
|
|
89
|
-
: "npm install -g @xuanwo/xurl@latest";
|
|
90
|
-
throw new Error(
|
|
91
|
-
`Missing optional dependency ${platformPackage}. Reinstall xurl: ${updateCommand}`,
|
|
92
|
-
);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
const binaryPath = path.join(vendorRoot, targetTriple, "xurl", binaryName);
|
|
97
|
-
const env = { ...process.env };
|
|
98
|
-
env[detectPackageManager() === "bun" ? "XURL_MANAGED_BY_BUN" : "XURL_MANAGED_BY_NPM"] =
|
|
99
|
-
"1";
|
|
100
|
-
|
|
101
|
-
const child = spawn(binaryPath, process.argv.slice(2), {
|
|
102
|
-
stdio: "inherit",
|
|
103
|
-
env,
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
child.on("error", (err) => {
|
|
107
|
-
// eslint-disable-next-line no-console
|
|
108
|
-
console.error(err);
|
|
109
|
-
process.exit(1);
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
const forwardSignal = (signal) => {
|
|
113
|
-
if (child.killed) {
|
|
114
|
-
return;
|
|
115
|
-
}
|
|
116
|
-
try {
|
|
117
|
-
child.kill(signal);
|
|
118
|
-
} catch {
|
|
119
|
-
// Ignore errors when the child already exited.
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
["SIGINT", "SIGTERM", "SIGHUP"].forEach((signal) => {
|
|
124
|
-
process.on(signal, () => forwardSignal(signal));
|
|
125
|
-
});
|
|
126
|
-
|
|
127
|
-
const childResult = await new Promise((resolve) => {
|
|
128
|
-
child.on("exit", (code, signal) => {
|
|
129
|
-
if (signal) {
|
|
130
|
-
resolve({ type: "signal", signal });
|
|
131
|
-
} else {
|
|
132
|
-
resolve({ type: "code", exitCode: code ?? 1 });
|
|
133
|
-
}
|
|
134
|
-
});
|
|
135
|
-
});
|
|
136
|
-
|
|
137
|
-
if (childResult.type === "signal") {
|
|
138
|
-
process.kill(process.pid, childResult.signal);
|
|
139
|
-
} else {
|
|
140
|
-
process.exit(childResult.exitCode);
|
|
141
|
-
}
|