Skip to content
This repository was archived by the owner on Jul 23, 2025. It is now read-only.

Commit a02669d

Browse files
committed
Language and style updates, add rename command
1 parent b215677 commit a02669d

File tree

1 file changed

+109
-68
lines changed

1 file changed

+109
-68
lines changed

docs/features/workspaces.md

Lines changed: 109 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,135 +1,176 @@
11
---
22
title: Workspaces
3-
description: Codegate workspaces
3+
description: Organize and customize your project environments
44
sidebar_position: 40
55
---
66

77
## Overview
88

9-
The "Workspaces" feature in CodeGate is designed to help users organize and
10-
customize their interactions with large language models (LLMs). Each workspace
11-
acts as a distinct environment with its own configurations and resources,
12-
allowing for personalized settings and efficient management of different
13-
projects or tasks.
9+
_Workspaces_ in CodeGate allow you to organize and customize your interactions
10+
with large language models (LLMs). Each workspace is a distinct environment with
11+
its own configurations and resources, enabling personalized settings and
12+
efficient management of different projects or tasks.
1413

15-
## Key Features
14+
## Key features
1615

17-
- **Custom Configurations**: Each workspace can have its own settings and system
16+
- **Custom configurations**: Each workspace can have its own settings and system
1817
prompts for interacting with LLMs, enabling tailored responses and behaviors.
19-
- **Resource Management**: Workspaces act as containers for bucketing resources
20-
within CodeGate, making it easier to manage and switch between different projects.
21-
- **Isolation and Independence**: Configurations in one workspace do not affect
18+
- **Resource management**: Workspaces act as containers for organizing resources
19+
within CodeGate, making it easier to manage and switch between different
20+
projects.
21+
- **Isolation and independence**: Configurations in one workspace do not affect
2222
others, providing clarity and precision in how settings are applied.
2323

24-
## Working with Workspaces
24+
## Working with workspaces
2525

26-
### Creating a Workspace
26+
:::info Default workspace
2727

28-
To create a new workspace, use the following command from your chat prompt interface:
28+
CodeGate ships with a default workspace named `default`. This workspace cannot
29+
be renamed, archived, or deleted.
2930

30-
```bash
31-
codegate workspace add $NAME
31+
:::
32+
33+
You can manage workspaces using `codegate workspace` commands sent through your
34+
AI assistant's chat interface. To see all available commands:
35+
36+
```plain
37+
codegate workspace -h
3238
```
3339

34-
This initializes a new workspace with the specified name.
40+
:::note
3541

36-
Note that workspace names may only contain alphanumeric characters with dashes.
42+
Currently, workspaces are not shown in the CodeGate dashboard. Stay tuned!
3743

38-
### Switching Workspaces
44+
:::
3945

40-
To switch between workspaces, you can activate a different workspace by using:
46+
### Create a workspace {#add}
4147

42-
```bash
43-
codegate workspace activate $NAME
48+
To create a new workspace:
49+
50+
```plain
51+
codegate workspace add WORKSPACE_NAME
4452
```
4553

46-
The active workspace is the current environment for commands and configurations.
54+
Replace `WORKSPACE_NAME` with a name for the new workspace. Names can only
55+
contain alphanumeric characters, hyphens (`-`), and underscores (`_`).
4756

48-
### Listing Workspaces
57+
:::note
4958

50-
For a quickly accessible overview of all workspaces, including which is currently
51-
active, use:
59+
Workspace names are case-sensitive.
5260

53-
```bash
61+
:::
62+
63+
### List workspaces {#list}
64+
65+
Get a list of all non-archived workspaces:
66+
67+
```plain
5468
codegate workspace list
5569
```
5670

57-
### Customizing System Prompts
71+
The currently active workspace is indicated as **(active)** in the list.
5872

59-
One of the key advantages of workspaces is the ability to set a custom system
60-
prompt. This can be done using the following command:
73+
### Activate a workspace {#activate}
6174

62-
```bash
63-
codegate system-prompt -w $WORKSPACE_NAME set $SYSTEM_PROMPT
75+
Switch between workspaces using the `activate` command. The active workspace is
76+
the current environment for commands and configuration.
77+
78+
```plain
79+
codegate workspace activate WORKSPACE_NAME
6480
```
6581

66-
Replace `$WORKSPACE_NAME` with your desired workspace and `$SYSTEM_PROMPT` with
67-
your custom prompt text.
82+
Replace `WORKSPACE_NAME` with the name of the workspace to activate
83+
(case-sensitive).
6884

69-
Note that if you don't specify a workspace explicitly, the command will take an
70-
the active workspace into use.
85+
### Customize the system prompt {#system-prompt}
7186

