import_dotenv
Parses standard dotenv-formatted text and stores each key-value pair into the keyring. Use for migrating .env files or onboarding projects. Supports comments, quotes, and dry-run preview.
Instructions
[secrets] Parse standard dotenv-formatted text and store each key/value pair into the keyring in one batch. Use when migrating an existing .env file into q-ring or onboarding a new project; prefer set_secret for a single key, and teleport_unpack to import an encrypted bundle. Mutates the keyring (one write per parsed key) and emits a 'write' audit event for each. Supports comments, single/double quotes, and \n escapes. Returns a multiline summary listing imported keys and any skipped (existing) keys; in dryRun mode no writes happen and the same summary is produced for review.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | No | Where the secret lives. 'global' = user keyring (default if omitted on reads), 'project' = scoped to projectPath, 'team' = team-shared (needs teamId), 'org' = org-shared (needs orgId). | global |
| dryRun | No | If true, parse and report what would happen but do not write to the keyring. Useful for previewing imports before committing. | |
| content | Yes | Raw .env file content as a single string (newline-separated KEY=VALUE lines, comments allowed). | |
| projectPath | No | Absolute path to the project root for project-scoped secrets and policy resolution. Defaults to the MCP server's current working directory when omitted. | |
| skipExisting | No | If true, leave already-present keys untouched and add them to the 'skipped' list instead of overwriting. |