Compare commits

...

12 Commits

Author SHA1 Message Date
Affaan Mustafa
f07797533d Merge pull request #931 from KT-lcz/main
docs: clarify multi-model command setup
2026-03-28 09:13:18 -04:00
Affaan Mustafa
87d883eb1b Merge pull request #963 from affaan-m/fix/install-show-help-on-error
fix(installer): show help text on error and document --profile full
2026-03-28 09:12:38 -04:00
Affaan Mustafa
652f87c5b6 fix(installer): tighten error help spacing 2026-03-28 09:11:14 -04:00
Affaan Mustafa
70b65a9d06 fix: tighten installer error spacing 2026-03-28 09:11:14 -04:00
Prabith Balagopalan
24674a7bd6 fix(installer): write error and help text to stderr for consistent stream output
Extracted help text into getHelpText() and write both the error message
and usage help to stderr via process.stderr.write(). This ensures that
when output is redirected (e.g. 2>errors.txt), both the error and the
guidance appear in the same stream.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-28 09:11:02 -04:00
Prabith Balagopalan
d49c95a5ec fix(installer): show help text on error and document --profile full in README
Running install.ps1/install.sh with no arguments gave a cryptic error
with no guidance. Now the usage help is printed after the error so users
know what arguments to pass.

Also added --profile full as the recommended install option in the README
quick-start section, which was previously undocumented.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-28 09:11:02 -04:00
Affaan Mustafa
70a96bd363 Merge pull request #977 from Lidang-Jiang/fix/cli-homedir-windows-fallback
fix(scripts): add os.homedir() fallback for Windows compatibility
2026-03-28 09:09:59 -04:00
Affaan Mustafa
8f7445a260 Merge pull request #976 from ymdvsymd/fix/ci-pnpm-yarn-compat-v2
fix(ci): enable Corepack for yarn and relax pnpm strict mode
2026-03-28 09:09:44 -04:00
Lidang-Jiang
ae21a8df85 fix(scripts): add os.homedir() fallback for Windows compatibility
On Windows (native cmd/PowerShell), process.env.HOME is undefined.
Seven CLI entry points and two library files pass process.env.HOME
directly as homeDir without a cross-platform fallback, causing all
path resolutions to silently fail (resolving to "undefined/.claude/...").

Node.js os.homedir() correctly handles all platforms (HOME on Unix,
USERPROFILE on Windows, OS-level fallback). The project already uses
this pattern in scripts/lib/state-store/index.js and has a getHomeDir()
utility in scripts/lib/utils.js, but it was not applied consistently.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Signed-off-by: Lidang-Jiang <lidangjiang@gmail.com>
2026-03-28 11:28:12 +08:00
to.watanabe
d8e3b9d593 fix(ci): remove --ignore-engines for Yarn Berry (v4+)
Yarn Berry removed the --ignore-engines flag; engine checking is no
longer a core feature. The deprecated flag causes yarn install to exit
with error code 1.
2026-03-28 12:27:04 +09:00
to.watanabe
7148d9006f fix(ci): enable Corepack for yarn and relax pnpm strict mode
All 18 pnpm/yarn CI jobs fail on main because:
1. pnpm v9+ refuses to install when package.json declares
   "packageManager": "yarn@4.9.2" — fixed by setting
   COREPACK_ENABLE_STRICT=0 and --no-frozen-lockfile
2. CI runners only have Yarn Classic (v1.x) but the project
   uses Yarn Berry (v4.x) — fixed by activating Corepack
   before the cache/install steps
2026-03-28 12:27:04 +09:00
lichangze
c96c4d2742 docs: clarify multi-model command setup
Document that multi-* commands require the ccg-workflow runtime so users know they must initialize the extra wrapper and prompt assets before use.
2026-03-26 16:42:08 +08:00
13 changed files with 93 additions and 20 deletions

View File

