@@ -546,7 +546,8 @@ redeployment.
546546
547547## RAG Knowledge Store Commands
548548
549- Commands for managing the RAG (Retrieval-Augmented Generation) knowledge store. These commands require RAG to be configured in your ` context.yaml ` .
549+ Commands for managing the RAG (Retrieval-Augmented Generation) knowledge store. These commands require RAG to be
550+ configured in your ` context.yaml ` .
550551
551552### Check RAG Status
552553
@@ -558,9 +559,9 @@ ctx rag:status
558559
559560#### Options
560561
561- | Option | Description |
562- | ----------| ------------------ |
563- | ` --json ` | Output as JSON |
562+ | Option | Description |
563+ | ----------| ----------------|
564+ | ` --json ` | Output as JSON |
564565
565566``` bash
566567ctx rag:status --json
@@ -576,12 +577,12 @@ ctx rag:index <path>
576577
577578#### Options
578579
579- | Option | Short | Default | Description |
580- | ---------------| -------| -----------| ------------------------------------------------ |
581- | ` --pattern ` | ` -p ` | ` *.md ` | File pattern (e.g., ` *.php ` , ` *.md ` ) |
582- | ` --type ` | ` -t ` | ` general ` | Document type (see below) |
583- | ` --recursive ` | ` -r ` | ` true ` | Search recursively |
584- | ` --dry-run ` | | ` false ` | Preview files without indexing |
580+ | Option | Short | Default | Description |
581+ | ---------------| -------| -----------| --------------------------------------|
582+ | ` --pattern ` | ` -p ` | ` *.md ` | File pattern (e.g., ` *.php ` , ` *.md ` ) |
583+ | ` --type ` | ` -t ` | ` general ` | Document type (see below) |
584+ | ` --recursive ` | ` -r ` | ` true ` | Search recursively |
585+ | ` --dry-run ` | | ` false ` | Preview files without indexing |
585586
586587** Document types:** ` architecture ` , ` api ` , ` testing ` , ` convention ` , ` tutorial ` , ` reference ` , ` general `
587588
@@ -611,9 +612,9 @@ ctx rag:clear
611612
612613#### Options
613614
614- | Option | Short | Description |
615- | -----------| -------| ----------------------------- |
616- | ` --force ` | ` -f ` | Skip confirmation prompt |
615+ | Option | Short | Description |
616+ | -----------| -------| --------------------------|
617+ | ` --force ` | ` -f ` | Skip confirmation prompt |
617618
618619``` bash
619620ctx rag:clear -f
@@ -629,12 +630,12 @@ ctx rag:reindex <path>
629630
630631#### Options
631632
632- | Option | Short | Default | Description |
633- | ---------------| -------| -----------| ----------------------------------- |
634- | ` --pattern ` | ` -p ` | ` *.md ` | File pattern |
635- | ` --type ` | ` -t ` | ` general ` | Document type |
636- | ` --recursive ` | ` -r ` | ` true ` | Search recursively |
637- | ` --force ` | ` -f ` | ` false ` | Skip confirmation prompt |
633+ | Option | Short | Default | Description |
634+ | ---------------| -------| -----------| --------------------------|
635+ | ` --pattern ` | ` -p ` | ` *.md ` | File pattern |
636+ | ` --type ` | ` -t ` | ` general ` | Document type |
637+ | ` --recursive ` | ` -r ` | ` true ` | Search recursively |
638+ | ` --force ` | ` -f ` | ` false ` | Skip confirmation prompt |
638639
639640#### Examples
640641
@@ -646,4 +647,140 @@ ctx rag:reindex docs -t reference
646647ctx rag:reindex docs -f
647648```
648649
649- > ** Note:** For detailed RAG configuration and MCP tool usage, see the [ RAG Knowledge Store] ( /mcp/rag ) documentation.
650+ > ** Note:** For detailed RAG configuration and MCP tool usage, see the [ RAG Knowledge Store] ( /mcp/rag ) documentation.
651+
652+ ## Project Management Commands
653+
654+ Commands for managing multiple projects. These allow you to register, switch between, list, and remove projects from the
655+ CTX registry.
656+
657+ > ** Note:** For detailed project management information, see the [ Dynamic Project Switching] ( /mcp/projects )
658+ > documentation.
659+
660+ ### Add a Project (` project:add ` )
661+
662+ Register a new project with the system:
663+
664+ ``` bash
665+ ctx project:add < path> [--name=< alias> ] [--config-file=< path> ] [--env-file=< path> ] [--switch]
666+ ```
667+
668+ #### Arguments
669+
670+ | Argument | Description |
671+ | ----------| ---------------------------------------------------------------|
672+ | ` path ` | Path to the project directory. Use ` . ` for current directory. |
673+
674+ #### Options
675+
676+ | Option | Short | Description |
677+ | -----------------| -------| ------------------------------------------------------|
678+ | ` --name ` | | Alias name for the project |
679+ | ` --config-file ` | ` -c ` | Path to custom configuration file within the project |
680+ | ` --env-file ` | ` -e ` | Path to .env file within the project |
681+ | ` --switch ` | ` -s ` | Switch to this project after adding it |
682+
683+ #### Examples
684+
685+ ``` bash
686+ # Add current directory as a project
687+ ctx project:add . --name=my-project
688+
689+ # Add with custom configuration
690+ ctx project:add /path/to/project --name=backend --env-file=.env.dev
691+
692+ # Add and switch to the project
693+ ctx project:add . --name=frontend --switch
694+ ```
695+
696+ ### Switch Project (` project ` )
697+
698+ Switch to a different registered project:
699+
700+ ``` bash
701+ ctx project [< path_or_alias> ]
702+ ```
703+
704+ #### Arguments
705+
706+ | Argument | Description |
707+ | -----------------| -------------------------------------------------------------------|
708+ | ` path_or_alias ` | Path or alias to the project. If omitted, shows interactive menu. |
709+
710+ #### Examples
711+
712+ ``` bash
713+ # Switch using alias
714+ ctx project my-backend
715+
716+ # Switch using path
717+ ctx project /path/to/project
718+
719+ # Interactive selection
720+ ctx project
721+ ```
722+
723+ ### List Projects (` project:list ` )
724+
725+ View all registered projects:
726+
727+ ``` bash
728+ ctx project:list
729+ # or
730+ ctx projects
731+ ```
732+
733+ #### Example Output
734+
735+ ```
736+ ╭─● CURRENT ─────────────────────────────────────────────────────────╮
737+ │ /home/user/projects/my-app
738+ │ Aliases: my-app
739+ │ Added: Jan 18, 2025
740+ ╰────────────────────────────────────────────────────────────────────╯
741+
742+ ╭─○──────────────────────────────────────────────────────────────────╮
743+ │ /home/user/projects/backend
744+ │ Aliases: backend
745+ │ Added: Jan 15, 2025
746+ ╰────────────────────────────────────────────────────────────────────╯
747+
748+ Commands:
749+ ctx project <path|alias> Switch to a project
750+ ctx project:add <path> Add a new project
751+ ctx project:remove <path|alias> Remove a project
752+ ```
753+
754+ ### Remove a Project (` project:remove ` )
755+
756+ Remove a project from the registry:
757+
758+ ``` bash
759+ ctx project:remove [< path_or_alias> ] [--force]
760+ ```
761+
762+ #### Arguments
763+
764+ | Argument | Description |
765+ | -----------------| -------------------------------------------------------------------|
766+ | ` path_or_alias ` | Path or alias to the project. If omitted, shows interactive menu. |
767+
768+ #### Options
769+
770+ | Option | Short | Description |
771+ | ------------------| -------| ----------------------------------------------|
772+ | ` --force ` | ` -f ` | Skip confirmation prompt |
773+ | ` --keep-aliases ` | | Keep aliases when removing (not recommended) |
774+
775+ #### Examples
776+
777+ ``` bash
778+ # Remove by alias
779+ ctx project:remove my-backend
780+
781+ # Remove without confirmation
782+ ctx project:remove old-project --force
783+
784+ # Interactive selection
785+ ctx project:remove
786+ ```
0 commit comments