isage-cli 0.2.4.12__py2.py3-none-any.whl

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 (58) hide show
  1. isage_cli-0.2.4.12.dist-info/METADATA +295 -0
  2. isage_cli-0.2.4.12.dist-info/RECORD +58 -0
  3. isage_cli-0.2.4.12.dist-info/WHEEL +6 -0
  4. isage_cli-0.2.4.12.dist-info/entry_points.txt +2 -0
  5. isage_cli-0.2.4.12.dist-info/top_level.txt +1 -0
  6. sage/cli/__init__.py +22 -0
  7. sage/cli/_version.py +5 -0
  8. sage/cli/commands/__init__.py +0 -0
  9. sage/cli/commands/apps/__init__.py +68 -0
  10. sage/cli/commands/apps/chat.py +2150 -0
  11. sage/cli/commands/apps/embedding.py +424 -0
  12. sage/cli/commands/apps/gateway.py +443 -0
  13. sage/cli/commands/apps/inference.py +652 -0
  14. sage/cli/commands/apps/llm.py +202 -0
  15. sage/cli/commands/apps/pipeline.py +1652 -0
  16. sage/cli/commands/apps/pipeline_domain.py +236 -0
  17. sage/cli/commands/apps/pipeline_embedding.py +509 -0
  18. sage/cli/commands/apps/pipeline_knowledge.py +410 -0
  19. sage/cli/commands/demo.py +302 -0
  20. sage/cli/commands/platform/__init__.py +110 -0
  21. sage/cli/commands/platform/cluster.py +337 -0
  22. sage/cli/commands/platform/config.py +74 -0
  23. sage/cli/commands/platform/docs.py +254 -0
  24. sage/cli/commands/platform/doctor.py +66 -0
  25. sage/cli/commands/platform/env.py +147 -0
  26. sage/cli/commands/platform/extensions.py +907 -0
  27. sage/cli/commands/platform/head.py +413 -0
  28. sage/cli/commands/platform/job.py +641 -0
  29. sage/cli/commands/platform/jobmanager.py +631 -0
  30. sage/cli/commands/platform/llm_config.py +191 -0
  31. sage/cli/commands/platform/logs.py +274 -0
  32. sage/cli/commands/platform/runtime.py +304 -0
  33. sage/cli/commands/platform/runtime_checker.py +153 -0
  34. sage/cli/commands/platform/ssh_setup.py +302 -0
  35. sage/cli/commands/platform/version.py +61 -0
  36. sage/cli/commands/platform/worker.py +548 -0
  37. sage/cli/core/__init__.py +16 -0
  38. sage/cli/core/base.py +370 -0
  39. sage/cli/core/config.py +312 -0
  40. sage/cli/core/config_refactored.py +244 -0
  41. sage/cli/core/exceptions.py +64 -0
  42. sage/cli/core/output.py +281 -0
  43. sage/cli/core/refactor_example.py +269 -0
  44. sage/cli/core/ssh.py +378 -0
  45. sage/cli/core/utils.py +448 -0
  46. sage/cli/core/validation.py +407 -0
  47. sage/cli/main.py +284 -0
  48. sage/cli/management/__init__.py +14 -0
  49. sage/cli/management/config_manager.py +355 -0
  50. sage/cli/management/deployment_manager.py +773 -0
  51. sage/cli/templates/__init__.py +21 -0
  52. sage/cli/templates/catalog.py +510 -0
  53. sage/cli/templates/pipeline_blueprints.py +1091 -0
  54. sage/cli/utils/__init__.py +17 -0
  55. sage/cli/utils/dev_check.py +129 -0
  56. sage/cli/utils/diagnostics.py +484 -0
  57. sage/cli/utils/env.py +181 -0
  58. sage/cli/utils/llm_detection.py +193 -0
