多套 Profile 的日常使用
工作與個人帳號需要分開時,建立不同 Profile。每套 Profile 獨立擁有 Home、Workspace、資料庫、工作階段、記憶、Soul、Roles、模型認證資料、Tools、Skills、MCP、Channels、Cron 與 Secrets,不自動共享。只想換助理口吻,用 Role。
建立後先明確選用
Dashboard Profile → New Profile 可填寫 ID 與顯示名。CLI 的對應操作:
anyy profile create office --display-name "工作"
anyy profile get office
anyy profile list
anyy profile use office
ID 最長 64 字元,以小寫字母/數字開頭,其他位置允許小寫字母、數字、-、_;部分指令名被保留。新環境先產生目錄、Workspace、空白使用者/記憶檔案、預設 Role 和設定;狀態資料庫在執行環境首次使用時建立。
profile use 寫入已記住的 Profile 選擇,只影響後續未明確指定環境的指令。它不會移動目前 Dashboard,也不會停止其他已執行 Profile。
anyy --profile office dashboard
anyy --profile office status
anyy --profile office gateway stop
anyy --profile office gateway start
Home 解析與目錄
| 輸入 | 解析規則 |
|---|---|
顯式 --home PATH | 單獨使用時直接選擇該目錄 |
顯式 --profile NAME | 按目前根目錄解析具名環境 |
| 都沒指定 | 先 ANYY_HOME,再已記住的 Profile 選擇,最後 default |
顯式 Home 與 Profile 不能同用。基礎 Home 就是 default,其他環境位於 BASE_HOME/profiles/NAME;--profile-root 指向 BASE_HOME,不是 profiles 子目錄。在另一 Root 下建立的環境不會自動出現。
在網頁完成切換
目標詳情點 Start and switch/Switch to,依次選擇 Profile、啟動或找到 Gateway、綁定資料,接著切換頁面。Current runtime、Running、Stopped 分別表示本頁連線、另一套執行中、未發現活動執行環境。
切換不遷移任何資料。完成後用 About 核對 Home,確認工作階段、模型、記憶、Channels、Skills、MCP 和 Cron 都來自目標環境。
刪除前的最後檢查
先驗證備份,切到另一環境,並確保目標既不是 default,也不是已記住的 Profile 選擇且已停止。Dashboard 不允許刪除目前環境;CLI 要明確帶參數:
anyy profile delete office --force --purge-secrets
--force 必需;存在 Secrets 卻不帶 --purge-secrets 會被拒絕。刪除會清除整個 Home,不是封存,也沒有復原按鈕。停止只結束執行環境、保留資料,兩者不要混用。
還原壓縮檔可以直接指定新 Home 執行,或復原到標準具名路徑後選擇;沒有任意目錄 import/register 指令,詳見復原步驟。