trellis 3.1.15 → 3.1.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli/index.js +160 -95
  2. package/package.json +1 -1
package/dist/cli/index.js CHANGED
@@ -5789,115 +5789,147 @@ async function runInit(rootPath, opts = {}) {
5789
5789
  if (isInteractive) {
5790
5790
  console.log(source_default.cyan(`
5791
5791
  Configuring workspace...`));
5792
- const frameworkChoices = [
5793
- { name: "React", value: "react" },
5794
- { name: "Vue", value: "vue" },
5795
- { name: "Svelte", value: "svelte" },
5796
- { name: "Next.js", value: "next" },
5797
- { name: "Nuxt", value: "nuxt" },
5798
- { name: "Remotion", value: "remotion" },
5799
- { name: "Expo / React Native", value: "expo" },
5800
- { name: "Bun runtime", value: "bun" },
5801
- { name: "Node.js server", value: "node" },
5802
- { name: "CLI tool", value: "cli" },
5803
- { name: "Library / Package", value: "library" },
5804
- { name: "Animation studio", value: "animation" },
5805
- { name: "Games", value: "games" },
5806
- { name: "None / Vanilla", value: "none" }
5807
- ];
5808
- framework = await dist_default5({
5809
- message: detectedFramework ? `What type of project are you building? (detected: ${detectedFramework})` : "What type of project are you building?",
5810
- choices: frameworkChoices,
5811
- default: opts.framework || detectedFramework || "none"
5812
- });
5813
- const ideChoices = [
5814
- {
5815
- name: "Cursor",
5816
- value: "cursor",
5817
- checked: selectedIdes.includes("cursor") || selectedIdes.length === 0
5818
- },
5819
- {
5820
- name: "Windsurf",
5821
- value: "windsurf",
5822
- checked: selectedIdes.includes("windsurf")
5823
- },
5824
- {
5825
- name: "Claude Desktop",
5826
- value: "claude",
5827
- checked: selectedIdes.includes("claude")
5828
- },
5829
- {
5830
- name: "VS Code Copilot",
5831
- value: "copilot",
5832
- checked: selectedIdes.includes("copilot")
5833
- },
5834
- {
5835
- name: "Google Gemini (Code Assist)",
5836
- value: "gemini",
5837
- checked: selectedIdes.includes("gemini")
5838
- },
5839
- {
5840
- name: "OpenAI Codex",
5841
- value: "codex",
5842
- checked: selectedIdes.includes("codex")
5843
- }
5844
- ];
5845
- selectedIdes = await dist_default4({
5846
- message: "Which IDEs/agents do you want to scaffold for?",
5847
- choices: ideChoices
5848
- });
5849
- footprint = await dist_default5({
5850
- message: "How minimal do you want your workspace?",
5851
- choices: [
5852
- { name: "Minimal (just agent rules)", value: "minimal" },
5853
- { name: "Standard (includes skills + workflows)", value: "standard" },
5854
- { name: "Full (kitchen sink)", value: "full" }
5855
- ],
5856
- default: footprint
5857
- });
5858
- plugins = await dist_default4({
5859
- message: "Select features:",
5792
+ const setupType = await dist_default5({
5793
+ message: "Choose your setup mode:",
5860
5794
  choices: [
5861
5795
  {
5862
- name: "Sub-projects (monorepo, workspaces)",
5863
- value: "sub-projects",
5864
- checked: plugins.includes("sub-projects")
5796
+ name: "\u26A1 Minimal Setup (One-shot setup with detected defaults)",
5797
+ value: "minimal"
5865
5798
  },
5866
- { name: "P2P Sync", value: "p2p", checked: plugins.includes("p2p") },
5867
5799
  {
5868
- name: "MCP Server",
5869
- value: "mcp",
5870
- checked: plugins.includes("mcp")
5800
+ name: "\uD83D\uDD27 Custom Guided Setup (Customize framework, IDEs, footprint, features)",
5801
+ value: "custom"
5802
+ }
5803
+ ],
5804
+ default: "minimal"
5805
+ });
5806
+ if (setupType === "minimal") {
5807
+ footprint = "minimal";
5808
+ framework = detectedFramework || "none";
5809
+ const ides = [];
5810
+ const envKeys = Object.keys(process.env).join(",").toLowerCase();
5811
+ if (process.env.TERM_PROGRAM === "Windsurf" || envKeys.includes("windsurf")) {
5812
+ ides.push("windsurf");
5813
+ } else if (process.env.TERM_PROGRAM === "vscode" || envKeys.includes("cursor")) {
5814
+ ides.push("cursor");
5815
+ } else {
5816
+ ides.push("cursor", "windsurf");
5817
+ }
5818
+ selectedIdes = ides;
5819
+ plugins = [];
5820
+ console.log(source_default.green(` \u2713 Detected project type: ${source_default.bold(framework)}`));
5821
+ console.log(source_default.green(` \u2713 Scaffolding rules for: ${source_default.bold(selectedIdes.join(", "))}`));
5822
+ } else {
5823
+ const frameworkChoices = [
5824
+ { name: "React", value: "react" },
5825
+ { name: "Vue", value: "vue" },
5826
+ { name: "Svelte", value: "svelte" },
5827
+ { name: "Next.js", value: "next" },
5828
+ { name: "Nuxt", value: "nuxt" },
5829
+ { name: "Remotion", value: "remotion" },
5830
+ { name: "Expo / React Native", value: "expo" },
5831
+ { name: "Bun runtime", value: "bun" },
5832
+ { name: "Node.js server", value: "node" },
5833
+ { name: "CLI tool", value: "cli" },
5834
+ { name: "Library / Package", value: "library" },
5835
+ { name: "Animation studio", value: "animation" },
5836
+ { name: "Games", value: "games" },
5837
+ { name: "None / Vanilla", value: "none" }
5838
+ ];
5839
+ framework = await dist_default5({
5840
+ message: detectedFramework ? `What type of project are you building? (detected: ${detectedFramework})` : "What type of project are you building?",
5841
+ choices: frameworkChoices,
5842
+ default: opts.framework || detectedFramework || "none"
5843
+ });
5844
+ const ideChoices = [
5845
+ {
5846
+ name: "Cursor",
5847
+ value: "cursor",
5848
+ checked: selectedIdes.includes("cursor") || selectedIdes.length === 0
5871
5849
  },
5872
5850
  {
5873
- name: "UI Components",
5874
- value: "ui-components",
5875
- checked: plugins.includes("ui-components")
5851
+ name: "Windsurf",
5852
+ value: "windsurf",
5853
+ checked: selectedIdes.includes("windsurf")
5876
5854
  },
5877
5855
  {
5878
- name: "Media Pipelines",
5879
- value: "media-pipelines",
5880
- checked: plugins.includes("media-pipelines")
5856
+ name: "Claude Desktop",
5857
+ value: "claude",
5858
+ checked: selectedIdes.includes("claude")
5881
5859
  },
5882
5860
  {
5883
- name: "Brand System",
5884
- value: "brand-system",
5885
- checked: plugins.includes("brand-system")
5861
+ name: "VS Code Copilot",
5862
+ value: "copilot",
5863
+ checked: selectedIdes.includes("copilot")
5886
5864
  },
5887
5865
  {
5888
- name: "Agent Memory",
5889
- value: "agent-memory",
5890
- checked: plugins.includes("agent-memory")
5866
+ name: "Google Gemini (Code Assist)",
5867
+ value: "gemini",
5868
+ checked: selectedIdes.includes("gemini")
5891
5869
  },
5892
5870
  {
5893
- name: "Workflows",
5894
- value: "workflows",
5895
- checked: plugins.includes("workflows") || footprint !== "minimal"
5871
+ name: "OpenAI Codex",
5872
+ value: "codex",
5873
+ checked: selectedIdes.includes("codex")
5896
5874
  }
5897
- ]
5898
- });
5899
- if (plugins.includes("sub-projects") && !plugins.includes("workflows")) {
5900
- plugins.push("workflows");
5875
+ ];
5876
+ selectedIdes = await dist_default4({
5877
+ message: "Which IDEs/agents do you want to scaffold for?",
5878
+ choices: ideChoices
5879
+ });
5880
+ footprint = await dist_default5({
5881
+ message: "How minimal do you want your workspace?",
5882
+ choices: [
5883
+ { name: "Minimal (just agent rules)", value: "minimal" },
5884
+ { name: "Standard (includes skills + workflows)", value: "standard" },
5885
+ { name: "Full (kitchen sink)", value: "full" }
5886
+ ],
5887
+ default: footprint
5888
+ });
5889
+ plugins = await dist_default4({
5890
+ message: "Select features:",
5891
+ choices: [
5892
+ {
5893
+ name: "Sub-projects (monorepo, workspaces)",
5894
+ value: "sub-projects",
5895
+ checked: plugins.includes("sub-projects")
5896
+ },
5897
+ { name: "P2P Sync", value: "p2p", checked: plugins.includes("p2p") },
5898
+ {
5899
+ name: "MCP Server",
5900
+ value: "mcp",
5901
+ checked: plugins.includes("mcp")
5902
+ },
5903
+ {
5904
+ name: "UI Components",
5905
+ value: "ui-components",
5906
+ checked: plugins.includes("ui-components")
5907
+ },
5908
+ {
5909
+ name: "Media Pipelines",
5910
+ value: "media-pipelines",
5911
+ checked: plugins.includes("media-pipelines")
5912
+ },
5913
+ {
5914
+ name: "Brand System",
5915
+ value: "brand-system",
5916
+ checked: plugins.includes("brand-system")
5917
+ },
5918
+ {
5919
+ name: "Agent Memory",
5920
+ value: "agent-memory",
5921
+ checked: plugins.includes("agent-memory")
5922
+ },
5923
+ {
5924
+ name: "Workflows",
5925
+ value: "workflows",
5926
+ checked: plugins.includes("workflows") || footprint !== "minimal"
5927
+ }
5928
+ ]
5929
+ });
5930
+ if (plugins.includes("sub-projects") && !plugins.includes("workflows")) {
5931
+ plugins.push("workflows");
5932
+ }
5901
5933
  }
5902
5934
  }
5903
5935
  const engine = new TrellisVcsEngine({ rootPath });
@@ -8589,7 +8621,16 @@ program2.command("code").alias("ide").description('Launch OpenCode in "Harness"
8589
8621
  let mcpProcess = null;
8590
8622
  if (opts.web) {
8591
8623
  console.log(source_default.dim(` Starting MCP server on port ${mcpPort}\u2026`));
8592
- mcpProcess = spawn("bun", ["run", mcp, "--quiet", "--path", rootPath, "--http", "--port", String(mcpPort)], {
8624
+ mcpProcess = spawn("bun", [
8625
+ "run",
8626
+ mcp,
8627
+ "--quiet",
8628
+ "--path",
8629
+ rootPath,
8630
+ "--http",
8631
+ "--port",
8632
+ String(mcpPort)
8633
+ ], {
8593
8634
  stdio: ["pipe", "pipe", "pipe"],
8594
8635
  detached: false
8595
8636
  });
@@ -8810,4 +8851,28 @@ cmsCmd.command("register-library <pkg>").description("Register a Svelte 5 compon
8810
8851
  process.exit(1);
8811
8852
  }
8812
8853
  });
8854
+ program2.command("skills").description("Install Trellis agent skills using the skills CLI (npx skills)").argument("[args...]", "Additional arguments to pass to the skills CLI").allowUnknownOption().action(async () => {
8855
+ const skillsIndex = process.argv.indexOf("skills");
8856
+ const extraArgs = skillsIndex !== -1 ? process.argv.slice(skillsIndex + 1) : [];
8857
+ const { spawnSync } = await import("child_process");
8858
+ const skillsArgs = ["skills", "add", "trentbrew/trellis", ...extraArgs];
8859
+ console.log(source_default.cyan(" Installing Trellis agent skills..."));
8860
+ console.log(source_default.dim(` Running: npx ${skillsArgs.join(" ")}
8861
+ `));
8862
+ if (process.env.TRELLIS_CLI_DRY_RUN === "1") {
8863
+ return;
8864
+ }
8865
+ const result = spawnSync("npx", skillsArgs, {
8866
+ stdio: "inherit",
8867
+ shell: true
8868
+ });
8869
+ if (result.error) {
8870
+ console.error(source_default.red(`
8871
+ \u2717 Failed to run skills CLI: ${result.error.message}`));
8872
+ process.exit(1);
8873
+ }
8874
+ if (result.status !== 0) {
8875
+ process.exit(result.status ?? 1);
8876
+ }
8877
+ });
8813
8878
  program2.parse();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trellis",
3
- "version": "3.1.15",
3
+ "version": "3.1.19",
4
4
  "description": "Agentic State Engine — event-sourced causal graph with branching, decision traces, and realtime sync for AI-native applications",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",