# os.getcwd

The `os.getcwd` function returns the script's current absolute execution directory. It is the same path returned by `fs.resolve(".")`.

## Usage

```python
os.getcwd()
```

The initial value is the script's configured working directory. [`os.chdir`](/functions/automation/os.chdir)
changes it for the rest of that invocation. This is script-local state; it does not change Atmos's host process directory.

## Examples

```python
original = os.getcwd()
os.chdir("scripts")
exec.run(["my-tool", "--version"])
os.chdir(original)
```

## Related

- [`os.chdir`](/functions/automation/os.chdir) changes the script's execution directory.
- [`fs.resolve`](/functions/automation/fs.resolve) resolves a path against that directory.
