CLI¶
Source format¶
- GitHub:
org/repoororg/repo@ref(branch/tag). Resolved to the repository;refis used for checkout. - Local:
./pathor/absolute/path. Roles are copied from the path; no git.
Install¶
Commands¶
Add roles from GitHub¶
Without --yes, add and update ask before overwriting existing files.
Add roles from a local path¶
Render to a specific target¶
List installed roles¶
Check unmanaged files¶
Clean unmanaged files¶
Update a GitHub source¶
Remove a role¶
Command model¶
addfetches a source, validates role topology, installs canonical files, and auto-renders when targets are explicit or detectableaddis interactive by default;--yesskips install and overwrite promptsrenderregenerates target outputs from merged canonical roles, with project scope overriding user scopelistshows installed roles for one scope at a time; use-gfor user scope and--jsonfor machine-readable outputremovedeletes the canonical file from one scope; target outputs can then be regenerated withrenderdoctorreports unmanaged files in the selected roles directorycleanremoves unmanaged files from the selected roles directoryupdatereuses theaddflow for non-local sources and also supports-g
Target detection¶
When --target is omitted, role-forge detects supported tools from project markers:
- Claude Code:
.claude/orCLAUDE.md - OpenCode:
.opencode/oropencode.json - Cursor:
.cursor/or.cursorrules - Windsurf:
.windsurf/or.windsurfrules
Behavior notes¶
- Overwrite: Without
--yes,addandupdateprompt before overwriting existing roles. - Update: Only non-local sources can be updated; local paths must be re-added.
- Remove: Deletes the canonical role file only; run
renderto regenerate target outputs or clean up platform dirs. - Scope: Project scope uses
roles_dirfromroles.toml(default.agents/roles/); user scope uses~/.agents/roles/(see configuration).