SuperCharge Claude Code v1.0.0 - Complete Customization Package
Features: - 30+ Custom Skills (cognitive, development, UI/UX, autonomous agents) - RalphLoop autonomous agent integration - Multi-AI consultation (Qwen) - Agent management system with sync capabilities - Custom hooks for session management - MCP servers integration - Plugin marketplace setup - Comprehensive installation script Components: - Skills: always-use-superpowers, ralph, brainstorming, ui-ux-pro-max, etc. - Agents: 100+ agents across engineering, marketing, product, etc. - Hooks: session-start-superpowers, qwen-consult, ralph-auto-trigger - Commands: /brainstorm, /write-plan, /execute-plan - MCP Servers: zai-mcp-server, web-search-prime, web-reader, zread - Binaries: ralphloop wrapper Installation: ./supercharge.sh
This commit is contained in:
58
plugins/examples/docker-helper/commands/logs.ts
Normal file
58
plugins/examples/docker-helper/commands/logs.ts
Normal file
@@ -0,0 +1,58 @@
|
||||
/**
|
||||
* Docker Logs Command
|
||||
* View and filter container logs
|
||||
*/
|
||||
|
||||
import { exec } from 'child_process'
|
||||
import { promisify } from 'util'
|
||||
|
||||
const execAsync = promisify(exec)
|
||||
|
||||
export interface LogsOptions {
|
||||
service?: string
|
||||
tail?: number
|
||||
follow?: boolean
|
||||
since?: string
|
||||
grep?: string
|
||||
}
|
||||
|
||||
export async function handle(args: LogsOptions, context: any): Promise<string> {
|
||||
const { service, tail = 100, follow = false, since, grep } = args
|
||||
|
||||
try {
|
||||
let command = 'docker-compose logs'
|
||||
|
||||
if (tail) {
|
||||
command += ` --tail ${tail}`
|
||||
}
|
||||
|
||||
if (follow) {
|
||||
command += ' -f'
|
||||
}
|
||||
|
||||
if (since) {
|
||||
command += ` --since "${since}"`
|
||||
}
|
||||
|
||||
if (service) {
|
||||
command += ` ${service}`
|
||||
}
|
||||
|
||||
const { stdout, stderr } = await execAsync(command)
|
||||
|
||||
let logs = stdout
|
||||
|
||||
// Filter by grep pattern if provided
|
||||
if (grep) {
|
||||
const lines = logs.split('\n')
|
||||
const filtered = lines.filter(line => line.includes(grep))
|
||||
logs = filtered.join('\n')
|
||||
}
|
||||
|
||||
return logs || stderr || 'No logs found'
|
||||
} catch (error: any) {
|
||||
throw new Error(`Failed to fetch logs: ${error.message}`)
|
||||
}
|
||||
}
|
||||
|
||||
export default { handle }
|
||||
Reference in New Issue
Block a user