maritime-cli 1.3.0 → 1.4.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/dist/commands/create.js +21 -0
- package/package.json +1 -1
package/dist/commands/create.js
CHANGED
|
@@ -24,6 +24,10 @@ export const createCommand = new Command('create')
|
|
|
24
24
|
.argument('[name]', 'Agent name')
|
|
25
25
|
.option('-t, --template <template>', 'Template to base the agent on (see `maritime templates`)')
|
|
26
26
|
.option('-e, --env <pairs...>', 'Environment variables (KEY=value)')
|
|
27
|
+
.option('-r, --repo <url>', 'Deploy from a GitHub repo (must contain a Dockerfile)')
|
|
28
|
+
.option('-b, --branch <branch>', 'Git branch to deploy (with --repo)')
|
|
29
|
+
.option('--public', 'Serve a public, no-login web URL for this agent (web apps)')
|
|
30
|
+
.option('--port <n>', 'Port your app listens on (exposed publicly; default 8080)')
|
|
27
31
|
// Advanced overrides — kept fully working but off the main --help so the
|
|
28
32
|
// happy path stays flag-free. By default the platform picks the applicable
|
|
29
33
|
// size for the framework and auto-sleeps when idle; you only reach for these
|
|
@@ -41,6 +45,7 @@ export const createCommand = new Command('create')
|
|
|
41
45
|
Examples:
|
|
42
46
|
maritime create researcher
|
|
43
47
|
maritime create acme-bot --template openclaw --json
|
|
48
|
+
maritime create my-app --repo https://github.com/you/app --public # public web agent
|
|
44
49
|
maritime create client-x -e OPENAI_API_KEY=sk-...`)
|
|
45
50
|
.action(async (nameArg, opts) => {
|
|
46
51
|
try {
|
|
@@ -90,6 +95,20 @@ Examples:
|
|
|
90
95
|
body.tier = opts.tier;
|
|
91
96
|
if (opts.env)
|
|
92
97
|
body.initialEnvVars = parseEnvPairs(opts.env);
|
|
98
|
+
if (opts.repo)
|
|
99
|
+
body.githubRepo = opts.repo;
|
|
100
|
+
if (opts.branch)
|
|
101
|
+
body.branch = opts.branch;
|
|
102
|
+
if (opts.public) {
|
|
103
|
+
body.publicWeb = true;
|
|
104
|
+
// A public web app is a bring-your-own-code agent unless a template was chosen.
|
|
105
|
+
if (!templateId && !opts.framework)
|
|
106
|
+
body.framework = 'custom';
|
|
107
|
+
}
|
|
108
|
+
if (opts.port)
|
|
109
|
+
body.exposedPort = Number(opts.port);
|
|
110
|
+
else if (opts.public)
|
|
111
|
+
body.exposedPort = 8080;
|
|
93
112
|
// Per-agent resource overrides (serverless). Omitted fields inherit the tier.
|
|
94
113
|
if (opts.alwaysOn && opts.idle !== undefined) {
|
|
95
114
|
fail('--always-on and --idle are mutually exclusive.', { code: 'usage', exitCode: 4 });
|
|
@@ -158,6 +177,8 @@ Examples:
|
|
|
158
177
|
res.push(`cap ${agent.computeMinutesLimit}min`);
|
|
159
178
|
if (res.length)
|
|
160
179
|
console.log(chalk.dim(` Resources: ${res.join(' | ')}`));
|
|
180
|
+
if (agent.publicUrl)
|
|
181
|
+
console.log(chalk.green(' Public URL: ') + chalk.bold(agent.publicUrl));
|
|
161
182
|
});
|
|
162
183
|
}
|
|
163
184
|
catch (error) {
|