# EnvTracker

**Kind:** Class

**Source:** [`atloria-monorepo/libs/agent-core/src/tools/env-tracker.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/libs/agent-core/src/tools/env-tracker.ts#L70)

## Methods

| Method | Signature | Returns |
|---|---|---|
| `isEnvModifyingCommand` | `isEnvModifyingCommand(command: string)` | `boolean` |
| `capture` | `capture()` | `Promise<EnvSnapshot>` |
| `getSnapshot` | `getSnapshot()` | `EnvSnapshot | null` |
| `getChanges` | `getChanges()` | `Record<string, { from?: string; to: string }>` |
| `formatForContext` | `formatForContext()` | `string` |
| `getCaptureCount` | `getCaptureCount()` | `number` |

## Where it refuses work

- `EnvTracker` stops the work with an early return when `!this.currentSnapshot`, in 2 places.

## When something fails

- `EnvTracker` handles failure in 1 place: it discards it silently in all 1.