@@ -0,0 +1,295 @@
1
+ Metadata-Version: 2.4
2
+ Name: isage-cli
3
+ Version: 0.2.4.12
4
+ Summary: SAGE Command Line Interface - Unified CLI for SAGE platform
5
+ Author-email: IntelliStream Team <shuhao_zhang@hust.edu.cn>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/intellistream/SAGE
8
+ Project-URL: Documentation, https://intellistream.github.io/SAGE
9
+ Project-URL: Repository, https://github.com/intellistream/SAGE
10
+ Project-URL: Issues, https://github.com/intellistream/SAGE/issues
11
+ Keywords: sage,cli,command-line,streaming,ai
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Requires-Python: >=3.9
20
+ Description-Content-Type: text/markdown
21
+ Requires-Dist: typer<1.0.0,>=0.15.0
22
+ Requires-Dist: rich>=13.0.0
23
+ Requires-Dist: pyyaml>=6.0
24
+ Requires-Dist: python-dotenv<2.0.0,>=1.1.0
25
+ Requires-Dist: requests<3.0.0,>=2.32.0
26
+ Requires-Dist: httpx<1.0.0,>=0.28.0
27
+ Requires-Dist: colorama>=0.4.6
28
+ Requires-Dist: tabulate<1.0.0,>=0.9.0
29
+ Provides-Extra: dev
30
+ Requires-Dist: pytest>=7.4.0; extra == "dev"
31
+ Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
32
+ Requires-Dist: ruff==0.14.6; extra == "dev"
33
+ Requires-Dist: isage-pypi-publisher>=0.2.0; extra == "dev"
34
+
35
+ # SAGE CLI
36
+
37
+ > **Unified Command Line Interface for SAGE Platform**
38
+
39
+ [![Python Version](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/downloads/)
40
+ [![License](https://img.shields.io/badge/license-Apache%202.0-green.svg)](../../LICENSE)
41
+
42
+ SAGE CLI (`sage-cli`) is the unified command-line interface for the SAGE (Streaming-Augmented
43
+ Generative Execution) platform. It provides a comprehensive set of commands for managing clusters,
44
+ deploying applications, and developing with SAGE.
45
+
46
+ ## 🧭 Governance / 团队协作制度
47
+
48
+ - `docs/governance/TEAM.md`
49
+ - `docs/governance/MAINTAINERS.md`
50
+ - `docs/governance/DEVELOPER_GUIDE.md`
51
+ - `docs/governance/PR_CHECKLIST.md`
52
+ - `docs/governance/SELF_HOSTED_RUNNER.md`
53
+ - `docs/governance/TODO.md`
54
+
55
+ ## 📋 Overview
56
+
57
+ **SAGE CLI** is the unified command-line interface for SAGE platform, providing commands for:
58
+
59
+ - **Cluster Management**: Start/stop Flownet-based runtime clusters, manage head/worker nodes
60
+ - **LLM Services**: Launch and manage LLM inference services
61
+ - **Development**: Tools for testing, quality checks, and project management
62
+ - **Monitoring**: System diagnostics and status checks
63
+
64
+ ## ✨ Features
65
+
66
+ - **Unified Interface**: Single `sage` command for all platform operations
67
+ - **Cluster Orchestration**: Full Flownet runtime lifecycle management
68
+ - **LLM Integration**: Start LLM services with automatic model loading
69
+ - **Interactive Chat**: Built-in chat interface for testing
70
+ - **Development Tools**: Via separate `sage-dev` command from sage-tools package
71
+
72
+ ## 🚀 Installation
73
+
74
+ ```bash
75
+ # From source
76
+ cd packages/sage-cli
77
+ pip install -e .
78
+
79
+ # Or install from PyPI (when published)
80
+ pip install sage-cli
81
+ ```
82
+
83
+ ## 📋 Command Structure
84
+
85
+ SAGE CLI organizes commands into two main categories:
86
+
87
+ ### Platform Commands
88
+
89
+ Manage SAGE infrastructure and system components:
90
+
91
+ - `sage cluster` - Flownet runtime cluster management
92
+ - `sage head` - Head node management
93
+ - `sage worker` - Worker node management
94
+ - `sage job` - Job management
95
+ - `sage jobmanager` - JobManager service
96
+ - `sage config` - Configuration management
97
+ - `sage doctor` - System diagnostics
98
+ - `sage version` - Version information
99
+ - `sage extensions` - C++ extension management
100
+
101
+ ### Application Commands
102
+
103
+ Application-level functionality:
104
+
105
+ - `sage llm` - LLM service management
106
+ - `sage chat` - Interactive chat interface
107
+ - `sage embedding` - Embedding service management
108
+ - `sage pipeline` - Pipeline builder
109
+ - `sage studio` - Visual pipeline editor
110
+
111
+ ### Development Commands
112
+
113
+ **Note:** Development commands are provided by the `sage-tools` package separately via the
114
+ `sage-dev` command.
115
+
116
+ To use development tools:
117
+
118
+ ```bash
119
+ # Install sage-tools (if not already installed)
120
+ pip install sage-tools
121
+
122
+ # Use sage-dev command
123
+ sage-dev quality check
124
+ sage-dev project test
125
+ sage-dev maintain doctor
126
+ ```
127
+
128
+ Development command groups include:
129
+
130
+ - `sage-dev quality` - Code quality checks
131
+ - `sage-dev project` - Project management
132
+ - `sage-dev maintain` - Maintenance tools
133
+ - `sage-dev package` - Package management
134
+ - `sage-dev resource` - Resource management
135
+ - `sage-dev github` - GitHub utilities
136
+
137
+ ## 📖 Quick Start
138
+
139
+ ### Basic Commands
140
+
141
+ ```bash
142
+ # Check system status
143
+ sage doctor
144
+
145
+ # View version
146
+ sage version
147
+
148
+ # Get help
149
+ sage --help
150
+ sage <command> --help
151
+ ```
152
+
153
+ ### Cluster Management
154
+
155
+ ```bash
156
+ # Start a cluster
157
+ sage cluster start
158
+
159
+ # View cluster status
160
+ sage cluster status
161
+
162
+ # Stop cluster
163
+ sage cluster stop
164
+ ```
165
+
166
+ ### LLM Service
167
+
168
+ ```bash
169
+ # Start LLM service
170
+ sage llm start --model Qwen/Qwen2.5-7B-Instruct
171
+
172
+ # Check status
173
+ sage llm status
174
+
175
+ # Interactive chat
176
+ sage chat
177
+ ```
178
+
179
+ ### Development Tools
180
+
181
+ For development commands, install `sage-tools`:
182
+
183
+ ```bash
184
+ pip install sage-tools
185
+
186
+ # Run development checks
187
+ sage-dev quality check
188
+
189
+ # Run tests
190
+ sage-dev project test
191
+ ```
192
+
193
+ ## � Configuration
194
+
195
+ SAGE CLI reads configuration from:
196
+
197
+ - `~/.sage/config.yaml` - User configuration
198
+ - `./config/config.yaml` - Project configuration
199
+ - Environment variables: `SAGE_*`
200
+
201
+ ```yaml
202
+ # config.yaml example
203
+ cluster:
204
+ head_node: localhost
205
+ workers: 4
206
+
207
+ llm:
208
+ model: Qwen/Qwen2.5-7B-Instruct
209
+ port: 8001
210
+ ```
211
+
212
+ ## 📦 Package Structure
213
+
214
+ ```
215
+ sage-cli/
216
+ ├── src/
217
+ │ └── sage/
218
+ │ └── cli/
219
+ │ ├── commands/ # Command implementations
220
+ │ ├── cluster/ # Cluster management
221
+ │ └── llm/ # LLM service commands
222
+ ├── tests/
223
+ ├── pyproject.toml
224
+ └── README.md
225
+ ```
226
+
227
+ ## 🧪 Testing
228
+
229
+ ```bash
230
+ # Run CLI tests
231
+ pytest packages/sage-cli/tests/
232
+
233
+ # Test specific command
234
+ sage --help
235
+ sage cluster --help
236
+
237
+ # Run integration tests
238
+ sage-dev project test --package sage-cli
239
+ ```
240
+
241
+ ## �📚 Documentation
242
+
243
+ For detailed documentation, see:
244
+
245
+ - [SAGE Documentation](https://intellistream.github.io/SAGE)
246
+ - [Project Changelog](../../CHANGELOG.md)
247
+
248
+ ## 🏗️ Architecture
249
+
250
+ SAGE CLI is part of the L5 (Interface Layer) in the SAGE architecture:
251
+
252
+ ```
253
+ L1: sage-common (Foundation)
254
+ L2: sage-platform (Platform Core)
255
+ L3: sage-kernel, sage-libs
256
+ L4: sage-middleware
257
+ L5: sage-cli, sage-tools
258
+ ├── sage-cli: Production CLI via `sage` command
259
+ └── sage-tools: Development tools via `sage-dev` command
260
+ ```
261
+
262
+ **Independent Repositories:**
263
+
264
+ - sage-benchmark: Benchmark suites
265
+ - sage-examples: Applications and tutorials
266
+ - sage-studio: Visual interface
267
+ - sageLLM: LLM inference engine
268
+
269
+ **Command Separation:**
270
+
271
+ - **sage** (from sage-cli): User-facing production commands
272
+
273
+ - Platform: cluster, head, worker, job, jobmanager, config, doctor, version, extensions
274
+ - Apps: llm, chat, embedding, pipeline
275
+
276
+ - **sage-dev** (from sage-tools): Developer-only commands
277
+
278
+ - quality, project, maintain, package, resource, github
279
+
280
+ Both packages are independent and can be installed separately.
281
+
282
+ ## 🤝 Contributing
283
+
284
+ Contributions are welcome! Please see [CONTRIBUTING.md](../../CONTRIBUTING.md) for guidelines.
285
+
286
+ ## 📄 License
287
+
288
+ Apache License 2.0 - see [LICENSE](../../LICENSE) for details.
289
+
290
+ ## 🔗 Related Packages
291
+
292
+ - `sage-tools` - Development tools and `sage-dev` commands
293
+ - `sage-platform` - SAGE platform core
294
+ - `sage-apps` - SAGE applications
295
+ - `sage-studio` - Visual pipeline editor
@@ -0,0 +1,58 @@
1
+ sage/cli/__init__.py,sha256=bo7KxexewLNQP2YcoXpvXtOi3Kkoo-OVVKwVAbt-SjQ,497
2
+ sage/cli/_version.py,sha256=QudkwDIVkRCUOizJ5yYAh29sLpTMmqS5l_FuSO6QEPk,139
3
+ sage/cli/main.py,sha256=ur2lqg6_47jJ3k67jis9I1TM2K8aVvLTtqsBpVMDFbA,8996
4
+ sage/cli/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ sage/cli/commands/demo.py,sha256=ZldScyTQCCvVyAC0vXOQa5pJ3cNkY5RP3gL1jcSR1g8,9439
6
+ sage/cli/commands/apps/__init__.py,sha256=1K2eJIJDAPjI0x6UjS3-D2pSkoZPJY08gCSZMUypSlg,1781
7
+ sage/cli/commands/apps/chat.py,sha256=_kV5_vMcy_2qMRuIf2Wg9elUIYEN-kOisfNz_JgqKoI,78108
8
+ sage/cli/commands/apps/embedding.py,sha256=MOfpCy7kUbK0WyfAB6Va6b1H42GMPRUDRYFE4yr2osM,12015
9
+ sage/cli/commands/apps/gateway.py,sha256=GaqHXiSnzeRscJOgj-RrneM_-noFN3BnXi4PqQW4AFA,14301
10
+ sage/cli/commands/apps/inference.py,sha256=cVMd6uyVrfAdrPTQSz_rbwfhHwKrAF9r5rRCTsixXWc,21620
11
+ sage/cli/commands/apps/llm.py,sha256=D2T4fSBT0ifN8T8UzduXm-nnoH53CInpsgj3obK6FqI,6505
12
+ sage/cli/commands/apps/pipeline.py,sha256=pNwXlhl7LeCXYEa-NtJ3feB-5mIPRqXd1HDlNmPabXM,59894
13
+ sage/cli/commands/apps/pipeline_domain.py,sha256=zivBsd7f2aLinNHFxwRE5R99fDZt-vY3dHn4sbIkRVk,8257
14
+ sage/cli/commands/apps/pipeline_embedding.py,sha256=YFmlBk5FU_4pOKpytiDDo8qD8S5tw99-59o5COyah5Y,18651
15
+ sage/cli/commands/apps/pipeline_knowledge.py,sha256=NDNCppNpfMEhabQXqovW8lB-AWni9T4yg0wucnpGqHQ,13848
16
+ sage/cli/commands/platform/__init__.py,sha256=pMptBNWXT_duZwFLlXmu49JpOQhJYc6sFZrLUOUwajw,2889
17
+ sage/cli/commands/platform/cluster.py,sha256=XoRC2CTpD142ervDQiXHzUyXsZogUKmAHsmsg0kgjM8,11583
18
+ sage/cli/commands/platform/config.py,sha256=gqv7l6os-f9D7x7CJbnFaKYV8L37lGXQuPshuU-Acz0,2667
19
+ sage/cli/commands/platform/docs.py,sha256=Wo7eDpzY7VIAX-pcHsKa2ZLiErdp8LrU1Wd2BkZ7TN0,7272
20
+ sage/cli/commands/platform/doctor.py,sha256=zwATcQsEUcOjJu1C5mwqWwYOSoCeowEUdzHiXA4Wh6A,1832
21
+ sage/cli/commands/platform/env.py,sha256=R28wFrOIgcy-4OBcinCRNxyGiCPGdv4q3VHh_Q-OqEU,5137
22
+ sage/cli/commands/platform/extensions.py,sha256=awq2qurR5qNqquwmIhxMyeq7fGmMngT1jC_-Phyl-eM,31534
23
+ sage/cli/commands/platform/head.py,sha256=PKsCe5mz0kqe2DDTcbWkiPdEwCef7o2qhO7Il0IvfZk,14682
24
+ sage/cli/commands/platform/job.py,sha256=AeyCMAWtZoL52Gb9i9jBMUwufQHAPUwwcXCgyAkrI0o,21559
25
+ sage/cli/commands/platform/jobmanager.py,sha256=zSOck8ZWcZptX6ey89zh72vV5kOFeX2zU-6rCbahkx4,24874
26
+ sage/cli/commands/platform/llm_config.py,sha256=zjcNHHE6S2R02lTDvfXzHiAmIkA5xc9bDGe29Vnj3iI,6858
27
+ sage/cli/commands/platform/logs.py,sha256=ORIXwgGLf1DIoqjk_I57rSE6gdzU0hFOgfLgD_z0zLs,8881
28
+ sage/cli/commands/platform/runtime.py,sha256=pnT3ds3tG1Z0HTC4-PnvFBJPCb0Q92axCp2mtdcLgb8,9776
29
+ sage/cli/commands/platform/runtime_checker.py,sha256=RfqnLzD01E1BVohXYNbxq4_Me72hhMtoazs1Nei5VUI,4204
30
+ sage/cli/commands/platform/ssh_setup.py,sha256=pPeI92i-eXBKXP68SvvgBg1ycJFdVaPWstAgd_w78gU,9052
31
+ sage/cli/commands/platform/version.py,sha256=qabquT956A5VtYAB1INrUwWfQhfdYaamnfGDmD9vy1Q,1843
32
+ sage/cli/commands/platform/worker.py,sha256=OOiualcwflZxyzKJ-mkDJZRCwXc-Ox4f8EQFYcR3Qiw,18190
33
+ sage/cli/core/__init__.py,sha256=Zkrk5Kic3MFD6LaYarKaToCKBoxHRUTXd0Sz6pgZRMk,406
34
+ sage/cli/core/base.py,sha256=aP6jwDXhnd3Ho_ybWiqHm6ev5a-dXgWrXyeD2TlUEWY,12526
35
+ sage/cli/core/config.py,sha256=Cls55jf4y74of79KJkJiXbC8CAnjQdgqwVLmNedT65w,10054
36
+ sage/cli/core/config_refactored.py,sha256=cuYp2n0hLaXftkZTlfhVt1Rnqjmetneh0rPp2rxQtdg,8660
37
+ sage/cli/core/exceptions.py,sha256=7gY4BvVNVyRsq9a1PTf1S5cGLW0Pihh7BRLAYriGRkc,1491
38
+ sage/cli/core/output.py,sha256=3moyyeMiQvODNnpOv6VQtBkswmWmpCF0vBXDrIH0CX0,8206
39
+ sage/cli/core/refactor_example.py,sha256=EBN6SqWGawhAr7T7d_PwEDRJ9lMchNXbhgXPqj1mFUk,8415
40
+ sage/cli/core/ssh.py,sha256=-UUz8pJF9yewtS67l9EpKG-7f7tiwm-ChxUT-iRzRAY,11514
41
+ sage/cli/core/utils.py,sha256=WulPrzXZPEBVgKTcwEZQrfPf8SRNB1walTZODHBnLoI,11143
42
+ sage/cli/core/validation.py,sha256=uSEpe7sd3R_1t7v4XDnM3wgALrhLbZxrSNivwTNOT7Y,9906
43
+ sage/cli/management/__init__.py,sha256=SGBGkAnrV4kstcpUXtEP5UxmtaHc00AhcDkH10hfZA4,304
44
+ sage/cli/management/config_manager.py,sha256=xUiv6N2PNO3EKg1J69YyxFdz51GYDYXhZjYMCSftGUs,11451
45
+ sage/cli/management/deployment_manager.py,sha256=87FjBnlDfZfDc28bww5GQolQuVqzxO6CHonKK4Jq_PU,31405
46
+ sage/cli/templates/__init__.py,sha256=_eZAevfgv68fwiB9g3VgstXAyTCgrfnMvqvJD8i9q6s,431
47
+ sage/cli/templates/catalog.py,sha256=2yV3xsu0fphDFetElByZy93NRWhdLW6hVvvjeO5Pe3U,18812
48
+ sage/cli/templates/pipeline_blueprints.py,sha256=aIUQh-gNPXU9jztI_-PZK4QeLTZ4YeetFIuzwwlBcG0,39361
49
+ sage/cli/utils/__init__.py,sha256=RQAnoP6uiDzcHt2eW0-bb6g8NGiOxQEH6Gne49NsLm4,329
50
+ sage/cli/utils/dev_check.py,sha256=G3KY5mTBRfUZj9pbs4waPtFGZm1QjPMuhv-_pgTU1sA,3873
51
+ sage/cli/utils/diagnostics.py,sha256=Eccq_7E2zpcfwMcer1om4loRolzbsiyZ1dTuHdZiQ8A,17284
52
+ sage/cli/utils/env.py,sha256=httNtm4RjYG88SffH4cW_gg_HInqMcrvA0r6NLURAuE,5657
53
+ sage/cli/utils/llm_detection.py,sha256=Im3caKRKu9U9qL8MGM-izkeFj7ICBWAc32JN4tb44kY,5540
54
+ isage_cli-0.2.4.12.dist-info/METADATA,sha256=D49EsgDsdB7ymfuhR4TwxqI1UqvWC8Mc0h45bisLlGM,7575
55
+ isage_cli-0.2.4.12.dist-info/WHEEL,sha256=Mk1ST5gDzEO5il5kYREiBnzzM469m5sI8ESPl7TRhJY,110
56
+ isage_cli-0.2.4.12.dist-info/entry_points.txt,sha256=s77M4e4PHBSG58s7WdArt8mtBeC579CmWrcKYKVFUJ0,43
57
+ isage_cli-0.2.4.12.dist-info/top_level.txt,sha256=hibFyzQHiLOMK68qL1OWsNKaXOmSXqZjeLTBem6Yy7I,5
58
+ isage_cli-0.2.4.12.dist-info/RECORD,,
@@ -0,0 +1,6 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.10.2)
3
+ Root-Is-Purelib: true
4
+ Tag: py2-none-any
5
+ Tag: py3-none-any
6
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ sage = sage.cli.main:app
@@ -0,0 +1 @@
1
+ sage
sage/cli/__init__.py ADDED
@@ -0,0 +1,22 @@
1
+ """SAGE CLI - Command Line Interface (L5)
2
+
3
+ Layer: L5 (Interface Layer)
4
+
5
+ Unified command-line interface for SAGE platform operations:
6
+ - App management (run, stop, status)
7
+ - LLM service control (start, stop, status)
8
+ - Cluster management
9
+ - Development tools
10
+
11
+ Architecture Rules:
12
+ - ✅ Can import from: L1-L4 (all lower layers)
13
+ - ❌ Must NOT be imported by: other packages (top layer, no upward dependencies)
14
+ """
15
+
16
+ from ._version import __version__
17
+
18
+ __layer__ = "L5"
19
+
20
+ __all__ = [
21
+ "__version__",
22
+ ]
sage/cli/_version.py ADDED
@@ -0,0 +1,5 @@
1
+ """Version information for sage-cli."""
2
+
3
+ __version__ = "0.2.4.12"
4
+ __author__ = "IntelliStream Team"
5
+ __email__ = "shuhao_zhang@hust.edu.cn"
File without changes
@@ -0,0 +1,68 @@
1
+ """
2
+ SAGE Application Commands
3
+
4
+ 应用层命令组,包括:
5
+ - llm: LLM服务管理
6
+ - chat: 编程助手
7
+ - embedding: Embedding管理
8
+ - pipeline: Pipeline构建器
9
+ - inference: 统一推理服务管理
10
+ - gateway: API网关服务
11
+
12
+ Note: studio和edge已独立为单独的仓库/包,不再包含在CLI中
13
+ """
14
+
15
+ from rich.console import Console
16
+
17
+ console = Console()
18
+
19
+ # 导入所有应用命令
20
+ try:
21
+ from .llm import app as llm_app
22
+ except ImportError as e:
23
+ console.print(f"[yellow]警告: 无法导入 llm 命令: {e}[/yellow]")
24
+ llm_app = None
25
+
26
+ try:
27
+ from .chat import app as chat_app
28
+ except ImportError as e:
29
+ console.print(f"[yellow]警告: 无法导入 chat 命令: {e}[/yellow]")
30
+ chat_app = None
31
+
32
+ try:
33
+ from .embedding import app as embedding_app
34
+ except ImportError as e:
35
+ console.print(f"[yellow]警告: 无法导入 embedding 命令: {e}[/yellow]")
36
+ embedding_app = None
37
+
38
+ try:
39
+ from .pipeline import app as pipeline_app
40
+ except ImportError as e:
41
+ console.print(f"[yellow]警告: 无法导入 pipeline 命令: {e}[/yellow]")
42
+ pipeline_app = None
43
+
44
+ try:
45
+ from .inference import app as inference_app
46
+ except ImportError as e:
47
+ console.print(f"[yellow]警告: 无法导入 inference 命令: {e}[/yellow]")
48
+ inference_app = None
49
+
50
+ try:
51
+ from .gateway import app as gateway_app
52
+ except ImportError as e:
53
+ console.print(f"[yellow]警告: 无法导入 gateway 命令: {e}[/yellow]")
54
+ gateway_app = None
55
+
56
+ # Note: studio and edge are now independent packages/repositories
57
+ # - sage-studio: https://github.com/intellistream/sage-studio
58
+ # - sage-edge: Install with: pip install isage-edge
59
+
60
+ # 导出所有命令
61
+ __all__ = [
62
+ "llm_app",
63
+ "chat_app",
64
+ "embedding_app",
65
+ "pipeline_app",
66
+ "inference_app",
67
+ "gateway_app",
68
+ ]