feat: add JoyCode install target

This commit is contained in:
Affaan Mustafa
2026-05-11 10:58:24 -04:00
committed by Affaan Mustafa
parent fb9a8f2973
commit c7c1e36625
12 changed files with 275 additions and 21 deletions

View File

@@ -31,6 +31,11 @@ Targets:
claude (default) - Install ECC into ~/.claude/ with managed rules/skills under rules/ecc and skills/ecc
cursor - Install rules, hooks, and bundled Cursor configs to ./.cursor/
antigravity - Install rules, workflows, skills, and agents to ./.agent/
codex - Install shared agents/config into ~/.codex/
gemini - Install project-local Gemini config into ./.gemini/
opencode - Install shared commands/hooks/config into ~/.opencode/
codebuddy - Install commands, agents, skills, and flattened rules into ./.codebuddy/
joycode - Install commands, agents, skills, and flattened rules into ./.joycode/
Options:
--profile <name> Resolve and install a manifest profile

View File

@@ -4,7 +4,7 @@ const path = require('path');
const { getInstallTargetAdapter, planInstallTargetScaffold } = require('./install-targets/registry');
const DEFAULT_REPO_ROOT = path.join(__dirname, '../..');
const SUPPORTED_INSTALL_TARGETS = ['claude', 'cursor', 'antigravity', 'codex', 'gemini', 'opencode', 'codebuddy'];
const SUPPORTED_INSTALL_TARGETS = ['claude', 'cursor', 'antigravity', 'codex', 'gemini', 'opencode', 'codebuddy', 'joycode'];
const COMPONENT_FAMILY_PREFIXES = {
baseline: 'baseline:',
language: 'lang:',

View File

@@ -7,6 +7,7 @@ const PLATFORM_SOURCE_PATH_OWNERS = Object.freeze({
'.codex': 'codex',
'.cursor': 'cursor',
'.gemini': 'gemini',
'.joycode': 'joycode',
'.opencode': 'opencode',
'.codebuddy': 'codebuddy',
});

View File

@@ -0,0 +1,50 @@
const path = require('path');
const {
createFlatRuleOperations,
createInstallTargetAdapter,
isForeignPlatformPath,
} = require('./helpers');
module.exports = createInstallTargetAdapter({
id: 'joycode-project',
target: 'joycode',
kind: 'project',
rootSegments: ['.joycode'],
installStatePathSegments: ['ecc-install-state.json'],
nativeRootRelativePath: '.joycode',
planOperations(input, adapter) {
const modules = Array.isArray(input.modules)
? input.modules
: (input.module ? [input.module] : []);
const {
repoRoot,
projectRoot,
homeDir,
} = input;
const planningInput = {
repoRoot,
projectRoot,
homeDir,
};
const targetRoot = adapter.resolveRoot(planningInput);
return modules.flatMap(module => {
const paths = Array.isArray(module.paths) ? module.paths : [];
return paths
.filter(p => !isForeignPlatformPath(p, adapter.target))
.flatMap(sourceRelativePath => {
if (sourceRelativePath === 'rules') {
return createFlatRuleOperations({
moduleId: module.id,
repoRoot,
sourceRelativePath,
destinationDir: path.join(targetRoot, 'rules'),
});
}
return [adapter.createScaffoldOperation(module.id, sourceRelativePath, planningInput)];
});
});
},
});

View File

@@ -4,6 +4,7 @@ const codebuddyProject = require('./codebuddy-project');
const codexHome = require('./codex-home');
const cursorProject = require('./cursor-project');
const geminiProject = require('./gemini-project');
const joycodeProject = require('./joycode-project');
const opencodeHome = require('./opencode-home');
const ADAPTERS = Object.freeze([
@@ -14,6 +15,7 @@ const ADAPTERS = Object.freeze([
geminiProject,
opencodeHome,
codebuddyProject,
joycodeProject,
]);
function listInstallTargetAdapters() {