configure-env-var

configure-env-var is a command for coding agents from atxp-dev/claude. It costs 12 tokens per session (1,282 once invoked), scanned B, original, MIT.

A command for setting an environment variable—a configuration value available to software while it runs—in a deployed agent.

In plain words
What is it for?
Use it to add or update non-empty configuration values before deploying an agent to cloud.atxp.ai.
Why use it?
It stores the value in the production environment file used by the next deployment, so the deployed agent can access settings such as service API keys.

Command

Part of the cloud plugin — 5 commands shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/atxp-dev/claude/configure-env-var
Clone the repo
git clone --depth 1 https://github.com/atxp-dev/claude

Or install cloud, the plugin that ships this one along with the rest of its 5 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for configure-env-var

README.md
[![agentmods](https://agentmods.dev/badge/commands/atxp-dev/claude/configure-env-var.svg)](https://agentmods.dev/commands/atxp-dev/claude/configure-env-var)
Your own site
<a href="https://agentmods.dev/commands/atxp-dev/claude/configure-env-var"><img src="https://agentmods.dev/badge/commands/atxp-dev/claude/configure-env-var.svg" alt="Measured on agentmods" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,282 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00012 $0.01282
Opus 5 $0.00006 $0.00641
Sonnet 5 $0.00002 $0.00256
Haiku 4.5 $0.00001 $0.00128

Measured 3d ago against content hash c234e86e706e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

configure-env-var scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

chmod 600 "$ENV_FILE"
cloud/commands/configure-env-var.md · 169 lines

How it starts

The opening of the file, as written. The whole thing — 169 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Sets an environment variable by writing it to .atxp/.env.production, which is included in deployments to cloud.atxp.ai.

Usage

/configure-env-var KEY VALUE

Replace KEY with your environment variable name and VALUE with its value.

Examples

Set API keys for external services:

/configure-env-var GOOGLE_ANALYTICS_API_KEY ya29.a0AfH6SMBx...
/configure-env-var GOOGLE_SEARCH_CONSOLE_KEY AIzaSyC...
/configure-env-var DATAFORSEO_API_KEY 12345678-1234-1234-1234-123456789abc

How it works

  1. Creates .atxp/.env.production if it doesn't exist
  2. Adds or updates the environment variable in KEY=VALUE format
  3. Sets file permissions to 600 (owner read/write only)
  4. The file will be included in your next /deploy
  5. Your deployed agent can access these variables at runtime

Requirements

  • Bash 3.2+ (default on macOS and most Linux distributions)
  • Write access to current directory

Value Handling

  • Empty values: Not allowed. Use /remove-env-var to delete variables.
  • Values with spaces: Fully supported (e.g., "Hello World")
  • Values with special characters: Supported including =, :, /, etc.
  • Multiline values: Not supported. Use base64 encoding if needed.

Implementation

#!/bin/bash

# Parse arguments
if [ "$#" -lt 2 ]; then
    echo "Usage: /configure-env-var KEY VALUE"
    echo "Example: /configure-env-var API_KEY abc123"
    exit 1
fi

KEY="$1"
shift
VALUE="$*"

# Validate key format (alphanumeric and underscore only)
if ! echo "$KEY" | grep -qE '^[A-Za-z_][A-Za-z0-9_]*$'; then
    echo "Error: KEY must start with a letter or underscore and contain only alphanumeric characters and underscores"
    exit 1
fi

# Create .atxp directory if it doesn't exist
mkdir -p .atxp

ENV_FILE=".atxp/.env.production"

# Create or update the env file
if [ -f "$ENV_FILE" ]; then
    # File exists, check if key already exists
    if grep -q "^${KEY}=" "$ENV_FILE"; then
        # Update existing key
        # Use a temporary file for safety
        TEMP_FILE=$(mktemp) || {
            echo "Error: Failed to create temporary file"
            exit 1
        }
        while IFS= read -r line; do
            if [[ "$line" =~ ^${KEY}= ]]; then
                echo "${KEY}=${VALUE}"
            else
                echo "$line"
            fi
        done < "$ENV_FILE" > "$TEMP_FILE"
        mv "$TEMP_FILE" "$ENV_FILE"
        echo "✓ Updated ${KEY} in ${ENV_FILE}"
    else
        # Append new key
        echo "${KEY}=${VALUE}" >> "$ENV_FILE"
        echo "✓ Added ${KEY} to ${ENV_FILE}"
    fi
else
    # Create new file
    echo "${KEY}=${VALUE}" > "$ENV_FILE"
    chmod 600 "$ENV_FILE"
    echo "✓ Created ${ENV_FILE} with ${KEY}"
fi

# Ensure restrictive permissions on existing file
chmod 600 "$ENV_FILE" 2>/dev/null || true

# Check if .gitignore exists and contains the env file
GITIGNORE_WARNED=false
if [ -f ".gitignore" ]; then
    if ! grep -qF ".atxp/.env.production" .gitignore; then
        GITIGNORE_WARNED=true
    fi
else
    GITIGNORE_WARNED=true
fi

if [ "$GITIGNORE_WARNED" = true ]; then
    echo ""
    echo "⚠️  SECURITY WARNING: Add .atxp/.env.production to your .gitignore"
    echo "   Run: echo '.atxp/.env.production' >> .gitignore"
fi

echo ""
echo "Next steps:"
echo "  1. Review variables: /list-env-vars"
echo "  2. Deploy your agent: /deploy"

Read the full file on GitHub · 169 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 169 lines · 12 tokens per session scan B c234e86e706e

Subscribe to this mod's changes

configure-env-var is a command published in the GitHub repository atxp-dev/claude (2 stars, last pushed 9mo ago), licensed MIT. It adds 12 tokens to every session and 1,282 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.