harnex 0.2.2 → 0.2.3
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.
- checksums.yaml +4 -4
- data/lib/harnex/commands/skills.rb +27 -20
- data/lib/harnex/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3ef69aafbfe0af98bf7e56fe9dfc0a8c320095a44bea1d682a5c582f9b6569f6
|
|
4
|
+
data.tar.gz: 9a3ac05697910d91beeb66f7abd463ad2b51c2e9355d5ddc6a60a8687a66472d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 00315bc8e09e631799a76ce8a3569f8ff4ed512cd62cae5b9cf8ac9092c173f5636893ffe2cfd8ee0ed06305509dba240d0272489d1949c3b7f141268f8f0043
|
|
7
|
+
data.tar.gz: 0e3425f79503c76e7d0e09edad5782efc784806cdc93cc096071be851782e27f73bf8a0ca7704330f9d45f86a0cc9684262da230650078152e556e4017888d93
|
|
@@ -7,22 +7,21 @@ module Harnex
|
|
|
7
7
|
|
|
8
8
|
def self.usage
|
|
9
9
|
<<~TEXT
|
|
10
|
-
Usage: harnex skills install [--
|
|
10
|
+
Usage: harnex skills install [--local]
|
|
11
11
|
|
|
12
12
|
Subcommands:
|
|
13
|
-
install Install bundled skills
|
|
13
|
+
install Install bundled skills (globally by default)
|
|
14
14
|
|
|
15
15
|
Options:
|
|
16
|
-
--
|
|
17
|
-
instead of the current repo
|
|
16
|
+
--local Install to the current repo instead of globally
|
|
18
17
|
|
|
19
18
|
Installs: #{INSTALL_SKILLS.join(', ')}
|
|
20
19
|
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
By default, copies each skill to ~/.claude/skills/<skill>/
|
|
21
|
+
and symlinks ~/.codex/skills/<skill> to it.
|
|
23
22
|
|
|
24
|
-
With --
|
|
25
|
-
|
|
23
|
+
With --local, copies each skill to .claude/skills/<skill>/
|
|
24
|
+
in the current repo and symlinks .codex/skills/<skill> to it.
|
|
26
25
|
TEXT
|
|
27
26
|
end
|
|
28
27
|
|
|
@@ -34,7 +33,7 @@ module Harnex
|
|
|
34
33
|
subcommand = @argv.shift
|
|
35
34
|
case subcommand
|
|
36
35
|
when "install"
|
|
37
|
-
skill_names,
|
|
36
|
+
skill_names, local, help = parse_install_args(@argv)
|
|
38
37
|
if help
|
|
39
38
|
puts self.class.usage
|
|
40
39
|
return 0
|
|
@@ -46,7 +45,7 @@ module Harnex
|
|
|
46
45
|
return missing_skill(skill_name)
|
|
47
46
|
end
|
|
48
47
|
|
|
49
|
-
result =
|
|
48
|
+
result = local ? install_local(skill_name, skill_source) : install_global(skill_name, skill_source)
|
|
50
49
|
return result unless result == 0
|
|
51
50
|
end
|
|
52
51
|
0
|
|
@@ -63,13 +62,13 @@ module Harnex
|
|
|
63
62
|
private
|
|
64
63
|
|
|
65
64
|
def parse_install_args(args)
|
|
66
|
-
|
|
65
|
+
local = false
|
|
67
66
|
help = false
|
|
68
67
|
|
|
69
68
|
args.each do |arg|
|
|
70
69
|
case arg
|
|
71
|
-
when "--
|
|
72
|
-
|
|
70
|
+
when "--local"
|
|
71
|
+
local = true
|
|
73
72
|
when "-h", "--help"
|
|
74
73
|
help = true
|
|
75
74
|
when /\A-/
|
|
@@ -80,7 +79,7 @@ module Harnex
|
|
|
80
79
|
end
|
|
81
80
|
end
|
|
82
81
|
|
|
83
|
-
[INSTALL_SKILLS,
|
|
82
|
+
[INSTALL_SKILLS, local, help]
|
|
84
83
|
end
|
|
85
84
|
|
|
86
85
|
def resolve_skill_source(skill_name)
|
|
@@ -124,13 +123,21 @@ module Harnex
|
|
|
124
123
|
claude_dir = File.expand_path("~/.claude/skills/#{skill_name}")
|
|
125
124
|
codex_dir = File.expand_path("~/.codex/skills/#{skill_name}")
|
|
126
125
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
FileUtils.rm_rf(
|
|
131
|
-
File.symlink(skill_source, dir)
|
|
132
|
-
puts "symlinked #{dir} -> #{skill_source}"
|
|
126
|
+
# Copy skill to ~/.claude/skills/<skill>/
|
|
127
|
+
if Dir.exist?(claude_dir)
|
|
128
|
+
warn("harnex skills: #{claude_dir} already exists, overwriting")
|
|
129
|
+
FileUtils.rm_rf(claude_dir)
|
|
133
130
|
end
|
|
131
|
+
FileUtils.mkdir_p(File.dirname(claude_dir))
|
|
132
|
+
FileUtils.cp_r(skill_source, claude_dir)
|
|
133
|
+
puts "installed #{claude_dir}"
|
|
134
|
+
|
|
135
|
+
# Symlink ~/.codex/skills/<skill> -> ~/.claude/skills/<skill>
|
|
136
|
+
codex_parent = File.dirname(codex_dir)
|
|
137
|
+
FileUtils.mkdir_p(codex_parent)
|
|
138
|
+
FileUtils.rm_rf(codex_dir) if File.exist?(codex_dir) || File.symlink?(codex_dir)
|
|
139
|
+
File.symlink(claude_dir, codex_dir)
|
|
140
|
+
puts "symlinked #{codex_dir} -> #{claude_dir}"
|
|
134
141
|
|
|
135
142
|
0
|
|
136
143
|
end
|
data/lib/harnex/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: harnex
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jikku Jose
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
date: 2026-03-31 00:00:00.000000000 Z
|
|
@@ -66,7 +66,7 @@ metadata:
|
|
|
66
66
|
homepage_uri: https://github.com/jikkuatwork/harnex
|
|
67
67
|
source_code_uri: https://github.com/jikkuatwork/harnex
|
|
68
68
|
bug_tracker_uri: https://github.com/jikkuatwork/harnex/issues
|
|
69
|
-
post_install_message:
|
|
69
|
+
post_install_message:
|
|
70
70
|
rdoc_options: []
|
|
71
71
|
require_paths:
|
|
72
72
|
- lib
|
|
@@ -82,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
82
82
|
version: '0'
|
|
83
83
|
requirements: []
|
|
84
84
|
rubygems_version: 3.5.3
|
|
85
|
-
signing_key:
|
|
85
|
+
signing_key:
|
|
86
86
|
specification_version: 4
|
|
87
87
|
summary: PTY harness for terminal AI agents
|
|
88
88
|
test_files: []
|