@guanmu/ccprofile 0.1.17 → 0.1.18

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.
package/README.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # ccx
2
2
 
3
+ ```text
4
+ ______ ______ __ __
5
+ / ____// ____/ \ \ / /
6
+ | | | | \ V /
7
+ | |___ | |___ / . \
8
+ \____/ \____/ /_/ \_\
9
+ ```
10
+
3
11
  Agent Profile Manager for Claude Code.
4
12
 
5
13
  `ccx` lets you save named Claude Code plugin profiles and install a whole profile into the current project with one command. It is designed as a command-first CLI, with a lightweight interactive wizard for manual use.
package/dist/index.js CHANGED
@@ -8,6 +8,16 @@ import pc from "picocolors";
8
8
  const PROFILES_DIR = path.join(process.env.HOME, ".ccx", "profiles");
9
9
  const MARKETPLACES_DIR = path.join(process.env.HOME, ".claude", "plugins", "marketplaces");
10
10
  const PROJECT_CONFIG_FILE = ".ccx.json";
11
+ const LOGO_LINES = [
12
+ " ______ ______ __ __",
13
+ " / ____// ____/ \\ \\ / /",
14
+ " | | | | \\ V /",
15
+ " | |___ | |___ / . \\",
16
+ " \\____/ \\____/ /_/ \\_\\",
17
+ ];
18
+ function renderLogo() {
19
+ return LOGO_LINES.map((line, index) => index < 2 ? pc.cyan(line) : pc.magenta(line)).join("\n");
20
+ }
11
21
  function ensureProfilesDir() {
12
22
  fs.mkdirSync(PROFILES_DIR, { recursive: true });
13
23
  }
@@ -568,10 +578,39 @@ function syncProjectConfig() {
568
578
  writeProjectConfig(plugins);
569
579
  p.log.success(`Synced ${plugins.length} plugin(s) to ${PROJECT_CONFIG_FILE}.`);
570
580
  }
581
+ async function saveToProfile(name) {
582
+ const plugins = readProjectConfig();
583
+ if (!name) {
584
+ if (!canPrompt()) {
585
+ missingArg("Profile name is required.", "ccx save <name>");
586
+ return;
587
+ }
588
+ name = (await p.text({
589
+ message: "Save as profile:",
590
+ }));
591
+ if (p.isCancel(name))
592
+ return;
593
+ }
594
+ name = normalizeProfileName(name);
595
+ if (!name)
596
+ return;
597
+ const file = profilePath(name);
598
+ if (fs.existsSync(file)) {
599
+ const overwrite = await p.confirm({
600
+ message: `Profile "${name}" already exists. Overwrite?`,
601
+ initialValue: false,
602
+ });
603
+ if (p.isCancel(overwrite) || !overwrite)
604
+ return;
605
+ }
606
+ writeProfile(name, { name, plugins });
607
+ p.log.success(`Saved ${plugins.length} plugin(s) to profile "${name}".`);
608
+ }
571
609
  function printBanner() {
572
610
  const require = createRequire(import.meta.url);
573
611
  const pkg = require("../package.json");
574
- p.note(pc.bold("ccx") + pc.dim(" — Agent Profile Manager ") + pc.gray(`v${pkg.version}`));
612
+ console.log(`${renderLogo()}\n`);
613
+ p.note(pc.bold("ccx") + pc.dim(" - Agent Profile Manager ") + pc.gray(`v${pkg.version}`));
575
614
  }
576
615
  async function interactiveMode() {
577
616
  if (!canPrompt()) {
@@ -645,13 +684,16 @@ async function interactiveMode() {
645
684
  p.outro("Done.");
646
685
  }
647
686
  function printHelp() {
648
- console.log(`ccx — Agent Profile Manager for Claude Code
687
+ console.log(`${renderLogo()}
688
+
689
+ ccx - Agent Profile Manager for Claude Code
649
690
 
650
691
  Usage:
651
692
  ccx Interactive mode (TTY only)
652
693
  ccx ui Interactive mode (TTY only)
653
694
  ccx init Create .ccx.json for current project
654
695
  ccx sync Sync installed plugins to .ccx.json
696
+ ccx save [name] Save .ccx.json plugins as a profile
655
697
  ccx install Install plugins from .ccx.json
656
698
  ccx install <profile> Install all plugins from profile
657
699
  ccx create <name> Create a new profile
@@ -694,6 +736,9 @@ async function main(args) {
694
736
  case "sync":
695
737
  syncProjectConfig();
696
738
  break;
739
+ case "save":
740
+ await saveToProfile(args[1]);
741
+ break;
697
742
  case "ui":
698
743
  case "tui":
699
744
  case "interactive":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guanmu/ccprofile",
3
- "version": "0.1.17",
3
+ "version": "0.1.18",
4
4
  "description": "Agent Profile Manager for Claude Code",
5
5
  "type": "module",
6
6
  "bin": {