@@ -48,6 +48,13 @@ jobs:
with:
version: latest
- name: Setup Yarn (via Corepack)
if: matrix.pm == 'yarn'
shell: bash
run: |
corepack enable
corepack prepare yarn@stable --activate
- name: Setup Bun
if: matrix.pm == 'bun'
uses: oven-sh/setup-bun@v2
@@ -114,14 +121,18 @@ jobs:
${{ runner.os }}-bun-
# Install dependencies
# COREPACK_ENABLE_STRICT=0 allows pnpm to install even though
# package.json declares "packageManager": "yarn@..."
- name: Install dependencies
shell: bash
env:
COREPACK_ENABLE_STRICT: '0'
run: |
case "${{ matrix.pm }}" in
npm) npm ci ;;
pnpm) pnpm install ;;
# --ignore-engines required for Node 18 compat with some devDependencies (e.g., markdownlint-cli)
yarn) yarn install --ignore-engines ;;
pnpm) pnpm install --no-frozen-lockfile ;;
# Yarn Berry (v4+) removed --ignore-engines; engine checking is no longer a core feature
yarn) yarn install ;;
bun) bun install ;;
*) echo "Unsupported package manager: ${{ matrix.pm }}" && exit 1 ;;
esac

View File

@@ -40,6 +40,13 @@ jobs:
with:
version: latest
- name: Setup Yarn (via Corepack)
if: inputs.package-manager == 'yarn'
shell: bash
run: |
corepack enable
corepack prepare yarn@stable --activate
- name: Setup Bun
if: inputs.package-manager == 'bun'
uses: oven-sh/setup-bun@v2
@@ -104,13 +111,18 @@ jobs:
restore-keys: |
${{ runner.os }}-bun-
# COREPACK_ENABLE_STRICT=0 allows pnpm to install even though
# package.json declares "packageManager": "yarn@..."
- name: Install dependencies
shell: bash
env:
COREPACK_ENABLE_STRICT: '0'
run: |
case "${{ inputs.package-manager }}" in
npm) npm ci ;;
pnpm) pnpm install ;;
yarn) yarn install --ignore-engines ;;
pnpm) pnpm install --no-frozen-lockfile ;;
# Yarn Berry (v4+) removed --ignore-engines; engine checking is no longer a core feature
yarn) yarn install ;;
bun) bun install ;;
*) echo "Unsupported package manager: ${{ inputs.package-manager }}" && exit 1 ;;
esac

View File

