--- name: asiri description: "Use when an agent needs to operate Asiri CLI or Asiri-managed secrets: inspect secret metadata, run commands with scoped secrets, add or rotate operational secrets, manage human member access, push or pull encrypted records, configure service-account runtime access for CI or servers, or diagnose Asiri workspace/device state without exposing secret values. Focus on safe operational use first; use trust, recovery, rekey, revocation, member access, service-account setup, and remote policy changes only when explicitly requested." --- # Asiri Asiri is a secrets access layer. Treat it as the source of operational secrets and the local runtime that uses them without copying values into agent context. ## Core Rules - Never print, paste, log, summarize, or store secret values. - Prefer metadata-only checks: list workspaces, list secret names, check status, inspect audit. - Use exactly one `--workspace ` on hosted workspace-scoped commands. Human account/device sessions never select or switch an active CLI workspace. - Require an explicit canonical slug or alias for local and hosted secret listing. If a fresh offline vault has no workspace, guide the user to `asiri workspace create `. - Use exact workspace slugs and secret paths from the user or from `asiri workspace list` / `asiri list`. - Prefer `asiri env` or `asiri mount` over raw reads. - Use raw reads only when the user explicitly asks and the authenticated identity is allowed to read; redirect verification reads to `/dev/null`. - Treat `--label` as audit metadata only. A label never grants or denies access. `--agent` is a compatibility alias for `--label`. - Treat strict audit failures as hard stops. Do not retry, bypass, copy, or expose the secret through another path when Asiri says audit ack is required before release. - Stop before changing trust, device, recovery, rekey, or local key material unless the user explicitly asked for that repair. - If Asiri reports missing platform key material, keyring errors, duplicated devices, unknown trust, or recovery problems, report the state and ask before mutating anything. ## First Check Start routine work by discovering the visible workspaces: ```sh asiri workspace list ``` Do not run `asiri --version` or `asiri setup doctor` routinely. Use them only when troubleshooting installation, configuration, authentication, trust, key material, or unexpected CLI behavior. If the user named a workspace, confirm it is visible above, then inspect its secret metadata: ```sh asiri list --workspace ``` `asiri list --workspace ` is safe for normal inspection. It shows names, hashes, sync state, and write status. It does not print plaintext. ## Workspace Identity Treat the canonical slug as the immutable storage, encryption, binding, and sync identity. Treat an alias as a user-scoped CLI shortcut. Aliases may repeat across users but must be unique within one user's visible workspaces. Offline users can create any valid local workspace slug: ```sh asiri workspace create ``` Do not require local workspace creation before control-plane sign-in. Signup creates the verified-email personal workspace, which remains the account default and is listed first. Local workspace creation and sync never change that default. Continue to pass `--workspace` explicitly to every workspace-scoped command. On first push, Asiri assigns a canonical slug with an eight-character suffix, atomically re-encrypts the local workspace under it, and retains the former local slug as that user's alias unless the user already selected another local alias. If first sync fails during local migration, preserve the vault and key material and retry the same workspace; its stable local ID makes remote provisioning idempotent. Set or change the signed-in user's alias without changing canonical identity: ```sh asiri workspace alias set --workspace ``` Never infer workspace identity from an alias or rewrite an existing hosted canonical slug. New devices store canonical slugs and receive the signed-in user's aliases for CLI resolution. ## Use A Secret Prefer environment injection for tools that read environment variables: ```sh asiri env --workspace -- ``` For a group of direct child secrets under one scope: ```sh asiri env --workspace -- ``` Prefer temporary files for tools that read Docker-style secret files: ```sh asiri mount --workspace -- ``` Use an explicit audit label when the audit record should differ from the child command name. It never changes authorization: ```sh asiri env --workspace --label