---
title: "Write Text File"
description: "Local-first visual environment for building and running AI workflows. Build agents visually, deploy anywhere, privacy by design."
canonical: https://docs.nodetool.ai/nodes/lib/os/writetextfile
markdown: https://docs.nodetool.ai/nodes/lib/os/writetextfile.md
product: NodeTool
source: https://github.com/nodetool-ai/nodetool/blob/main/docs/nodes/lib/os/writetextfile.md
---

# Write Text File

**Type:** `lib.os.WriteTextFile`

**Namespace:** `lib.os`

## Description

Write text to a file in the workspace.
    os, file, write, text, save

## Properties

| Property | Type | Description | Default |
|----------|------|-------------|---------|
| path | `str` | Relative path to file within workspace | `` |
| content | `str` | Text content to write | `` |
| encoding | `str` | Text encoding (utf-8, ascii, etc.) | `utf-8` |
| append | `bool` | Append to file instead of overwriting | `false` |

## Outputs

| Output | Type | Description |
|--------|------|-------------|
| output | `str` |  |

## Related Nodes

Browse other nodes in the [lib.os](./) namespace.