@@ -180,6 +180,11 @@ cd everything-claude-code
npm install # or: pnpm install | yarn install | bun install
# macOS/Linux
# Recommended: install everything (full profile)
./install.sh --profile full
# Or install for specific languages only
./install.sh typescript # or python or golang or swift or php
# ./install.sh typescript python golang swift php
# ./install.sh --target cursor typescript
@@ -188,6 +193,11 @@ npm install # or: pnpm install | yarn install | bun install
```powershell
# Windows PowerShell
# Recommended: install everything (full profile)
.\install.ps1 --profile full
# Or install for specific languages only
.\install.ps1 typescript # or python or golang or swift or php
# .\install.ps1 typescript python golang swift php
# .\install.ps1 --target cursor typescript
@@ -214,6 +224,20 @@ For manual install instructions see the README in the `rules/` folder.
**That's it!** You now have access to 28 agents, 125 skills, and 60 commands.
### Multi-model commands require additional setup
> ⚠️ `multi-*` commands are **not** covered by the base plugin/rules install above.
>
> To use `/multi-plan`, `/multi-execute`, `/multi-backend`, `/multi-frontend`, and `/multi-workflow`, you must also install the `ccg-workflow` runtime.
>
> Initialize it with `npx ccg-workflow`.
>
> That runtime provides the external dependencies these commands expect, including:
> - `~/.claude/bin/codeagent-wrapper`
> - `~/.claude/.ccg/prompts/*`
>
> Without `ccg-workflow`, these `multi-*` commands will not run correctly.
---
## 🌐 Cross-Platform Support

View File

@@ -105,6 +105,20 @@ cp -r everything-claude-code/rules/perl/* ~/.claude/rules/
**完成!** 你现在可以使用 13 个代理、43 个技能和 31 个命令。
### multi-* 命令需要额外配置
> ⚠️ 上面的基础插件 / rules 安装**不包含** `multi-*` 命令所需的运行时。
>
> 如果要使用 `/multi-plan`、`/multi-execute`、`/multi-backend`、`/multi-frontend` 和 `/multi-workflow`,还需要额外安装 `ccg-workflow` 运行时。
>
> 可通过 `npx ccg-workflow` 完成初始化安装。
>
> 该运行时会提供这些命令依赖的关键组件,包括:
> - `~/.claude/bin/codeagent-wrapper`
> - `~/.claude/.ccg/prompts/*`
>
> 未安装 `ccg-workflow` 时,这些 `multi-*` 命令将无法正常运行。
---
## 🌐 跨平台支持

View File

@@ -1,5 +1,6 @@
#!/usr/bin/env node
const os = require('os');
const { buildDoctorReport } = require('./lib/install-lifecycle');
const { SUPPORTED_INSTALL_TARGETS } = require('./lib/install-manifests');
@@ -88,7 +89,7 @@ function main() {
const report = buildDoctorReport({
repoRoot: require('path').join(__dirname, '..'),
homeDir: process.env.HOME,
homeDir: process.env.HOME || os.homedir(),
projectRoot: process.cwd(),
targets: options.targets,
});

View File

@@ -6,6 +6,7 @@
* target-specific mutation logic into testable Node code.
*/
const os = require('os');
const {
SUPPORTED_INSTALL_TARGETS,
listLegacyCompatibilityLanguages,
@@ -16,10 +17,10 @@ const {
parseInstallArgs,
} = require('./lib/install/request');
function showHelp(exitCode = 0) {
function getHelpText() {
const languages = listLegacyCompatibilityLanguages();
console.log(`
return `
Usage: install.sh [--target <${LEGACY_INSTALL_TARGETS.join('|')}>] [--dry-run] [--json] <language> [<language> ...]
install.sh [--target <${SUPPORTED_INSTALL_TARGETS.join('|')}>] [--dry-run] [--json] --profile <name> [--with <component>]... [--without <component>]...
install.sh [--target <${SUPPORTED_INSTALL_TARGETS.join('|')}>] [--dry-run] [--json] --modules <id,id,...> [--with <component>]... [--without <component>]...
@@ -43,8 +44,11 @@ Options:
Available languages:
${languages.map(language => ` - ${language}`).join('\n')}
`);
`;
}
function showHelp(exitCode = 0) {
console.log(getHelpText());
process.exit(exitCode);
}
@@ -118,7 +122,7 @@ function main() {
});
const plan = createInstallPlanFromRequest(request, {
projectRoot: process.cwd(),
homeDir: process.env.HOME,
homeDir: process.env.HOME || os.homedir(),
claudeRulesDir: process.env.CLAUDE_RULES_DIR || null,
});
@@ -138,7 +142,7 @@ function main() {
printHumanPlan(result, false);
}
} catch (error) {
console.error(`Error: ${error.message}`);
process.stderr.write(`Error: ${error.message}${getHelpText()}`);
process.exit(1);
}
}

View File

