mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-10 00:05:27 +00:00
refactor: move init guidance overrides to env vars
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.5
parent
5a48886b4c
commit
876943468b
@@ -160,11 +160,11 @@ addition to the skills bundle:
|
||||
}
|
||||
```
|
||||
|
||||
That matches the new `wmill init` overrides:
|
||||
That matches the internal `wmill init` override env vars:
|
||||
|
||||
```bash
|
||||
wmill init --use-default --ai-skills-source ./ai_evals/variants/cli/snapshots/candidate-skills
|
||||
wmill init --use-default --ai-skills-source ./ai_evals/variants/cli/snapshots/candidate-skills --ai-agents-source ./my-candidate-AGENTS.md
|
||||
WMILL_INIT_AI_SKILLS_SOURCE=./ai_evals/variants/cli/snapshots/candidate-skills wmill init --use-default
|
||||
WMILL_INIT_AI_SKILLS_SOURCE=./ai_evals/variants/cli/snapshots/candidate-skills WMILL_INIT_AI_AGENTS_SOURCE=./my-candidate-AGENTS.md wmill init --use-default
|
||||
```
|
||||
|
||||
## Next Steps
|
||||
|
||||
+5
-4
@@ -113,14 +113,15 @@ source <(wmill completions zsh)
|
||||
### AI Guidance Variants
|
||||
|
||||
`wmill init` can now materialize alternate AI guidance bundles without changing
|
||||
the generated defaults in the repo.
|
||||
the generated defaults in the repo, but this is exposed as internal env-var
|
||||
overrides rather than public CLI flags.
|
||||
|
||||
Examples:
|
||||
|
||||
```bash
|
||||
wmill init --use-default --ai-skills-source /path/to/custom/skills
|
||||
wmill init --use-default --ai-skills-source /path/to/custom/skills --ai-agents-source /path/to/AGENTS.md
|
||||
wmill init --use-default --ai-skills-source /path/to/custom/skills --ai-claude-source /path/to/CLAUDE.md
|
||||
WMILL_INIT_AI_SKILLS_SOURCE=/path/to/custom/skills wmill init --use-default
|
||||
WMILL_INIT_AI_SKILLS_SOURCE=/path/to/custom/skills WMILL_INIT_AI_AGENTS_SOURCE=/path/to/AGENTS.md wmill init --use-default
|
||||
WMILL_INIT_AI_SKILLS_SOURCE=/path/to/custom/skills WMILL_INIT_AI_CLAUDE_SOURCE=/path/to/CLAUDE.md wmill init --use-default
|
||||
```
|
||||
|
||||
This is the same guidance-writing path used by the benchmark CLI under
|
||||
|
||||
@@ -22,11 +22,12 @@ export interface InitOptions {
|
||||
baseUrl?: string;
|
||||
configDir?: string;
|
||||
bindProfile?: boolean;
|
||||
aiSkillsSource?: string;
|
||||
aiAgentsSource?: string;
|
||||
aiClaudeSource?: string;
|
||||
}
|
||||
|
||||
const WMILL_INIT_AI_SKILLS_SOURCE = "WMILL_INIT_AI_SKILLS_SOURCE";
|
||||
const WMILL_INIT_AI_AGENTS_SOURCE = "WMILL_INIT_AI_AGENTS_SOURCE";
|
||||
const WMILL_INIT_AI_CLAUDE_SOURCE = "WMILL_INIT_AI_CLAUDE_SOURCE";
|
||||
|
||||
/**
|
||||
* Bootstrap a windmill project with a wmill.yaml file
|
||||
*/
|
||||
@@ -228,9 +229,9 @@ async function initAction(opts: InitOptions) {
|
||||
targetDir: ".",
|
||||
nonDottedPaths,
|
||||
overwriteProjectGuidance: false,
|
||||
skillsSourcePath: opts.aiSkillsSource,
|
||||
agentsSourcePath: opts.aiAgentsSource,
|
||||
claudeSourcePath: opts.aiClaudeSource,
|
||||
skillsSourcePath: process.env[WMILL_INIT_AI_SKILLS_SOURCE],
|
||||
agentsSourcePath: process.env[WMILL_INIT_AI_AGENTS_SOURCE],
|
||||
claudeSourcePath: process.env[WMILL_INIT_AI_CLAUDE_SOURCE],
|
||||
});
|
||||
|
||||
if (guidanceResult.agentsWritten) {
|
||||
@@ -266,18 +267,6 @@ const command = new Command()
|
||||
.description("Bootstrap a windmill project with a wmill.yaml file")
|
||||
.option("--use-default", "Use default settings without checking backend")
|
||||
.option("--use-backend", "Use backend git-sync settings if available")
|
||||
.option(
|
||||
"--ai-skills-source <path:string>",
|
||||
"Use a custom skills directory instead of the generated .claude/skills bundle"
|
||||
)
|
||||
.option(
|
||||
"--ai-agents-source <path:string>",
|
||||
"Use a custom AGENTS.md file for AI guidance"
|
||||
)
|
||||
.option(
|
||||
"--ai-claude-source <path:string>",
|
||||
"Use a custom CLAUDE.md file for AI guidance"
|
||||
)
|
||||
.option(
|
||||
"--repository <repo:string>",
|
||||
"Specify repository path (e.g., u/user/repo) when using backend settings"
|
||||
|
||||
Reference in New Issue
Block a user