Skip to content

Commit 5a69f66

Browse files
committed
aliases
1 parent 4ec0e6e commit 5a69f66

14 files changed

Lines changed: 21 additions & 27 deletions

File tree

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ Credentials are stored per-profile. The default profile is named `default`. Use
4545

4646
Save credentials for a profile. On success the server is probed once — the rendered output shows the API-key user, role (`Admin`/`User`), and Metabase version, and the same values are cached in `<configDir>/profiles.json` so later commands skip re-probing. Failure of either the auth probe (`/api/user/current`) or the server probe (`/api/session/properties`) rejects the login; an existing profile keeps its last-known-good `apiKey`/`url`/`lastProbe` and gains a `lastFailure` entry.
4747

48-
| Flag | Description |
49-
| ------------------- | ---------------------------------------------------------- |
50-
| `--url <url>` | Metabase URL. Falls back to `METABASE_URL`, then prompts. |
51-
| `--api-key <value>` | API key. Visible in shell history — pipe on stdin instead. |
52-
| `--profile <name>` | Profile to write to (default: `default`). |
53-
| `--skip-verify` | Save without contacting the server (no probe, no cache). |
48+
| Flag | Description |
49+
| ------------------------ | ---------------------------------------------------------- |
50+
| `--url <url>` | Metabase URL. Falls back to `METABASE_URL`, then prompts. |
51+
| `--api-key <value>` | API key. Visible in shell history — pipe on stdin instead. |
52+
| `--profile <name>`, `-p` | Profile to write to (default: `default`). |
53+
| `--skip-verify` | Save without contacting the server (no probe, no cache). |
5454

5555
Resolution order for the API key: `--api-key` → piped stdin → `METABASE_API_KEY` → interactive prompt. Stdin is auto-detected when not a TTY.
5656

@@ -69,10 +69,10 @@ mb auth status --json
6969
mb auth status --profile staging
7070
```
7171

72-
| Flag | Description |
73-
| ------------------ | ---------------------------------------- |
74-
| `--profile <name>` | Profile to inspect (default: `default`). |
75-
| `--json` | Emit JSON. Auto-enabled on non-TTY. |
72+
| Flag | Description |
73+
| ------------------------ | ---------------------------------------- |
74+
| `--profile <name>`, `-p` | Profile to inspect (default: `default`). |
75+
| `--json` | Emit JSON. Auto-enabled on non-TTY. |
7676

7777
### `mb auth list`
7878

@@ -98,10 +98,10 @@ mb auth logout --yes
9898
mb auth logout --profile staging --yes
9999
```
100100

101-
| Flag | Description |
102-
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------- |
103-
| `--profile <name>` | Profile to clear (default: `default`). |
104-
| `--yes` | Skip the interactive confirmation prompt. In non-TTY contexts the prompt is skipped automatically (kubectl/gh/docker convention). |
101+
| Flag | Description |
102+
| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- |
103+
| `--profile <name>`, `-p` | Profile to clear (default: `default`). |
104+
| `--yes` | Skip the interactive confirmation prompt. In non-TTY contexts the prompt is skipped automatically (kubectl/gh/docker convention). |
105105

106106
## Transforms
107107

src/commands/card/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { defineCommand } from "citty";
33
export default defineCommand({
44
meta: {
55
name: "card",
6-
alias: "cards",
76
description: "Manage Metabase cards (questions, models, metrics)",
87
},
98
subCommands: {

src/commands/collection/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { defineCommand } from "citty";
33
export default defineCommand({
44
meta: {
55
name: "collection",
6-
alias: "collections",
76
description: "Manage Metabase collections",
87
},
98
subCommands: {

src/commands/dashboard/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { defineCommand } from "citty";
33
export default defineCommand({
44
meta: {
55
name: "dashboard",
6-
alias: "dashboards",
76
description: "Manage Metabase dashboards",
87
},
98
subCommands: {

src/commands/field/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { defineCommand } from "citty";
22

33
export default defineCommand({
4-
meta: { name: "field", alias: "fields", description: "Manage Metabase fields" },
4+
meta: { name: "field", description: "Manage Metabase fields" },
55
subCommands: {
66
get: () => import("./get").then((m) => m.default),
77
values: () => import("./values").then((m) => m.default),

src/commands/flags.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const outputFlags = {
2020
} as const;
2121

2222
export const profileFlag = {
23-
profile: { type: "string", description: "Named profile (default: 'default')" },
23+
profile: { type: "string", description: "Named profile (default: 'default')", alias: "p" },
2424
} as const;
2525

2626
export const connectionFlags = {

src/commands/measure/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { defineCommand } from "citty";
22

33
export default defineCommand({
4-
meta: { name: "measure", alias: "measures", description: "Manage Metabase measures" },
4+
meta: { name: "measure", description: "Manage Metabase measures" },
55
subCommands: {
66
list: () => import("./list").then((mod) => mod.default),
77
get: () => import("./get").then((mod) => mod.default),

src/commands/segment/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { defineCommand } from "citty";
22

33
export default defineCommand({
4-
meta: { name: "segment", alias: "segments", description: "Manage Metabase segments" },
4+
meta: { name: "segment", description: "Manage Metabase segments" },
55
subCommands: {
66
list: () => import("./list").then((mod) => mod.default),
77
get: () => import("./get").then((mod) => mod.default),

src/commands/setting/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { defineCommand } from "citty";
22

33
export default defineCommand({
4-
meta: { name: "setting", description: "Inspect and update Metabase settings", alias: "settings" },
4+
meta: { name: "setting", description: "Inspect and update Metabase settings" },
55
subCommands: {
66
list: () => import("./list").then((m) => m.default),
77
get: () => import("./get").then((m) => m.default),

src/commands/snippet/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { defineCommand } from "citty";
33
export default defineCommand({
44
meta: {
55
name: "snippet",
6-
alias: "snippets",
76
description: "Manage Metabase native query snippets",
87
},
98
subCommands: {

0 commit comments

Comments
 (0)