videosdkagent-cli 0.0.1__tar.gz → 0.0.5__tar.gz

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.
Files changed (36) hide show
  1. {videosdkagent_cli-0.0.1 → videosdkagent_cli-0.0.5}/.gitignore +3 -1
  2. {videosdkagent_cli-0.0.1 → videosdkagent_cli-0.0.5}/PKG-INFO +2 -2
  3. videosdkagent_cli-0.0.5/README.md +249 -0
  4. {videosdkagent_cli-0.0.1 → videosdkagent_cli-0.0.5}/pyproject.toml +9 -3
  5. videosdkagent_cli-0.0.5/videosdk_cli/auth.py +122 -0
  6. videosdkagent_cli-0.0.5/videosdk_cli/build.py +1530 -0
  7. videosdkagent_cli-0.0.5/videosdk_cli/main.py +122 -0
  8. {videosdkagent_cli-0.0.1 → videosdkagent_cli-0.0.5}/videosdk_cli/projects.py +36 -19
  9. {videosdkagent_cli-0.0.1 → videosdkagent_cli-0.0.5}/videosdk_cli/templates.py +87 -32
  10. {videosdkagent_cli-0.0.1 → videosdkagent_cli-0.0.5}/videosdk_cli/utils/analytics.py +4 -3
  11. {videosdkagent_cli-0.0.1 → videosdkagent_cli-0.0.5}/videosdk_cli/utils/api_client.py +26 -24
  12. videosdkagent_cli-0.0.5/videosdk_cli/utils/apis/deployment_client.py +333 -0
  13. {videosdkagent_cli-0.0.1 → videosdkagent_cli-0.0.5}/videosdk_cli/utils/apis/videosdk_auth_api_client.py +5 -6
  14. {videosdkagent_cli-0.0.1 → videosdkagent_cli-0.0.5}/videosdk_cli/utils/auth_api_client.py +2 -2
  15. videosdkagent_cli-0.0.5/videosdk_cli/utils/manager/agent_manager.py +549 -0
  16. {videosdkagent_cli-0.0.1 → videosdkagent_cli-0.0.5}/videosdk_cli/utils/template_helper.py +102 -28
  17. {videosdkagent_cli-0.0.1 → videosdkagent_cli-0.0.5}/videosdk_cli/utils/ui/progress_runner.py +15 -7
  18. videosdkagent_cli-0.0.5/videosdk_cli/utils/ui/theme.py +144 -0
  19. videosdkagent_cli-0.0.5/videosdk_cli/utils/videosdk_yaml_helper.py +225 -0
  20. videosdkagent_cli-0.0.1/README.md +0 -103
  21. videosdkagent_cli-0.0.1/videosdk_cli/auth.py +0 -57
  22. videosdkagent_cli-0.0.1/videosdk_cli/build.py +0 -430
  23. videosdkagent_cli-0.0.1/videosdk_cli/main.py +0 -89
  24. videosdkagent_cli-0.0.1/videosdk_cli/secret_set.py +0 -82
  25. videosdkagent_cli-0.0.1/videosdk_cli/utils/apis/deployment_client.py +0 -172
  26. videosdkagent_cli-0.0.1/videosdk_cli/utils/manager/agent_manager.py +0 -381
  27. videosdkagent_cli-0.0.1/videosdk_cli/utils/videosdk_yaml_helper.py +0 -75
  28. {videosdkagent_cli-0.0.1 → videosdkagent_cli-0.0.5}/videosdk_cli/__init__.py +0 -0
  29. {videosdkagent_cli-0.0.1 → videosdkagent_cli-0.0.5}/videosdk_cli/run_agent.py +0 -0
  30. {videosdkagent_cli-0.0.1 → videosdkagent_cli-0.0.5}/videosdk_cli/utils/__init__.py +0 -0
  31. {videosdkagent_cli-0.0.1 → videosdkagent_cli-0.0.5}/videosdk_cli/utils/apis/error.py +0 -0
  32. {videosdkagent_cli-0.0.1 → videosdkagent_cli-0.0.5}/videosdk_cli/utils/config_manager.py +0 -0
  33. {videosdkagent_cli-0.0.1 → videosdkagent_cli-0.0.5}/videosdk_cli/utils/exceptions.py +0 -0
  34. {videosdkagent_cli-0.0.1 → videosdkagent_cli-0.0.5}/videosdk_cli/utils/project_config.py +0 -0
  35. {videosdkagent_cli-0.0.1 → videosdkagent_cli-0.0.5}/videosdk_cli/utils/template_options.py +0 -0
  36. {videosdkagent_cli-0.0.1 → videosdkagent_cli-0.0.5}/videosdk_cli/utils/ui/kv_blocks.py +0 -0
