claude_swarm 0.1.1 → 0.1.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +4 -0
- data/claude-swarm.yml +19 -0
- data/lib/claude_swarm/cli.rb +4 -2
- data/lib/claude_swarm/orchestrator.rb +26 -15
- data/lib/claude_swarm/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37bc8baf6ea837fcd1e8936a1ae5a6a13138fad6e6efb3708deca991673e119d
|
4
|
+
data.tar.gz: 1e3d06c4138a42e7ab54a121c4bd3e584db3859e640a5965aac88d04fe0e6132
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dba5aab927293d3cc5fc4190b0cd84f7addf7ae0f90224df425a166d33c5feb5e062be21c8b915589191a14609f25f6fc68da63402c5295588bd5c4ed1d177ab
|
7
|
+
data.tar.gz: 6a7d5058d8583bd1bf6fec8d148fe62e617535528f49f960412eb6da065db01a0405f4de6cff8963c63c523ce81cbf661dc49fe8840df3d568eaa2fcba853284
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## [0.1.2] - 2025-05-29
|
4
|
+
|
5
|
+
### Added
|
6
|
+
- Added `-p` / `--prompt` flag to pass prompts directly to the main Claude instance for non-interactive mode
|
7
|
+
- Output suppression when running with the `-p` flag for cleaner scripted usage
|
8
|
+
|
3
9
|
## [0.1.1] - 2025-05-24
|
4
10
|
|
5
11
|
- Initial release
|
data/README.md
CHANGED
@@ -374,6 +374,10 @@ claude-swarm -c team-config.yml
|
|
374
374
|
# Run with --dangerously-skip-permissions for all instances
|
375
375
|
claude-swarm --vibe
|
376
376
|
|
377
|
+
# Run in non-interactive mode with a prompt
|
378
|
+
claude-swarm -p "Implement the new user authentication feature"
|
379
|
+
claude-swarm --prompt "Fix the bug in the payment module"
|
380
|
+
|
377
381
|
# Show version
|
378
382
|
claude-swarm version
|
379
383
|
|
data/claude-swarm.yml
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
version: 1
|
2
|
+
swarm:
|
3
|
+
name: "Swarm Name"
|
4
|
+
main: lead_developer
|
5
|
+
instances:
|
6
|
+
lead_developer:
|
7
|
+
directory: .
|
8
|
+
model: sonnet
|
9
|
+
prompt: "You are the lead developer coordinating the team"
|
10
|
+
tools: [Read, Edit, Bash, Write]
|
11
|
+
connections: [frontend_dev]
|
12
|
+
|
13
|
+
# Example instances (uncomment and modify as needed):
|
14
|
+
|
15
|
+
frontend_dev:
|
16
|
+
directory: .
|
17
|
+
model: sonnet
|
18
|
+
prompt: "You specialize in frontend development with React, TypeScript, and modern web technologies"
|
19
|
+
tools: [Read, Edit, Write, "Bash(npm:*)", "Bash(yarn:*)", "Bash(pnpm:*)"]
|
data/lib/claude_swarm/cli.rb
CHANGED
@@ -17,6 +17,8 @@ module ClaudeSwarm
|
|
17
17
|
desc: "Path to configuration file"
|
18
18
|
method_option :vibe, type: :boolean, default: false,
|
19
19
|
desc: "Run with --dangerously-skip-permissions for all instances"
|
20
|
+
method_option :prompt, aliases: "-p", type: :string,
|
21
|
+
desc: "Prompt to pass to the main Claude instance (non-interactive mode)"
|
20
22
|
def start(config_file = nil)
|
21
23
|
config_path = config_file || options[:config]
|
22
24
|
unless File.exist?(config_path)
|
@@ -24,11 +26,11 @@ module ClaudeSwarm
|
|
24
26
|
exit 1
|
25
27
|
end
|
26
28
|
|
27
|
-
say "Starting Claude Swarm from #{config_path}..."
|
29
|
+
say "Starting Claude Swarm from #{config_path}..." unless options[:prompt]
|
28
30
|
begin
|
29
31
|
config = Configuration.new(config_path)
|
30
32
|
generator = McpGenerator.new(config, vibe: options[:vibe])
|
31
|
-
orchestrator = Orchestrator.new(config, generator, vibe: options[:vibe])
|
33
|
+
orchestrator = Orchestrator.new(config, generator, vibe: options[:vibe], prompt: options[:prompt])
|
32
34
|
orchestrator.start
|
33
35
|
rescue Error => e
|
34
36
|
error e.message
|
@@ -4,39 +4,48 @@ require "shellwords"
|
|
4
4
|
|
5
5
|
module ClaudeSwarm
|
6
6
|
class Orchestrator
|
7
|
-
def initialize(configuration, mcp_generator, vibe: false)
|
7
|
+
def initialize(configuration, mcp_generator, vibe: false, prompt: nil)
|
8
8
|
@config = configuration
|
9
9
|
@generator = mcp_generator
|
10
10
|
@vibe = vibe
|
11
|
+
@prompt = prompt
|
11
12
|
end
|
12
13
|
|
13
14
|
def start
|
14
|
-
|
15
|
-
|
16
|
-
|
15
|
+
unless @prompt
|
16
|
+
puts "🐝 Starting Claude Swarm: #{@config.swarm_name}"
|
17
|
+
puts "😎 Vibe mode ON" if @vibe
|
18
|
+
puts
|
19
|
+
end
|
17
20
|
|
18
21
|
# Set session timestamp for all instances to share the same log file
|
19
22
|
session_timestamp = Time.now.strftime("%Y%m%d_%H%M%S")
|
20
23
|
ENV["CLAUDE_SWARM_SESSION_TIMESTAMP"] = session_timestamp
|
21
|
-
|
22
|
-
|
24
|
+
unless @prompt
|
25
|
+
puts "📝 Session logs will be saved to: .claude-swarm/logs/session_#{session_timestamp}.log"
|
26
|
+
puts
|
27
|
+
end
|
23
28
|
|
24
29
|
# Generate all MCP configuration files
|
25
30
|
@generator.generate_all
|
26
|
-
|
27
|
-
|
31
|
+
unless @prompt
|
32
|
+
puts "✓ Generated MCP configurations in .claude-swarm/"
|
33
|
+
puts
|
34
|
+
end
|
28
35
|
|
29
36
|
# Launch the main instance
|
30
37
|
main_instance = @config.main_instance_config
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
38
|
+
unless @prompt
|
39
|
+
puts "🚀 Launching main instance: #{@config.main_instance}"
|
40
|
+
puts " Model: #{main_instance[:model]}"
|
41
|
+
puts " Directory: #{main_instance[:directory]}"
|
42
|
+
puts " Tools: #{main_instance[:tools].join(", ")}" if main_instance[:tools].any?
|
43
|
+
puts " Connections: #{main_instance[:connections].join(", ")}" if main_instance[:connections].any?
|
44
|
+
puts
|
45
|
+
end
|
37
46
|
|
38
47
|
command = build_main_command(main_instance)
|
39
|
-
if ENV["DEBUG"]
|
48
|
+
if ENV["DEBUG"] && !@prompt
|
40
49
|
puts "Running: #{command}"
|
41
50
|
puts
|
42
51
|
end
|
@@ -65,6 +74,8 @@ module ClaudeSwarm
|
|
65
74
|
mcp_config_path = @generator.mcp_config_path(@config.main_instance)
|
66
75
|
parts << "--mcp-config #{mcp_config_path}"
|
67
76
|
|
77
|
+
parts << "-p #{Shellwords.escape(@prompt)}" if @prompt
|
78
|
+
|
68
79
|
parts.join(" ")
|
69
80
|
end
|
70
81
|
end
|
data/lib/claude_swarm/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: claude_swarm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paulo Arruda
|
8
8
|
bindir: exe
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-05-
|
10
|
+
date: 2025-05-29 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: thor
|
@@ -57,6 +57,7 @@ files:
|
|
57
57
|
- LICENSE
|
58
58
|
- README.md
|
59
59
|
- Rakefile
|
60
|
+
- claude-swarm.yml
|
60
61
|
- example/claude-swarm.yml
|
61
62
|
- exe/claude-swarm
|
62
63
|
- lib/claude_swarm.rb
|