Files
paseo/packages/cli/src/commands/project/shared.ts
T
Mohamed Boudra ac4331456c Manage projects from the CLI (#3460)
* feat(cli): manage projects

Expose the existing project lifecycle through one CLI command group so projects can be managed without opening the app.

* fix(cli): preserve remote project paths

Project paths belong to the daemon when a target is explicit. Require that path instead of resolving the CLI machine's cwd, and keep local convenience resolution for the default connection.

* docs(cli): document project management

* docs(cli): remove repeated project reference
2026-08-16 20:32:08 +02:00

29 lines
830 B
TypeScript

import type { WorkspaceProjectDescriptorPayload } from "@getpaseo/protocol/messages";
import type { OutputSchema } from "../../output/index.js";
export interface ProjectRow {
projectId: string;
name: string;
kind: "git" | "non_git" | "directory";
path: string;
}
export const projectSchema: OutputSchema<ProjectRow> = {
idField: "projectId",
columns: [
{ header: "PROJECT ID", field: "projectId", width: 20 },
{ header: "NAME", field: "name", width: 24 },
{ header: "KIND", field: "kind", width: 10 },
{ header: "PATH", field: "path", width: 42 },
],
};
export function toProjectRow(project: WorkspaceProjectDescriptorPayload): ProjectRow {
return {
projectId: project.projectId,
name: project.projectDisplayName,
kind: project.projectKind,
path: project.projectRootPath,
};
}