@@ -213,4 +213,6 @@ marimo/_lsp/
213
213
  __marimo__/
214
214
 
215
215
  # Streamlit
216
- .streamlit/secrets.toml
216
+ .streamlit/secrets.toml
217
+
218
+ .DS_Store
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: videosdkagent-cli
3
- Version: 0.0.1
3
+ Version: 0.0.5
4
4
  Summary: VideoSDK CLI tool
5
- Author-email: Krishna <krishna@videosdk.live>
5
+ Author-email: VIDEOSDK <sdk@videosdk.live>
6
6
  Requires-Dist: aiohttp>=3.9.0
7
7
  Requires-Dist: click>=8.1.0
8
8
  Requires-Dist: docker-image-py>=0.1.13
@@ -0,0 +1,249 @@
1
+ # VideoSDK CLI
2
+
3
+ Install the VideoSDK CLI using Python:
4
+
5
+ ```sh
6
+ pip install videosdk-cli
7
+ ```
8
+
9
+ ---
10
+
11
+ ## Authentication
12
+
13
+ ### Login
14
+
15
+ ```sh
16
+ videosdk auth login
17
+ ```
18
+
19
+ ### Logout
20
+
21
+ ```sh
22
+ videosdk auth logout
23
+ ```
24
+
25
+ ---
26
+
27
+ ## Agent Management
28
+
29
+ ### Initialize Agent
30
+
31
+ ```sh
32
+ videosdk agent init --name my-agent
33
+ ```
34
+
35
+ ### Build Docker Image
36
+
37
+ ```sh
38
+ videosdk agent build --image myrepo/myagent:latest --file Dockerfile
39
+ ```
40
+
41
+ ### Push to Registry
42
+
43
+ ```sh
44
+ videosdk agent push --image myrepo/myagent:latest --server docker.io --username user --password pass
45
+ ```
46
+
47
+ ### Deploy Agent
48
+
49
+ ```sh
50
+ videosdk agent deploy [name] --image myrepo/myagent:latest --min-replica 1 --max-replica 5 --profile cpu-small --agent-id <agent-id> --env-secret my-secrets --image-pull-secret my-pull-secret --region us-east
51
+ ```
52
+
53
+ ---
54
+
55
+ ## Version Management
56
+
57
+ ### List Versions
58
+
59
+ ```sh
60
+ videosdk agent version list --agent-id <agent-id>
61
+ ```
62
+
63
+ ### Update Version
64
+
65
+ ```sh
66
+ videosdk agent version update --version-id <version-id> --min-replica 2 --max-replica 10 --profile cpu-medium --image-pull-secret my-secret
67
+ ```
68
+
69
+ ### Activate Version
70
+
71
+ ```sh
72
+ videosdk agent version activate --version-id <version-id> --agent-id <agent-id>
73
+ ```
74
+
75
+ ### Deactivate Version
76
+
77
+ ```sh
78
+ videosdk agent version deactivate --version-id <version-id> --force --agent-id <agent-id>
79
+ ```
80
+
81
+ ### Get Version Status
82
+
83
+ ```sh
84
+ videosdk agent version status --version-id <version-id>
85
+ ```
86
+
87
+ ### Describe Version
88
+
89
+ ```sh
90
+ videosdk agent version describe --version-id <version-id>
91
+ ```
92
+
93
+ ---
94
+
95
+ ## Secret Management
96
+
97
+ ### Create Secret Set
98
+
99
+ ```sh
100
+ videosdk agent secrets create my-secrets --file .env --region us-east
101
+ ```
102
+
103
+ Or interactively:
104
+
105
+ ```sh
106
+ videosdk agent secrets create my-secrets
107
+ ```
108
+
109
+ ### Add Keys to Secret
110
+
111
+ ```sh
112
+ videosdk agent secrets add my-secrets
113
+ ```
114
+
115
+ ### Remove Keys from Secret
116
+
117
+ ```sh
118
+ videosdk agent secrets remove my-secrets
119
+ ```
120
+
121
+ ### Describe Secret
122
+
123
+ ```sh
124
+ videosdk agent secrets describe my-secrets
125
+ ```
126
+
127
+ ### Delete Secret Set
128
+
129
+ ```sh
130
+ videosdk agent secrets delete my-secrets
131
+ ```
132
+
133
+ ### List All Secrets
134
+
135
+ ```sh
136
+ videosdk agent secrets list
137
+ ```
138
+
139
+ ### Create Image Pull Secret
140
+
141
+ ```sh
142
+ videosdk agent image-pull-secret my-registry-secret --region us-east
143
+ ```
144
+
145
+ ---
146
+
147
+ ## Session Management
148
+
149
+ ### Start Session
150
+
151
+ ```sh
152
+ videosdk agent session start --version-id <version-id> --room-id <room-id>
153
+ ```
154
+
155
+ ### Stop Session
156
+
157
+ ```sh
158
+ videosdk agent session stop --room-id <room-id> --session-id <session-id> --end-session
159
+ ```
160
+
161
+ ### List Sessions
162
+
163
+ ```sh
164
+ videosdk agent sessions --version-id <version-id> --agent-id <agent-id> --active --region us-east
165
+ ```
166
+
167
+ ---
168
+
169
+ ## Templates
170
+
171
+ ### List Templates
172
+
173
+ ```sh
174
+ videosdk template list
175
+ ```
176
+
177
+ Example output:
178
+
179
+ | Template id | File Name | Description |
180
+ | --------------------------- | ------------------------------ | --------------------------------------------------- |
181
+ | ai-agent-cascading-pipeline | ai-agent-cascading-pipeline.py | AI Agent with a cascading, multi-provider pipeline. |
182
+ | ai-agent-real-time-pipeline | ai-agent-real-time-pipeline.py | AI Agent with a real-time pipeline. |
183
+
184
+ ### Create Project from Template
185
+
186
+ ```sh
187
+ videosdk template get -t ai-agent-cascading-pipeline my-app
188
+ ```
189
+
190
+ ---
191
+
192
+ ## Run Local Agent
193
+
194
+ ```sh
195
+ videosdk run my-app
196
+ ```
197
+
198
+ This will:
199
+
200
+ 1. Create/use a virtual environment
201
+ 2. Install requirements
202
+ 3. Run the agent in console mode
203
+
204
+ Example output:
205
+
206
+ ```sh
207
+ Running project 'my-app'...
208
+ [✓] model_quantized.onnx already downloaded.
209
+ ====================================================================================================
210
+ Videosdk's AI Agent Console Mode
211
+ ====================================================================================================
212
+ Session end callback configured
213
+ Waiting for participant...
214
+ Participant joined
215
+ 2025-10-13 12:21:20,846 - INFO - agent output speech: Hello, how can I help you today?
216
+ Agent is running... (will exit automatically when participants leave)
217
+ ```
218
+
219
+ ---
220
+
221
+ ## Command Reference
222
+
223
+ | Command | Description |
224
+ | ---------------------------------------- | ------------------------ |
225
+ | `videosdk auth login` | Login to VideoSDK |
226
+ | `videosdk auth logout` | Logout from VideoSDK |
227
+ | `videosdk agent init` | Initialize agent |
228
+ | `videosdk agent build` | Build Docker image |
229
+ | `videosdk agent push` | Push image to registry |
230
+ | `videosdk agent deploy` | Deploy new version |
231
+ | `videosdk agent version list` | List versions |
232
+ | `videosdk agent version update` | Update version |
233
+ | `videosdk agent version activate` | Activate version |
234
+ | `videosdk agent version deactivate` | Deactivate version |
235
+ | `videosdk agent version status` | Get version status |
236
+ | `videosdk agent version describe` | Describe version |
237
+ | `videosdk agent secrets create <name>` | Create secret set |
238
+ | `videosdk agent secrets add <name>` | Add keys to secret |
239
+ | `videosdk agent secrets remove <name>` | Remove keys from secret |
240
+ | `videosdk agent secrets describe <name>` | Describe secret |
241
+ | `videosdk agent secrets delete <name>` | Delete secret set |
242
+ | `videosdk agent secrets list` | List all secrets |
243
+ | `videosdk agent image-pull-secret` | Create image pull secret |
244
+ | `videosdk agent session start` | Start agent session |
245
+ | `videosdk agent session stop` | Stop agent session |
246
+ | `videosdk agent sessions` | List sessions |
247
+ | `videosdk template list` | List templates |
248
+ | `videosdk template get` | Create from template |
249
+ | `videosdk run` | Run local agent |
@@ -6,9 +6,9 @@ build-backend = "hatchling.build"
6
6
 
