Files & Projects

Manage Environment Variables and Project Secrets

By TermSquad · Last reviewed

Configure environment variables using your project’s documented method. TermSquad’s Files page is a file editor, not a dedicated secrets vault.

Set a non-secret shell variable

In the terminal where you will start the application:

export APP_ENV=development

That variable is available to processes started from the shell. It does not automatically appear in an already running process, another pane, or a new SSH session.

For persistent configuration, use the project or service’s supported environment mechanism.

Use an environment file when supported

  1. Read the repository’s setup instructions.
  2. Copy its example configuration only if the project instructs you to do so.
  3. Fill in the required values locally on the computer.
  4. Check that secret-bearing files are excluded from Git.
  5. Restart the application as required to load the changes.

An .env file is read only if the framework or startup command supports it. Its name alone does not make it encrypted or private.

Before committing, use git status and inspect the staged diff. Adding a file to .gitignore does not remove it from Git if it was already tracked.

Handle credentials carefully

Keep secrets out of agent prompts, shared memory, screenshots, and support reports. Files readable by an agent may be accessible to its tools, so consider what credentials the project actually needs.

If a secret is exposed, revoke or rotate it with the provider. Deleting the visible text does not undo exposure.

See AI credentials and computer security.