mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-11 02:33:51 +08:00
feat: Add workflow dashboard template and utility functions
- Implemented a new HTML template for the workflow dashboard, featuring a responsive design with dark/light theme support, session statistics, and task management UI. - Created a browser launcher utility to open HTML files in the default browser across platforms. - Developed file utility functions for safe reading and writing of JSON and text files. - Added path resolver utilities to validate and resolve file paths, ensuring security against path traversal attacks. - Introduced UI utilities for displaying styled messages and banners in the console.
This commit is contained in:
37
ccw/src/commands/list.js
Normal file
37
ccw/src/commands/list.js
Normal file
@@ -0,0 +1,37 @@
|
||||
import chalk from 'chalk';
|
||||
import { showBanner, divider, info } from '../utils/ui.js';
|
||||
import { getAllManifests } from '../core/manifest.js';
|
||||
|
||||
/**
|
||||
* List command handler - shows all installations
|
||||
*/
|
||||
export async function listCommand() {
|
||||
showBanner();
|
||||
console.log(chalk.cyan.bold(' Installed Claude Code Workflow Instances\n'));
|
||||
|
||||
const manifests = getAllManifests();
|
||||
|
||||
if (manifests.length === 0) {
|
||||
info('No installations found.');
|
||||
console.log('');
|
||||
console.log(chalk.gray(' Run: ccw install - to install Claude Code Workflow'));
|
||||
console.log('');
|
||||
return;
|
||||
}
|
||||
|
||||
manifests.forEach((m, i) => {
|
||||
const modeColor = m.installation_mode === 'Global' ? chalk.cyan : chalk.yellow;
|
||||
|
||||
console.log(chalk.white.bold(` ${i + 1}. `) + modeColor.bold(m.installation_mode));
|
||||
console.log(chalk.gray(` Path: ${m.installation_path}`));
|
||||
console.log(chalk.gray(` Date: ${new Date(m.installation_date).toLocaleDateString()}`));
|
||||
console.log(chalk.gray(` Version: ${m.application_version}`));
|
||||
console.log(chalk.gray(` Files: ${m.files_count}`));
|
||||
console.log(chalk.gray(` Dirs: ${m.directories_count}`));
|
||||
console.log('');
|
||||
});
|
||||
|
||||
divider();
|
||||
console.log(chalk.gray(' Run: ccw uninstall - to remove an installation'));
|
||||
console.log('');
|
||||
}
|
||||
Reference in New Issue
Block a user