7
7
  [project]
8
8
  name = "videosdkagent-cli"
9
- version = "0.0.1"
9
+ version = "0.0.5"
10
10
  description = "VideoSDK CLI tool"
11
- authors = [{name="Krishna", email="krishna@videosdk.live"}]
11
+ authors = [{name="VIDEOSDK", email="sdk@videosdk.live"}]
12
12
  dependencies = [
13
13
  "click>=8.1.0",
14
14
  "aiohttp>=3.9.0",
@@ -29,4 +29,10 @@ videosdk = "videosdk_cli.main:cli" # <-- CRITICAL CHANGE
29
29
 
30
30
  [tool.hatch.build.targets.wheel]
31
31
  # This must list the actual package folder name.
32
- packages = ["videosdk_cli"] # <-- CRITICAL CHANGE
32
+ packages = ["videosdk_cli"] # <-- CRITICAL CHANGE
33
+
34
+ [tool.hatch.build.targets.sdist]
35
+ exclude = [
36
+ "/cli",
37
+ "/venv",
38
+ ]
@@ -0,0 +1,122 @@
1
+ import asyncio
2
+ import click
3
+ from videosdk_cli.utils.config_manager import set_config_value
4
+ from videosdk_cli.utils.auth_api_client import AuthAPIClient
5
+ from videosdk_cli.utils.ui.theme import (
6
+ console,
7
+ print_header,
8
+ print_success,
9
+ print_info,
10
+ PRIMARY,
11
+ MUTED,
12
+ )
13
+ import os
14
+ import webbrowser
15
+
16
+
17
+ @click.group()
18
+ def auth_cli():
19
+ """
20
+ Authenticate with VideoSDK.
21
+
22
+ Login or logout from your VideoSDK account. Authentication is required
23
+ for deploying and managing agents.
24
+
25
+ \b
26
+ Commands:
27
+ login Authenticate with your VideoSDK account
28
+ logout Remove stored authentication token
29
+ """
30
+ pass
31
+
32
+
33
+ @auth_cli.command(name="login")
34
+ def login():
35
+ """
36
+ Login to your VideoSDK account.
37
+
38
+ Opens a browser window for authentication. After successful login,
39
+ your credentials are stored locally for future CLI commands.
40
+
41
+ \b
42
+ Example:
43
+ $ videosdk auth login
44
+ """
45
+ try:
46
+ asyncio.run(handle_auth())
47
+ except KeyboardInterrupt:
48
+ console.print(f"\n[{PRIMARY}]Authentication cancelled by user[/{PRIMARY}]")
49
+ except Exception as e:
50
+ raise click.ClickException(f"Authentication failed: Please try again")
51
+
52
+
53
+ @auth_cli.command(name="logout")
54
+ def logout():
55
+ """
56
+ Logout from your VideoSDK account.
57
+
58
+ Removes the stored authentication token. You will need to login
59
+ again to use authenticated commands.
60
+
61
+ \b
62
+ Example:
63
+ $ videosdk auth logout
64
+ """
65
+ try:
66
+ asyncio.run(handle_logout())
67
+ except KeyboardInterrupt:
68
+ console.print(f"\n[{PRIMARY}]Logout cancelled by user[/{PRIMARY}]")
69
+ except Exception as e:
70
+ raise click.ClickException(f"Logout failed: Please try again")
71
+
72
+
73
+ async def handle_auth():
74
+ from videosdk_cli.utils.template_helper import API_BASE_URL, DASHBOARD_URL
75
+
76
+ client = AuthAPIClient(api_base_url=API_BASE_URL)
77
+
78
+ print_header("Authentication")
79
+ print_info("Initiating browser authentication...")
80
+
81
+ data = await client.start_auth()
82
+
83
+ generated_url = DASHBOARD_URL + "/cli/confirm-auth?requestId=" + data["requestId"]
84
+ webbrowser.open(generated_url)
85
+
86
+ print_success(f"Opened authentication URL in browser")
87
+ console.print(f" [{MUTED}]{generated_url}[/{MUTED}]")
88
+ console.print()
89
+
90
+ requestId = data["requestId"]
91
+ expires_in = data["expiresIn"]
92
+
93
+ poll_interval = 3
94
+ attempts = expires_in // poll_interval
95
+
96
+ with console.status(
97
+ f"[{PRIMARY}]Waiting for authentication...[/{PRIMARY}]", spinner="dots"
98
+ ) as status:
99
+ for i in range(attempts):
100
+ await asyncio.sleep(poll_interval)
101
+
102
+ auth_status = await client.check_status(requestId)
103
+
104
+ if auth_status["status"] == "approved":
105
+ set_config_value("VIDEOSDK_AUTH_TOKEN", auth_status["token"])
106
+ status.stop()
107
+ print_success("Successfully authenticated!")
108
+ return
109
+
110
+ if auth_status["status"] == "expired":
111
+ status.stop()
112
+ raise click.ClickException(
113
+ "Authentication link expired. Please run `videosdk auth login` again."
114
+ )
115
+
116
+ raise click.ClickException("Authentication timed out. Please try again.")
117
+
118
+
119
+ async def handle_logout():
120
+ print_header("Logout")
121
+ set_config_value("VIDEOSDK_AUTH_TOKEN", None)
122
+ print_success("Successfully logged out")