Skip to content

Commit 6ac8dc3

Browse files
committed
feat(cli): improve project init command styling
1 parent 072fd2c commit 6ac8dc3

3 files changed

Lines changed: 38 additions & 6 deletions

File tree

apps/cli/src/handlers/init.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,22 @@ function detectProjectRoot(): string | null {
8484
return null;
8585
}
8686

87+
const BANNER = `
88+
██████╗ ███████╗███████╗██╗ ██╗ ██████╗ ██████╗ ██╗ ██████╗
89+
██╔═══██╗██╔════╝██╔════╝██║ ██║██╔═══██╗██╔══██╗██║ ██╔══██╗
90+
██║ ██║█████╗ █████╗ ██║ █╗ ██║██║ ██║██████╔╝██║ ██║ ██║
91+
██║ ██║██╔══╝ ██╔══╝ ██║███╗██║██║ ██║██╔══██╗██║ ██║ ██║
92+
╚██████╔╝██║ ██║ ╚███╔███╔╝╚██████╔╝██║ ██║███████╗██████╔╝
93+
╚═════╝ ╚═╝ ╚═╝ ╚══╝╚══╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
94+
`;
95+
8796
export async function initHandler(options: InitOptions = {}): Promise<InitResult> {
8897
const configPath = getConfigPath();
8998
const existingConfig = loadConfig();
9099
const configExists = existsSync(configPath);
91100
const projectRoot = detectProjectRoot();
92101

102+
console.log(BANNER);
93103
p.intro("ow init");
94104

95105
if (!options.skipAuth) {

apps/cli/src/handlers/project.ts

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,31 @@ function detectProjectRoot(): string | null {
5656
return null;
5757
}
5858

59+
const LOGO_LINES = [
60+
" ██████╗ ███████╗███████╗██╗ ██╗ ██████╗ ██████╗ ██╗ ██████╗ ",
61+
"██╔═══██╗██╔════╝██╔════╝██║ ██║██╔═══██╗██╔══██╗██║ ██╔══██╗",
62+
"██║ ██║█████╗ █████╗ ██║ █╗ ██║██║ ██║██████╔╝██║ ██║ ██║",
63+
"██║ ██║██╔══╝ ██╔══╝ ██║███╗██║██║ ██║██╔══██╗██║ ██║ ██║",
64+
"╚██████╔╝██║ ██║ ╚███╔███╔╝╚██████╔╝██║ ██║███████╗██████╔╝",
65+
" ╚═════╝ ╚═╝ ╚═╝ ╚══╝╚══╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝ ",
66+
];
67+
68+
const OLIVE = "\x1b[38;5;187m";
69+
const RESET = "\x1b[0m";
70+
71+
function showBanner(): void {
72+
console.log();
73+
for (const line of LOGO_LINES) {
74+
console.log(`${OLIVE}${line}${RESET}`);
75+
}
76+
console.log();
77+
}
78+
5979
export async function projectInitHandler(
6080
options: ProjectInitOptions = {},
6181
): Promise<ProjectInitResult> {
62-
p.intro("ow project init");
82+
showBanner();
83+
p.intro("Scan your deps to install reference files and create a clone map for your agents.");
6384

6485
const configPath = getConfigPath();
6586
if (!existsSync(configPath)) {

install

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -321,11 +321,12 @@ main() {
321321
local channel="${OW_CHANNEL:-stable}"
322322

323323
echo ""
324-
echo " ____ ________ __ __"
325-
echo " / __ \\/ __/ __/ ______ _____/ /___/ /"
326-
echo " / / / / /_/ /_| | /| / / __ \\/ ___/ / __ / "
327-
echo "/ /_/ / __/ __/| |/ |/ / /_/ / / / / /_/ / "
328-
echo "\\____/_/ /_/ |__/|__/\\____/_/ /_/\\__,_/ "
324+
echo " ██████╗ ███████╗███████╗██╗ ██╗ ██████╗ ██████╗ ██╗ ██████╗ "
325+
echo "██╔═══██╗██╔════╝██╔════╝██║ ██║██╔═══██╗██╔══██╗██║ ██╔══██╗"
326+
echo "██║ ██║█████╗ █████╗ ██║ █╗ ██║██║ ██║██████╔╝██║ ██║ ██║"
327+
echo "██║ ██║██╔══╝ ██╔══╝ ██║███╗██║██║ ██║██╔══██╗██║ ██║ ██║"
328+
echo "╚██████╔╝██║ ██║ ╚███╔███╔╝╚██████╔╝██║ ██║███████╗██████╔╝"
329+
echo " ╚═════╝ ╚═╝ ╚═╝ ╚══╝╚══╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝ "
329330
echo ""
330331

331332
log "Installing Offworld CLI..."

0 commit comments

Comments
 (0)