diff --git a/CLAUDE.md b/CLAUDE.md index fbaa16d..424faf8 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -16,7 +16,7 @@ Personal web appliance that auto-discovers and runs multiple web apps on your ho - **Bun** runtime (not Node) - **Hype** (custom HTTP framework wrapping Hono) from `@because/hype` - **Forge** (typed CSS-in-JS) from `@because/forge` -- **Commander** + **kleur** for CLI +- **Commander** + **ansis** for CLI - TypeScript + Hono JSX - Client renders with `hono/jsx/dom` (no build step, served directly) diff --git a/bun.lock b/bun.lock index 6e5b5f1..27316f7 100644 --- a/bun.lock +++ b/bun.lock @@ -9,9 +9,9 @@ "@because/hype": "^0.0.2", "@because/sneaker": "^0.0.4", "@because/toes": "^0.0.12", + "ansis": "^4.2.0", "commander": "14.0.3", "diff": "^8.0.3", - "kleur": "^4.1.5", }, "devDependencies": { "@types/bun": "latest", @@ -37,6 +37,8 @@ "@types/node": ["@types/node@25.2.3", "https://npm.nose.space/@types/node/-/node-25.2.3.tgz", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-m0jEgYlYz+mDJZ2+F4v8D1AyQb+QzsNqRuI7xg1VQX/KlKS0qT9r1Mo16yo5F/MtifXFgaofIFsdFMox2SxIbQ=="], + "ansis": ["ansis@4.2.0", "https://npm.nose.space/ansis/-/ansis-4.2.0.tgz", {}, "sha512-HqZ5rWlFjGiV0tDm3UxxgNRqsOTniqoKZu0pIAfh7TZQMGuZK+hH0drySty0si0QXj1ieop4+SkSfPZBPPkHig=="], + "bun-types": ["bun-types@1.3.10", "https://npm.nose.space/bun-types/-/bun-types-1.3.10.tgz", { "dependencies": { "@types/node": "*" } }, "sha512-tcpfCCl6XWo6nCVnpcVrxQ+9AYN1iqMIzgrSKYMB/fjLtV2eyAVEg7AxQJuCq/26R6HpKWykQXuSOq/21RYcbg=="], "commander": ["commander@14.0.3", "https://npm.nose.space/commander/-/commander-14.0.3.tgz", {}, "sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw=="], diff --git a/package.json b/package.json index 20b6861..72ac9ef 100644 --- a/package.json +++ b/package.json @@ -48,8 +48,8 @@ "@because/hype": "^0.0.2", "@because/sneaker": "^0.0.4", "@because/toes": "^0.0.12", + "ansis": "^4.2.0", "commander": "14.0.3", - "diff": "^8.0.3", - "kleur": "^4.1.5" + "diff": "^8.0.3" } } diff --git a/src/cli/commands/cron.ts b/src/cli/commands/cron.ts index 72912eb..9e3ff6c 100644 --- a/src/cli/commands/cron.ts +++ b/src/cli/commands/cron.ts @@ -1,5 +1,5 @@ import type { LogLine } from '@types' -import color from 'kleur' +import color from 'ansis' import { get, getSignal, handleError, makeUrl, post } from '../http' import { resolveAppName } from '../name' diff --git a/src/cli/commands/env.ts b/src/cli/commands/env.ts index f4d4ab7..9afb2d0 100644 --- a/src/cli/commands/env.ts +++ b/src/cli/commands/env.ts @@ -1,4 +1,4 @@ -import color from 'kleur' +import color from 'ansis' import { del, get, handleError, post } from '../http' import { resolveAppName } from '../name' @@ -43,7 +43,7 @@ async function globalEnvSet(keyOrKeyValue: string, valueArg?: string) { export async function envList(name: string | undefined, opts: { global?: boolean }) { if (opts.global) { const vars = await get('/api/env') - console.log(color.bold().cyan('Global Environment Variables')) + console.log(color.bold.cyan('Global Environment Variables')) console.log() if (!vars || vars.length === 0) { console.log(color.gray(' No global environment variables set')) @@ -68,7 +68,7 @@ export async function envList(name: string | undefined, opts: { global?: boolean return } - console.log(color.bold().cyan(`Environment Variables for ${appName}`)) + console.log(color.bold.cyan(`Environment Variables for ${appName}`)) console.log() const appKeys = new Set(vars.map(v => v.key)) diff --git a/src/cli/commands/manage.ts b/src/cli/commands/manage.ts index d6720ab..8876635 100644 --- a/src/cli/commands/manage.ts +++ b/src/cli/commands/manage.ts @@ -1,6 +1,6 @@ import type { App } from '@types' import { generateTemplates, type TemplateType } from '%templates' -import color from 'kleur' +import color from 'ansis' import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'fs' import { basename, join } from 'path' import { buildAppUrl } from '@urls' diff --git a/src/cli/commands/metrics.ts b/src/cli/commands/metrics.ts index 4a3c76b..4359077 100644 --- a/src/cli/commands/metrics.ts +++ b/src/cli/commands/metrics.ts @@ -1,4 +1,4 @@ -import color from 'kleur' +import color from 'ansis' import { get } from '../http' import { resolveAppName } from '../name' diff --git a/src/cli/setup.ts b/src/cli/setup.ts index b6c3bbc..a84cfb6 100644 --- a/src/cli/setup.ts +++ b/src/cli/setup.ts @@ -1,6 +1,6 @@ import { program } from 'commander' -import color from 'kleur' +import color from 'ansis' import pkg from '../../package.json' import { SHA } from './sha' @@ -33,7 +33,7 @@ program .version(`v${pkg.version}-${SHA}`, '-v, --version') .addHelpText('beforeAll', (ctx) => { if (ctx.command === program) { - return color.bold().cyan('🐾 Toes') + color.gray(' - personal web appliance\n') + return color.bold.cyan('🐾 Toes') + color.gray(' - personal web appliance\n') } return '' }) diff --git a/src/cli/shell.ts b/src/cli/shell.ts index d9e1c78..cfd249b 100644 --- a/src/cli/shell.ts +++ b/src/cli/shell.ts @@ -2,7 +2,7 @@ import type { App } from '@types' import * as readline from 'readline' -import color from 'kleur' +import color from 'ansis' import { get, handleError, HOST, withSignal } from './http' import { program } from './setup' @@ -66,7 +66,7 @@ function getCommandNames(): string[] { async function printBanner(): Promise { const apps = await get('/api/apps') if (!apps) { - console.log(color.bold().cyan(' \u{1F43E} Toes') + ` ${HOST}`) + console.log(color.bold.cyan(' \u{1F43E} Toes') + ` ${HOST}`) console.log() return } @@ -78,7 +78,7 @@ async function printBanner(): Promise { const visibleApps = apps.filter(a => !a.tool) console.log() - console.log(color.bold().cyan(' \u{1F43E} Toes') + ` ${HOST}`) + console.log(color.bold.cyan(' \u{1F43E} Toes') + ` ${HOST}`) console.log() // App status line