create-origo-app 0.0.0-stage → 0.1.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/cli.js ADDED
@@ -0,0 +1,22 @@
1
+ import { showBanner } from "./ui/banner.js";
2
+ import { logger } from "./ui/logger.js";
3
+ import { VERSION } from "./constants/app.js";
4
+ import { createCommand } from "./commands/create.js";
5
+ export function runCLI(args) {
6
+ showBanner();
7
+ createCommand();
8
+ if (args.includes("--version") || args.includes("-v")) {
9
+ console.log(`Origo v${VERSION}`);
10
+ return;
11
+ }
12
+ if (args.includes("--help") || args.includes("-h")) {
13
+ console.log("Usage: origo [options]");
14
+ console.log();
15
+ console.log("Options:");
16
+ console.log(" -v, --version Show version");
17
+ console.log(" -h, --help Show help");
18
+ return;
19
+ }
20
+ logger.success("Welcome to Origo!");
21
+ logger.info("Your CLI is ready.");
22
+ }
@@ -0,0 +1,11 @@
1
+ import { multiSelect } from "../ui/multiselect.js";
2
+ export async function createCommand() {
3
+ const features = await multiSelect("Select features for your project", [
4
+ { name: "TypeScript", value: "typescript", checked: true },
5
+ { name: "ESLint", value: "eslint" },
6
+ { name: "Prettier", value: "prettier" },
7
+ { name: "Docker", value: "docker" },
8
+ { name: "Testing", value: "testing" },
9
+ ]);
10
+ console.log("\nSelected features:", features.join(", "));
11
+ }
@@ -0,0 +1,6 @@
1
+ import { showBanner } from "../ui/banner.js";
2
+ import { createCommand } from "./create.js";
3
+ export async function runCLI() {
4
+ showBanner();
5
+ await createCommand();
6
+ }
@@ -0,0 +1,3 @@
1
+ export const APP_NAME = "Origo";
2
+ export const VERSION = "0.1.0";
3
+ export const TAGLINE = "The origin of every great project.";
package/dist/index.js ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+ import { runCLI } from "./commands/index.js";
3
+ runCLI().catch((error) => {
4
+ console.error(error);
5
+ process.exitCode = 1;
6
+ });
@@ -0,0 +1,10 @@
1
+ import pc from "picocolors";
2
+ import { APP_NAME, TAGLINE } from "../constants/app.js";
3
+ export function showBanner() {
4
+ console.log();
5
+ console.log(` ${pc.green("◎")} ${pc.bold(pc.white(APP_NAME.toUpperCase()))}`);
6
+ console.log(` ${pc.dim(TAGLINE)}`);
7
+ console.log();
8
+ console.log(pc.dim(" ─────────────────────────────────────"));
9
+ console.log();
10
+ }
@@ -0,0 +1,15 @@
1
+ import pc from "picocolors";
2
+ export const logger = {
3
+ info(message) {
4
+ console.log(`${pc.blue("ℹ")} ${message}`);
5
+ },
6
+ success(message) {
7
+ console.log(`${pc.green("✔")} ${message}`);
8
+ },
9
+ error(message) {
10
+ console.log(`${pc.red("✖")} ${message}`);
11
+ },
12
+ warn(message) {
13
+ console.log(`${pc.yellow("⚠")} ${message}`);
14
+ },
15
+ };
@@ -0,0 +1,22 @@
1
+ import { checkbox } from "@inquirer/prompts";
2
+ export async function multiSelect(message, options) {
3
+ return checkbox({
4
+ message,
5
+ choices: options.map((option) => ({
6
+ name: option.name,
7
+ value: option.value,
8
+ description: option.description,
9
+ checked: option.checked,
10
+ })),
11
+ pageSize: 8,
12
+ required: true,
13
+ theme: {
14
+ prefix: "◆",
15
+ icon: {
16
+ checked: "◉",
17
+ unchecked: "◯",
18
+ cursor: "❯ ",
19
+ },
20
+ },
21
+ });
22
+ }
package/package.json CHANGED
@@ -1,6 +1,32 @@
1
1
  {
2
2
  "name": "create-origo-app",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "A modern project scaffolding CLI",
5
+ "type": "module",
6
+ "bin": {
7
+ "origo": "dist/index.js"
8
+ },
9
+ "files": [
10
+ "dist"
11
+ ],
12
+ "scripts": {
13
+ "build": "tsc",
14
+ "start": "npm run build && node dist/index.js",
15
+ "dev": "concurrently \"tsc --watch\" \"node --watch dist/index.js\"",
16
+ "prepublishOnly": "npm run build"
17
+ },
18
+ "engines": {
19
+ "node": ">=20"
20
+ },
21
+ "keywords": [],
22
+ "devDependencies": {
23
+ "@types/node": "^26.6.6",
24
+ "concurrently": "^10.0.7",
25
+ "typescript": "^7.0.2"
26
+ },
27
+ "dependencies": {
28
+ "@inquirer/prompts": "^8.8.0",
29
+ "commander": "^15.1.0",
30
+ "picocolors": "^1.1.1"
31
+ }
32
+ }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.