start-vibing 2.0.48 → 2.0.49

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.js +166 -1
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -765,6 +765,163 @@ async function installMcps() {
765
765
  return { installed, failed, skipped };
766
766
  }
767
767
 
768
+ // src/plugins.ts
769
+ import { spawn as spawn3, spawnSync as spawnSync3 } from "child_process";
770
+ var RECOMMENDED_PLUGINS = [
771
+ {
772
+ name: "typescript-lsp",
773
+ marketplace: "claude-plugins-official",
774
+ description: "TypeScript code intelligence (go-to-definition, diagnostics)"
775
+ },
776
+ {
777
+ name: "code-review",
778
+ marketplace: "claude-plugins-official",
779
+ description: "Code review workflows and PR analysis"
780
+ },
781
+ {
782
+ name: "security-guidance",
783
+ marketplace: "claude-plugins-official",
784
+ description: "Security best practices and vulnerability detection"
785
+ },
786
+ {
787
+ name: "commit-commands",
788
+ marketplace: "claude-plugins-official",
789
+ description: "Git commit, push, and PR workflows"
790
+ }
791
+ ];
792
+ var c2 = {
793
+ reset: "\x1B[0m",
794
+ bright: "\x1B[1m",
795
+ dim: "\x1B[2m",
796
+ green: "\x1B[32m",
797
+ yellow: "\x1B[33m",
798
+ blue: "\x1B[34m",
799
+ cyan: "\x1B[36m",
800
+ red: "\x1B[31m",
801
+ magenta: "\x1B[35m"
802
+ };
803
+ function isClaudePluginReady() {
804
+ if (!commandExists("claude"))
805
+ return false;
806
+ try {
807
+ const result = spawnSync3("claude", ["plugin", "--help"], {
808
+ encoding: "utf-8",
809
+ stdio: ["pipe", "pipe", "pipe"],
810
+ shell: true,
811
+ timeout: 1e4
812
+ });
813
+ return result.status === 0;
814
+ } catch {
815
+ return false;
816
+ }
817
+ }
818
+ function isPluginInstalled(name, marketplace) {
819
+ try {
820
+ const result = spawnSync3("claude", ["plugin", "list"], {
821
+ encoding: "utf-8",
822
+ stdio: ["pipe", "pipe", "pipe"],
823
+ shell: true,
824
+ timeout: 1e4
825
+ });
826
+ if (result.status === 0 && result.stdout) {
827
+ return result.stdout.includes(`${name}@${marketplace}`);
828
+ }
829
+ return false;
830
+ } catch {
831
+ return false;
832
+ }
833
+ }
834
+ async function installPlugin(plugin) {
835
+ const pluginId = `${plugin.name}@${plugin.marketplace}`;
836
+ if (isPluginInstalled(plugin.name, plugin.marketplace)) {
837
+ return {
838
+ plugin: pluginId,
839
+ success: true,
840
+ message: "Already installed",
841
+ skipped: true
842
+ };
843
+ }
844
+ return new Promise((resolve) => {
845
+ const args = ["plugin", "install", pluginId, "--scope", "user"];
846
+ const proc = spawn3("claude", args, {
847
+ shell: true,
848
+ stdio: ["pipe", "pipe", "pipe"]
849
+ });
850
+ let stdout = "";
851
+ let stderr = "";
852
+ proc.stdout?.on("data", (data) => {
853
+ stdout += data.toString();
854
+ });
855
+ proc.stderr?.on("data", (data) => {
856
+ stderr += data.toString();
857
+ });
858
+ proc.on("close", (code) => {
859
+ if (code === 0) {
860
+ resolve({
861
+ plugin: pluginId,
862
+ success: true,
863
+ message: "Installed"
864
+ });
865
+ } else {
866
+ resolve({
867
+ plugin: pluginId,
868
+ success: false,
869
+ message: stderr || stdout || `Exit code: ${code}`
870
+ });
871
+ }
872
+ });
873
+ proc.on("error", (err) => {
874
+ resolve({
875
+ plugin: pluginId,
876
+ success: false,
877
+ message: err.message
878
+ });
879
+ });
880
+ setTimeout(() => {
881
+ proc.kill();
882
+ resolve({
883
+ plugin: pluginId,
884
+ success: false,
885
+ message: "Installation timed out"
886
+ });
887
+ }, 30000);
888
+ });
889
+ }
890
+ async function installPlugins() {
891
+ console.log("");
892
+ console.log(` ${c2.bright}${c2.magenta}Installing Plugins...${c2.reset}`);
893
+ console.log(` ${c2.dim}(Also pre-configured in .claude/settings.json as fallback)${c2.reset}`);
894
+ console.log("");
895
+ if (!isClaudePluginReady()) {
896
+ console.log(` ${c2.yellow}Plugin commands not available. Skipping CLI installation.${c2.reset}`);
897
+ console.log(` ${c2.dim}Plugins will auto-prompt when Claude Code opens the project.${c2.reset}`);
898
+ return { installed: 0, failed: 0, skipped: RECOMMENDED_PLUGINS.length };
899
+ }
900
+ const results = [];
901
+ for (const plugin of RECOMMENDED_PLUGINS) {
902
+ process.stdout.write(` ${c2.dim}Installing ${plugin.name}...${c2.reset}`);
903
+ const result = await installPlugin(plugin);
904
+ process.stdout.clearLine?.(0);
905
+ process.stdout.cursorTo?.(0);
906
+ const icon = result.success ? `${c2.green}\u2713${c2.reset}` : `${c2.red}\u2717${c2.reset}`;
907
+ const status = result.skipped ? `${c2.dim}(already installed)${c2.reset}` : result.success ? `${c2.green}OK${c2.reset}` : `${c2.yellow}skipped (will auto-prompt)${c2.reset}`;
908
+ console.log(` ${icon} ${c2.cyan}${plugin.name}${c2.reset}: ${plugin.description} ${status}`);
909
+ results.push(result);
910
+ }
911
+ const installed = results.filter((r) => r.success && !r.skipped).length;
912
+ const failed = results.filter((r) => !r.success).length;
913
+ const skipped = results.filter((r) => r.skipped).length;
914
+ console.log("");
915
+ console.log(` ${c2.bright}Plugin Summary:${c2.reset}`);
916
+ console.log(` ${c2.green}Installed: ${installed}${c2.reset}`);
917
+ if (skipped > 0)
918
+ console.log(` ${c2.dim}Already installed: ${skipped}${c2.reset}`);
919
+ if (failed > 0) {
920
+ console.log(` ${c2.yellow}Deferred: ${failed} (will auto-prompt on project open)${c2.reset}`);
921
+ }
922
+ return { installed, failed, skipped };
923
+ }
924
+
768
925
  // src/cli.ts
