Workspace Linking
Linking projects together lets Clew Code treat multiple repositories as a single work surface. Links are bidirectional — linking A to B also links B to A, so switching between projects always shows the full group.
Commands
| Command | Description |
|---|---|
/workspace list | Show all linked projects and their load status |
/workspace link <path> | Link another project repository |
/workspace unlink <path> | Remove a link |
/workspace load | (Re)load all linked projects as working directories |
How linking works
/workspace link ../clew-api
→ Writes .clew/workspace.json in both repos
→ Adds target as a working directory for this session
→ Persists the working directory for future sessionsLinked projects appear as working directories in the permission system with a 🔗 linked badge.
Data storage
Each repo stores its links in:
<repo>/.clew/workspace.jsonjson
{
"version": 1,
"links": [
"/absolute/path/to/linked-project"
]
}Bidirectional linking
When you link A → B:
- A's
.clew/workspace.jsongets B added to itslinksarray - B's
.clew/workspace.jsongets A added to itslinksarray
Returning to either project loads the full group automatically.
Linked projects appear as working directories in the permission system with a 🔗 linked badge.
Session lifecycle
- On linking: the target is immediately added as a working directory so tools can access it
- On session start: linked dirs are checked for existence on disk; stale entries (deleted repos) are silently skipped
- On unlink: the working directory remains active for the current session (remove it with
/permissionsif needed)
Use cases
- Cross-repo refactoring — edit API and client in the same session
- Shared config — link your config repo with your app repo
- Documentation alongside code — pair
clew-docswithclew-code