Skip to content

Commit 3fa3044

Browse files
Finalize setupr command naming polish
1 parent 1f2eb1b commit 3fa3044

23 files changed

Lines changed: 124 additions & 124 deletions

docs/COMMANDS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ Setupr TUIs share the same terminal-native style: blue uppercase panel titles, t
102102
```bash
103103
setup help
104104
setup help auth
105-
setup auth --help
105+
setupr auth --help
106106
setup help auth set-key
107107
```
108108

docs/FEATURES.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,22 @@ Supports 7 AI providers (25+ models, plus custom GitHub Models catalog IDs):
4141

4242
```bash
4343
# Guided setup for provider API keys
44-
setup auth login
44+
setupr auth login
4545

4646
# Save one provider API key globally
47-
setup auth set-key github
47+
setupr auth set-key github
4848

4949
# View configured providers without printing raw keys
50-
setup auth list
50+
setupr auth list
5151

5252
# Test configured providers with tiny requests
53-
setup auth test
53+
setupr auth test
5454

5555
# View available models
56-
setup auth models
56+
setupr auth models
5757

5858
# Set preferred model
59-
setup auth use openai/gpt-4.1-mini
59+
setupr auth use openai/gpt-4.1-mini
6060
```
6161

6262
Setupr stores provider API keys globally in `~/.setupr/secrets.json` with file permissions `0600`. Raw keys are never printed.
@@ -101,11 +101,11 @@ All command-like actions pass through one safety layer. Safe checks and normal d
101101
## Environment Management
102102

103103
```bash
104-
setup env # Open interactive .env editor TUI
105-
setup env init # Create .env from .env.example
106-
setup env check # Check for missing variables
107-
setup env sync # Sync structure with .env.example
108-
setup env smart # Smart reorganize + auto-fill
104+
setupr env # Open interactive .env editor TUI
105+
setupr env init # Create .env from .env.example
106+
setupr env check # Check for missing variables
107+
setupr env sync # Sync structure with .env.example
108+
setupr env smart # Smart reorganize + auto-fill
109109
```
110110

111111
## Checkpoint & Resume

src/ai/client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export async function chat(
7878
if (!client) {
7979
const providerConfig = PROVIDERS[model.provider];
8080
throw new Error(
81-
`No API key for ${model.provider}. Run setup auth set-key ${model.provider}, or set ${providerConfig.envKey} in your environment for this shell.`
81+
`No API key for ${model.provider}. Run setupr auth set-key ${model.provider}, or set ${providerConfig.envKey} in your environment for this shell.`
8282
);
8383
}
8484

src/ai/director.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ async function maybeHandleModelIntent(input: DirectorInput, text: string): Promi
105105
if (!model) {
106106
input.store.getState().addMessage({
107107
role: "assistant",
108-
content: `I do not recognize "${requested}" as an available model ID or name. Run setup auth models to see the catalog, or use a GitHub Models ID like publisher/model-name.`,
108+
content: `I do not recognize "${requested}" as an available model ID or name. Run setupr auth models to see the catalog, or use a GitHub Models ID like publisher/model-name.`,
109109
});
110110
return { handled: true, action: "model.unknown" };
111111
}
@@ -115,7 +115,7 @@ async function maybeHandleModelIntent(input: DirectorInput, text: string): Promi
115115
const keys = [provider.envKey, ...(provider.envAliases || [])].join(" or ");
116116
input.store.getState().addMessage({
117117
role: "assistant",
118-
content: `I found ${model.id}, but ${model.provider} is not configured. Run setup auth set-key ${model.provider}, or set ${keys} for this shell, then I can switch to it.`,
118+
content: `I found ${model.id}, but ${model.provider} is not configured. Run setupr auth set-key ${model.provider}, or set ${keys} for this shell, then I can switch to it.`,
119119
});
120120
return { handled: true, action: "model.unavailable" };
121121
}

