# output()

Canonical URL: https://developers.iagenify.com/es/sdk/ref/compute-terminal/output/
Language: es

`terminal.output({ since? }) → Promise<OutputState>`

Read terminal output from a cursor and refresh its state.

```javascript
let cursor = 0;
const result = await terminal.output({ since: cursor });
process.stdout.write(result.text);
cursor = result.cursor;
```

| Name | Type | Requirement | Description |
| --- | --- | --- | --- |
| `since` | number |  | Output cursor to continue from. Defaults to `0` for all retained output. |

The response carries new text, the next cursor, terminal status, exit code and busy state. The instance's `status`, `busy`, `exitCode` and `cwd` are updated when returned by the API.

```python
import sys

cursor = 0
result = terminal.output(since=cursor)
sys.stdout.write(result["text"])
cursor = result["cursor"]
```
