@xyteai/cli 0.1.0

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 (251) hide show
  1. package/LICENSE +176 -0
  2. package/README.md +245 -0
  3. package/dist/bin/xyte-cli.d.ts +3 -0
  4. package/dist/bin/xyte-cli.d.ts.map +1 -0
  5. package/dist/bin/xyte-cli.js +18 -0
  6. package/dist/bin/xyte-cli.js.map +1 -0
  7. package/dist/cli/index.d.ts +24 -0
  8. package/dist/cli/index.d.ts.map +1 -0
  9. package/dist/cli/index.js +1185 -0
  10. package/dist/cli/index.js.map +1 -0
  11. package/dist/client/catalog.d.ts +6 -0
  12. package/dist/client/catalog.d.ts.map +1 -0
  13. package/dist/client/catalog.js +32 -0
  14. package/dist/client/catalog.js.map +1 -0
  15. package/dist/client/create-client.d.ts +3 -0
  16. package/dist/client/create-client.d.ts.map +1 -0
  17. package/dist/client/create-client.js +235 -0
  18. package/dist/client/create-client.js.map +1 -0
  19. package/dist/config/connectivity.d.ts +19 -0
  20. package/dist/config/connectivity.d.ts.map +1 -0
  21. package/dist/config/connectivity.js +166 -0
  22. package/dist/config/connectivity.js.map +1 -0
  23. package/dist/config/readiness.d.ts +32 -0
  24. package/dist/config/readiness.d.ts.map +1 -0
  25. package/dist/config/readiness.js +96 -0
  26. package/dist/config/readiness.js.map +1 -0
  27. package/dist/config/retry-policy.d.ts +16 -0
  28. package/dist/config/retry-policy.d.ts.map +1 -0
  29. package/dist/config/retry-policy.js +24 -0
  30. package/dist/config/retry-policy.js.map +1 -0
  31. package/dist/contracts/call-envelope.d.ts +74 -0
  32. package/dist/contracts/call-envelope.d.ts.map +1 -0
  33. package/dist/contracts/call-envelope.js +72 -0
  34. package/dist/contracts/call-envelope.js.map +1 -0
  35. package/dist/contracts/problem.d.ts +11 -0
  36. package/dist/contracts/problem.d.ts.map +1 -0
  37. package/dist/contracts/problem.js +55 -0
  38. package/dist/contracts/problem.js.map +1 -0
  39. package/dist/contracts/versions.d.ts +6 -0
  40. package/dist/contracts/versions.d.ts.map +1 -0
  41. package/dist/contracts/versions.js +9 -0
  42. package/dist/contracts/versions.js.map +1 -0
  43. package/dist/http/errors.d.ts +24 -0
  44. package/dist/http/errors.d.ts.map +1 -0
  45. package/dist/http/errors.js +39 -0
  46. package/dist/http/errors.js.map +1 -0
  47. package/dist/http/transport.d.ts +35 -0
  48. package/dist/http/transport.d.ts.map +1 -0
  49. package/dist/http/transport.js +129 -0
  50. package/dist/http/transport.js.map +1 -0
  51. package/dist/index.d.ts +10 -0
  52. package/dist/index.d.ts.map +1 -0
  53. package/dist/index.js +23 -0
  54. package/dist/index.js.map +1 -0
  55. package/dist/mcp/server.d.ts +12 -0
  56. package/dist/mcp/server.d.ts.map +1 -0
  57. package/dist/mcp/server.js +404 -0
  58. package/dist/mcp/server.js.map +1 -0
  59. package/dist/namespaces/device.d.ts +38 -0
  60. package/dist/namespaces/device.d.ts.map +1 -0
  61. package/dist/namespaces/device.js +36 -0
  62. package/dist/namespaces/device.js.map +1 -0
  63. package/dist/namespaces/organization.d.ts +27 -0
  64. package/dist/namespaces/organization.d.ts.map +1 -0
  65. package/dist/namespaces/organization.js +30 -0
  66. package/dist/namespaces/organization.js.map +1 -0
  67. package/dist/namespaces/partner.d.ts +18 -0
  68. package/dist/namespaces/partner.d.ts.map +1 -0
  69. package/dist/namespaces/partner.js +21 -0
  70. package/dist/namespaces/partner.js.map +1 -0
  71. package/dist/observability/logger.d.ts +3 -0
  72. package/dist/observability/logger.d.ts.map +1 -0
  73. package/dist/observability/logger.js +21 -0
  74. package/dist/observability/logger.js.map +1 -0
  75. package/dist/observability/tracing.d.ts +3 -0
  76. package/dist/observability/tracing.d.ts.map +1 -0
  77. package/dist/observability/tracing.js +26 -0
  78. package/dist/observability/tracing.js.map +1 -0
  79. package/dist/secure/key-slots.d.ts +8 -0
  80. package/dist/secure/key-slots.d.ts.map +1 -0
  81. package/dist/secure/key-slots.js +47 -0
  82. package/dist/secure/key-slots.js.map +1 -0
  83. package/dist/secure/keychain.d.ts +20 -0
  84. package/dist/secure/keychain.d.ts.map +1 -0
  85. package/dist/secure/keychain.js +170 -0
  86. package/dist/secure/keychain.js.map +1 -0
  87. package/dist/secure/profile-store.d.ts +66 -0
  88. package/dist/secure/profile-store.d.ts.map +1 -0
  89. package/dist/secure/profile-store.js +309 -0
  90. package/dist/secure/profile-store.js.map +1 -0
  91. package/dist/spec/public-endpoints.json +1175 -0
  92. package/dist/tui/animation.d.ts +12 -0
  93. package/dist/tui/animation.d.ts.map +1 -0
  94. package/dist/tui/animation.js +41 -0
  95. package/dist/tui/animation.js.map +1 -0
  96. package/dist/tui/app.d.ts +27 -0
  97. package/dist/tui/app.d.ts.map +1 -0
  98. package/dist/tui/app.js +711 -0
  99. package/dist/tui/app.js.map +1 -0
  100. package/dist/tui/assets/logo.d.ts +5 -0
  101. package/dist/tui/assets/logo.d.ts.map +1 -0
  102. package/dist/tui/assets/logo.js +24 -0
  103. package/dist/tui/assets/logo.js.map +1 -0
  104. package/dist/tui/data-loaders.d.ts +33 -0
  105. package/dist/tui/data-loaders.d.ts.map +1 -0
  106. package/dist/tui/data-loaders.js +250 -0
  107. package/dist/tui/data-loaders.js.map +1 -0
  108. package/dist/tui/dispatch.d.ts +14 -0
  109. package/dist/tui/dispatch.d.ts.map +1 -0
  110. package/dist/tui/dispatch.js +44 -0
  111. package/dist/tui/dispatch.js.map +1 -0
  112. package/dist/tui/headless-renderer.d.ts +20 -0
  113. package/dist/tui/headless-renderer.d.ts.map +1 -0
  114. package/dist/tui/headless-renderer.js +598 -0
  115. package/dist/tui/headless-renderer.js.map +1 -0
  116. package/dist/tui/input-controller.d.ts +29 -0
  117. package/dist/tui/input-controller.d.ts.map +1 -0
  118. package/dist/tui/input-controller.js +76 -0
  119. package/dist/tui/input-controller.js.map +1 -0
  120. package/dist/tui/key-wizard.d.ts +29 -0
  121. package/dist/tui/key-wizard.d.ts.map +1 -0
  122. package/dist/tui/key-wizard.js +177 -0
  123. package/dist/tui/key-wizard.js.map +1 -0
  124. package/dist/tui/keymap.d.ts +9 -0
  125. package/dist/tui/keymap.d.ts.map +1 -0
  126. package/dist/tui/keymap.js +29 -0
  127. package/dist/tui/keymap.js.map +1 -0
  128. package/dist/tui/layout.d.ts +16 -0
  129. package/dist/tui/layout.d.ts.map +1 -0
  130. package/dist/tui/layout.js +99 -0
  131. package/dist/tui/layout.js.map +1 -0
  132. package/dist/tui/logger.d.ts +12 -0
  133. package/dist/tui/logger.d.ts.map +1 -0
  134. package/dist/tui/logger.js +83 -0
  135. package/dist/tui/logger.js.map +1 -0
  136. package/dist/tui/navigation.d.ts +26 -0
  137. package/dist/tui/navigation.d.ts.map +1 -0
  138. package/dist/tui/navigation.js +136 -0
  139. package/dist/tui/navigation.js.map +1 -0
  140. package/dist/tui/panes.d.ts +7 -0
  141. package/dist/tui/panes.d.ts.map +1 -0
  142. package/dist/tui/panes.js +34 -0
  143. package/dist/tui/panes.js.map +1 -0
  144. package/dist/tui/runtime.d.ts +34 -0
  145. package/dist/tui/runtime.d.ts.map +1 -0
  146. package/dist/tui/runtime.js +100 -0
  147. package/dist/tui/runtime.js.map +1 -0
  148. package/dist/tui/scene.d.ts +160 -0
  149. package/dist/tui/scene.d.ts.map +1 -0
  150. package/dist/tui/scene.js +424 -0
  151. package/dist/tui/scene.js.map +1 -0
  152. package/dist/tui/screens/config.d.ts +3 -0
  153. package/dist/tui/screens/config.d.ts.map +1 -0
  154. package/dist/tui/screens/config.js +406 -0
  155. package/dist/tui/screens/config.js.map +1 -0
  156. package/dist/tui/screens/dashboard.d.ts +3 -0
  157. package/dist/tui/screens/dashboard.d.ts.map +1 -0
  158. package/dist/tui/screens/dashboard.js +176 -0
  159. package/dist/tui/screens/dashboard.js.map +1 -0
  160. package/dist/tui/screens/devices.d.ts +3 -0
  161. package/dist/tui/screens/devices.d.ts.map +1 -0
  162. package/dist/tui/screens/devices.js +297 -0
  163. package/dist/tui/screens/devices.js.map +1 -0
  164. package/dist/tui/screens/incidents.d.ts +4 -0
  165. package/dist/tui/screens/incidents.d.ts.map +1 -0
  166. package/dist/tui/screens/incidents.js +304 -0
  167. package/dist/tui/screens/incidents.js.map +1 -0
  168. package/dist/tui/screens/setup.d.ts +3 -0
  169. package/dist/tui/screens/setup.d.ts.map +1 -0
  170. package/dist/tui/screens/setup.js +299 -0
  171. package/dist/tui/screens/setup.js.map +1 -0
  172. package/dist/tui/screens/spaces.d.ts +7 -0
  173. package/dist/tui/screens/spaces.d.ts.map +1 -0
  174. package/dist/tui/screens/spaces.js +422 -0
  175. package/dist/tui/screens/spaces.js.map +1 -0
  176. package/dist/tui/screens/tickets.d.ts +9 -0
  177. package/dist/tui/screens/tickets.d.ts.map +1 -0
  178. package/dist/tui/screens/tickets.js +418 -0
  179. package/dist/tui/screens/tickets.js.map +1 -0
  180. package/dist/tui/serialize.d.ts +31 -0
  181. package/dist/tui/serialize.d.ts.map +1 -0
  182. package/dist/tui/serialize.js +183 -0
  183. package/dist/tui/serialize.js.map +1 -0
  184. package/dist/tui/table-format.d.ts +11 -0
  185. package/dist/tui/table-format.d.ts.map +1 -0
  186. package/dist/tui/table-format.js +77 -0
  187. package/dist/tui/table-format.js.map +1 -0
  188. package/dist/tui/tabs.d.ts +4 -0
  189. package/dist/tui/tabs.d.ts.map +1 -0
  190. package/dist/tui/tabs.js +13 -0
  191. package/dist/tui/tabs.js.map +1 -0
  192. package/dist/tui/types.d.ts +37 -0
  193. package/dist/tui/types.d.ts.map +1 -0
  194. package/dist/tui/types.js +3 -0
  195. package/dist/tui/types.js.map +1 -0
  196. package/dist/types/client.d.ts +54 -0
  197. package/dist/types/client.d.ts.map +1 -0
  198. package/dist/types/client.js +3 -0
  199. package/dist/types/client.js.map +1 -0
  200. package/dist/types/endpoints.d.ts +29 -0
  201. package/dist/types/endpoints.d.ts.map +1 -0
  202. package/dist/types/endpoints.js +3 -0
  203. package/dist/types/endpoints.js.map +1 -0
  204. package/dist/types/profile.d.ts +29 -0
  205. package/dist/types/profile.d.ts.map +1 -0
  206. package/dist/types/profile.js +3 -0
  207. package/dist/types/profile.js.map +1 -0
  208. package/dist/utils/config-dir.d.ts +2 -0
  209. package/dist/utils/config-dir.d.ts.map +1 -0
  210. package/dist/utils/config-dir.js +23 -0
  211. package/dist/utils/config-dir.js.map +1 -0
  212. package/dist/utils/error-format.d.ts +4 -0
  213. package/dist/utils/error-format.d.ts.map +1 -0
  214. package/dist/utils/error-format.js +34 -0
  215. package/dist/utils/error-format.js.map +1 -0
  216. package/dist/utils/install-skills.d.ts +38 -0
  217. package/dist/utils/install-skills.d.ts.map +1 -0
  218. package/dist/utils/install-skills.js +117 -0
  219. package/dist/utils/install-skills.js.map +1 -0
  220. package/dist/utils/json-output.d.ts +6 -0
  221. package/dist/utils/json-output.d.ts.map +1 -0
  222. package/dist/utils/json-output.js +30 -0
  223. package/dist/utils/json-output.js.map +1 -0
  224. package/dist/utils/json.d.ts +4 -0
  225. package/dist/utils/json.d.ts.map +1 -0
  226. package/dist/utils/json.js +36 -0
  227. package/dist/utils/json.js.map +1 -0
  228. package/dist/utils/version.d.ts +2 -0
  229. package/dist/utils/version.d.ts.map +1 -0
  230. package/dist/utils/version.js +28 -0
  231. package/dist/utils/version.js.map +1 -0
  232. package/dist/workflows/fleet-insights.d.ts +122 -0
  233. package/dist/workflows/fleet-insights.d.ts.map +1 -0
  234. package/dist/workflows/fleet-insights.js +938 -0
  235. package/dist/workflows/fleet-insights.js.map +1 -0
  236. package/docs/schemas/call-envelope.v1.schema.json +140 -0
  237. package/docs/schemas/headless-frame.v1.schema.json +159 -0
  238. package/docs/schemas/inspect-deep-dive.v1.schema.json +251 -0
  239. package/docs/schemas/inspect-fleet.v1.schema.json +111 -0
  240. package/docs/schemas/report.v1.schema.json +39 -0
  241. package/package.json +75 -0
  242. package/skills/xyte-cli/SKILL.md +181 -0
  243. package/skills/xyte-cli/agents/openai.yaml +4 -0
  244. package/skills/xyte-cli/references/endpoints.md +106 -0
  245. package/skills/xyte-cli/references/headless-contract.md +96 -0
  246. package/skills/xyte-cli/references/tui-flows.md +126 -0
  247. package/skills/xyte-cli/scripts/check_headless.sh +83 -0
  248. package/skills/xyte-cli/scripts/endpoint_filters_report.sh +33 -0
  249. package/skills/xyte-cli/scripts/run_xyte_cli.sh +12 -0
  250. package/skills/xyte-cli/scripts/validate_agent_contracts.sh +72 -0
  251. package/skills/xyte-cli/scripts/validate_with_schema.js +30 -0
