Skip to content

Commit 9917c2b

Browse files
author
vangogh
committed
gbox 0.0.11
1 parent f5d3179 commit 9917c2b

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

Formula/g/gbox.rb

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
class Gbox < Formula
2+
desc "Self-hostable sandbox for AI Agents to execute commands and surf web"
3+
homepage "https://gbox.ai"
4+
url "https://github.com/babelcloud/gbox/releases/download/v0.0.19/gbox-v0.0.19.tar.gz"
5+
sha256 "41e94e96a756bb4ec81d049080fe15b45d5b3c59785f54965daa364aa7813331"
6+
license "Apache-2.0"
7+
8+
depends_on "go" => :build
9+
depends_on "rsync" => :build
10+
depends_on "yq"
11+
12+
uses_from_macos "jq"
13+
14+
def install
15+
system "make", "install", "prefix=#{prefix}", "VERSION=#{version}", "COMMIT_ID=#{File.read("COMMIT")}", "BUILD_TIME=#{time.iso8601}"
16+
generate_completions_from_executable(bin/"gbox", "completion")
17+
end
18+
19+
test do
20+
# Test gbox version
21+
assert_match version.to_s, shell_output("#{bin}/gbox --version")
22+
23+
# Test gbox profile management
24+
add_output = shell_output("#{bin}/gbox profile add -k xxx -n gbox-user -o local")
25+
assert_match "Profile added successfully", add_output
26+
27+
current_output = shell_output("#{bin}/gbox profile current")
28+
assert_match "Profile Name: gbox-user", current_output
29+
assert_match "Organization Name: local", current_output
30+
assert_match "API Key: xxx", current_output
31+
end
32+
end

0 commit comments

Comments
 (0)