@curaious/uno 0.1.13 → 0.1.15

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/bin/cli.js CHANGED
@@ -87,7 +87,68 @@ function runDockerCompose(args, options = {}) {
87
87
  });
88
88
  }
89
89
 
90
+ function parseArgs() {
91
+ const args = process.argv.slice(2);
92
+ const profiles = [];
93
+ const composeArgs = [];
94
+ let showHelp = false;
95
+
96
+ for (let i = 0; i < args.length; i++) {
97
+ const arg = args[i];
98
+
99
+ if (arg === '--help' || arg === '-h') {
100
+ showHelp = true;
101
+ } else if (arg === '--temporal') {
102
+ profiles.push('temporal');
103
+ } else if (arg === '--restate') {
104
+ profiles.push('restate');
105
+ } else if (arg === '--all') {
106
+ profiles.push('all');
107
+ } else {
108
+ // Pass through other arguments to docker compose
109
+ composeArgs.push(arg);
110
+ }
111
+ }
112
+
113
+ return { profiles, composeArgs, showHelp };
114
+ }
115
+
116
+ function showHelpMessage() {
117
+ console.log(`
118
+ ${BOLD}Usage:${RESET} npx @curaious/uno [options] [docker-compose-args]
119
+
120
+ ${BOLD}Options:${RESET}
121
+ --temporal Enable temporal worker profile
122
+ --restate Enable restate service profile
123
+ --all Enable all profiles (temporal + restate)
124
+ --help, -h Show this help message
125
+
126
+ ${BOLD}Profiles:${RESET}
127
+ temporal Start temporal worker service
128
+ restate Start restate service
129
+ all Start both temporal and restate services
130
+
131
+ ${BOLD}Examples:${RESET}
132
+ npx @curaious/uno # Start default services (agent-server)
133
+ npx @curaious/uno --temporal # Start with temporal worker
134
+ npx @curaious/uno --restate # Start with restate service
135
+ npx @curaious/uno --all # Start with both temporal and restate
136
+ npx @curaious/uno --temporal up -d # Start temporal in detached mode
137
+
138
+ ${BOLD}Note:${RESET}
139
+ Any additional arguments are passed directly to docker compose.
140
+ Use 'docker compose' commands like: up, down, ps, logs, etc.
141
+ `);
142
+ }
143
+
90
144
  async function main() {
145
+ const { profiles, composeArgs, showHelp } = parseArgs();
146
+
147
+ if (showHelp) {
148
+ showHelpMessage();
149
+ process.exit(0);
150
+ }
151
+
91
152
  banner();
92
153
 
93
154
  if (!checkDocker()) {
@@ -99,9 +160,27 @@ async function main() {
99
160
  process.exit(1);
100
161
  }
101
162
 
163
+ // Build docker compose arguments
164
+ const dockerArgs = [];
165
+
166
+ // Add profile flags if any profiles are specified
167
+ if (profiles.length > 0) {
168
+ for (const profile of profiles) {
169
+ dockerArgs.push('--profile', profile);
170
+ }
171
+ log(`Using profiles: ${profiles.join(', ')}`, CYAN);
172
+ }
173
+
174
+ // Add compose command (default to 'up' if no command provided)
175
+ if (composeArgs.length === 0) {
176
+ dockerArgs.push('up');
102
177
  log('Starting Uno services...', GREEN);
103
178
  log(`${DIM}This may take a few minutes on first run to pull images.${RESET}`);
104
- runDockerCompose(['up']);
179
+ } else {
180
+ dockerArgs.push(...composeArgs);
181
+ }
182
+
183
+ runDockerCompose(dockerArgs);
105
184
  }
106
185
 
107
186
  main().catch((err) => {
@@ -102,7 +102,7 @@ services:
102
102
 
103
103
  uno-restate-service:
104
104
  image: ${UNO_IMAGE:-praveenraj9495/uno-gateway:latest}
105
- command: ["restate-service"]
105
+ command: ["restate-worker"]
106
106
  env_file:
107
107
  - env_vars
108
108
  depends_on:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curaious/uno",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
4
4
  "description": "Uno - AI Gateway and Agent Framework",
5
5
  "bin": {
6
6
  "uno": "./bin/cli.js"