@mhmdreza-rafiei/agentry 0.2.0 → 0.2.2

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/package.json CHANGED
@@ -1,53 +1,61 @@
1
- {
2
- "name": "@mhmdreza-rafiei/agentry",
3
- "version": "0.2.0",
4
- "description": "One CLI to install agents, skills, rules, and profiles onto AI coding agents — portable AI/agent tooling.",
5
- "type": "module",
6
- "bin": {
7
- "agentry": "./dist/cli.mjs"
8
- },
9
- "files": [
10
- "dist",
11
- "README.md",
12
- "LICENSE"
13
- ],
14
- "scripts": {
15
- "dev": "tsx src/cli.ts",
16
- "build": "obuild",
17
- "test": "vitest run",
18
- "test:watch": "vitest",
19
- "typecheck": "tsc --noEmit"
20
- },
21
- "engines": {
22
- "node": ">=22.20.0"
23
- },
24
- "keywords": [
25
- "ai",
26
- "agents",
27
- "skills",
28
- "rules",
29
- "profiles",
30
- "cli",
31
- "cursor",
32
- "claude-code",
33
- "codex",
34
- "agentic",
35
- "scaffold"
36
- ],
37
- "license": "MIT",
38
- "dependencies": {
39
- "@clack/prompts": "^0.7.0",
40
- "@vercel/detect-agent": "^1.2.1",
41
- "picocolors": "^1.1.1",
42
- "xdg-basedir": "^5.1.0",
43
- "yaml": "^2.8.3",
44
- "zod": "^3.23.0"
45
- },
46
- "devDependencies": {
47
- "@types/node": "^22.10.0",
48
- "obuild": "^0.4.22",
49
- "tsx": "^4.19.0",
50
- "typescript": "^5.9.3",
51
- "vitest": "^2.1.0"
52
- }
53
- }
1
+ {
2
+ "name": "@mhmdreza-rafiei/agentry",
3
+ "version": "0.2.2",
4
+ "description": "One CLI to install agents, skills, rules, and profiles onto AI coding agents — portable AI/agent tooling.",
5
+ "type": "module",
6
+ "bin": {
7
+ "agentry": "dist/cli.mjs"
8
+ },
9
+ "files": [
10
+ "dist",
11
+ "README.md",
12
+ "LICENSE"
13
+ ],
14
+ "scripts": {
15
+ "dev": "tsx src/cli.ts",
16
+ "build": "obuild",
17
+ "test": "vitest run",
18
+ "test:watch": "vitest",
19
+ "typecheck": "tsc --noEmit"
20
+ },
21
+ "engines": {
22
+ "node": ">=22.20.0"
23
+ },
24
+ "keywords": [
25
+ "ai",
26
+ "agents",
27
+ "skills",
28
+ "rules",
29
+ "profiles",
30
+ "cli",
31
+ "cursor",
32
+ "claude-code",
33
+ "codex",
34
+ "agentic",
35
+ "scaffold"
36
+ ],
37
+ "license": "MIT",
38
+ "repository": {
39
+ "type": "git",
40
+ "url": "git+https://github.com/mhmdreza-rafiei/agentry.git"
41
+ },
42
+ "bugs": {
43
+ "url": "https://github.com/mhmdreza-rafiei/agentry/issues"
44
+ },
45
+ "homepage": "https://github.com/mhmdreza-rafiei/agentry#readme",
46
+ "dependencies": {
47
+ "@clack/prompts": "^0.7.0",
48
+ "@vercel/detect-agent": "^1.2.1",
49
+ "picocolors": "^1.1.1",
50
+ "xdg-basedir": "^5.1.0",
51
+ "yaml": "^2.8.3",
52
+ "zod": "^3.23.0"
53
+ },
54
+ "devDependencies": {
55
+ "@types/node": "^22.10.0",
56
+ "obuild": "^0.4.22",
57
+ "tsx": "^4.19.0",
58
+ "typescript": "^5.9.3",
59
+ "vitest": "^4.1.10"
60
+ }
61
+ }
@@ -1,2 +0,0 @@
1
- import { parseSource } from "./source_parser2.mjs";
2
- export { parseSource };
@@ -1,74 +0,0 @@
1
- import { existsSync, statSync } from "node:fs";
2
- import { homedir } from "node:os";
3
- import { resolve } from "node:path";
4
- function isLocalPath(source) {
5
- if (!source) return false;
6
- if (source === "." || source === "..") return true;
7
- if (source.startsWith("./") || source.startsWith("../") || source.startsWith("/") || source.startsWith("~")) return true;
8
- try {
9
- return existsSync(source) && statSync(source).isDirectory();
10
- } catch {
11
- return false;
12
- }
13
- }
14
- function parseGithubTreeUrl(url) {
15
- const m = url.match(/^https?:\/\/github\.com\/([\w.-]+\/[\w.-]+?)\/tree\/([^/]+)\/(.+)$/);
16
- if (!m) return null;
17
- return {
18
- ownerRepo: m[1],
19
- ref: m[2],
20
- subpath: m[3].replace(/\/+$/, "")
21
- };
22
- }
23
- function parseSource(source) {
24
- if (!source || typeof source !== "string") throw new Error("Empty source.");
25
- const raw = source;
26
- if (isLocalPath(source)) return {
27
- kind: "local",
28
- raw,
29
- url: null,
30
- subpath: "",
31
- local: resolve(source.replace(/^~/, homedir()))
32
- };
33
- const tree = parseGithubTreeUrl(source);
34
- if (tree) return {
35
- kind: "github-url",
36
- raw,
37
- url: `https://github.com/${tree.ownerRepo}.git`,
38
- subpath: tree.subpath,
39
- ref: tree.ref,
40
- local: null
41
- };
42
- let m = source.match(/^https?:\/\/github\.com\/([\w.-]+\/[\w.-]+?)(?:\.git)?\/?$/);
43
- if (m) return {
44
- kind: "github-url",
45
- raw,
46
- url: `https://github.com/${m[1]}.git`,
47
- subpath: "",
48
- local: null
49
- };
50
- m = source.match(/^https?:\/\/gitlab\.com\/([\w./-]+?)(?:\.git)?\/?$/);
51
- if (m) return {
52
- kind: "gitlab-url",
53
- raw,
54
- url: `https://gitlab.com/${m[1]}.git`,
55
- subpath: "",
56
- local: null
57
- };
58
- if (source.startsWith("git@") || /^https?:\/\/.*\.git$/.test(source)) return {
59
- kind: "git-url",
60
- raw,
61
- url: source,
62
- subpath: "",
63
- local: null
64
- };
65
- if (/^[\w.-]+\/[\w.-]+$/.test(source)) return {
66
- kind: "github-shorthand",
67
- raw,
68
- url: `https://github.com/${source}.git`,
69
- subpath: "",
70
- local: null
71
- };
72
- throw new Error(`Cannot parse source "${source}". Use author/repo, a GitHub/GitLab URL, a git URL, or a local path.`);
73
- }
74
- export { isLocalPath, parseSource };