769
926
  var __filename3 = fileURLToPath2(import.meta.url);
770
927
  var __dirname3 = dirname2(__filename3);
@@ -849,7 +1006,8 @@ ${BANNER}
849
1006
  2. Creates .claude/ folder with agents, skills, hooks, config
850
1007
  3. Installs Claude Code if not found on system
851
1008
  4. Installs recommended MCP servers (Context7, Playwright, etc.)
852
- 5. Launches Claude Code with --dangerously-skip-permissions
1009
+ 5. Installs recommended plugins (TypeScript LSP, Code Review, etc.)
1010
+ 6. Launches Claude Code with --dangerously-skip-permissions
853
1011
 
854
1012
  Smart Copy Behavior:
855
1013
  - ALWAYS overwrites: agents/*.md, hooks/*.py, settings.json
@@ -985,6 +1143,13 @@ async function main() {
985
1143
  console.log(" MCP installation skipped (Claude CLI not ready).");
986
1144
  console.log(' Run "claude mcp list" after restart to verify.');
987
1145
  }
1146
+ if (!skipMcp && isClaudePluginReady()) {
1147
+ console.log("");
1148
+ console.log(" ========================================");
1149
+ console.log(" Plugin Setup");
1150
+ console.log(" ========================================");
1151
+ await installPlugins();
1152
+ }
988
1153
  console.log("");
989
1154
  launchClaude(targetDir);
990
1155
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "start-vibing",
3
- "version": "2.0.48",
3
+ "version": "2.0.49",
4
4
  "description": "Setup Claude Code agents, skills, and hooks in your project. Smart copy that preserves your custom domains and configurations.",
5
5
  "type": "module",
6
6
  "bin": {