package/LICENSE ADDED
@@ -0,0 +1,176 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
package/README.md ADDED
@@ -0,0 +1,245 @@
1
+ # xyte-cli
2
+
3
+ Xyte CLI with SKILLS, built for coding agents and operators.
4
+
5
+ `xyte-cli` provides deterministic access to Xyte APIs, a full TUI (without a Network tab), guarded write flows, headless NDJSON snapshots, and an MCP server.
6
+
7
+ ### xyte-cli vs xyte MCP
8
+
9
+ - **CLI**: best fit for coding agents that need low-token, command-driven workflows.
10
+ - **MCP**: available for tool-based integrations and external orchestration via `xyte-cli mcp serve`.
11
+
12
+ ### Key Features
13
+
14
+ - One-command skill install flow: `xyte-cli install --skills`
15
+ - Guided setup embedded into install flow (unless `--no-setup`)
16
+ - Provider/slot key lifecycle (`add`, `use`, `update`, `rename`, `test`, `remove`)
17
+ - Guarded endpoint writes (`--allow-write`) and deletes (`--confirm <endpoint-key>`)
18
+ - Full TUI screens:
19
+ - `setup`, `config`, `dashboard`, `spaces`, `devices`, `incidents`, `tickets`
20
+ - Provider-first Config screen with hotkeys:
21
+ - `a`, `e`, `u`, `t`, `x`, `n`, `c`, `r`
22
+ - Headless JSON frames with stable contracts
23
+ - Inspect/report pipelines with schema-versioned output
24
+
25
+ ## Requirements
26
+
27
+ - Node.js 18+
28
+ - A valid XYTE API key
29
+ - Supported keychain backend:
30
+ - macOS Keychain
31
+ - Linux `secret-tool`
32
+ - test/runtime override: `XYTE_CLI_KEYCHAIN_BACKEND=memory`
33
+
34
+ ## Getting Started
35
+
36
+ ## Installation
37
+
38
+ ```bash
39
+ npm install -g @xyte/cli@latest
40
+ xyte-cli --help
41
+ ```
42
+
43
+ ### Install skills (recommended)
44
+
45
+ ```bash
46
+ xyte-cli install --skills
47
+ ```
48
+
49
+ By default, this command prompts for:
50
+ - install scope: `project`, `user`, or `both`
51
+ - agents: `all` or a subset of `claude,copilot,codex`
52
+
53
+ Then it installs the same skill bundle to the selected destinations and runs guided setup in the same flow.
54
+
55
+ When no prompt is available (CI/non-interactive), default is:
56
+ - scope: `project`
57
+ - agents: `all` (`claude`, `copilot`, `codex`)
58
+
59
+ Path mapping:
60
+ - Project scope:
61
+ - Claude: `.claude/skills/xyte-cli`
62
+ - Copilot: `.github/skills/xyte-cli`
63
+ - Codex: `.agents/skills/xyte-cli`
64
+ - User scope:
65
+ - Claude: `~/.claude/skills/xyte-cli`
66
+ - Copilot: `~/.copilot/skills/xyte-cli`
67
+ - Codex: `~/.agents/skills/xyte-cli`
68
+
69
+ Options:
70
+
71
+ ```bash
72
+ xyte-cli install --skills --no-setup
73
+ xyte-cli install --skills --target /path/to/workspace
74
+ xyte-cli install --skills --scope project --agents claude,codex
75
+ xyte-cli install --skills --scope both --agents all --force
76
+ xyte-cli install --skills --force
77
+ ```
78
+
79
+ ### Non-interactive setup
80
+
81
+ ```bash
82
+ XYTE_CLI_KEY="<your-key>" \
83
+ xyte-cli setup run --non-interactive --tenant acme
84
+ ```
85
+
86
+ ### Skills-less operation
87
+
88
+ Point your agent to `xyte-cli --help` and ask it to use CLI commands directly.
89
+
90
+ Example prompt:
91
+
92
+ ```text
93
+ Use xyte-cli to inspect tenant acme and generate a PDF report.
94
+ Check xyte-cli --help first and keep outputs in JSON when possible.
95
+ ```
96
+
97
+ ## Visual Demo
98
+
99
+ ![XYTE TUI dashboard](docs/media/tui-dashboard-synthetic.png)
100
+
101
+ ![XYTE headless frame](docs/media/headless-frame-synthetic.png)
102
+
103
+ ## Commands
104
+
105
+ ### Core
106
+
107
+ ```bash
108
+ xyte-cli install --skills [--target <path>] [--scope <project|user|both>] [--agents <all|claude|copilot|codex[,..]>] [--force] [--no-setup]
109
+ xyte-cli doctor install --format json
110
+ xyte-cli setup status --tenant <tenant-id> --format json
111
+ xyte-cli setup run [--non-interactive] [--tenant <tenant-id>] [--key <value>]
112
+ xyte-cli config doctor --tenant <tenant-id> --format json
113
+ ```
114
+
115
+ ### Tenant + Auth Slots
116
+
117
+ ```bash
118
+ xyte-cli tenant add <tenant-id> --name "Acme"
119
+ xyte-cli tenant use <tenant-id>
120
+ xyte-cli tenant list
121
+
122
+ xyte-cli auth key add --tenant <tenant-id> --provider xyte-org --name primary --key "<value>" --set-active
123
+ xyte-cli auth key list --tenant <tenant-id> --format json
124
+ xyte-cli auth key use --tenant <tenant-id> --provider xyte-org --slot primary
125
+ xyte-cli auth key update --tenant <tenant-id> --provider xyte-org --slot primary --key "<value>"
126
+ xyte-cli auth key rename --tenant <tenant-id> --provider xyte-org --slot primary --name prod-primary
127
+ xyte-cli auth key test --tenant <tenant-id> --provider xyte-org --slot prod-primary
128
+ xyte-cli auth key remove --tenant <tenant-id> --provider xyte-org --slot prod-primary --confirm
129
+ ```
130
+
131
+ ### Endpoint Operations
132
+
133
+ ```bash
134
+ xyte-cli list-endpoints
135
+ xyte-cli describe-endpoint organization.devices.getDevices
136
+ xyte-cli call organization.devices.getDevices --tenant <tenant-id>
137
+ xyte-cli call organization.devices.getDevices --tenant <tenant-id> --output-mode envelope
138
+ ```
139
+
140
+ ### Guarded Writes
141
+
142
+ ```bash
143
+ xyte-cli call organization.commands.sendCommand \
144
+ --tenant <tenant-id> \
145
+ --allow-write \
146
+ --path-json '{"device_id":"DEVICE_ID"}' \
147
+ --body-json '{"name":"reboot"}'
148
+
149
+ xyte-cli call organization.commands.cancelCommand \
150
+ --tenant <tenant-id> \
151
+ --allow-write \
152
+ --confirm organization.commands.cancelCommand \
153
+ --path-json '{"device_id":"DEVICE_ID","command_id":"COMMAND_ID"}'
154
+ ```
155
+
156
+ ### Insights + Reports
157
+
158
+ ```bash
159
+ xyte-cli inspect fleet --tenant <tenant-id> --format json
160
+ xyte-cli inspect deep-dive --tenant <tenant-id> --window 24 --format json > /tmp/deep-dive.json
161
+ xyte-cli report generate --tenant <tenant-id> --input /tmp/deep-dive.json --out /tmp/xyte-report.pdf
162
+ ```
163
+
164
+ ### TUI + Headless
165
+
166
+ ```bash
167
+ xyte-cli tui
168
+ xyte-cli tui --headless --screen dashboard --format json --once --tenant <tenant-id>
169
+ xyte-cli tui --headless --screen spaces --format json --follow --interval-ms 2000 --tenant <tenant-id>
170
+ ```
171
+
172
+ ### MCP
173
+
174
+ ```bash
175
+ xyte-cli mcp serve
176
+ ```
177
+
178
+ ## Headless Contract IDs
179
+
180
+ - `xyte.headless.frame.v1`
181
+ - `xyte.call.envelope.v1`
182
+ - `xyte.inspect.fleet.v1`
183
+ - `xyte.inspect.deep-dive.v1`
184
+ - `xyte.report.v1`
185
+
186
+ Schemas:
187
+
188
+ - `docs/schemas/headless-frame.v1.schema.json`
189
+ - `docs/schemas/call-envelope.v1.schema.json`
190
+ - `docs/schemas/inspect-fleet.v1.schema.json`
191
+ - `docs/schemas/inspect-deep-dive.v1.schema.json`
192
+ - `docs/schemas/report.v1.schema.json`
193
+
194
+ ## Agent Quick Start
195
+
196
+ ### Claude
197
+
198
+ ```bash
199
+ xyte-cli install --skills
200
+ claude
201
+ ```
202
+
203
+ ### Codex
204
+
205
+ ```bash
206
+ xyte-cli install --skills
207
+ # in Codex prompts, ask to run xyte-cli commands directly
208
+ ```
209
+
210
+ ### GitHub Copilot
211
+
212
+ ```bash
213
+ xyte-cli install --skills
214
+ # in Copilot prompts, ask to run xyte-cli commands directly
215
+ ```
216
+
217
+ ## Development
218
+
219
+ ```bash
220
+ npm ci
221
+ npm run typecheck
222
+ npm test
223
+ npm run build
224
+ npm pack
225
+ ```
226
+
227
+ Local package smoke:
228
+
229
+ ```bash
230
+ npm i -g ./xyte-cli-*.tgz
231
+ xyte-cli install --skills --no-setup
232
+ ```
233
+
234
+ ## Release
235
+
236
+ Manual npm release steps are documented in:
237
+
238
+ - `docs/release.md`
239
+
240
+ ## Skill Package Layout
241
+
242
+ - `skills/xyte-cli/SKILL.md`
243
+ - `skills/xyte-cli/references/`
244
+ - `skills/xyte-cli/scripts/`
245
+ - `skills/xyte-cli/agents/`
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=xyte-cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"xyte-cli.d.ts","sourceRoot":"","sources":["../../src/bin/xyte-cli.ts"],"names":[],"mappings":""}
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ const index_1 = require("../cli/index");
5
+ const problem_1 = require("../contracts/problem");
6
+ const error_format_1 = require("../utils/error-format");
7
+ (0, index_1.runCli)().catch((error) => {
8
+ const errorFormat = (0, error_format_1.resolveCliErrorFormat)(process.argv.slice(2), process.env.XYTE_ERROR_FORMAT);
9
+ if (errorFormat === 'json') {
10
+ process.stderr.write(`${JSON.stringify((0, problem_1.toProblemDetails)(error), null, 2)}\n`);
11
+ process.exit(1);
12
+ return;
13
+ }
14
+ const message = error instanceof Error ? error.message : String(error);
15
+ process.stderr.write(`${message}\n`);
16
+ process.exit(1);
17
+ });
18
+ //# sourceMappingURL=xyte-cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"xyte-cli.js","sourceRoot":"","sources":["../../src/bin/xyte-cli.ts"],"names":[],"mappings":";;;AAEA,wCAAsC;AACtC,kDAAwD;AACxD,wDAA8D;AAE9D,IAAA,cAAM,GAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACvB,MAAM,WAAW,GAAG,IAAA,oCAAqB,EAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IAChG,IAAI,WAAW,KAAK,MAAM,EAAE,CAAC;QAC3B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,IAAA,0BAAgB,EAAC,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;QAC9E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAChB,OAAO;IACT,CAAC;IAED,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,OAAO,IAAI,CAAC,CAAC;IACrC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { Command } from 'commander';
2
+ import { type KeychainStore } from '../secure/keychain';
3
+ import { type ProfileStore } from '../secure/profile-store';
4
+ import { runTuiApp } from '../tui/app';
5
+ type OutputStream = Pick<typeof process.stdout, 'write'>;
6
+ type ErrorStream = Pick<typeof process.stderr, 'write'>;
7
+ type PromptValueFn = (args: {
8
+ question: string;
9
+ initial?: string;
10
+ stdout: OutputStream;
11
+ }) => Promise<string>;
12
+ export interface CliRuntime {
13
+ profileStore?: ProfileStore;
14
+ keychain?: KeychainStore;
15
+ stdout?: OutputStream;
16
+ stderr?: ErrorStream;
17
+ runTui?: typeof runTuiApp;
18
+ promptValue?: PromptValueFn;
19
+ isTTY?: boolean;
20
+ }
21
+ export declare function createCli(runtime?: CliRuntime): Command;
22
+ export declare function runCli(argv?: string[], runtime?: CliRuntime): Promise<void>;
23
+ export {};
24
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOpC,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAE7E,OAAO,EAAoB,KAAK,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAW9E,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAavC,KAAK,YAAY,GAAG,IAAI,CAAC,OAAO,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACzD,KAAK,WAAW,GAAG,IAAI,CAAC,OAAO,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAExD,KAAK,aAAa,GAAG,CAAC,IAAI,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,YAAY,CAAA;CAAE,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;AAa7G,MAAM,WAAW,UAAU;IACzB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,SAAS,CAAC;IAC1B,WAAW,CAAC,EAAE,aAAa,CAAC;IAC5B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAqWD,wBAAgB,SAAS,CAAC,OAAO,GAAE,UAAe,GAAG,OAAO,CA0gC3D;AAED,wBAAsB,MAAM,CAAC,IAAI,WAAe,EAAE,OAAO,GAAE,UAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAGzF"}