Skip to content

Commit 947d789

Browse files
authored
Merge pull request #1 from zhujian0805/main
fix the cam prompt commands
2 parents cc791bd + 1f97273 commit 947d789

19 files changed

+1032
-2291
lines changed

.github/copilot-instructions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# Copilot Instructions for Testing
1+
# copilot-instructions.md — GitHub Copilot Code Assistant Instructions
22

33
This is a test instruction file for GitHub Copilot CLI custom instructions support.
44

55
## Guidelines
66

77
- Write clear, maintainable code
88
- Test everything before committing
9-
- Follow the repository's coding style
9+
- Follow the repository's coding style

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ rm -rf dist/*
1212
./install.sh uninstall
1313
./install.sh
1414
cp ~/.config/code-assistant-manager/providers.json.bak ~/.config/code-assistant-manager/providers.json
15-
```
15+
```

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ CAM solves this by providing a single, consistent interface to manage everything
3232
- **MCP Registry:** Built-in registry with **381 pre-configured MCP servers** ready to install across all supported tools.
3333
- **Extensible Framework:** Standardized architecture for managing:
3434
- **Agents:** Standalone assistant configurations (markdown-based with YAML front matter).
35-
- **Prompts:** Reusable system prompts synced across assistants at user or project scope.
35+
- **Prompts:** Reusable system prompts with fancy name generation synced across assistants at user or project scope.
3636
- **Skills:** Custom tools and functionalities for your agents (directory-based with SKILL.md).
3737
- **Plugins:** Marketplace extensions for supported assistants (GitHub repos or local paths).
3838
- **MCP Support:** First-class support for the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/), allowing assistants to connect to external data sources and tools.
@@ -206,11 +206,13 @@ cam agent repos # Manage agent repositories
206206
### Prompt Subcommands
207207

208208
```bash
209-
cam prompt list # List saved prompts
210-
cam prompt create # Create a new prompt
211-
cam prompt sync <id> <tool> # Sync a prompt to a tool
212-
cam prompt set-default <id> # Set default prompt for sync-all
213-
cam prompt sync-all # Sync default prompt to all tools
209+
cam prompt list # List all saved prompts
210+
cam prompt add [NAME] -f FILE # Add prompt (auto-generates fancy name ✨)
211+
cam prompt update NAME -f FILE # Update prompt content, name, or settings
212+
cam prompt import --app claude # Import from live app files (fancy names ✨)
213+
cam prompt install NAME --app claude # Install prompt to app files
214+
cam prompt remove NAME # Remove a prompt
215+
cam prompt status # Show where prompts are installed with file paths
214216
```
215217

216218
### Skill Subcommands

code_assistant_manager/cli/completion_commands.py

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def _generate_bash_completion() -> str:
9494
config_commands="validate list ls l"
9595
9696
# Prompt subcommands
97-
prompt_commands="list view create update delete sync import-live show-live import export unsync status"
97+
prompt_commands="list show add update remove import install uninstall status"
9898
9999
# Plugin subcommands
100100
plugin_commands="marketplace list repos add-repo remove-repo install uninstall enable disable validate browse view status"
@@ -275,36 +275,36 @@ def _generate_bash_completion() -> str:
275275
COMPREPLY=( $(compgen -W "--help" -- ${cur}) )
276276
return 0
277277
;;
278-
view|delete)
278+
show)
279279
COMPREPLY=( $(compgen -W "--help" -- ${cur}) )
280280
return 0
281281
;;
282-
create)
283-
COMPREPLY=( $(compgen -W "--title -t --content -c --description -d --tags --help" -- ${cur}) )
282+
add)
283+
COMPREPLY=( $(compgen -W "--file -f --description -d --default --no-default --help" -- ${cur}) )
284284
return 0
285285
;;
286286
update)
287-
COMPREPLY=( $(compgen -W "--title -t --content -c --description -d --tags --help" -- ${cur}) )
287+
COMPREPLY=( $(compgen -W "--file -f --description -d --name -n --default --no-default --help" -- ${cur}) )
288288
return 0
289289
;;
290-
sync)
291-
COMPREPLY=( $(compgen -W "--app-type -a --all --help" -- ${cur}) )
290+
remove)
291+
COMPREPLY=( $(compgen -W "--force -f --help" -- ${cur}) )
292292
return 0
293293
;;
294-
import-live|show-live)
295-
COMPREPLY=( $(compgen -W "--app-type -a --help" -- ${cur}) )
294+
import)
295+
COMPREPLY=( $(compgen -W "--app -a --level -l --project-dir -d --description --help" -- ${cur}) )
296296
return 0
297297
;;
298-
import|export)
299-
COMPREPLY=( $(compgen -W "--file -f --help" -- ${cur}) )
298+
install)
299+
COMPREPLY=( $(compgen -W "--app -a --level -l --project-dir -d --help" -- ${cur}) )
300300
return 0
301301
;;
302-
unsync)
303-
COMPREPLY=( $(compgen -W "--app-type -a --prompt-id -p --all --help" -- ${cur}) )
302+
uninstall)
303+
COMPREPLY=( $(compgen -W "--app -a --level -l --project-dir -d --force -f --help" -- ${cur}) )
304304
return 0
305305
;;
306306
status)
307-
COMPREPLY=( $(compgen -W "--level -l --help" -- ${cur}) )
307+
COMPREPLY=( $(compgen -W "--project-dir -d --help" -- ${cur}) )
308308
return 0
309309
;;
310310
esac
@@ -507,17 +507,14 @@ def _generate_zsh_completion() -> str:
507507
508508
prompt_commands=(
509509
'list:List all prompts'
510-
'view:View a specific prompt'
511-
'create:Create a new prompt'
512-
'update:Update an existing prompt'
513-
'delete:Delete a prompt'
514-
'sync:Sync prompts to editor clients'
515-
'import-live:Import prompts from live editor'
516-
'show-live:Show live prompts from editor'
517-
'import:Import prompts from file'
518-
'export:Export prompts to file'
519-
'unsync:Remove synced prompts from editors'
520-
'status:Show prompt sync status'
510+
'show:Show prompt content'
511+
'add:Add a new prompt (auto-generates fancy name)'
512+
'update:Update existing prompt'
513+
'remove:Remove a prompt'
514+
'import:Import from live app files (auto-generates fancy name)'
515+
'install:Install prompt to app files'
516+
'uninstall:Uninstall prompt from app files'
517+
'status:Show installation status'
521518
)
522519
523520
skill_commands=(
@@ -643,26 +640,29 @@ def _generate_zsh_completion() -> str:
643640
list)
644641
_values 'option' '--help[Show help]'
645642
;;
646-
view|delete)
643+
show)
647644
_values 'option' '--help[Show help]'
648645
;;
649-
create|update)
650-
_values 'option' '--title[Prompt title]' '--content[Prompt content]' '--description[Prompt description]' '--tags[Prompt tags]' '--help[Show help]'
646+
add)
647+
_values 'option' '--file[Prompt file]:file:_files' '--description[Prompt description]' '--default[Set as default]' '--no-default[Unset as default]' '--help[Show help]'
651648
;;
652-
sync)
653-
_values 'option' '--app-type[Application type]:app:(claude codex gemini qwen codebuddy)' '--all[Sync all prompts]' '--help[Show help]'
649+
update)
650+
_values 'option' '--file[Updated content file]:file:_files' '--description[Updated description]' '--name[New prompt name]' '--default[Set as default]' '--no-default[Unset as default]' '--help[Show help]'
654651
;;
655-
import-live|show-live)
656-
_values 'option' '--app-type[Application type]:app:(claude codex gemini qwen codebuddy)' '--help[Show help]'
652+
remove)
653+
_values 'option' '--force[Skip confirmation]' '--help[Show help]'
657654
;;
658-
import|export)
659-
_values 'option' '--file[File path]:file:_files' '--help[Show help]'
655+
import)
656+
_values 'option' '--app[Application type]:app:(claude codex gemini copilot codebuddy)' '--level[Level]:level:(user project)' '--project-dir[Project directory]:directory:_files -/' '--description[Prompt description]' '--help[Show help]'
657+
;;
658+
install)
659+
_values 'option' '--app[Application type]:app:(claude codex gemini copilot codebuddy)' '--level[Level]:level:(user project)' '--project-dir[Project directory]:directory:_files -/' '--help[Show help]'
660660
;;
661-
unsync)
662-
_values 'option' '--app-type[Application type]:app:(claude codex gemini qwen codebuddy)' '--prompt-id[Prompt ID]' '--all[Unsync all prompts]' '--help[Show help]'
661+
uninstall)
662+
_values 'option' '--app[Application type]:app:(claude codex gemini copilot codebuddy)' '--level[Level]:level:(user project)' '--project-dir[Project directory]:directory:_files -/' '--force[Skip confirmation]' '--help[Show help]'
663663
;;
664664
status)
665-
_values 'option' '--level[Status level]:level:(summary detailed)' '--help[Show help]'
665+
_values 'option' '--project-dir[Project directory]:directory:_files -/' '--help[Show help]'
666666
;;
667667
*)
668668
_values 'option' '--help[Show help]'

0 commit comments

Comments
 (0)