mirror of
https://github.com/rohitg00/skillkit.git
synced 2026-11-18 18:04:26 +00:00
Revert "feat: single source of truth for skills marketplace"
This reverts commit 0c5eb93891.
This commit is contained in:
@@ -39,7 +39,6 @@ import {
|
||||
CommandCmd,
|
||||
AICommand,
|
||||
AuditCommand,
|
||||
PublishCommand,
|
||||
AgentCommand,
|
||||
AgentListCommand,
|
||||
AgentShowCommand,
|
||||
@@ -99,7 +98,6 @@ cli.register(PlanCommand);
|
||||
cli.register(CommandCmd);
|
||||
cli.register(AICommand);
|
||||
cli.register(AuditCommand);
|
||||
cli.register(PublishCommand);
|
||||
cli.register(AgentCommand);
|
||||
cli.register(AgentListCommand);
|
||||
cli.register(AgentShowCommand);
|
||||
|
||||
@@ -94,69 +94,6 @@ function downloadContent(content: string, filename: string): void {
|
||||
URL.revokeObjectURL(url);
|
||||
}
|
||||
|
||||
// localStorage cache for AI-generated skills
|
||||
const CACHE_KEY = 'skillkit_ai_cache';
|
||||
const CACHE_VERSION = 1;
|
||||
|
||||
interface CachedSkill {
|
||||
skill: AgentSkill;
|
||||
query: string;
|
||||
timestamp: number;
|
||||
}
|
||||
|
||||
interface SkillCache {
|
||||
version: number;
|
||||
skills: Record<string, CachedSkill>;
|
||||
}
|
||||
|
||||
function normalizeQuery(query: string): string {
|
||||
return query.toLowerCase().trim().replace(/\s+/g, ' ');
|
||||
}
|
||||
|
||||
function getSkillCache(): SkillCache {
|
||||
try {
|
||||
const cached = localStorage.getItem(CACHE_KEY);
|
||||
if (cached) {
|
||||
const parsed = JSON.parse(cached) as SkillCache;
|
||||
if (parsed.version === CACHE_VERSION) {
|
||||
return parsed;
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
// Ignore parse errors
|
||||
}
|
||||
return { version: CACHE_VERSION, skills: {} };
|
||||
}
|
||||
|
||||
function getCachedSkill(query: string): AgentSkill | null {
|
||||
const cache = getSkillCache();
|
||||
const key = normalizeQuery(query);
|
||||
const cached = cache.skills[key];
|
||||
if (cached) {
|
||||
// Cache valid for 7 days
|
||||
const weekMs = 7 * 24 * 60 * 60 * 1000;
|
||||
if (Date.now() - cached.timestamp < weekMs) {
|
||||
return cached.skill;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function setCachedSkill(query: string, skill: AgentSkill): void {
|
||||
try {
|
||||
const cache = getSkillCache();
|
||||
const key = normalizeQuery(query);
|
||||
cache.skills[key] = {
|
||||
skill,
|
||||
query: key,
|
||||
timestamp: Date.now(),
|
||||
};
|
||||
localStorage.setItem(CACHE_KEY, JSON.stringify(cache));
|
||||
} catch {
|
||||
// Ignore storage errors (quota exceeded, etc.)
|
||||
}
|
||||
}
|
||||
|
||||
export function SkillGenerator(): React.ReactElement {
|
||||
const [input, setInput] = useState('');
|
||||
const [status, setStatus] = useState<LoadingState>(LoadingState.IDLE);
|
||||
@@ -166,7 +103,6 @@ export function SkillGenerator(): React.ReactElement {
|
||||
const [selectedSkill, setSelectedSkill] = useState<IndexedSkill | null>(null);
|
||||
const [skillContent, setSkillContent] = useState<string | null>(null);
|
||||
const [generatedSkill, setGeneratedSkill] = useState<AgentSkill | null>(null);
|
||||
const [isFromCache, setIsFromCache] = useState(false);
|
||||
const [activeTab, setActiveTab] = useState<'principles' | 'patterns' | 'antipatterns'>('principles');
|
||||
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
@@ -208,25 +144,12 @@ export function SkillGenerator(): React.ReactElement {
|
||||
}
|
||||
|
||||
async function handleGenerateWithAI(): Promise<void> {
|
||||
setError(null);
|
||||
|
||||
// Check cache first
|
||||
const cached = getCachedSkill(input);
|
||||
if (cached) {
|
||||
setGeneratedSkill(cached);
|
||||
setIsFromCache(true);
|
||||
setViewMode('generated');
|
||||
setStatus(LoadingState.SUCCESS);
|
||||
return;
|
||||
}
|
||||
|
||||
setStatus(LoadingState.LOADING);
|
||||
setIsFromCache(false);
|
||||
setError(null);
|
||||
|
||||
try {
|
||||
const result = await generateAgentSkill(input);
|
||||
setGeneratedSkill(result);
|
||||
setCachedSkill(input, result); // Cache the result
|
||||
setViewMode('generated');
|
||||
setStatus(LoadingState.SUCCESS);
|
||||
} catch {
|
||||
@@ -235,46 +158,6 @@ export function SkillGenerator(): React.ReactElement {
|
||||
}
|
||||
}
|
||||
|
||||
function submitToMarketplace(): void {
|
||||
if (!generatedSkill) return;
|
||||
|
||||
const slug = generatedSkill.name.toLowerCase().replace(/\s+/g, '-').replace(/[^a-z0-9-]/g, '');
|
||||
const skillContent = generateSkillMd(generatedSkill);
|
||||
|
||||
const body = `## 📤 AI-Generated Skill: ${generatedSkill.title}
|
||||
|
||||
### Skill Details
|
||||
- **Name:** ${generatedSkill.name}
|
||||
- **Description:** ${generatedSkill.description}
|
||||
- **Tags:** ${generatedSkill.tags.join(', ')}
|
||||
- **Version:** ${generatedSkill.version}
|
||||
|
||||
### SKILL.md Content
|
||||
|
||||
<details>
|
||||
<summary>Click to expand</summary>
|
||||
|
||||
\`\`\`markdown
|
||||
${skillContent.slice(0, 4000)}${skillContent.length > 4000 ? '\n...(truncated)' : ''}
|
||||
\`\`\`
|
||||
|
||||
</details>
|
||||
|
||||
### Checklist for Maintainer
|
||||
- [ ] Review skill content for quality
|
||||
- [ ] Add to \`marketplace/skills.json\`
|
||||
|
||||
---
|
||||
**Generated via:** AI Skill Generator
|
||||
**Search query:** "${input}"`;
|
||||
|
||||
const title = encodeURIComponent(`[AI Skill] ${generatedSkill.title}`);
|
||||
const encodedBody = encodeURIComponent(body);
|
||||
const url = `https://github.com/rohitg00/skillkit/issues/new?title=${title}&body=${encodedBody}&labels=ai-generated,skill-submission`;
|
||||
|
||||
window.open(url, '_blank', 'noopener,noreferrer');
|
||||
}
|
||||
|
||||
function handleBack(): void {
|
||||
switch (viewMode) {
|
||||
case 'content':
|
||||
@@ -470,9 +353,9 @@ ${skillContent.slice(0, 4000)}${skillContent.length > 4000 ? '\n...(truncated)'
|
||||
|
||||
<div className="mt-6 pt-6 border-t border-zinc-800">
|
||||
<p className="text-zinc-500 font-mono text-sm mb-3">Install with SkillKit:</p>
|
||||
<pre className="bg-zinc-950 border border-zinc-800 p-4 text-sm overflow-x-auto">
|
||||
<code className="text-zinc-300 font-mono text-xs sm:text-sm whitespace-nowrap">
|
||||
npx skillkit install {selectedSkill.id.split('/').slice(0, 2).join('/')}
|
||||
<pre className="bg-zinc-950 border border-zinc-800 p-4 text-sm">
|
||||
<code className="text-zinc-300 font-mono">
|
||||
skillkit install {selectedSkill.id.split('/').slice(0, 2).join('/')} --agent claude-code,cursor
|
||||
</code>
|
||||
</pre>
|
||||
</div>
|
||||
@@ -483,19 +366,14 @@ ${skillContent.slice(0, 4000)}${skillContent.length > 4000 ? '\n...(truncated)'
|
||||
<div className="animate-fade-in-up">
|
||||
<div className="flex items-start justify-between mb-8 border-b border-zinc-800 pb-6">
|
||||
<div className="flex-1">
|
||||
<div className="flex flex-wrap items-center gap-2 mb-2">
|
||||
<h3 className="text-xl sm:text-2xl font-bold text-white">{generatedSkill.title}</h3>
|
||||
<div className="flex items-center gap-3 mb-2">
|
||||
<h3 className="text-2xl font-bold text-white">{generatedSkill.title}</h3>
|
||||
<span className="text-xs font-mono text-zinc-500 bg-zinc-900 px-2 py-1 border border-zinc-800">
|
||||
v{generatedSkill.version}
|
||||
</span>
|
||||
<span className="text-xs font-mono text-purple-400 bg-purple-900/30 px-2 py-1 border border-purple-800/50">
|
||||
AI Generated
|
||||
</span>
|
||||
{isFromCache && (
|
||||
<span className="text-xs font-mono text-green-400 bg-green-900/30 px-2 py-1 border border-green-800/50">
|
||||
Cached
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
<p className="text-zinc-400 font-mono text-sm mb-4">{generatedSkill.description}</p>
|
||||
<div className="flex flex-wrap gap-2">
|
||||
@@ -506,26 +384,15 @@ ${skillContent.slice(0, 4000)}${skillContent.length > 4000 ? '\n...(truncated)'
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex flex-col sm:flex-row gap-2 shrink-0 ml-4">
|
||||
<button
|
||||
onClick={downloadGeneratedSkillMd}
|
||||
className="flex items-center justify-center gap-2 bg-white text-black px-4 py-2 font-mono text-sm hover:bg-zinc-200 transition-colors"
|
||||
>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" className="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4" />
|
||||
</svg>
|
||||
DOWNLOAD
|
||||
</button>
|
||||
<button
|
||||
onClick={submitToMarketplace}
|
||||
className="flex items-center justify-center gap-2 bg-purple-600 text-white px-4 py-2 font-mono text-sm hover:bg-purple-500 transition-colors"
|
||||
>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" className="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12" />
|
||||
</svg>
|
||||
SUBMIT
|
||||
</button>
|
||||
</div>
|
||||
<button
|
||||
onClick={downloadGeneratedSkillMd}
|
||||
className="flex items-center gap-2 bg-white text-black px-4 py-2 font-mono text-sm hover:bg-zinc-200 transition-colors shrink-0 ml-4"
|
||||
>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" className="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4" />
|
||||
</svg>
|
||||
DOWNLOAD
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<Card className="mb-6">
|
||||
|
||||
@@ -227,7 +227,8 @@ ${jsonEntry}
|
||||
### Checklist for Maintainer
|
||||
- [ ] Verify repository is public
|
||||
- [ ] Add JSON entry to \`marketplace/skills.json\`
|
||||
- [ ] Add to \`marketplace/skills.json\`
|
||||
- [ ] Copy to \`docs/skillkit/data/skills.json\`
|
||||
- [ ] Copy to \`packages/core/src/marketplace/data/skills.json\`
|
||||
|
||||
---
|
||||
**Submitted by:** @${form.authorGithub || 'anonymous'}
|
||||
@@ -254,7 +255,8 @@ ${form.skillContent.slice(0, 4000)}${form.skillContent.length > 4000 ? '\n...(tr
|
||||
### Checklist for Maintainer
|
||||
- [ ] Review SKILL.md content
|
||||
- [ ] Add JSON entry to \`marketplace/skills.json\`
|
||||
- [ ] Add to \`marketplace/skills.json\`
|
||||
- [ ] Copy to \`docs/skillkit/data/skills.json\`
|
||||
- [ ] Copy to \`packages/core/src/marketplace/data/skills.json\`
|
||||
|
||||
---
|
||||
**Author:** @${form.authorGithub || 'anonymous'}`;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// Single source of truth: marketplace/skills.json
|
||||
import skillsData from '../../../marketplace/skills.json';
|
||||
import skillsData from './skills.json';
|
||||
|
||||
export interface IndexedSkill {
|
||||
id: string;
|
||||
|
||||
@@ -0,0 +1,161 @@
|
||||
{
|
||||
"$schema": "./schema.json",
|
||||
"version": 1,
|
||||
"updatedAt": "2026-01-26",
|
||||
"skills": [
|
||||
{
|
||||
"id": "vercel-labs/agent-skills/vercel-react-best-practices",
|
||||
"name": "Vercel React Best Practices",
|
||||
"description": "Best practices for building React applications with Vercel",
|
||||
"source": "vercel-labs/agent-skills",
|
||||
"tags": ["react", "vercel", "frontend"]
|
||||
},
|
||||
{
|
||||
"id": "vercel-labs/agent-skills/web-design-guidelines",
|
||||
"name": "Web Design Guidelines",
|
||||
"description": "Guidelines for designing modern web applications",
|
||||
"source": "vercel-labs/agent-skills",
|
||||
"tags": ["design", "ui", "frontend"]
|
||||
},
|
||||
{
|
||||
"id": "remotion-dev/skills/remotion-best-practices",
|
||||
"name": "Remotion Best Practices",
|
||||
"description": "Best practices for creating videos with Remotion",
|
||||
"source": "remotion-dev/skills",
|
||||
"tags": ["remotion", "video", "react"]
|
||||
},
|
||||
{
|
||||
"id": "anthropics/skills/frontend-design",
|
||||
"name": "Frontend Design",
|
||||
"description": "Frontend design patterns and best practices",
|
||||
"source": "anthropics/skills",
|
||||
"tags": ["design", "ui", "frontend"]
|
||||
},
|
||||
{
|
||||
"id": "anthropics/skills/skill-creator",
|
||||
"name": "Skill Creator",
|
||||
"description": "Create and publish your own skills",
|
||||
"source": "anthropics/skills",
|
||||
"tags": ["meta", "skills"]
|
||||
},
|
||||
{
|
||||
"id": "vercel-labs/agent-browser/agent-browser",
|
||||
"name": "Agent Browser",
|
||||
"description": "Browser automation skills for AI agents",
|
||||
"source": "vercel-labs/agent-browser",
|
||||
"tags": ["browser", "automation"]
|
||||
},
|
||||
{
|
||||
"id": "supabase/agent-skills/supabase-postgres-best-practices",
|
||||
"name": "Supabase Postgres Best Practices",
|
||||
"description": "Best practices for Supabase and PostgreSQL",
|
||||
"source": "supabase/agent-skills",
|
||||
"tags": ["supabase", "postgres", "database"]
|
||||
},
|
||||
{
|
||||
"id": "expo/skills/building-native-ui",
|
||||
"name": "Building Native UI",
|
||||
"description": "Build native mobile UIs with Expo and React Native",
|
||||
"source": "expo/skills",
|
||||
"tags": ["expo", "react-native", "mobile"]
|
||||
},
|
||||
{
|
||||
"id": "callstackincubator/agent-skills/react-native",
|
||||
"name": "React Native Development",
|
||||
"description": "React Native mobile development best practices",
|
||||
"source": "callstackincubator/agent-skills",
|
||||
"tags": ["react-native", "mobile"]
|
||||
},
|
||||
{
|
||||
"id": "anthropics/skills/typescript-best-practices",
|
||||
"name": "TypeScript Best Practices",
|
||||
"description": "TypeScript coding standards and patterns",
|
||||
"source": "anthropics/skills",
|
||||
"tags": ["typescript", "javascript"]
|
||||
},
|
||||
{
|
||||
"id": "anthropics/skills/testing-patterns",
|
||||
"name": "Testing Patterns",
|
||||
"description": "Unit, integration, and E2E testing patterns",
|
||||
"source": "anthropics/skills",
|
||||
"tags": ["testing", "jest", "vitest"]
|
||||
},
|
||||
{
|
||||
"id": "anthropics/skills/api-design",
|
||||
"name": "API Design",
|
||||
"description": "RESTful and GraphQL API design patterns",
|
||||
"source": "anthropics/skills",
|
||||
"tags": ["api", "rest", "graphql"]
|
||||
},
|
||||
{
|
||||
"id": "anthropics/skills/security-audit",
|
||||
"name": "Security Audit",
|
||||
"description": "Security best practices and vulnerability scanning",
|
||||
"source": "anthropics/skills",
|
||||
"tags": ["security", "audit"]
|
||||
},
|
||||
{
|
||||
"id": "anthropics/skills/git-workflow",
|
||||
"name": "Git Workflow",
|
||||
"description": "Git branching, commits, and collaboration patterns",
|
||||
"source": "anthropics/skills",
|
||||
"tags": ["git", "devops"]
|
||||
},
|
||||
{
|
||||
"id": "anthropics/skills/docker-patterns",
|
||||
"name": "Docker Patterns",
|
||||
"description": "Docker containerization best practices",
|
||||
"source": "anthropics/skills",
|
||||
"tags": ["docker", "devops", "containers"]
|
||||
},
|
||||
{
|
||||
"id": "openai/skills/code-review",
|
||||
"name": "Code Review",
|
||||
"description": "Automated code review and suggestions",
|
||||
"source": "openai/skills",
|
||||
"tags": ["code-review", "quality"]
|
||||
},
|
||||
{
|
||||
"id": "openai/skills/documentation",
|
||||
"name": "Documentation Generator",
|
||||
"description": "Generate and maintain code documentation",
|
||||
"source": "openai/skills",
|
||||
"tags": ["documentation", "readme"]
|
||||
},
|
||||
{
|
||||
"id": "davila7/claude-code-templates/nextjs-app",
|
||||
"name": "Next.js App Router",
|
||||
"description": "Next.js 14+ App Router patterns and best practices",
|
||||
"source": "davila7/claude-code-templates",
|
||||
"tags": ["nextjs", "react", "frontend"]
|
||||
},
|
||||
{
|
||||
"id": "davila7/claude-code-templates/prisma-patterns",
|
||||
"name": "Prisma Patterns",
|
||||
"description": "Prisma ORM patterns and database design",
|
||||
"source": "davila7/claude-code-templates",
|
||||
"tags": ["prisma", "database", "orm"]
|
||||
},
|
||||
{
|
||||
"id": "composioHQ/awesome-claude-code-skills/python-best-practices",
|
||||
"name": "Python Best Practices",
|
||||
"description": "Python coding standards and patterns",
|
||||
"source": "composioHQ/awesome-claude-code-skills",
|
||||
"tags": ["python"]
|
||||
},
|
||||
{
|
||||
"id": "composioHQ/awesome-claude-code-skills/rust-patterns",
|
||||
"name": "Rust Patterns",
|
||||
"description": "Rust memory safety and performance patterns",
|
||||
"source": "composioHQ/awesome-claude-code-skills",
|
||||
"tags": ["rust"]
|
||||
},
|
||||
{
|
||||
"id": "composioHQ/awesome-claude-code-skills/go-patterns",
|
||||
"name": "Go Patterns",
|
||||
"description": "Go concurrency and idiomatic patterns",
|
||||
"source": "composioHQ/awesome-claude-code-skills",
|
||||
"tags": ["golang", "go"]
|
||||
}
|
||||
]
|
||||
}
|
||||
+23
-125423
File diff suppressed because it is too large
Load Diff
@@ -1,39 +0,0 @@
|
||||
{
|
||||
"$schema": "./sources-schema.json",
|
||||
"version": 1,
|
||||
"updatedAt": "2026-01-26",
|
||||
"description": "Curated skill repository sources - THE SINGLE SOURCE OF TRUTH",
|
||||
"sources": [
|
||||
{ "source": "anthropics/skills", "name": "Anthropic Official", "official": true },
|
||||
{ "source": "vercel-labs/agent-skills", "name": "Vercel Labs", "official": true },
|
||||
{ "source": "expo/skills", "name": "Expo / React Native", "official": true },
|
||||
{ "source": "remotion-dev/skills", "name": "Remotion Video", "official": true },
|
||||
{ "source": "supabase/agent-skills", "name": "Supabase", "official": true },
|
||||
{ "source": "stripe/ai", "name": "Stripe Payments", "official": true },
|
||||
{ "source": "ComposioHQ/awesome-claude-skills", "name": "Composio Awesome" },
|
||||
{ "source": "travisvn/awesome-claude-skills", "name": "Travis Awesome" },
|
||||
{ "source": "mhattingpete/claude-skills-marketplace", "name": "Skills Marketplace" },
|
||||
{ "source": "coreyhaines31/marketingskills", "name": "Marketing Skills" },
|
||||
{ "source": "obra/superpowers", "name": "Superpowers TDD" },
|
||||
{ "source": "softaworks/agent-toolkit", "name": "Softaworks Toolkit" },
|
||||
{ "source": "wshobson/agents", "name": "Dev Patterns" },
|
||||
{ "source": "langgenius/dify", "name": "Dify Frontend" },
|
||||
{ "source": "trailofbits/skills", "name": "Trail of Bits Security" },
|
||||
{ "source": "better-auth/skills", "name": "Better Auth" },
|
||||
{ "source": "onmax/nuxt-skills", "name": "Nuxt / Vue" },
|
||||
{ "source": "hyf0/vue-skills", "name": "Vue Best Practices" },
|
||||
{ "source": "jezweb/claude-skills", "name": "Cloudflare / TanStack" },
|
||||
{ "source": "elysiajs/skills", "name": "ElysiaJS / Bun" },
|
||||
{ "source": "kadajett/agent-nestjs-skills", "name": "NestJS" },
|
||||
{ "source": "callstackincubator/agent-skills", "name": "React Native" },
|
||||
{ "source": "cloudai-x/threejs-skills", "name": "Three.js" },
|
||||
{ "source": "emalorenzo/three-agent-skills", "name": "Three.js Advanced" },
|
||||
{ "source": "dimillian/skills", "name": "SwiftUI iOS" },
|
||||
{ "source": "waynesutton/convexskills", "name": "Convex Backend" },
|
||||
{ "source": "kepano/obsidian-skills", "name": "Obsidian Notes" },
|
||||
{ "source": "jimliu/baoyu-skills", "name": "Baoyu Tools" },
|
||||
{ "source": "giuseppe-trisciuoglio/developer-kit", "name": "Shadcn / Radix" },
|
||||
{ "source": "openrouterteam/agent-skills", "name": "OpenRouter SDK" },
|
||||
{ "source": "intellectronica/agent-skills", "name": "Context7" }
|
||||
]
|
||||
}
|
||||
@@ -31,7 +31,6 @@ export { PlanCommand } from './plan.js';
|
||||
export { CommandCmd } from './command.js';
|
||||
export { AICommand } from './ai.js';
|
||||
export { AuditCommand } from './audit.js';
|
||||
export { PublishCommand } from './publish.js';
|
||||
export {
|
||||
AgentCommand,
|
||||
AgentListCommand,
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
import { existsSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
import { createInterface } from 'node:readline';
|
||||
import chalk from 'chalk';
|
||||
import { Command, Option } from 'clipanion';
|
||||
import type { AgentType } from '@skillkit/core';
|
||||
@@ -72,9 +69,6 @@ export class InitCommand extends Command {
|
||||
console.log(chalk.dim(' 2. Sync config: skillkit sync'));
|
||||
console.log(chalk.dim(' 3. Use skills: skillkit read <skill-name>'));
|
||||
|
||||
// Check if SKILL.md exists and offer to publish
|
||||
await this.checkAndPromptPublish();
|
||||
|
||||
return 0;
|
||||
} catch (error) {
|
||||
console.error(chalk.red('Initialization failed'));
|
||||
@@ -82,44 +76,4 @@ export class InitCommand extends Command {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
private async checkAndPromptPublish(): Promise<void> {
|
||||
const skillMdLocations = [
|
||||
join(process.cwd(), 'SKILL.md'),
|
||||
join(process.cwd(), 'skills', 'SKILL.md'),
|
||||
join(process.cwd(), '.claude', 'skills', 'SKILL.md'),
|
||||
join(process.cwd(), '.cursor', 'skills', 'SKILL.md'),
|
||||
];
|
||||
|
||||
const foundSkillMd = skillMdLocations.find(loc => existsSync(loc));
|
||||
if (!foundSkillMd) return;
|
||||
|
||||
console.log();
|
||||
console.log(chalk.yellow('Found SKILL.md in your project!'));
|
||||
console.log(chalk.dim('Would you like to publish it to the SkillKit marketplace?'));
|
||||
console.log();
|
||||
|
||||
const answer = await this.prompt('Publish skill? [y/N]: ');
|
||||
|
||||
if (answer.toLowerCase() === 'y' || answer.toLowerCase() === 'yes') {
|
||||
console.log();
|
||||
console.log(chalk.cyan('To publish your skill, run:'));
|
||||
console.log(chalk.white(` skillkit publish ${foundSkillMd}`));
|
||||
console.log();
|
||||
}
|
||||
}
|
||||
|
||||
private prompt(question: string): Promise<string> {
|
||||
const rl = createInterface({
|
||||
input: process.stdin,
|
||||
output: process.stdout,
|
||||
});
|
||||
|
||||
return new Promise(resolve => {
|
||||
rl.question(question, answer => {
|
||||
rl.close();
|
||||
resolve(answer.trim());
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,261 +0,0 @@
|
||||
import { existsSync, readFileSync } from 'node:fs';
|
||||
import { join, basename, dirname } from 'node:path';
|
||||
import { execSync } from 'node:child_process';
|
||||
import chalk from 'chalk';
|
||||
import { Command, Option } from 'clipanion';
|
||||
|
||||
interface SkillFrontmatter {
|
||||
name?: string;
|
||||
description?: string;
|
||||
tags?: string[];
|
||||
version?: string;
|
||||
}
|
||||
|
||||
export class PublishCommand extends Command {
|
||||
static override paths = [['publish']];
|
||||
|
||||
static override usage = Command.Usage({
|
||||
description: 'Publish your skill to the SkillKit marketplace',
|
||||
examples: [
|
||||
['Publish skill from current directory', '$0 publish'],
|
||||
['Publish skill from specific path', '$0 publish ./my-skill'],
|
||||
['Publish with custom name', '$0 publish --name my-awesome-skill'],
|
||||
],
|
||||
});
|
||||
|
||||
skillPath = Option.String({ required: false, name: 'path' });
|
||||
|
||||
name = Option.String('--name,-n', {
|
||||
description: 'Custom skill name (default: parsed from SKILL.md)',
|
||||
});
|
||||
|
||||
dryRun = Option.Boolean('--dry-run', false, {
|
||||
description: 'Show what would be published without actually publishing',
|
||||
});
|
||||
|
||||
async execute(): Promise<number> {
|
||||
const skillPath = this.skillPath || process.cwd();
|
||||
const skillMdPath = this.findSkillMd(skillPath);
|
||||
|
||||
if (!skillMdPath) {
|
||||
console.error(chalk.red('No SKILL.md found'));
|
||||
console.error(chalk.dim('Run this command from a directory containing SKILL.md'));
|
||||
console.error(chalk.dim('Or specify the path: skillkit publish ./path/to/skill'));
|
||||
return 1;
|
||||
}
|
||||
|
||||
console.log(chalk.cyan('Publishing skill to SkillKit marketplace...\n'));
|
||||
|
||||
// Parse SKILL.md
|
||||
const content = readFileSync(skillMdPath, 'utf-8');
|
||||
const frontmatter = this.parseFrontmatter(content);
|
||||
const skillName = this.name || frontmatter.name || basename(dirname(skillMdPath));
|
||||
|
||||
// Get git repo info
|
||||
const repoInfo = this.getRepoInfo(dirname(skillMdPath));
|
||||
if (!repoInfo) {
|
||||
console.error(chalk.red('Not a git repository or no remote configured'));
|
||||
console.error(chalk.dim('Your skill must be in a git repository with a GitHub remote'));
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Build skill entry
|
||||
const skillEntry = {
|
||||
id: `${repoInfo.owner}/${repoInfo.repo}/${skillName}`,
|
||||
name: this.formatName(skillName),
|
||||
description: frontmatter.description || `Best practices and patterns for ${this.formatName(skillName)}`,
|
||||
source: `${repoInfo.owner}/${repoInfo.repo}`,
|
||||
tags: frontmatter.tags || this.inferTags(skillName, frontmatter.description || ''),
|
||||
};
|
||||
|
||||
console.log(chalk.white('Skill details:'));
|
||||
console.log(chalk.dim(` ID: ${skillEntry.id}`));
|
||||
console.log(chalk.dim(` Name: ${skillEntry.name}`));
|
||||
console.log(chalk.dim(` Description: ${skillEntry.description}`));
|
||||
console.log(chalk.dim(` Source: ${skillEntry.source}`));
|
||||
console.log(chalk.dim(` Tags: ${skillEntry.tags.join(', ')}`));
|
||||
console.log();
|
||||
|
||||
if (this.dryRun) {
|
||||
console.log(chalk.yellow('Dry run - not publishing'));
|
||||
console.log(chalk.dim('JSON entry that would be added:'));
|
||||
console.log(JSON.stringify(skillEntry, null, 2));
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Create GitHub issue to add skill
|
||||
const issueBody = this.createIssueBody(skillEntry);
|
||||
const issueTitle = encodeURIComponent(`[Publish] ${skillEntry.name}`);
|
||||
const issueBodyEncoded = encodeURIComponent(issueBody);
|
||||
const issueUrl = `https://github.com/rohitg00/skillkit/issues/new?title=${issueTitle}&body=${issueBodyEncoded}&labels=skill-submission,publish`;
|
||||
|
||||
console.log(chalk.green('Opening GitHub to submit your skill...\n'));
|
||||
|
||||
try {
|
||||
// Try to open the URL
|
||||
const openCmd = process.platform === 'darwin' ? 'open' :
|
||||
process.platform === 'win32' ? 'start' : 'xdg-open';
|
||||
execSync(`${openCmd} "${issueUrl}"`, { stdio: 'ignore' });
|
||||
|
||||
console.log(chalk.green('GitHub issue page opened!'));
|
||||
console.log(chalk.dim('Review and submit the issue to publish your skill.'));
|
||||
} catch {
|
||||
console.log(chalk.yellow('Could not open browser automatically.'));
|
||||
console.log(chalk.dim('Please open this URL manually:\n'));
|
||||
console.log(chalk.cyan(issueUrl.slice(0, 200) + '...'));
|
||||
}
|
||||
|
||||
console.log();
|
||||
console.log(chalk.cyan('Next steps:'));
|
||||
console.log(chalk.dim(' 1. Review the skill details in the GitHub issue'));
|
||||
console.log(chalk.dim(' 2. Submit the issue'));
|
||||
console.log(chalk.dim(' 3. A maintainer will review and add your skill'));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
private findSkillMd(basePath: string): string | null {
|
||||
// Check if path is directly to SKILL.md
|
||||
if (basePath.endsWith('SKILL.md') && existsSync(basePath)) {
|
||||
return basePath;
|
||||
}
|
||||
|
||||
// Check if SKILL.md exists in the directory
|
||||
const direct = join(basePath, 'SKILL.md');
|
||||
if (existsSync(direct)) {
|
||||
return direct;
|
||||
}
|
||||
|
||||
// Check common skill locations
|
||||
const locations = [
|
||||
join(basePath, 'skills', 'SKILL.md'),
|
||||
join(basePath, '.claude', 'skills', 'SKILL.md'),
|
||||
join(basePath, '.cursor', 'skills', 'SKILL.md'),
|
||||
];
|
||||
|
||||
for (const loc of locations) {
|
||||
if (existsSync(loc)) {
|
||||
return loc;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private parseFrontmatter(content: string): SkillFrontmatter {
|
||||
const match = content.match(/^---\n([\s\S]*?)\n---/);
|
||||
if (!match) return {};
|
||||
|
||||
const frontmatter: SkillFrontmatter = {};
|
||||
const lines = match[1].split('\n');
|
||||
|
||||
for (const line of lines) {
|
||||
const [key, ...valueParts] = line.split(':');
|
||||
if (!key || valueParts.length === 0) continue;
|
||||
|
||||
const value = valueParts.join(':').trim();
|
||||
|
||||
switch (key.trim()) {
|
||||
case 'name':
|
||||
frontmatter.name = value.replace(/^["']|["']$/g, '');
|
||||
break;
|
||||
case 'description':
|
||||
frontmatter.description = value.replace(/^["']|["']$/g, '');
|
||||
break;
|
||||
case 'version':
|
||||
frontmatter.version = value.replace(/^["']|["']$/g, '');
|
||||
break;
|
||||
case 'tags':
|
||||
// Parse YAML array: [tag1, tag2] or - tag1\n- tag2
|
||||
if (value.startsWith('[')) {
|
||||
frontmatter.tags = value
|
||||
.slice(1, -1)
|
||||
.split(',')
|
||||
.map(t => t.trim().replace(/^["']|["']$/g, ''));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return frontmatter;
|
||||
}
|
||||
|
||||
private getRepoInfo(dir: string): { owner: string; repo: string } | null {
|
||||
try {
|
||||
const remote = execSync('git remote get-url origin', {
|
||||
cwd: dir,
|
||||
encoding: 'utf-8',
|
||||
stdio: ['pipe', 'pipe', 'ignore'],
|
||||
}).trim();
|
||||
|
||||
// Parse GitHub URL: git@github.com:owner/repo.git or https://github.com/owner/repo.git
|
||||
const match = remote.match(/github\.com[:/]([^/]+)\/([^/.]+)/);
|
||||
if (match) {
|
||||
return { owner: match[1], repo: match[2] };
|
||||
}
|
||||
} catch {
|
||||
// Not a git repo or no remote
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private formatName(name: string): string {
|
||||
return name
|
||||
.split(/[-_]/)
|
||||
.map(word => word.charAt(0).toUpperCase() + word.slice(1))
|
||||
.join(' ');
|
||||
}
|
||||
|
||||
private inferTags(name: string, description: string): string[] {
|
||||
const tags: string[] = [];
|
||||
const text = `${name} ${description}`.toLowerCase();
|
||||
|
||||
const tagMap: Record<string, string[]> = {
|
||||
react: ['react', 'jsx', 'tsx'],
|
||||
typescript: ['typescript', 'ts'],
|
||||
nextjs: ['next', 'nextjs'],
|
||||
testing: ['test', 'jest', 'vitest'],
|
||||
mobile: ['mobile', 'react-native', 'expo'],
|
||||
backend: ['backend', 'api', 'server'],
|
||||
database: ['database', 'postgres', 'mysql', 'supabase'],
|
||||
frontend: ['frontend', 'ui', 'design'],
|
||||
devops: ['devops', 'ci', 'cd', 'docker'],
|
||||
};
|
||||
|
||||
for (const [tag, keywords] of Object.entries(tagMap)) {
|
||||
if (keywords.some(k => text.includes(k))) {
|
||||
tags.push(tag);
|
||||
}
|
||||
}
|
||||
|
||||
return tags.length > 0 ? tags : ['general'];
|
||||
}
|
||||
|
||||
private createIssueBody(
|
||||
skill: { id: string; name: string; description: string; source: string; tags: string[] }
|
||||
): string {
|
||||
return `## Publish Skill Request
|
||||
|
||||
### Skill Details
|
||||
- **ID:** \`${skill.id}\`
|
||||
- **Name:** ${skill.name}
|
||||
- **Description:** ${skill.description}
|
||||
- **Source:** [${skill.source}](https://github.com/${skill.source})
|
||||
- **Tags:** ${skill.tags.map(t => `\`${t}\``).join(', ')}
|
||||
|
||||
### JSON Entry
|
||||
\`\`\`json
|
||||
${JSON.stringify(skill, null, 2)}
|
||||
\`\`\`
|
||||
|
||||
### Checklist
|
||||
- [ ] SKILL.md follows the standard format
|
||||
- [ ] Skill is publicly accessible on GitHub
|
||||
- [ ] Description accurately describes the skill
|
||||
- [ ] Tags are appropriate
|
||||
|
||||
---
|
||||
Submitted via \`skillkit publish\``;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,161 @@
|
||||
{
|
||||
"$schema": "./schema.json",
|
||||
"version": 1,
|
||||
"updatedAt": "2026-01-26",
|
||||
"skills": [
|
||||
{
|
||||
"id": "vercel-labs/agent-skills/vercel-react-best-practices",
|
||||
"name": "Vercel React Best Practices",
|
||||
"description": "Best practices for building React applications with Vercel",
|
||||
"source": "vercel-labs/agent-skills",
|
||||
"tags": ["react", "vercel", "frontend"]
|
||||
},
|
||||
{
|
||||
"id": "vercel-labs/agent-skills/web-design-guidelines",
|
||||
"name": "Web Design Guidelines",
|
||||
"description": "Guidelines for designing modern web applications",
|
||||
"source": "vercel-labs/agent-skills",
|
||||
"tags": ["design", "ui", "frontend"]
|
||||
},
|
||||
{
|
||||
"id": "remotion-dev/skills/remotion-best-practices",
|
||||
"name": "Remotion Best Practices",
|
||||
"description": "Best practices for creating videos with Remotion",
|
||||
"source": "remotion-dev/skills",
|
||||
"tags": ["remotion", "video", "react"]
|
||||
},
|
||||
{
|
||||
"id": "anthropics/skills/frontend-design",
|
||||
"name": "Frontend Design",
|
||||
"description": "Frontend design patterns and best practices",
|
||||
"source": "anthropics/skills",
|
||||
"tags": ["design", "ui", "frontend"]
|
||||
},
|
||||
{
|
||||
"id": "anthropics/skills/skill-creator",
|
||||
"name": "Skill Creator",
|
||||
"description": "Create and publish your own skills",
|
||||
"source": "anthropics/skills",
|
||||
"tags": ["meta", "skills"]
|
||||
},
|
||||
{
|
||||
"id": "vercel-labs/agent-browser/agent-browser",
|
||||
"name": "Agent Browser",
|
||||
"description": "Browser automation skills for AI agents",
|
||||
"source": "vercel-labs/agent-browser",
|
||||
"tags": ["browser", "automation"]
|
||||
},
|
||||
{
|
||||
"id": "supabase/agent-skills/supabase-postgres-best-practices",
|
||||
"name": "Supabase Postgres Best Practices",
|
||||
"description": "Best practices for Supabase and PostgreSQL",
|
||||
"source": "supabase/agent-skills",
|
||||
"tags": ["supabase", "postgres", "database"]
|
||||
},
|
||||
{
|
||||
"id": "expo/skills/building-native-ui",
|
||||
"name": "Building Native UI",
|
||||
"description": "Build native mobile UIs with Expo and React Native",
|
||||
"source": "expo/skills",
|
||||
"tags": ["expo", "react-native", "mobile"]
|
||||
},
|
||||
{
|
||||
"id": "callstackincubator/agent-skills/react-native",
|
||||
"name": "React Native Development",
|
||||
"description": "React Native mobile development best practices",
|
||||
"source": "callstackincubator/agent-skills",
|
||||
"tags": ["react-native", "mobile"]
|
||||
},
|
||||
{
|
||||
"id": "anthropics/skills/typescript-best-practices",
|
||||
"name": "TypeScript Best Practices",
|
||||
"description": "TypeScript coding standards and patterns",
|
||||
"source": "anthropics/skills",
|
||||
"tags": ["typescript", "javascript"]
|
||||
},
|
||||
{
|
||||
"id": "anthropics/skills/testing-patterns",
|
||||
"name": "Testing Patterns",
|
||||
"description": "Unit, integration, and E2E testing patterns",
|
||||
"source": "anthropics/skills",
|
||||
"tags": ["testing", "jest", "vitest"]
|
||||
},
|
||||
{
|
||||
"id": "anthropics/skills/api-design",
|
||||
"name": "API Design",
|
||||
"description": "RESTful and GraphQL API design patterns",
|
||||
"source": "anthropics/skills",
|
||||
"tags": ["api", "rest", "graphql"]
|
||||
},
|
||||
{
|
||||
"id": "anthropics/skills/security-audit",
|
||||
"name": "Security Audit",
|
||||
"description": "Security best practices and vulnerability scanning",
|
||||
"source": "anthropics/skills",
|
||||
"tags": ["security", "audit"]
|
||||
},
|
||||
{
|
||||
"id": "anthropics/skills/git-workflow",
|
||||
"name": "Git Workflow",
|
||||
"description": "Git branching, commits, and collaboration patterns",
|
||||
"source": "anthropics/skills",
|
||||
"tags": ["git", "devops"]
|
||||
},
|
||||
{
|
||||
"id": "anthropics/skills/docker-patterns",
|
||||
"name": "Docker Patterns",
|
||||
"description": "Docker containerization best practices",
|
||||
"source": "anthropics/skills",
|
||||
"tags": ["docker", "devops", "containers"]
|
||||
},
|
||||
{
|
||||
"id": "openai/skills/code-review",
|
||||
"name": "Code Review",
|
||||
"description": "Automated code review and suggestions",
|
||||
"source": "openai/skills",
|
||||
"tags": ["code-review", "quality"]
|
||||
},
|
||||
{
|
||||
"id": "openai/skills/documentation",
|
||||
"name": "Documentation Generator",
|
||||
"description": "Generate and maintain code documentation",
|
||||
"source": "openai/skills",
|
||||
"tags": ["documentation", "readme"]
|
||||
},
|
||||
{
|
||||
"id": "davila7/claude-code-templates/nextjs-app",
|
||||
"name": "Next.js App Router",
|
||||
"description": "Next.js 14+ App Router patterns and best practices",
|
||||
"source": "davila7/claude-code-templates",
|
||||
"tags": ["nextjs", "react", "frontend"]
|
||||
},
|
||||
{
|
||||
"id": "davila7/claude-code-templates/prisma-patterns",
|
||||
"name": "Prisma Patterns",
|
||||
"description": "Prisma ORM patterns and database design",
|
||||
"source": "davila7/claude-code-templates",
|
||||
"tags": ["prisma", "database", "orm"]
|
||||
},
|
||||
{
|
||||
"id": "composioHQ/awesome-claude-code-skills/python-best-practices",
|
||||
"name": "Python Best Practices",
|
||||
"description": "Python coding standards and patterns",
|
||||
"source": "composioHQ/awesome-claude-code-skills",
|
||||
"tags": ["python"]
|
||||
},
|
||||
{
|
||||
"id": "composioHQ/awesome-claude-code-skills/rust-patterns",
|
||||
"name": "Rust Patterns",
|
||||
"description": "Rust memory safety and performance patterns",
|
||||
"source": "composioHQ/awesome-claude-code-skills",
|
||||
"tags": ["rust"]
|
||||
},
|
||||
{
|
||||
"id": "composioHQ/awesome-claude-code-skills/go-patterns",
|
||||
"name": "Go Patterns",
|
||||
"description": "Go concurrency and idiomatic patterns",
|
||||
"source": "composioHQ/awesome-claude-code-skills",
|
||||
"tags": ["golang", "go"]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -121,23 +121,26 @@ export interface MarketplaceConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* Default skill sources - loaded from marketplace/sources.json (single source of truth)
|
||||
* Default skill sources
|
||||
*/
|
||||
import sourcesData from '../../../../marketplace/sources.json' with { type: 'json' };
|
||||
|
||||
export const DEFAULT_SKILL_SOURCES: SkillSource[] = sourcesData.sources.map(
|
||||
(s: { source: string; name: string; official?: boolean }) => {
|
||||
const [owner, repo] = s.source.split('/');
|
||||
return {
|
||||
owner,
|
||||
repo,
|
||||
name: s.name,
|
||||
description: `Skills from ${s.name}`,
|
||||
official: s.official || false,
|
||||
branch: 'main',
|
||||
};
|
||||
}
|
||||
);
|
||||
export const DEFAULT_SKILL_SOURCES: SkillSource[] = [
|
||||
{
|
||||
owner: 'composioHQ',
|
||||
repo: 'awesome-claude-code-skills',
|
||||
name: 'Composio Curated',
|
||||
description: 'Curated collection of Claude Code skills',
|
||||
official: false,
|
||||
branch: 'main',
|
||||
},
|
||||
{
|
||||
owner: 'anthropics',
|
||||
repo: 'courses',
|
||||
name: 'Anthropic Official',
|
||||
description: 'Official Anthropic courses and skills',
|
||||
official: true,
|
||||
branch: 'master',
|
||||
},
|
||||
];
|
||||
|
||||
/**
|
||||
* Cache file name
|
||||
|
||||
@@ -7,15 +7,40 @@ import { join } from 'node:path';
|
||||
import type { SkillItem, RepoInfo, FetchedSkill } from './types.js';
|
||||
|
||||
/**
|
||||
* Default repos loaded from marketplace/sources.json (single source of truth)
|
||||
* Import at runtime to allow updates without code changes
|
||||
* Default popular repos - can be extended via config.marketplaceSources
|
||||
*/
|
||||
import sourcesData from '../../../../marketplace/sources.json' with { type: 'json' };
|
||||
|
||||
export const DEFAULT_REPOS: RepoInfo[] = sourcesData.sources.map((s: { source: string; name: string }) => ({
|
||||
source: s.source,
|
||||
name: s.name,
|
||||
}));
|
||||
export const DEFAULT_REPOS: RepoInfo[] = [
|
||||
{ source: 'anthropics/skills', name: 'Anthropic Official' },
|
||||
{ source: 'vercel-labs/agent-skills', name: 'Vercel Labs' },
|
||||
{ source: 'expo/skills', name: 'Expo / React Native' },
|
||||
{ source: 'remotion-dev/skills', name: 'Remotion Video' },
|
||||
{ source: 'ComposioHQ/awesome-claude-skills', name: 'Composio Awesome' },
|
||||
{ source: 'travisvn/awesome-claude-skills', name: 'Travis Awesome' },
|
||||
{ source: 'mhattingpete/claude-skills-marketplace', name: 'Skills Marketplace' },
|
||||
{ source: 'coreyhaines31/marketingskills', name: 'Marketing Skills' },
|
||||
{ source: 'obra/superpowers', name: 'Superpowers TDD' },
|
||||
{ source: 'softaworks/agent-toolkit', name: 'Softaworks Toolkit' },
|
||||
{ source: 'wshobson/agents', name: 'Dev Patterns' },
|
||||
{ source: 'langgenius/dify', name: 'Dify Frontend' },
|
||||
{ source: 'trailofbits/skills', name: 'Trail of Bits Security' },
|
||||
{ source: 'better-auth/skills', name: 'Better Auth' },
|
||||
{ source: 'onmax/nuxt-skills', name: 'Nuxt / Vue' },
|
||||
{ source: 'hyf0/vue-skills', name: 'Vue Best Practices' },
|
||||
{ source: 'jezweb/claude-skills', name: 'Cloudflare / TanStack' },
|
||||
{ source: 'elysiajs/skills', name: 'ElysiaJS / Bun' },
|
||||
{ source: 'kadajett/agent-nestjs-skills', name: 'NestJS' },
|
||||
{ source: 'callstackincubator/agent-skills', name: 'React Native' },
|
||||
{ source: 'cloudai-x/threejs-skills', name: 'Three.js' },
|
||||
{ source: 'emalorenzo/three-agent-skills', name: 'Three.js Advanced' },
|
||||
{ source: 'dimillian/skills', name: 'SwiftUI iOS' },
|
||||
{ source: 'stripe/ai', name: 'Stripe Payments' },
|
||||
{ source: 'waynesutton/convexskills', name: 'Convex Backend' },
|
||||
{ source: 'kepano/obsidian-skills', name: 'Obsidian Notes' },
|
||||
{ source: 'jimliu/baoyu-skills', name: 'Baoyu Tools' },
|
||||
{ source: 'giuseppe-trisciuoglio/developer-kit', name: 'Shadcn / Radix' },
|
||||
{ source: 'openrouterteam/agent-skills', name: 'OpenRouter SDK' },
|
||||
{ source: 'intellectronica/agent-skills', name: 'Context7' },
|
||||
];
|
||||
|
||||
/**
|
||||
* Marketplace state
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
import { useState } from 'react';
|
||||
import { Box, Text, useInput, useApp, useStdout } from 'ink';
|
||||
import { Sidebar } from './components/Sidebar.js';
|
||||
import { Home } from './screens/Home.js';
|
||||
import { Browse } from './screens/Browse.js';
|
||||
import { Installed } from './screens/Installed.js';
|
||||
import { Sync } from './screens/Sync.js';
|
||||
import { Settings } from './screens/Settings.js';
|
||||
|
||||
export type Screen = 'home' | 'browse' | 'installed' | 'sync' | 'settings';
|
||||
|
||||
export function App() {
|
||||
const [screen, setScreen] = useState<Screen>('home');
|
||||
const { exit } = useApp();
|
||||
const { stdout } = useStdout();
|
||||
|
||||
const cols = stdout?.columns || 80;
|
||||
const rows = stdout?.rows || 24;
|
||||
const showSidebar = cols >= 70;
|
||||
|
||||
useInput((input, key) => {
|
||||
if (input === 'q') {
|
||||
exit();
|
||||
return;
|
||||
}
|
||||
if (key.escape) {
|
||||
setScreen('home');
|
||||
return;
|
||||
}
|
||||
if (input === 'h') setScreen('home');
|
||||
if (input === 'b') setScreen('browse');
|
||||
if (input === 'l') setScreen('installed');
|
||||
if (input === 's') setScreen('sync');
|
||||
if (input === ',') setScreen('settings');
|
||||
});
|
||||
|
||||
const renderScreen = () => {
|
||||
switch (screen) {
|
||||
case 'home': return <Home onNavigate={setScreen} cols={cols} rows={rows} />;
|
||||
case 'browse': return <Browse cols={cols} rows={rows} />;
|
||||
case 'installed': return <Installed cols={cols} rows={rows} />;
|
||||
case 'sync': return <Sync cols={cols} rows={rows} />;
|
||||
case 'settings': return <Settings cols={cols} rows={rows} />;
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Box flexDirection="column">
|
||||
<Box flexDirection="row" flexGrow={1}>
|
||||
{showSidebar && <Sidebar screen={screen} onNavigate={setScreen} />}
|
||||
<Box flexDirection="column" flexGrow={1} marginLeft={1}>
|
||||
{renderScreen()}
|
||||
</Box>
|
||||
</Box>
|
||||
<Text dimColor>h Home b Browse l List s Sync , Config Esc Back q Quit</Text>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
import { Box, Text } from 'ink';
|
||||
import { colors, symbols } from '../theme.js';
|
||||
|
||||
interface HeaderProps {
|
||||
title: string;
|
||||
subtitle?: string;
|
||||
count?: number;
|
||||
}
|
||||
|
||||
export function Header({ title, subtitle, count }: HeaderProps) {
|
||||
return (
|
||||
<Box flexDirection="column" marginBottom={1}>
|
||||
<Box justifyContent="space-between">
|
||||
<Text color={colors.primary} bold>
|
||||
{title.toUpperCase()}
|
||||
</Text>
|
||||
{count !== undefined && (
|
||||
<Text color={colors.secondaryDim}>
|
||||
{symbols.star} {count}
|
||||
</Text>
|
||||
)}
|
||||
</Box>
|
||||
{subtitle && (
|
||||
<Text color={colors.secondaryDim} dimColor>
|
||||
{subtitle}
|
||||
</Text>
|
||||
)}
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
import { Box, Text } from 'ink';
|
||||
import TextInput from 'ink-text-input';
|
||||
import { colors } from '../theme.js';
|
||||
|
||||
interface SearchInputProps {
|
||||
value: string;
|
||||
onChange: (value: string) => void;
|
||||
placeholder?: string;
|
||||
isFocused?: boolean;
|
||||
}
|
||||
|
||||
export function SearchInput({
|
||||
value,
|
||||
onChange,
|
||||
placeholder = 'Search skills...',
|
||||
isFocused = false,
|
||||
}: SearchInputProps) {
|
||||
return (
|
||||
<Box
|
||||
borderStyle="single"
|
||||
borderColor={isFocused ? colors.primary : colors.borderDim}
|
||||
paddingX={1}
|
||||
>
|
||||
<Text color={colors.secondaryDim}>🔍 </Text>
|
||||
{isFocused ? (
|
||||
<TextInput
|
||||
value={value}
|
||||
onChange={onChange}
|
||||
placeholder={placeholder}
|
||||
/>
|
||||
) : (
|
||||
<Text color={value ? colors.secondary : colors.secondaryDim}>
|
||||
{value || placeholder}
|
||||
</Text>
|
||||
)}
|
||||
<Box flexGrow={1} />
|
||||
<Text color={colors.secondaryDim}>/</Text>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
import { Box, Text } from 'ink';
|
||||
import { colors, symbols } from '../theme.js';
|
||||
import type { Screen } from '../App.js';
|
||||
|
||||
interface SidebarProps {
|
||||
screen: Screen;
|
||||
onNavigate: (screen: Screen) => void;
|
||||
isCompact?: boolean;
|
||||
}
|
||||
|
||||
const NAV: { id: Screen; label: string }[] = [
|
||||
{ id: 'home', label: 'Home' },
|
||||
{ id: 'browse', label: 'Browse' },
|
||||
{ id: 'installed', label: 'List' },
|
||||
{ id: 'sync', label: 'Sync' },
|
||||
{ id: 'settings', label: 'Config' },
|
||||
];
|
||||
|
||||
export function Sidebar({ screen }: SidebarProps) {
|
||||
return (
|
||||
<Box flexDirection="column" width={14} borderStyle="single" paddingX={1}>
|
||||
<Text bold color={colors.primary}>SkillKit</Text>
|
||||
|
||||
{NAV.slice(0, 2).map((item) => (
|
||||
<Text key={item.id} inverse={screen === item.id}>
|
||||
{screen === item.id ? symbols.bullet : ' '}{item.label}
|
||||
</Text>
|
||||
))}
|
||||
|
||||
<Text> </Text>
|
||||
|
||||
{NAV.slice(2).map((item) => (
|
||||
<Text key={item.id} inverse={screen === item.id}>
|
||||
{screen === item.id ? symbols.bullet : ' '}{item.label}
|
||||
</Text>
|
||||
))}
|
||||
|
||||
<Box flexGrow={1} />
|
||||
|
||||
<Text dimColor>? Help</Text>
|
||||
<Text dimColor>q Quit</Text>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
import { Box, Text } from 'ink';
|
||||
import { colors, symbols } from '../theme.js';
|
||||
|
||||
export interface SkillItem {
|
||||
name: string;
|
||||
description?: string;
|
||||
source?: string;
|
||||
installs?: number;
|
||||
enabled?: boolean;
|
||||
}
|
||||
|
||||
interface SkillListProps {
|
||||
skills: SkillItem[];
|
||||
selectedIndex: number;
|
||||
showInstalls?: boolean;
|
||||
showRank?: boolean;
|
||||
showSource?: boolean;
|
||||
maxVisible?: number;
|
||||
}
|
||||
|
||||
function formatInstalls(count: number): string {
|
||||
if (count >= 1000) {
|
||||
return `${(count / 1000).toFixed(1)}K`;
|
||||
}
|
||||
return String(count);
|
||||
}
|
||||
|
||||
export function SkillList({
|
||||
skills,
|
||||
selectedIndex,
|
||||
showInstalls = false,
|
||||
showRank = false,
|
||||
showSource = true,
|
||||
maxVisible = 10,
|
||||
}: SkillListProps) {
|
||||
if (skills.length === 0) {
|
||||
return (
|
||||
<Box>
|
||||
<Text color={colors.secondaryDim} dimColor>
|
||||
No skills found
|
||||
</Text>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
||||
const startIndex = Math.max(0, selectedIndex - Math.floor(maxVisible / 2));
|
||||
const visibleSkills = skills.slice(startIndex, startIndex + maxVisible);
|
||||
const actualStartIndex = startIndex;
|
||||
|
||||
return (
|
||||
<Box flexDirection="column">
|
||||
{showRank && (
|
||||
<Box marginBottom={1}>
|
||||
<Text color={colors.secondaryDim}>
|
||||
{' # SKILL'}
|
||||
{showSource && ' SOURCE'}
|
||||
{showInstalls && ' INSTALLS'}
|
||||
</Text>
|
||||
</Box>
|
||||
)}
|
||||
|
||||
{visibleSkills.map((skill, idx) => {
|
||||
const realIndex = actualStartIndex + idx;
|
||||
const isSelected = realIndex === selectedIndex;
|
||||
const skillName = skill.name.padEnd(28).slice(0, 28);
|
||||
const sourceName = skill.source ? skill.source.slice(0, 25) : '';
|
||||
|
||||
return (
|
||||
<Box key={`${skill.source}-${skill.name}`}>
|
||||
<Text
|
||||
color={isSelected ? colors.primary : colors.secondary}
|
||||
bold={isSelected}
|
||||
inverse={isSelected}
|
||||
>
|
||||
{isSelected ? symbols.pointer : ' '}
|
||||
{showRank ? String(realIndex + 1).padStart(2, ' ') : ''}
|
||||
{' '}
|
||||
{skillName}
|
||||
</Text>
|
||||
{showSource && (
|
||||
<Text color={colors.secondaryDim} dimColor={!isSelected}>
|
||||
{' '}{sourceName}
|
||||
</Text>
|
||||
)}
|
||||
{showInstalls && skill.installs !== undefined && (
|
||||
<Text color={colors.secondaryDim}>
|
||||
{formatInstalls(skill.installs).padStart(8)}
|
||||
</Text>
|
||||
)}
|
||||
</Box>
|
||||
);
|
||||
})}
|
||||
|
||||
{skills.length > maxVisible && (
|
||||
<Box marginTop={1}>
|
||||
<Text color={colors.secondaryDim} dimColor>
|
||||
Showing {startIndex + 1}-{Math.min(startIndex + maxVisible, skills.length)} of {skills.length}
|
||||
</Text>
|
||||
</Box>
|
||||
)}
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
import { Box, Text } from 'ink';
|
||||
import { colors, symbols } from '../theme.js';
|
||||
|
||||
interface Shortcut {
|
||||
key: string;
|
||||
label: string;
|
||||
}
|
||||
|
||||
interface StatusBarProps {
|
||||
shortcuts: Shortcut[];
|
||||
message?: string;
|
||||
}
|
||||
|
||||
export function StatusBar({ shortcuts, message }: StatusBarProps) {
|
||||
return (
|
||||
<Box
|
||||
borderStyle="single"
|
||||
borderColor={colors.borderDim}
|
||||
borderTop
|
||||
borderBottom={false}
|
||||
borderLeft={false}
|
||||
borderRight={false}
|
||||
paddingX={1}
|
||||
justifyContent="space-between"
|
||||
>
|
||||
<Box gap={2}>
|
||||
{shortcuts.map((shortcut, idx) => (
|
||||
<Box key={idx} gap={1}>
|
||||
<Text color={colors.primary} bold>
|
||||
{shortcut.key}
|
||||
</Text>
|
||||
<Text color={colors.secondaryDim}>{shortcut.label}</Text>
|
||||
</Box>
|
||||
))}
|
||||
</Box>
|
||||
|
||||
{message && (
|
||||
<Text color={colors.success}>
|
||||
{symbols.check} {message}
|
||||
</Text>
|
||||
)}
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
export { Sidebar } from './Sidebar.js';
|
||||
export { Header } from './Header.js';
|
||||
export { SkillList, type SkillItem } from './SkillList.js';
|
||||
export { StatusBar } from './StatusBar.js';
|
||||
export { SearchInput } from './SearchInput.js';
|
||||
@@ -0,0 +1,3 @@
|
||||
export { useSkills } from './useSkills.js';
|
||||
export { useMarketplace } from './useMarketplace.js';
|
||||
export { useKeyboard, useListNavigation } from './useKeyboard.js';
|
||||
@@ -0,0 +1,93 @@
|
||||
import { useState, useCallback, useEffect } from 'react';
|
||||
import { useInput, useApp } from 'ink';
|
||||
import type { Screen } from '../App.js';
|
||||
|
||||
interface UseKeyboardOptions {
|
||||
onNavigate?: (screen: Screen) => void;
|
||||
onSelect?: () => void;
|
||||
onSearch?: () => void;
|
||||
onInstall?: () => void;
|
||||
onBack?: () => void;
|
||||
onUp?: () => void;
|
||||
onDown?: () => void;
|
||||
disabled?: boolean;
|
||||
}
|
||||
|
||||
export function useKeyboard(options: UseKeyboardOptions = {}) {
|
||||
const { exit } = useApp();
|
||||
|
||||
useInput((input, key) => {
|
||||
if (options.disabled) return;
|
||||
|
||||
if (input === 'q' || (key.ctrl && input === 'c')) {
|
||||
exit();
|
||||
return;
|
||||
}
|
||||
|
||||
if (key.escape && options.onBack) {
|
||||
options.onBack();
|
||||
return;
|
||||
}
|
||||
|
||||
if (key.return && options.onSelect) {
|
||||
options.onSelect();
|
||||
return;
|
||||
}
|
||||
|
||||
if (key.upArrow && options.onUp) {
|
||||
options.onUp();
|
||||
return;
|
||||
}
|
||||
|
||||
if (key.downArrow && options.onDown) {
|
||||
options.onDown();
|
||||
return;
|
||||
}
|
||||
|
||||
if (input === '/' && options.onSearch) {
|
||||
options.onSearch();
|
||||
return;
|
||||
}
|
||||
|
||||
if (input === 'i' && options.onInstall) {
|
||||
options.onInstall();
|
||||
return;
|
||||
}
|
||||
|
||||
if (input === 'h' && options.onNavigate) {
|
||||
options.onNavigate('home');
|
||||
} else if (input === 'b' && options.onNavigate) {
|
||||
options.onNavigate('browse');
|
||||
} else if (input === 'l' && options.onNavigate) {
|
||||
options.onNavigate('installed');
|
||||
} else if (input === 's' && options.onNavigate) {
|
||||
options.onNavigate('sync');
|
||||
} else if (input === ',' && options.onNavigate) {
|
||||
options.onNavigate('settings');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function useListNavigation(listLength: number, initialIndex = 0) {
|
||||
const [selectedIndex, setSelectedIndex] = useState(initialIndex);
|
||||
|
||||
useEffect(() => {
|
||||
if (selectedIndex >= listLength && listLength > 0) {
|
||||
setSelectedIndex(listLength - 1);
|
||||
}
|
||||
}, [listLength, selectedIndex]);
|
||||
|
||||
const moveUp = useCallback(() => {
|
||||
setSelectedIndex((prev) => Math.max(0, prev - 1));
|
||||
}, []);
|
||||
|
||||
const moveDown = useCallback(() => {
|
||||
setSelectedIndex((prev) => Math.min(listLength - 1, prev + 1));
|
||||
}, [listLength]);
|
||||
|
||||
const reset = useCallback(() => {
|
||||
setSelectedIndex(0);
|
||||
}, []);
|
||||
|
||||
return { selectedIndex, setSelectedIndex, moveUp, moveDown, reset };
|
||||
}
|
||||
@@ -0,0 +1,181 @@
|
||||
import { useState, useCallback, useEffect } from 'react';
|
||||
import { detectProvider } from '../../providers/index.js';
|
||||
import type { SkillItem } from '../components/SkillList.js';
|
||||
|
||||
export interface RepoInfo {
|
||||
source: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
const POPULAR_REPOS: RepoInfo[] = [
|
||||
{ source: 'anthropics/skills', name: 'Anthropic Official' },
|
||||
{ source: 'vercel-labs/agent-skills', name: 'Vercel Labs' },
|
||||
{ source: 'expo/skills', name: 'Expo / React Native' },
|
||||
{ source: 'remotion-dev/skills', name: 'Remotion Video' },
|
||||
{ source: 'ComposioHQ/awesome-claude-skills', name: 'Composio Awesome' },
|
||||
{ source: 'travisvn/awesome-claude-skills', name: 'Travis Awesome' },
|
||||
{ source: 'mhattingpete/claude-skills-marketplace', name: 'Skills Marketplace' },
|
||||
{ source: 'coreyhaines31/marketingskills', name: 'Marketing Skills' },
|
||||
{ source: 'obra/superpowers', name: 'Superpowers TDD' },
|
||||
{ source: 'softaworks/agent-toolkit', name: 'Softaworks Toolkit' },
|
||||
{ source: 'wshobson/agents', name: 'Dev Patterns' },
|
||||
{ source: 'langgenius/dify', name: 'Dify Frontend' },
|
||||
{ source: 'trailofbits/skills', name: 'Trail of Bits Security' },
|
||||
{ source: 'better-auth/skills', name: 'Better Auth' },
|
||||
{ source: 'onmax/nuxt-skills', name: 'Nuxt / Vue' },
|
||||
{ source: 'hyf0/vue-skills', name: 'Vue Best Practices' },
|
||||
{ source: 'jezweb/claude-skills', name: 'Cloudflare / TanStack' },
|
||||
{ source: 'elysiajs/skills', name: 'ElysiaJS / Bun' },
|
||||
{ source: 'kadajett/agent-nestjs-skills', name: 'NestJS' },
|
||||
{ source: 'callstackincubator/agent-skills', name: 'React Native' },
|
||||
{ source: 'cloudai-x/threejs-skills', name: 'Three.js' },
|
||||
{ source: 'emalorenzo/three-agent-skills', name: 'Three.js Advanced' },
|
||||
{ source: 'dimillian/skills', name: 'SwiftUI iOS' },
|
||||
{ source: 'stripe/ai', name: 'Stripe Payments' },
|
||||
{ source: 'waynesutton/convexskills', name: 'Convex Backend' },
|
||||
{ source: 'kepano/obsidian-skills', name: 'Obsidian Notes' },
|
||||
{ source: 'jimliu/baoyu-skills', name: 'Baoyu Tools' },
|
||||
{ source: 'giuseppe-trisciuoglio/developer-kit', name: 'Shadcn / Radix' },
|
||||
{ source: 'openrouterteam/agent-skills', name: 'OpenRouter SDK' },
|
||||
{ source: 'intellectronica/agent-skills', name: 'Context7' },
|
||||
{ source: 'alirezarezvani/claude-skills', name: 'Alireza Rezvani' },
|
||||
];
|
||||
|
||||
interface FetchedSkill {
|
||||
name: string;
|
||||
source: string;
|
||||
repoName: string;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
interface UseMarketplaceResult {
|
||||
skills: SkillItem[];
|
||||
loading: boolean;
|
||||
error: string | null;
|
||||
totalCount: number;
|
||||
repos: RepoInfo[];
|
||||
currentRepo: string | null;
|
||||
refresh: () => void;
|
||||
search: (query: string) => void;
|
||||
fetchRepo: (source: string) => Promise<void>;
|
||||
fetchAllRepos: () => Promise<void>;
|
||||
}
|
||||
|
||||
export function useMarketplace(): UseMarketplaceResult {
|
||||
const [allSkills, setAllSkills] = useState<FetchedSkill[]>([]);
|
||||
const [filteredSkills, setFilteredSkills] = useState<FetchedSkill[]>([]);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
const [currentRepo, setCurrentRepo] = useState<string | null>(null);
|
||||
const [fetchedRepos, setFetchedRepos] = useState<Set<string>>(new Set());
|
||||
|
||||
const fetchRepo = useCallback(async (source: string) => {
|
||||
if (fetchedRepos.has(source)) return;
|
||||
|
||||
setLoading(true);
|
||||
setError(null);
|
||||
setCurrentRepo(source);
|
||||
|
||||
try {
|
||||
const provider = detectProvider(source);
|
||||
if (!provider) {
|
||||
throw new Error(`Could not detect provider for: ${source}`);
|
||||
}
|
||||
|
||||
const result = await provider.clone(source, '', { depth: 1 });
|
||||
|
||||
if (!result.success || !result.discoveredSkills) {
|
||||
throw new Error(result.error || 'Failed to fetch skills');
|
||||
}
|
||||
|
||||
const repoName = POPULAR_REPOS.find(r => r.source === source)?.name || source;
|
||||
const newSkills: FetchedSkill[] = result.discoveredSkills.map(skill => ({
|
||||
name: skill.name,
|
||||
source: source,
|
||||
repoName: repoName,
|
||||
description: undefined,
|
||||
}));
|
||||
|
||||
setAllSkills(prev => {
|
||||
const updated = [...prev, ...newSkills];
|
||||
return updated.sort((a, b) => a.name.localeCompare(b.name));
|
||||
});
|
||||
|
||||
setFetchedRepos(prev => new Set([...prev, source]));
|
||||
|
||||
if (result.tempRoot) {
|
||||
const { rmSync } = await import('node:fs');
|
||||
rmSync(result.tempRoot, { recursive: true, force: true });
|
||||
}
|
||||
} catch (err) {
|
||||
setError(err instanceof Error ? err.message : 'Failed to fetch repository');
|
||||
} finally {
|
||||
setLoading(false);
|
||||
setCurrentRepo(null);
|
||||
}
|
||||
}, [fetchedRepos]);
|
||||
|
||||
const fetchAllRepos = useCallback(async () => {
|
||||
setLoading(true);
|
||||
setError(null);
|
||||
|
||||
for (const repo of POPULAR_REPOS) {
|
||||
if (!fetchedRepos.has(repo.source)) {
|
||||
setCurrentRepo(repo.source);
|
||||
try {
|
||||
await fetchRepo(repo.source);
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
setLoading(false);
|
||||
setCurrentRepo(null);
|
||||
}, [fetchRepo, fetchedRepos]);
|
||||
|
||||
const search = useCallback((query: string) => {
|
||||
if (!query.trim()) {
|
||||
setFilteredSkills(allSkills);
|
||||
} else {
|
||||
const lowerQuery = query.toLowerCase();
|
||||
setFilteredSkills(
|
||||
allSkills.filter(
|
||||
(s) =>
|
||||
s.name.toLowerCase().includes(lowerQuery) ||
|
||||
s.source.toLowerCase().includes(lowerQuery) ||
|
||||
s.repoName.toLowerCase().includes(lowerQuery) ||
|
||||
s.description?.toLowerCase().includes(lowerQuery)
|
||||
)
|
||||
);
|
||||
}
|
||||
}, [allSkills]);
|
||||
|
||||
const refresh = useCallback(() => {
|
||||
setFetchedRepos(new Set());
|
||||
setAllSkills([]);
|
||||
setFilteredSkills([]);
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
setFilteredSkills(allSkills);
|
||||
}, [allSkills]);
|
||||
|
||||
const skills: SkillItem[] = filteredSkills.map((s) => ({
|
||||
name: s.name,
|
||||
description: s.description || s.repoName,
|
||||
source: s.source,
|
||||
}));
|
||||
|
||||
return {
|
||||
skills,
|
||||
loading,
|
||||
error,
|
||||
totalCount: allSkills.length,
|
||||
repos: POPULAR_REPOS,
|
||||
currentRepo,
|
||||
refresh,
|
||||
search,
|
||||
fetchRepo,
|
||||
fetchAllRepos,
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
import { useState, useEffect } from 'react';
|
||||
import { getSearchDirs } from '../../core/config.js';
|
||||
import { findAllSkills } from '../../core/skills.js';
|
||||
import type { SkillItem } from '../components/SkillList.js';
|
||||
|
||||
interface UseSkillsResult {
|
||||
skills: SkillItem[];
|
||||
loading: boolean;
|
||||
error: string | null;
|
||||
refresh: () => void;
|
||||
remove: (name: string) => Promise<void>;
|
||||
}
|
||||
|
||||
export function useSkills(): UseSkillsResult {
|
||||
const [skills, setSkills] = useState<SkillItem[]>([]);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
|
||||
const refresh = () => {
|
||||
setLoading(true);
|
||||
setError(null);
|
||||
|
||||
try {
|
||||
const searchDirs = getSearchDirs();
|
||||
const foundSkills = findAllSkills(searchDirs);
|
||||
|
||||
const skillItems: SkillItem[] = foundSkills.map((s) => ({
|
||||
name: s.name,
|
||||
description: s.description,
|
||||
source: s.metadata?.source,
|
||||
enabled: s.enabled,
|
||||
}));
|
||||
|
||||
setSkills(skillItems);
|
||||
} catch (err) {
|
||||
setError(err instanceof Error ? err.message : 'Failed to load skills');
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
const remove = async (name: string) => {
|
||||
const { rmSync } = await import('node:fs');
|
||||
const foundSkill = skills.find(s => s.name === name);
|
||||
if (foundSkill) {
|
||||
const searchDirs = getSearchDirs();
|
||||
const allSkills = findAllSkills(searchDirs);
|
||||
const skill = allSkills.find(s => s.name === name);
|
||||
if (skill) {
|
||||
rmSync(skill.path, { recursive: true, force: true });
|
||||
refresh();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
refresh();
|
||||
}, []);
|
||||
|
||||
return { skills, loading, error, refresh, remove };
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import { render } from 'ink';
|
||||
import { App } from './App.js';
|
||||
|
||||
export function startTUI() {
|
||||
const { waitUntilExit } = render(<App />);
|
||||
return waitUntilExit();
|
||||
}
|
||||
@@ -0,0 +1,223 @@
|
||||
import { useState } from 'react';
|
||||
import { existsSync, mkdirSync, cpSync, rmSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
import { Box, Text, useInput } from 'ink';
|
||||
import { colors, symbols } from '../theme.js';
|
||||
import { useMarketplace } from '../hooks/useMarketplace.js';
|
||||
import { detectProvider } from '../../providers/index.js';
|
||||
import { detectAgent, getAdapter, getAllAdapters } from '../../agents/index.js';
|
||||
import { getInstallDir, saveSkillMetadata } from '../../core/config.js';
|
||||
import type { SkillMetadata, AgentType } from '../../core/types.js';
|
||||
|
||||
type View = 'repos' | 'skills' | 'agents';
|
||||
|
||||
interface Props {
|
||||
cols?: number;
|
||||
rows?: number;
|
||||
}
|
||||
|
||||
export function Browse({ rows = 24 }: Props) {
|
||||
const { repos, skills, loading, currentRepo, fetchRepo, fetchAllRepos } = useMarketplace();
|
||||
const [view, setView] = useState<View>('repos');
|
||||
const [sel, setSel] = useState(0);
|
||||
const [installing, setInstalling] = useState<string | null>(null);
|
||||
const [message, setMessage] = useState<string | null>(null);
|
||||
const [selectedSkill, setSelectedSkill] = useState<{ name: string; source: string } | null>(null);
|
||||
const [agents, setAgents] = useState<{ type: AgentType; name: string; detected: boolean }[]>([]);
|
||||
|
||||
const items = view === 'repos' ? repos : view === 'skills' ? skills : agents;
|
||||
const maxVisible = Math.max(5, rows - 8);
|
||||
const start = Math.max(0, Math.min(sel - Math.floor(maxVisible / 2), items.length - maxVisible));
|
||||
const visible = items.slice(start, start + maxVisible);
|
||||
|
||||
const showAgentSelection = async (skillName: string, source: string) => {
|
||||
setSelectedSkill({ name: skillName, source });
|
||||
const adapters = getAllAdapters();
|
||||
const agentList: typeof agents = [];
|
||||
for (const a of adapters) {
|
||||
agentList.push({
|
||||
type: a.type as AgentType,
|
||||
name: a.name,
|
||||
detected: await a.isDetected(),
|
||||
});
|
||||
}
|
||||
setAgents(agentList);
|
||||
setView('agents');
|
||||
setSel(0);
|
||||
};
|
||||
|
||||
const installSkill = async (skillName: string, source: string, agentType?: AgentType) => {
|
||||
setInstalling(skillName);
|
||||
setMessage(null);
|
||||
|
||||
try {
|
||||
const provider = detectProvider(source);
|
||||
if (!provider) {
|
||||
setMessage(`Error: Unknown provider for ${source}`);
|
||||
setInstalling(null);
|
||||
return;
|
||||
}
|
||||
|
||||
const result = await provider.clone(source, '', { depth: 1 });
|
||||
|
||||
if (!result.success || !result.discoveredSkills) {
|
||||
setMessage(`Error: ${result.error || 'Failed to fetch'}`);
|
||||
setInstalling(null);
|
||||
return;
|
||||
}
|
||||
|
||||
const skill = result.discoveredSkills.find(s => s.name === skillName);
|
||||
if (!skill) {
|
||||
setMessage(`Error: Skill ${skillName} not found`);
|
||||
setInstalling(null);
|
||||
return;
|
||||
}
|
||||
|
||||
const targetAgentType = agentType || await detectAgent();
|
||||
const adapter = getAdapter(targetAgentType);
|
||||
const installDir = getInstallDir(false, targetAgentType);
|
||||
|
||||
if (!existsSync(installDir)) {
|
||||
mkdirSync(installDir, { recursive: true });
|
||||
}
|
||||
|
||||
const targetPath = join(installDir, skillName);
|
||||
|
||||
if (existsSync(targetPath)) {
|
||||
rmSync(targetPath, { recursive: true, force: true });
|
||||
}
|
||||
|
||||
cpSync(skill.path, targetPath, { recursive: true, dereference: true });
|
||||
|
||||
const metadata: SkillMetadata = {
|
||||
name: skillName,
|
||||
description: '',
|
||||
source: source,
|
||||
sourceType: provider.type,
|
||||
subpath: skillName,
|
||||
installedAt: new Date().toISOString(),
|
||||
enabled: true,
|
||||
};
|
||||
saveSkillMetadata(targetPath, metadata);
|
||||
|
||||
if (result.tempRoot) {
|
||||
rmSync(result.tempRoot, { recursive: true, force: true });
|
||||
}
|
||||
|
||||
setMessage(`✓ Installed ${skillName} to ${adapter.name}`);
|
||||
if (!agentType) {
|
||||
setView('skills');
|
||||
}
|
||||
} catch (err) {
|
||||
setMessage(`Error: ${err instanceof Error ? err.message : 'Unknown error'}`);
|
||||
} finally {
|
||||
setInstalling(null);
|
||||
if (agentType) {
|
||||
setSelectedSkill(null);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
useInput((input, key) => {
|
||||
if (loading || installing) return;
|
||||
|
||||
if (key.upArrow) setSel(i => Math.max(0, i - 1));
|
||||
else if (key.downArrow) setSel(i => Math.min(items.length - 1, i + 1));
|
||||
else if (key.return) {
|
||||
if (view === 'repos' && repos[sel]) {
|
||||
fetchRepo(repos[sel].source);
|
||||
setView('skills');
|
||||
setSel(0);
|
||||
setMessage(null);
|
||||
} else if (view === 'skills' && skills[sel]?.source) {
|
||||
installSkill(skills[sel].name, skills[sel].source);
|
||||
} else if (view === 'agents' && agents[sel]) {
|
||||
installSkill(selectedSkill!.name, selectedSkill!.source, agents[sel].type);
|
||||
}
|
||||
}
|
||||
else if (input === 'm' && view === 'skills' && skills[sel]?.source) {
|
||||
showAgentSelection(skills[sel].name, skills[sel].source!);
|
||||
}
|
||||
else if (input === 'r') {
|
||||
if (view === 'skills') {
|
||||
setView('repos');
|
||||
setSel(0);
|
||||
setMessage(null);
|
||||
} else if (view === 'agents') {
|
||||
setView('skills');
|
||||
setSel(0);
|
||||
}
|
||||
}
|
||||
else if (input === 'a' && view === 'repos') {
|
||||
fetchAllRepos();
|
||||
setView('skills');
|
||||
setSel(0);
|
||||
}
|
||||
});
|
||||
|
||||
if (view === 'agents') {
|
||||
return (
|
||||
<Box flexDirection="column">
|
||||
<Text bold color={colors.primary}>SELECT AGENT</Text>
|
||||
<Text dimColor>Install "{selectedSkill?.name}" to which agent?</Text>
|
||||
<Text dimColor>(All agents supported - directory created if needed)</Text>
|
||||
|
||||
<Box marginTop={1} flexDirection="column">
|
||||
{visible.map((agent, i) => {
|
||||
const idx = start + i;
|
||||
const isSel = idx === sel;
|
||||
const a = agent as typeof agents[0];
|
||||
const status = a.detected ? '(ready)' : '(will create)';
|
||||
return (
|
||||
<Text key={a.type} inverse={isSel}>
|
||||
{isSel ? symbols.pointer : ' '} {a.name.padEnd(20)} <Text color={colors.secondaryDim}>{status}</Text>
|
||||
</Text>
|
||||
);
|
||||
})}
|
||||
</Box>
|
||||
|
||||
<Box marginTop={1}>
|
||||
<Text dimColor>Enter=install to selected agent r=back q=quit</Text>
|
||||
</Box>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<Box flexDirection="column">
|
||||
<Text bold color={colors.primary}>{view === 'repos' ? 'REPOSITORIES' : 'SKILLS'}</Text>
|
||||
{loading && <Text dimColor>Loading {currentRepo}...</Text>}
|
||||
{installing && <Text>Installing {installing}...</Text>}
|
||||
{message && <Text dimColor>{message}</Text>}
|
||||
<Text dimColor>{items.length} items</Text>
|
||||
|
||||
<Box marginTop={1} flexDirection="column">
|
||||
{start > 0 && <Text dimColor> ↑ {start} more</Text>}
|
||||
{visible.map((item, i) => {
|
||||
const idx = start + i;
|
||||
const isSel = idx === sel;
|
||||
const name = view === 'repos'
|
||||
? (item as typeof repos[0]).name
|
||||
: (item as typeof skills[0]).name;
|
||||
const src = view === 'repos'
|
||||
? (item as typeof repos[0]).source
|
||||
: (item as typeof skills[0]).source || '';
|
||||
return (
|
||||
<Text key={src + name} inverse={isSel}>
|
||||
{isSel ? symbols.pointer : ' '}{name.padEnd(25)} <Text color={colors.secondaryDim}>{src}</Text>
|
||||
</Text>
|
||||
);
|
||||
})}
|
||||
{start + maxVisible < items.length && <Text dimColor> ↓ {items.length - start - maxVisible} more</Text>}
|
||||
</Box>
|
||||
|
||||
<Box marginTop={1}>
|
||||
<Text dimColor>
|
||||
{view === 'repos'
|
||||
? 'Enter=fetch a=all q=quit'
|
||||
: 'Enter=quick install m=choose agent r=back q=quit'}
|
||||
</Text>
|
||||
</Box>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
import { useState, useEffect } from 'react';
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { dirname, join } from 'node:path';
|
||||
import { Box, Text } from 'ink';
|
||||
import { colors, logo } from '../theme.js';
|
||||
import type { Screen } from '../App.js';
|
||||
|
||||
interface HomeProps {
|
||||
onNavigate: (screen: Screen) => void;
|
||||
cols?: number;
|
||||
rows?: number;
|
||||
}
|
||||
|
||||
const CHARS = '01█▓▒░╔╗╚╝║═';
|
||||
|
||||
const logoSmall = `
|
||||
╔═╗╦╔═╦╦ ╦ ╦╔═╦╔╦╗
|
||||
╚═╗╠╩╗║║ ║ ╠╩╗║ ║
|
||||
╚═╝╩ ╩╩╩═╝╩═╝╩ ╩╩ ╩
|
||||
`.trim();
|
||||
|
||||
function getVersion(): string {
|
||||
try {
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
const packageJsonPath = join(__dirname, '../../../package.json');
|
||||
const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));
|
||||
return packageJson.version || '1.2.0';
|
||||
} catch {
|
||||
return '1.2.0';
|
||||
}
|
||||
}
|
||||
|
||||
function scramble(target: string, progress: number): string {
|
||||
return target.split('\n').map(line => {
|
||||
return line.split('').map((char, i) => {
|
||||
if (char === ' ') return char;
|
||||
if (progress > (i / line.length) * 100) return char;
|
||||
return CHARS[Math.floor(Math.random() * CHARS.length)];
|
||||
}).join('');
|
||||
}).join('\n');
|
||||
}
|
||||
|
||||
export function Home({ cols = 80, rows = 24 }: HomeProps) {
|
||||
const [progress, setProgress] = useState(0);
|
||||
const [display, setDisplay] = useState('');
|
||||
const version = getVersion();
|
||||
|
||||
const useLogo = cols < 80 ? logoSmall : logo;
|
||||
|
||||
useEffect(() => {
|
||||
if (progress >= 100) {
|
||||
setDisplay(useLogo);
|
||||
return;
|
||||
}
|
||||
const t = setInterval(() => {
|
||||
setProgress(p => {
|
||||
const next = p + 12;
|
||||
setDisplay(scramble(useLogo, next));
|
||||
return next;
|
||||
});
|
||||
}, 35);
|
||||
return () => clearInterval(t);
|
||||
}, [progress, useLogo]);
|
||||
|
||||
return (
|
||||
<Box flexDirection="column">
|
||||
<Text color={colors.primary}>{display || useLogo}</Text>
|
||||
|
||||
<Box marginTop={1}>
|
||||
<Text>Manage AI agent skills from your terminal.</Text>
|
||||
</Box>
|
||||
|
||||
<Box marginTop={1} flexDirection="column">
|
||||
<Text bold>Quick Actions:</Text>
|
||||
<Text dimColor> [b] Browse skills marketplace</Text>
|
||||
<Text dimColor> [l] View installed skills</Text>
|
||||
<Text dimColor> [s] Sync skills across agents</Text>
|
||||
<Text dimColor> [,] Settings</Text>
|
||||
</Box>
|
||||
|
||||
{rows >= 18 && (
|
||||
<Box marginTop={1} flexDirection="column">
|
||||
<Text bold>Navigation:</Text>
|
||||
<Text dimColor> ↑↓ Navigate lists</Text>
|
||||
<Text dimColor> Enter Select / Confirm</Text>
|
||||
<Text dimColor> Esc Go back / Home</Text>
|
||||
<Text dimColor> q Quit</Text>
|
||||
</Box>
|
||||
)}
|
||||
|
||||
<Box marginTop={1}>
|
||||
<Text dimColor>v{version} - Works with 17 AI agents</Text>
|
||||
</Box>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
import { useState } from 'react';
|
||||
import { Box, Text, useInput } from 'ink';
|
||||
import { colors, symbols } from '../theme.js';
|
||||
import { useSkills } from '../hooks/useSkills.js';
|
||||
|
||||
interface Props {
|
||||
cols?: number;
|
||||
rows?: number;
|
||||
}
|
||||
|
||||
export function Installed({ rows = 24 }: Props) {
|
||||
const { skills, loading, refresh, remove } = useSkills();
|
||||
const [sel, setSel] = useState(0);
|
||||
|
||||
const maxVisible = Math.max(5, rows - 6);
|
||||
const start = Math.max(0, Math.min(sel - Math.floor(maxVisible / 2), skills.length - maxVisible));
|
||||
const visible = skills.slice(start, start + maxVisible);
|
||||
|
||||
useInput((input, key) => {
|
||||
if (loading) return;
|
||||
if (key.upArrow) setSel(i => Math.max(0, i - 1));
|
||||
else if (key.downArrow) setSel(i => Math.min(skills.length - 1, i + 1));
|
||||
else if (input === 'r') refresh();
|
||||
else if (input === 'd' && skills[sel]) remove(skills[sel].name);
|
||||
});
|
||||
|
||||
return (
|
||||
<Box flexDirection="column">
|
||||
<Text bold color={colors.primary}>INSTALLED SKILLS</Text>
|
||||
<Text dimColor>{skills.length} skills</Text>
|
||||
|
||||
{loading && <Text>Loading...</Text>}
|
||||
|
||||
{!loading && skills.length === 0 && (
|
||||
<Text dimColor>No skills installed. Press b to browse.</Text>
|
||||
)}
|
||||
|
||||
{!loading && skills.length > 0 && (
|
||||
<Box marginTop={1} flexDirection="column">
|
||||
{start > 0 && <Text dimColor> ↑ {start} more</Text>}
|
||||
{visible.map((skill, i) => {
|
||||
const idx = start + i;
|
||||
const isSel = idx === sel;
|
||||
return (
|
||||
<Text key={skill.name} inverse={isSel}>
|
||||
{isSel ? symbols.pointer : ' '}{skill.name.padEnd(30)} {skill.source && <Text color={colors.secondaryDim}>{skill.source}</Text>}
|
||||
</Text>
|
||||
);
|
||||
})}
|
||||
{start + maxVisible < skills.length && <Text dimColor> ↓ {skills.length - start - maxVisible} more</Text>}
|
||||
</Box>
|
||||
)}
|
||||
|
||||
<Box marginTop={1}>
|
||||
<Text dimColor>r=refresh d=delete q=quit</Text>
|
||||
</Box>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
import { useState } from 'react';
|
||||
import { Box, Text, useInput } from 'ink';
|
||||
import { colors, symbols } from '../theme.js';
|
||||
|
||||
interface Props {
|
||||
cols?: number;
|
||||
rows?: number;
|
||||
}
|
||||
|
||||
const SETTINGS = [
|
||||
{ id: 'agent', label: 'Default Agent', value: 'auto-detect' },
|
||||
{ id: 'sync', label: 'Auto Sync', value: 'disabled' },
|
||||
{ id: 'cache', label: 'Cache Dir', value: '~/.skillkit/cache' },
|
||||
];
|
||||
|
||||
export function Settings({}: Props) {
|
||||
const [sel, setSel] = useState(0);
|
||||
|
||||
useInput((_, key) => {
|
||||
if (key.upArrow) setSel(i => Math.max(0, i - 1));
|
||||
else if (key.downArrow) setSel(i => Math.min(SETTINGS.length - 1, i + 1));
|
||||
});
|
||||
|
||||
return (
|
||||
<Box flexDirection="column">
|
||||
<Text bold color={colors.primary}>SETTINGS</Text>
|
||||
<Text dimColor>Configure SkillKit</Text>
|
||||
|
||||
<Box marginTop={1} flexDirection="column">
|
||||
{SETTINGS.map((s, i) => {
|
||||
const isSel = i === sel;
|
||||
return (
|
||||
<Text key={s.id} inverse={isSel}>
|
||||
{isSel ? symbols.pointer : ' '}{s.label.padEnd(16)} <Text color={colors.secondaryDim}>{s.value}</Text>
|
||||
</Text>
|
||||
);
|
||||
})}
|
||||
</Box>
|
||||
|
||||
<Box marginTop={1}>
|
||||
<Text dimColor>Enter=edit q=quit</Text>
|
||||
</Box>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
import { useState, useEffect } from 'react';
|
||||
import { Box, Text, useInput } from 'ink';
|
||||
import { colors, symbols } from '../theme.js';
|
||||
import { getAllAdapters } from '../../agents/index.js';
|
||||
|
||||
interface AgentStatus {
|
||||
name: string;
|
||||
type: string;
|
||||
detected: boolean;
|
||||
}
|
||||
|
||||
interface Props {
|
||||
cols?: number;
|
||||
rows?: number;
|
||||
}
|
||||
|
||||
export function Sync({ rows = 24 }: Props) {
|
||||
const [agents, setAgents] = useState<AgentStatus[]>([]);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [sel, setSel] = useState(0);
|
||||
const [syncing, setSyncing] = useState(false);
|
||||
|
||||
const maxVisible = Math.max(5, rows - 6);
|
||||
const start = Math.max(0, Math.min(sel - Math.floor(maxVisible / 2), agents.length - maxVisible));
|
||||
const visible = agents.slice(start, start + maxVisible);
|
||||
|
||||
useEffect(() => {
|
||||
(async () => {
|
||||
const adapters = getAllAdapters();
|
||||
const s: AgentStatus[] = [];
|
||||
for (const a of adapters) {
|
||||
s.push({ name: a.name, type: a.type, detected: await a.isDetected() });
|
||||
}
|
||||
setAgents(s);
|
||||
setLoading(false);
|
||||
})();
|
||||
}, []);
|
||||
|
||||
useInput((input, key) => {
|
||||
if (loading || syncing) return;
|
||||
if (key.upArrow) setSel(i => Math.max(0, i - 1));
|
||||
else if (key.downArrow) setSel(i => Math.min(agents.length - 1, i + 1));
|
||||
else if (input === 'a') { setSyncing(true); setTimeout(() => setSyncing(false), 500); }
|
||||
else if (key.return && agents[sel]?.detected) { setSyncing(true); setTimeout(() => setSyncing(false), 300); }
|
||||
});
|
||||
|
||||
const detected = agents.filter(a => a.detected).length;
|
||||
|
||||
return (
|
||||
<Box flexDirection="column">
|
||||
<Text bold color={colors.primary}>SYNC SKILLS</Text>
|
||||
<Text dimColor>{detected}/{agents.length} agents detected</Text>
|
||||
|
||||
{loading && <Text>Detecting agents...</Text>}
|
||||
{syncing && <Text>Syncing...</Text>}
|
||||
|
||||
{!loading && !syncing && (
|
||||
<Box marginTop={1} flexDirection="column">
|
||||
{start > 0 && <Text dimColor> ↑ {start} more</Text>}
|
||||
{visible.map((agent, i) => {
|
||||
const idx = start + i;
|
||||
const isSel = idx === sel;
|
||||
return (
|
||||
<Text key={agent.type} inverse={isSel} dimColor={!agent.detected}>
|
||||
{isSel ? symbols.pointer : ' '}{agent.detected ? symbols.checkboxOn : symbols.checkboxOff} {agent.name.padEnd(20)} {agent.detected ? 'Ready' : 'N/A'}
|
||||
</Text>
|
||||
);
|
||||
})}
|
||||
{start + maxVisible < agents.length && <Text dimColor> ↓ {agents.length - start - maxVisible} more</Text>}
|
||||
</Box>
|
||||
)}
|
||||
|
||||
<Box marginTop={1}>
|
||||
<Text dimColor>Enter=sync a=all q=quit</Text>
|
||||
</Box>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
export { Home } from './Home.js';
|
||||
export { Browse } from './Browse.js';
|
||||
export { Installed } from './Installed.js';
|
||||
export { Sync } from './Sync.js';
|
||||
export { Settings } from './Settings.js';
|
||||
@@ -0,0 +1,31 @@
|
||||
import chalk from 'chalk';
|
||||
|
||||
export const colors = {
|
||||
primary: 'white',
|
||||
secondary: 'white',
|
||||
secondaryDim: 'gray',
|
||||
success: 'white',
|
||||
danger: 'white',
|
||||
warning: 'white',
|
||||
background: 'bgBlack',
|
||||
borderDim: 'gray',
|
||||
};
|
||||
|
||||
export const symbols = {
|
||||
pointer: chalk.white('❯'),
|
||||
bullet: '●',
|
||||
checkboxOn: chalk.white('✔'),
|
||||
checkboxOff: chalk.dim('✖'),
|
||||
check: chalk.white('✓'),
|
||||
star: '★',
|
||||
spinner: ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'],
|
||||
};
|
||||
|
||||
export const logo = `
|
||||
███████╗██╗ ██╗██╗██╗ ██╗ ██╗ ██╗██╗████████╗
|
||||
██╔════╝██║ ██╔╝██║██║ ██║ ██║ ██╔╝██║╚══██╔══╝
|
||||
███████╗█████╔╝ ██║██║ ██║ █████╔╝ ██║ ██║
|
||||
╚════██║██╔═██╗ ██║██║ ██║ ██╔═██╗ ██║ ██║
|
||||
███████║██║ ██╗██║███████╗███████╗██║ ██╗██║ ██║
|
||||
╚══════╝╚═╝ ╚═╝╚═╝╚══════╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝
|
||||
`;
|
||||
Reference in New Issue
Block a user