shakaflow-cli 0.1.0 → 0.1.1
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/shakaflow_cli/version.rb +1 -1
- data/lib/shakaflow_cli.rb +47 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 236f91f6a948e7590e34be44bf6b1eca0c1d0ef825cc6ff33d801a764b395ce8
|
|
4
|
+
data.tar.gz: f0318dc2e2c46d26f92dd3f7d7fb302dda533f2ba412435f9c995bf45385758d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a02e09e586ecd477f09030dbdc885d0c0f6b26c3d1107e270af61c0623afbd308dfe4dd6a837b7d2ab1c066931b0ba83773bce53041fef5783f76f8616decfba
|
|
7
|
+
data.tar.gz: de6479d67c50056c55ed6f5481d8e87dab1816ad41b2dfce8d539fd6ff13a5479a1c9bc7926bbb02dc6e7698520893f3881f18fcc6d1256563eb921ac1484814
|
data/lib/shakaflow_cli.rb
CHANGED
|
@@ -37,6 +37,10 @@ module ShakaflowCli
|
|
|
37
37
|
handle_member_activity_context
|
|
38
38
|
when "members"
|
|
39
39
|
handle_members
|
|
40
|
+
when "api-token"
|
|
41
|
+
handle_api_token
|
|
42
|
+
when "workspaces"
|
|
43
|
+
handle_workspaces
|
|
40
44
|
when "version", "-v", "--version"
|
|
41
45
|
puts "shakaflow-cli #{VERSION}"
|
|
42
46
|
when "help", nil, "-h", "--help"
|
|
@@ -58,6 +62,8 @@ module ShakaflowCli
|
|
|
58
62
|
|
|
59
63
|
Commands:
|
|
60
64
|
config Configure API URL and token
|
|
65
|
+
api-token Show information about the current API token
|
|
66
|
+
workspaces List Slack workspaces for the tenant
|
|
61
67
|
providers List available LLM providers
|
|
62
68
|
prompt Test a raw LLM prompt
|
|
63
69
|
member-activity-summary Generate activity summary for a member
|
|
@@ -241,6 +247,18 @@ module ShakaflowCli
|
|
|
241
247
|
output_response(response, :members)
|
|
242
248
|
end
|
|
243
249
|
|
|
250
|
+
def handle_api_token
|
|
251
|
+
parse_global_options
|
|
252
|
+
response = api_get("/api/v1/api_tokens/me")
|
|
253
|
+
output_response(response, :api_token)
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
def handle_workspaces
|
|
257
|
+
parse_global_options
|
|
258
|
+
response = api_get("/api/v1/api_tokens/workspaces")
|
|
259
|
+
output_response(response, :workspaces)
|
|
260
|
+
end
|
|
261
|
+
|
|
244
262
|
def parse_global_options
|
|
245
263
|
@options[:env] ||= ENV["SF_ENV"] || "production"
|
|
246
264
|
@options[:format] ||= "table"
|
|
@@ -381,6 +399,10 @@ module ShakaflowCli
|
|
|
381
399
|
output_context_result(response)
|
|
382
400
|
when :members
|
|
383
401
|
output_members_table(response)
|
|
402
|
+
when :api_token
|
|
403
|
+
output_api_token(response)
|
|
404
|
+
when :workspaces
|
|
405
|
+
output_workspaces(response)
|
|
384
406
|
else
|
|
385
407
|
puts JSON.pretty_generate(response)
|
|
386
408
|
end
|
|
@@ -474,5 +496,30 @@ module ShakaflowCli
|
|
|
474
496
|
puts " Email: #{member['email']}"
|
|
475
497
|
end
|
|
476
498
|
end
|
|
499
|
+
|
|
500
|
+
def output_api_token(response)
|
|
501
|
+
puts "API Token Information:"
|
|
502
|
+
puts "-" * 60
|
|
503
|
+
puts " Name: #{response['name']}"
|
|
504
|
+
puts " Created by: #{response['created_by']}"
|
|
505
|
+
puts " Tenant: #{response['tenant']['name']} (id: #{response['tenant']['id']})"
|
|
506
|
+
puts " Created at: #{response['created_at']}"
|
|
507
|
+
puts " Expires at: #{response['expires_at'] || 'Never'}"
|
|
508
|
+
end
|
|
509
|
+
|
|
510
|
+
def output_workspaces(response)
|
|
511
|
+
workspaces = response["workspaces"] || []
|
|
512
|
+
if workspaces.empty?
|
|
513
|
+
puts "No Slack workspaces found."
|
|
514
|
+
return
|
|
515
|
+
end
|
|
516
|
+
|
|
517
|
+
puts "Slack Workspaces:"
|
|
518
|
+
puts "-" * 60
|
|
519
|
+
workspaces.each do |workspace|
|
|
520
|
+
status = workspace["active"] ? "active" : "inactive"
|
|
521
|
+
puts " #{workspace['name']} (id: #{workspace['id']}) [#{status}]"
|
|
522
|
+
end
|
|
523
|
+
end
|
|
477
524
|
end
|
|
478
525
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: shakaflow-cli
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ShakaCode
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-01-
|
|
11
|
+
date: 2026-01-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Command-line interface for interacting with ShakaFlow development API
|
|
14
14
|
email:
|