@nebulaos/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.
package/README.md ADDED
@@ -0,0 +1,298 @@
1
+ # NebulaOS CLI
2
+
3
+ > Command-line interface for managing NebulaOS AI agents, workflows, and resources.
4
+
5
+ ## Features
6
+
7
+ - **Authentication** -- Login with Personal Access Tokens (PAT), manage contexts for multiple organizations
8
+ - **Resource Management** -- List, inspect, archive, unarchive, and promote agents, workflows, and tools
9
+ - **Execution** -- Run agents and workflows remotely, inspect execution results and logs
10
+ - **LLM Gateway** -- Manage routes, API keys, browse model catalog, track usage and requests
11
+ - **RAG** -- Create and manage Retrieval-Augmented Generation connections, run semantic searches
12
+ - **Feature Flags** -- Enable, disable, and configure platform features
13
+ - **Observability** -- Search and inspect traces, view metrics
14
+ - **Multi-format Output** -- Table, JSON, YAML, and quiet modes for both humans and AI agents
15
+
16
+ ## Installation
17
+
18
+ ```bash
19
+ # npm
20
+ npm install -g @nebulaos/cli
21
+
22
+ # pnpm
23
+ pnpm add -g @nebulaos/cli
24
+
25
+ # yarn
26
+ yarn global add @nebulaos/cli
27
+ ```
28
+
29
+ After installation, the `nebulaos` command will be available globally.
30
+
31
+ ## Quick Start
32
+
33
+ ```bash
34
+ # 1. Login with your Personal Access Token
35
+ nebulaos auth login
36
+
37
+ # 2. Check authentication status
38
+ nebulaos auth status
39
+
40
+ # 3. List your organizations
41
+ nebulaos orgs list
42
+
43
+ # 4. List registered resources
44
+ nebulaos resources list
45
+
46
+ # 5. Execute an agent
47
+ nebulaos exec run <resourceId> --input '{"prompt": "Hello"}'
48
+ ```
49
+
50
+ ## Configuration
51
+
52
+ ### Contexts
53
+
54
+ NebulaOS CLI supports multiple contexts, allowing you to manage several organizations or environments. Each context stores an API URL, authentication token, and organization ID.
55
+
56
+ ```bash
57
+ # Login creates a context automatically
58
+ nebulaos auth login --api-url https://api.myorg.nebulaos.com --context-name production
59
+
60
+ # Switch between organizations
61
+ nebulaos orgs switch my-other-org
62
+
63
+ # View all configuration
64
+ nebulaos config list
65
+ ```
66
+
67
+ ### Defaults
68
+
69
+ ```bash
70
+ # Set default output format
71
+ nebulaos config set defaults.output json
72
+
73
+ # Set default page size (1-100)
74
+ nebulaos config set defaults.pageSize 50
75
+ ```
76
+
77
+ Configuration is stored using the [conf](https://github.com/sindresorhus/conf) library under the `nebulaos` project name (`~/.config/nebulaos/config.json` on Linux).
78
+
79
+ ### Environment Variables
80
+
81
+ | Variable | Description | Corresponding Flag |
82
+ |---|---|---|
83
+ | `NEBULAOS_OUTPUT` | Default output format (`table`, `json`, `yaml`, `quiet`) | `-o, --output` |
84
+ | `NEBULAOS_CONTEXT` | Context name to use | `--context` |
85
+ | `NEBULAOS_API_URL` | Override API URL | `--api-url` |
86
+ | `NEBULAOS_TOKEN` | Override authentication token | `--token` |
87
+ | `NEBULAOS_ORG_ID` | Override organization ID | `--org-id` |
88
+
89
+ ## Global Options
90
+
91
+ These options are available on every command:
92
+
93
+ | Option | Description |
94
+ |---|---|
95
+ | `-o, --output <format>` | Output format: `table`, `json`, `yaml`, `quiet` |
96
+ | `--context <name>` | Use a specific context |
97
+ | `--api-url <url>` | Override API URL |
98
+ | `--token <token>` | Override authentication token |
99
+ | `--org-id <id>` | Override organization ID |
100
+ | `--no-color` | Disable colored output |
101
+ | `--verbose` | Enable verbose output |
102
+ | `-V, --version` | Show CLI version |
103
+ | `-h, --help` | Show help |
104
+
105
+ ## Commands
106
+
107
+ ### Authentication
108
+
109
+ | Command | Description |
110
+ |---|---|
111
+ | `nebulaos auth login` | Authenticate with a Personal Access Token |
112
+ | `nebulaos auth logout` | Remove credentials for a context |
113
+ | `nebulaos auth status` | Show current authentication status |
114
+
115
+ ### Organizations
116
+
117
+ | Command | Description |
118
+ |---|---|
119
+ | `nebulaos orgs list` | List accessible organizations |
120
+ | `nebulaos orgs get <id>` | Get organization details |
121
+ | `nebulaos orgs switch <slug>` | Switch active organization context |
122
+
123
+ ### Clients
124
+
125
+ | Command | Description |
126
+ |---|---|
127
+ | `nebulaos clients list` | List clients in the current organization |
128
+ | `nebulaos clients get <id>` | Get client details (including agents and workflows) |
129
+ | `nebulaos clients create` | Create a new client |
130
+ | `nebulaos clients api-keys list <clientId>` | List API keys for a client |
131
+ | `nebulaos clients api-keys create <clientId>` | Create a new API key |
132
+ | `nebulaos clients api-keys revoke <clientId> <keyId>` | Revoke an API key |
133
+
134
+ ### Resources
135
+
136
+ | Command | Description |
137
+ |---|---|
138
+ | `nebulaos resources list` | List registered resources (agents, workflows, tools) |
139
+ | `nebulaos resources get <id>` | Get resource details |
140
+ | `nebulaos resources archive <id>` | Archive a resource |
141
+ | `nebulaos resources unarchive <id>` | Unarchive a resource |
142
+ | `nebulaos resources promote <id>` | Promote a resource from discovered to official |
143
+
144
+ ### Execution
145
+
146
+ | Command | Description |
147
+ |---|---|
148
+ | `nebulaos exec run <resourceId>` | Execute a resource (agent or workflow) |
149
+ | `nebulaos exec list` | List executions |
150
+ | `nebulaos exec get <id>` | Get execution details |
151
+ | `nebulaos exec logs <id>` | View execution logs |
152
+
153
+ ### LLM Gateway
154
+
155
+ | Command | Description |
156
+ |---|---|
157
+ | `nebulaos llm routes list` | List all LLM gateway routes |
158
+ | `nebulaos llm routes get <alias>` | Get route details |
159
+ | `nebulaos llm routes create` | Create a new route |
160
+ | `nebulaos llm routes update <alias>` | Update a route |
161
+ | `nebulaos llm routes delete <alias>` | Delete a route |
162
+ | `nebulaos llm keys list` | List LLM gateway API keys |
163
+ | `nebulaos llm keys create` | Create a new LLM API key |
164
+ | `nebulaos llm keys revoke <keyId>` | Revoke an LLM API key |
165
+ | `nebulaos llm catalog` | Browse the LLM model catalog |
166
+ | `nebulaos llm requests` | List recent LLM gateway requests |
167
+ | `nebulaos llm usage` | Show LLM gateway usage statistics |
168
+
169
+ ### RAG
170
+
171
+ | Command | Description |
172
+ |---|---|
173
+ | `nebulaos rag connections list` | List RAG connections |
174
+ | `nebulaos rag connections get <id>` | Get connection details |
175
+ | `nebulaos rag connections create` | Create a new RAG connection |
176
+ | `nebulaos rag connections update <id>` | Update a RAG connection |
177
+ | `nebulaos rag connections delete <id>` | Delete a RAG connection |
178
+ | `nebulaos rag connections test <id>` | Test a RAG connection |
179
+ | `nebulaos rag search` | Search using RAG |
180
+
181
+ ### Features
182
+
183
+ | Command | Description |
184
+ |---|---|
185
+ | `nebulaos features catalog` | List all available features in the catalog |
186
+ | `nebulaos features list` | List enabled features |
187
+ | `nebulaos features get <key>` | Get feature details |
188
+ | `nebulaos features enable <key>` | Enable a feature |
189
+ | `nebulaos features disable <key>` | Disable a feature |
190
+ | `nebulaos features config <key>` | View or update feature configuration |
191
+
192
+ ### Observability
193
+
194
+ | Command | Description |
195
+ |---|---|
196
+ | `nebulaos obs traces search` | Search traces |
197
+ | `nebulaos obs traces get <traceId>` | Get trace details |
198
+ | `nebulaos obs metrics` | View observability metrics |
199
+
200
+ ### Config
201
+
202
+ | Command | Description |
203
+ |---|---|
204
+ | `nebulaos config list` | List all configuration values |
205
+ | `nebulaos config get <key>` | Get a configuration value |
206
+ | `nebulaos config set <key> <value>` | Set a configuration value |
207
+
208
+ ## Output Formats
209
+
210
+ ### Table (default)
211
+
212
+ Human-readable formatted tables with colored output.
213
+
214
+ ```bash
215
+ nebulaos resources list
216
+ ```
217
+
218
+ ```
219
+ ID Name Type Status Created At
220
+ 550e8400-e29b-41d4-a716-446655440000 my-agent agent official 1/15/2026
221
+ 6ba7b810-9dad-11d1-80b4-00c04fd430c8 my-workflow workflow discovered 1/20/2026
222
+ ```
223
+
224
+ ### JSON
225
+
226
+ Machine-readable JSON, ideal for scripting and AI agent integration.
227
+
228
+ ```bash
229
+ nebulaos resources list -o json
230
+ ```
231
+
232
+ ```json
233
+ [
234
+ {
235
+ "id": "550e8400-e29b-41d4-a716-446655440000",
236
+ "name": "my-agent",
237
+ "type": "agent",
238
+ "status": "official",
239
+ "createdAt": "2026-01-15T10:30:00.000Z"
240
+ }
241
+ ]
242
+ ```
243
+
244
+ ### YAML
245
+
246
+ YAML output for configuration-friendly contexts.
247
+
248
+ ```bash
249
+ nebulaos resources list -o yaml
250
+ ```
251
+
252
+ ```yaml
253
+ - id: 550e8400-e29b-41d4-a716-446655440000
254
+ name: my-agent
255
+ type: agent
256
+ status: official
257
+ createdAt: "2026-01-15T10:30:00.000Z"
258
+ ```
259
+
260
+ ### Quiet
261
+
262
+ Outputs only IDs, one per line. Useful for piping to other commands.
263
+
264
+ ```bash
265
+ nebulaos resources list -o quiet
266
+ # 550e8400-e29b-41d4-a716-446655440000
267
+ # 6ba7b810-9dad-11d1-80b4-00c04fd430c8
268
+ ```
269
+
270
+ ## Exit Codes
271
+
272
+ | Code | Meaning |
273
+ |---|---|
274
+ | `0` | Success |
275
+ | `1` | General error |
276
+ | `2` | Invalid argument |
277
+ | `3` | Authentication error |
278
+ | `4` | Authorization error |
279
+ | `5` | Not found |
280
+ | `6` | Conflict error |
281
+ | `7` | Validation error |
282
+ | `8` | Network error |
283
+ | `9` | Timeout error |
284
+ | `10` | Server error |
285
+ | `11` | Configuration error |
286
+
287
+ ## For AI Agents
288
+
289
+ This CLI is designed to be used by AI agents (Claude, Cursor, etc.). See [docs/ai-usage.md](docs/ai-usage.md) for the complete guide on machine-friendly usage, including JSON output parsing, pagination, and automation patterns.
290
+
291
+ ## Documentation
292
+
293
+ - [Command Reference](docs/commands.md) -- Detailed reference for all commands with examples
294
+ - [AI Agent Usage Guide](docs/ai-usage.md) -- Guide for AI agent integration and automation
295
+
296
+ ## License
297
+
298
+ Proprietary - StaryaAI