72-
#### Example
87+
One of the key advantages of workspaces is the ability to customize the system
88+
prompt with extra project-specific context or instructions.
7389

74-
Suppose you want to set a custom system prompt for a workspace named "project-alpha":
90+
```plain
91+
codegate system-prompt [-w WORKSPACE_NAME] set SYSTEM_PROMPT
92+
```
7593

76-
```bash
94+
Replace `SYSTEM_PROMPT` with your custom prompt text.
95+
96+
Optionally, specify the workspace to modify with `-w WORKSPACE_NAME`. If you
97+
don't explicitly set a workspace, the currently active workspace is modified.
98+
99+
**Example**: Set a custom system prompt for the workspace named "project-alpha":
100+
101+
```plain
77102
codegate system-prompt -w project-alpha set Start each conversation with "Welcome to Project Alpha Assistant. How can I help today?"
78103
```
79104

80-
This will enhance your prompt when you're working in that workspace.
105+
### Rename a workspace {#rename}
81106

82-
### Archiving a workspace
107+
To change the name of an existing workspace:
83108

84-
In order to "archive" a workspace, use the following command in your prompt:
109+
```plain
110+
codegate workspace rename WORKSPACE_NAME NEW_WORKSPACE_NAME
111+
```
85112

86-
```bash
87-
codegate workspace remove $WORKSPACE_NAME
113+
Replace `WORKSPACE_NAME` with the current name of the workspace, and
114+
`NEW_WORKSPACE_NAME` with the new name to set.
115+
116+
### Archive a workspace {#archive}
117+
118+
You can mark a workspace as archived without permanently deleting it. This is
119+
useful in situations when you are not actively working on a project but may want
120+
to come back to it later.
121+
122+
```plain
123+
codegate workspace remove WORKSPACE_NAME
88124
```
89125

90-
This will not fully delete the workspace, but will set it in "archived mode". You
91-
may still recover an archived workspace.
126+
Replace `WORKSPACE_NAME` with the name of the workspace to archive. Archived
127+
workspaces can be [restored](#restore) later or [permanently deleted](#delete).
92128

93-
### Listing Archived Workspaces
129+
### List archived workspaces {#list-archived}
94130

95-
To view a list of all archived workspaces, use the following command:
131+
Get a list of all archived workspaces:
96132

97-
```bash
133+
```plain
98134
codegate workspace list-archived
99135
```
100136

101-
This command will display all workspaces that have been archived, allowing you
102-
to review which projects are stored for potential future use.
137+
Archived workspaces can be [restored](#restore) or
138+
[permanently deleted](#delete), but cannot be activated.
103139

104-
### Restoring an Archived Workspace
140+
### Restore an archived workspace {#restore}
105141

106-
If you need to reactivate an archived workspace, you can restore it using the
107-
following command:
142+
Use the `restore` command to recover an [archived](#archive) workspace. Once
143+
restored, a workspace will appear in your available [workspace list](#list) and
144+
can be [activated](#activate).
108145

109146
```bash
110-
codegate workspace restore $WORKSPACE_NAME
147+
codegate workspace restore WORKSPACE_NAME
111148
```
112149

113-
Replace `$WORKSPACE_NAME` with the name of the workspace you wish to restore.
114-
Once restored, it will appear in your active workspace list.
150+
Replace `WORKSPACE_NAME` with the name of the workspace to restore.
115151

116-
### Deleting an Archived Workspace
152+
### Permanently delete a workspace {#delete}
117153

118-
In cases where an archived workspace is no longer needed and can be safely removed,
119-
you can permanently delete it with:
154+
The `delete-archived` command permanently deletes an archived workspace.
120155

121156
```bash
122-
codegate workspace delete-archived $WORKSPACE_NAME
157+
codegate workspace delete-archived WORKSPACE_NAME
123158
```
124159

125-
Make sure to double-check before executing this command, as it will permanently
126-
remove the specified workspace from your system.
160+
Replace `WORKSPACE_NAME` with the name of the workspace to delete.
161+
162+
:::warning
163+
164+
Deletion is permanent. Ensure that the workspace is no longer needed and can be
165+
safely removed. There is no confirmation when you run this command.
166+
167+
:::
127168

128-
## Best Practices
169+
## Recommendations
129170

130-
- Utilize workspaces to separate different projects or objectives, ensuring each
131-
has a dedicated configuration.
132-
- Regularly review and update the system prompts to align with the evolving needs
133-
of your projects.
171+
- Use workspaces to separate different projects or objectives, ensuring each has
172+
a dedicated configuration.
173+
- Regularly review and update the system prompts to align with the evolving
174+
needs of your projects.
134175
- Use resource bucketing to keep assets organized and easily accessible within
135176
their respective workspaces.

0 commit comments

Comments
 (0)