Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
188 changes: 188 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
"typescript": "^5.7.2",
"typescript-eslint": "^8.52.0",
"vitest": "^4.0.16",
"zod": "^4.3.5"
"zod": "^4.3.5",
"open": "^11.0.0"
},
"engines": {
"node": ">=20.19.0"
Expand Down
30 changes: 30 additions & 0 deletions src/cli/commands/project/dashboard.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { Command } from "commander";
import open from "open";
import { getBase44ApiUrl, getBase44ClientId, loadProjectEnv } from "@core/config.js";
import { runCommand } from "../../utils/index.js";
import type { RunCommandResult } from "../../utils/runCommand.js";

async function openDashboard(): Promise<RunCommandResult> {
// Load project environment to get the project ID
await loadProjectEnv();

const projectId = getBase44ClientId();

if (!projectId) {
throw new Error(
"App not configured. BASE44_CLIENT_ID environment variable is required. Set it in your .env.local file."
);
}

const dashboardUrl = `${getBase44ApiUrl()}/apps/${projectId}/editor/workspace/overview`;

await open(dashboardUrl);

return { outroMessage: `Dashboard opened at ${dashboardUrl}` };
}

export const dashboardCommand = new Command("dashboard")
.description("Open the app dashboard in your browser")
.action(async () => {
await runCommand(openDashboard, { requireAuth: true });
});
2 changes: 2 additions & 0 deletions src/cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { logoutCommand } from "./commands/auth/logout.js";
import { entitiesPushCommand } from "./commands/entities/push.js";
import { functionsDeployCommand } from "./commands/functions/deploy.js";
import { createCommand } from "./commands/project/create.js";
import { dashboardCommand } from "./commands/project/dashboard.js";
import { siteDeployCommand } from "./commands/site/deploy.js";
import packageJson from "../../package.json";

Expand All @@ -26,6 +27,7 @@ program.addCommand(logoutCommand);

// Register project commands
program.addCommand(createCommand);
program.addCommand(dashboardCommand);

// Register entities commands
program.addCommand(entitiesPushCommand);
Expand Down