src/ai/intelligence.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export async function intelligentResponse(
104104
// Level 2: Live AI call
105105
if (!hasAIKey()) {
106106
return {
107-
response: "AI features require an API key. Run setup auth login or setup auth set-key <provider>. Shell environment keys still work for temporary use.",
107+
response: "AI features require an API key. Run setupr auth login or setupr auth set-key <provider>. Shell environment keys still work for temporary use.",
108108
level: "pattern",
109109
cost: 0,
110110
};

src/cli/help.ts

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ const HELP_NODES: Record<string, HelpNode> = {
2424
setup: {
2525
name: "setup",
2626
summary: "Scan, plan, install/configure, verify, and explain a project setup.",
27-
usage: "setup setup [--force] [--plain|--no-tui]",
27+
usage: "setupr setup [--force] [--plain|--no-tui]",
2828
options: [
2929
{ name: "--force", summary: "Use safe defaults and ask only for blockers." },
3030
{ name: "--plain, --no-tui", summary: "Run without the TUI." },
3131
],
32-
examples: ["setup", "setup setup --force", "setup setup --plain --force"],
32+
examples: ["setupr", "setupr setup --force", "setupr setup --plain --force"],
3333
},
3434
chat: {
3535
name: "chat",
@@ -53,7 +53,7 @@ const HELP_NODES: Record<string, HelpNode> = {
5353
auth: {
5454
name: "auth",
5555
summary: "Manage global Setupr AI provider API keys and active model.",
56-
usage: "setup auth <command> [options]",
56+
usage: "setupr auth <command> [options]",
5757
commands: [
5858
{ name: "login", summary: "Guided provider API key setup." },
5959
{ name: "list", summary: "List providers and masked API key status." },
@@ -74,33 +74,33 @@ const HELP_NODES: Record<string, HelpNode> = {
7474
{ name: "--plain", summary: "Use plain output." },
7575
],
7676
examples: [
77-
"setup auth login",
78-
"setup auth set-key github",
79-
"setup auth test github",
80-
"setup auth use openai/gpt-4.1-mini",
81-
"setup auth migrate --force",
77+
"setupr auth login",
78+
"setupr auth set-key github",
79+
"setupr auth test github",
80+
"setupr auth use openai/gpt-4.1-mini",
81+
"setupr auth migrate --force",
8282
],
8383
},
8484
"auth set-key": {
8585
name: "auth set-key",
8686
summary: "Save one provider API key in global Setupr auth storage.",
87-
usage: "setup auth set-key <provider> [--key <api-key>] [--force]",
87+
usage: "setupr auth set-key <provider> [--key <api-key>] [--force]",
8888
options: [
8989
{ name: "--key <api-key>", summary: "Use inline value; may be visible in shell history." },
9090
{ name: "--force", summary: "Replace an existing saved key without confirmation." },
9191
],
92-
examples: ["setup auth set-key github", "setup auth set-key minimax --force"],
92+
examples: ["setupr auth set-key github", "setupr auth set-key minimax --force"],
9393
},
9494
"auth test": {
9595
name: "auth test",
9696
summary: "Test one or all configured AI providers with tiny requests.",
97-
usage: "setup auth test [provider]",
98-
examples: ["setup auth test", "setup auth test github"],
97+
usage: "setupr auth test [provider]",
98+
examples: ["setupr auth test", "setupr auth test github"],
9999
},
100100
env: {
101101
name: "env",
102102
summary: "Open the .env editor TUI or manage the project .env file from .env.example.",
103-
usage: "setup env [init|check|sync|smart] [--force|--plain]",
103+
usage: "setupr env [init|check|sync|smart] [--force|--plain]",
104104
commands: [
105105
{ name: "(no subcommand)", summary: "Open the interactive .env editor TUI. Creates .env from .env.example after confirmation when needed." },
106106
{ name: "init", summary: "Create .env from .env.example. Without .env.example, requires --force to create empty .env." },
@@ -112,36 +112,36 @@ const HELP_NODES: Record<string, HelpNode> = {
112112
{ name: "--plain, --no-tui", summary: "Show a non-interactive env summary/error instead of the editor." },
113113
{ name: "--force", summary: "With init, overwrite existing .env or create empty .env when no .env.example exists." },
114114
],
115-
examples: ["setup env", "setup env --force", "setup env init", "setup env init --force", "setup env check", "setup env smart"],
115+
examples: ["setupr env", "setupr env --force", "setupr env init", "setupr env init --force", "setupr env check", "setupr env smart"],
116116
},
117117
clean: {
118118
name: "clean",
119119
summary: "Remove generated or local-only artifacts.",
120-
usage: "setup clean [deps|share|all] [--force] [--plain]",
120+
usage: "setupr clean [deps|share|all] [--force] [--plain]",
121121
options: [
122122
{ name: "--deps", summary: "Remove dependency/install artifacts." },
123123
{ name: "--share", summary: "Remove local sensitive/share-sensitive files." },
124124
{ name: "--all", summary: "Remove dependencies, build outputs, caches, and local env files." },
125125
{ name: "--force", summary: "Skip confirmation." },
126126
],
127-
examples: ["setup clean deps", "setup clean --share --force", "setup clean all --plain --force"],
127+
examples: ["setupr clean deps", "setupr clean --share --force", "setupr clean all --plain --force"],
128128
},
129129
config: {
130130
name: "config",
131131
summary: "Manage global Setupr preferences.",
132-
usage: "setup config <show|set|reset|models>",
132+
usage: "setupr config <show|set|reset|models>",
133133
commands: [
134134
{ name: "show", summary: "Show current config." },
135135
{ name: "set", summary: "Set model, theme, confirm, autoupdate, or ai." },
136136
{ name: "reset", summary: "Restore defaults." },
137137
{ name: "models", summary: "Show model catalog. Auth commands are preferred for model/auth work." },
138138
],
139-
examples: ["setup config show", "setup config set theme light", "setup auth models"],
139+
examples: ["setupr config show", "setupr config set theme light", "setupr auth models"],
140140
},
141141
git: {
142142
name: "git",
143143
summary: "Git workflows and repository helpers.",
144-
usage: "setup git <command> [options]",
144+
usage: "setupr git <command> [options]",
145145
commands: [
146146
{ name: "init", summary: "Initialize git and generate a stack-aware .gitignore." },
147147
{ name: "hooks", summary: "Install or remove useful git hooks." },
@@ -178,32 +178,32 @@ const HELP_NODES: Record<string, HelpNode> = {
178178
init: {
179179
name: "init",
180180
summary: "Scaffold a new project.",
181-
usage: "setup init [stack|name] [options]",
181+
usage: "setupr init [stack|name] [options]",
182182
options: [
183183
{ name: "--template <name>", summary: "Use a named template when supported." },
184184
{ name: "--force", summary: "Overwrite generated files where supported." },
185185
],
186-
examples: ["setup init node", "setup init python", "setup init --template react-app"],
186+
examples: ["setupr init node", "setupr init python", "setupr init --template react-app"],
187187
},
188188
migrate: {
189189
name: "migrate",
190190
summary: "Migrate package manager metadata and lockfiles.",
191-
usage: "setup migrate <npm|yarn|pnpm|bun> [--force]",
191+
usage: "setupr migrate <npm|yarn|pnpm|bun> [--force]",
192192
options: [
193193
{ name: "--force", summary: "Proceed through supported destructive replacement steps." },
194194
],
195-
examples: ["setup migrate pnpm", "setup migrate npm --force"],
195+
examples: ["setupr migrate pnpm", "setupr migrate npm --force"],
196196
},
197197
ci: {
198198
name: "ci",
199199
summary: "Generate CI/CD configuration for the current project.",
200-
usage: "setup ci <github|gitlab|bitbucket|circleci>",
201-
examples: ["setup ci github", "setup ci gitlab"],
200+
usage: "setupr ci <github|gitlab|bitbucket|circleci>",
201+
examples: ["setupr ci github", "setupr ci gitlab"],
202202
},
203203
docker: {
204204
name: "docker",
205205
summary: "Generate Docker assets and check Docker readiness.",
206-
usage: "setup docker <generate|compose|check> [options]",
206+
usage: "setupr docker <generate|compose|check> [options]",
207207
commands: [
208208
{ name: "generate", summary: "Generate a Dockerfile for the detected stack." },
209209
{ name: "compose", summary: "Generate docker-compose.yml for app services." },
@@ -212,12 +212,12 @@ const HELP_NODES: Record<string, HelpNode> = {
212212
options: [
213213
{ name: "--force", summary: "Overwrite existing generated Docker files." },
214214
],
215-
examples: ["setup docker generate", "setup docker compose --force", "setup docker check"],
215+
examples: ["setupr docker generate", "setupr docker compose --force", "setupr docker check"],
216216
},
217217
secrets: {
218218
name: "secrets",
219219
summary: "Encrypted project-local secrets management.",
220-
usage: "setup secrets <init|set|get|list|remove|export|import|rotate> [name] [value]",
220+
usage: "setupr secrets <init|set|get|list|remove|export|import|rotate> [name] [value]",
221221
commands: [
222222
{ name: "init", summary: "Initialize encrypted secret storage." },
223223
{ name: "set", summary: "Store a secret value." },
@@ -228,24 +228,24 @@ const HELP_NODES: Record<string, HelpNode> = {
228228
{ name: "import", summary: "Import exported secrets." },
229229
{ name: "rotate", summary: "Rotate the local encryption key." },
230230
],
231-
examples: ["setup secrets init", "setup secrets set API_KEY", "setup secrets list"],
231+
examples: ["setupr secrets init", "setupr secrets set API_KEY", "setupr secrets list"],
232232
},
233233
templates: {
234234
name: "templates",
235235
summary: "Project template management.",
236-
usage: "setup templates <new|list|save|remove> [name-or-url]",
236+
usage: "setupr templates <new|list|save|remove> [name-or-url]",
237237
commands: [
238238
{ name: "new", summary: "Create a project from a GitHub repo or saved template." },
239239
{ name: "list", summary: "List saved templates." },
240240
{ name: "save", summary: "Save the current project as a reusable template." },
241241
{ name: "remove", summary: "Remove a saved template." },
242242
],
243-
examples: ["setup templates list", "setup templates new user/repo", "setup templates save api-starter"],
243+
examples: ["setupr templates list", "setupr templates new user/repo", "setupr templates save api-starter"],
244244
},
245245
workspace: {
246246
name: "workspace",
247247
summary: "Monorepo workspace commands.",
248-
usage: "setup workspace <list|run|exec|add|info|check> [args]",
248+
usage: "setupr workspace <list|run|exec|add|info|check> [args]",
249249
commands: [
250250
{ name: "list", summary: "List workspace packages." },
251251
{ name: "run", summary: "Run a script across workspaces." },
@@ -254,20 +254,20 @@ const HELP_NODES: Record<string, HelpNode> = {
254254
{ name: "info", summary: "Show workspace metadata." },
255255
{ name: "check", summary: "Check workspace consistency." },
256256
],
257-
examples: ["setup workspace list", "setup workspace run test", "setup workspace check"],
257+
examples: ["setupr workspace list", "setupr workspace run test", "setupr workspace check"],
258258
},
259259
health: {
260260
name: "health",
261261
summary: "Project health checks.",
262-
usage: "setup health [full|deps|security|outdated|size]",
262+
usage: "setupr health [full|deps|security|outdated|size]",
263263
commands: [
264264
{ name: "full", summary: "Run all health checks." },
265265
{ name: "deps", summary: "Check dependency health." },
266266
{ name: "security", summary: "Run security-oriented checks." },
267267
{ name: "outdated", summary: "Check outdated dependencies." },
268268
{ name: "size", summary: "Report project size signals." },
269269
],
270-
examples: ["setup health", "setup health security", "setup health size"],
270+
examples: ["setupr health", "setupr health security", "setupr health size"],
271271
},
272272
test: {
273273
name: "test",
@@ -339,13 +339,13 @@ const HELP_NODES: Record<string, HelpNode> = {
339339
share: {
340340
name: "share",
341341
summary: "Export and import shareable setup bundles.",
342-
usage: "setup share <export|import|inspect> [file]",
342+
usage: "setupr share <export|import|inspect> [file]",
343343
commands: [
344344
{ name: "export", summary: "Create a shareable project setup bundle." },
345345
{ name: "import", summary: "Apply a setup bundle." },
346346
{ name: "inspect", summary: "Inspect a setup bundle before applying it." },
347347
],
348-
examples: ["setup share export", "setup share inspect setupr-share.json", "setup share import setupr-share.json"],
348+
examples: ["setupr share export", "setupr share inspect setupr-share.json", "setupr share import setupr-share.json"],
349349
},
350350
plugin: {
351351
name: "plugin",
@@ -367,29 +367,29 @@ const HELP_NODES: Record<string, HelpNode> = {
367367
lint: {
368368
name: "lint",
369369
summary: "Run or configure linting.",
370-
usage: "setup lint <run|setup|fix> [--force]",
370+
usage: "setupr lint <run|setup|fix> [--force]",
371371
commands: [
372372
{ name: "run", summary: "Run the detected lint command." },
373373
{ name: "setup", summary: "Set up linting for the detected stack." },
374374
{ name: "fix", summary: "Run lint fixes where supported." },
375375
],
376-
examples: ["setup lint run", "setup lint fix", "setup lint setup --force"],
376+
examples: ["setupr lint run", "setupr lint fix", "setupr lint setup --force"],
377377
},
378378
format: {
379379
name: "format",
380380
summary: "Run or configure formatting.",
381-
usage: "setup format <run|check|setup> [--force]",
381+
usage: "setupr format <run|check|setup> [--force]",
382382
commands: [
383383
{ name: "run", summary: "Format files with the detected formatter." },
384384
{ name: "check", summary: "Check formatting without writing changes." },
385385
{ name: "setup", summary: "Set up formatting for the detected stack." },
386386
],
387-
examples: ["setup format run", "setup format check", "setup format setup"],
387+
examples: ["setupr format run", "setupr format check", "setupr format setup"],
388388
},
389389
scaffold: {
390390
name: "scaffold",
391391
summary: "Advanced compatibility command for local project-file generation.",
392-
usage: "setup scaffold <component|page|api|hook|model|test|service|middleware> <name>",
392+
usage: "setupr scaffold <component|page|api|hook|model|test|service|middleware> <name>",
393393
commands: [
394394
{ name: "component", summary: "Generate a UI component." },
395395
{ name: "page", summary: "Generate a page/route file." },
@@ -400,7 +400,7 @@ const HELP_NODES: Record<string, HelpNode> = {
400400
{ name: "service", summary: "Generate a service module." },
401401
{ name: "middleware", summary: "Generate middleware." },
402402
],
403-
examples: ["setup scaffold component Button", "setup scaffold api users", "setup scaffold test src/lib/math.ts"],
403+
examples: ["setupr scaffold component Button", "setupr scaffold api users", "setupr scaffold test src/lib/math.ts"],
404404
},
405405
};
406406

src/commands/plain/auth.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ async function authUse(modelId: string | undefined): Promise<void> {
274274
console.log(chalk.green(`✓ Active model set to ${model.id}`));
275275
if (!getProviderEnvValue(model.provider)) {
276276
console.log(chalk.yellow(` ${PROVIDER_LABELS[model.provider]} does not have a configured API key yet.`));
277-
console.log(chalk.dim(` Run: setup auth set-key ${model.provider}`));
277+
console.log(chalk.dim(` Run: setupr auth set-key ${model.provider}`));
278278
}
279279
}
280280

@@ -423,7 +423,7 @@ async function promptChoice(label: string, choices: AIProvider[]): Promise<AIPro
423423
canContinue: true,
424424
}));
425425
const fallback = "github";
426-
console.log(chalk.dim(`Continuing with ${PROVIDER_LABELS[fallback]}. Use setup auth set-key <provider> for a specific provider.`));
426+
console.log(chalk.dim(`Continuing with ${PROVIDER_LABELS[fallback]}. Use setupr auth set-key <provider> for a specific provider.`));
427427
return fallback;
428428
}
429429

src/commands/plain/docker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ async function dockerCheck(cwd: string): Promise<void> {
139139
if (existsSync(join(cwd, "Dockerfile"))) {
140140
console.log(` Dockerfile: ${chalk.green("present")}`);
141141
} else {
142-
console.log(` Dockerfile: ${chalk.dim("missing")} ${chalk.dim("(run setup docker generate)")}`);
142+
console.log(` Dockerfile: ${chalk.dim("missing")} ${chalk.dim("(run setupr docker generate)")}`);
143143
}
144144
console.log("");
145145
}

0 commit comments

Comments
 (0)