@@ -1,4 +1,5 @@
const fs = require('fs');
const os = require('os');
const path = require('path');
const { execFileSync } = require('child_process');
@@ -442,7 +443,7 @@ function planAntigravityLegacyInstall(context) {
function createLegacyInstallPlan(options = {}) {
const sourceRoot = options.sourceRoot || getSourceRoot();
const projectRoot = options.projectRoot || process.cwd();
const homeDir = options.homeDir || process.env.HOME;
const homeDir = options.homeDir || process.env.HOME || os.homedir();
const target = options.target || 'claude';
validateLegacyTarget(target);

View File

@@ -1,4 +1,5 @@
const fs = require('fs');
const os = require('os');
const path = require('path');
const { resolveInstallPlan, loadInstallManifests } = require('./install-manifests');
@@ -696,7 +697,7 @@ function buildDiscoveryRecord(adapter, context) {
function discoverInstalledStates(options = {}) {
const context = {
homeDir: options.homeDir || process.env.HOME,
homeDir: options.homeDir || process.env.HOME || os.homedir(),
projectRoot: options.projectRoot || process.cwd(),
};
const targets = normalizeTargets(options.targets);
@@ -904,7 +905,7 @@ function buildDoctorReport(options = {}) {
}).filter(record => record.exists);
const context = {
repoRoot,
homeDir: options.homeDir || process.env.HOME,
homeDir: options.homeDir || process.env.HOME || os.homedir(),
projectRoot: options.projectRoot || process.cwd(),
manifestVersion: manifests.modulesVersion,
packageVersion: readPackageVersion(repoRoot),
@@ -988,7 +989,7 @@ function repairInstalledStates(options = {}) {
const manifests = loadInstallManifests({ repoRoot });
const context = {
repoRoot,
homeDir: options.homeDir || process.env.HOME,
homeDir: options.homeDir || process.env.HOME || os.homedir(),
projectRoot: options.projectRoot || process.cwd(),
manifestVersion: manifests.modulesVersion,
packageVersion: readPackageVersion(repoRoot),

View File

@@ -1,5 +1,6 @@
#!/usr/bin/env node
const os = require('os');
const { discoverInstalledStates } = require('./lib/install-lifecycle');
const { SUPPORTED_INSTALL_TARGETS } = require('./lib/install-manifests');
@@ -70,7 +71,7 @@ function main() {
}
const records = discoverInstalledStates({
homeDir: process.env.HOME,
homeDir: process.env.HOME || os.homedir(),
projectRoot: process.cwd(),
targets: options.targets,
}).filter(record => record.exists);

View File

@@ -1,5 +1,6 @@
#!/usr/bin/env node
const os = require('os');
const { repairInstalledStates } = require('./lib/install-lifecycle');
const { SUPPORTED_INSTALL_TARGETS } = require('./lib/install-manifests');
@@ -74,7 +75,7 @@ function main() {
const result = repairInstalledStates({
repoRoot: require('path').join(__dirname, '..'),
homeDir: process.env.HOME,
homeDir: process.env.HOME || os.homedir(),
projectRoot: process.cwd(),
targets: options.targets,
dryRun: options.dryRun,

View File

@@ -1,6 +1,7 @@
#!/usr/bin/env node
'use strict';
const os = require('os');
const { createStateStore } = require('./lib/state-store');
function showHelp(exitCode = 0) {
@@ -134,7 +135,7 @@ async function main() {
store = await createStateStore({
dbPath: options.dbPath,
homeDir: process.env.HOME,
homeDir: process.env.HOME || os.homedir(),
});
if (!options.sessionId) {

View File

@@ -1,6 +1,7 @@
#!/usr/bin/env node
'use strict';
const os = require('os');
const { createStateStore } = require('./lib/state-store');
function showHelp(exitCode = 0) {
@@ -139,7 +140,7 @@ async function main() {
store = await createStateStore({
dbPath: options.dbPath,
homeDir: process.env.HOME,
homeDir: process.env.HOME || os.homedir(),
});
const payload = {

View File

@@ -1,5 +1,6 @@
#!/usr/bin/env node
const os = require('os');
const { uninstallInstalledStates } = require('./lib/install-lifecycle');
const { SUPPORTED_INSTALL_TARGETS } = require('./lib/install-manifests');
@@ -73,7 +74,7 @@ function main() {
}
const result = uninstallInstalledStates({
homeDir: process.env.HOME,
homeDir: process.env.HOME || os.homedir(),
projectRoot: process.cwd(),
targets: options.targets,
dryRun: options.dryRun,