# Terminal Window

### Terminal in Nimbalyst

Nimbalyst enables you to run a Ghostty-powered terminal directly within Nimbalyst. You can create multiple terminal sessions, each running independently in your workspace directory. Terminal sessions persist across app restarts, so your command output is preserved.<br>

<figure><img src="/files/CagY2lPTvKlfaUe1tNDp" alt=""><figcaption></figcaption></figure>

### Opening and Closing the Terminal

Open and close the terminal from the terminal icon on the left nav or with the command key

You can have multiple terminals by clicking the + and making a new terminal tab

<figure><img src="/files/81CYbdX5WS4Ct0cY6FdT" alt=""><figcaption></figcaption></figure>

### Using the Terminal

Type commands and press Enter to run them. The terminal works like any standard shell:

* Run commands: `ls`, `git status`, `npm install`, etc.
* Navigate directories: `cd folder`
* Use tab completion (depends on your shell)
* Access command history with up/down arrow keys

#### Shell Detection

Nimbalyst automatically detects and uses your system shell:

| Platform | Default Shell       |
| -------- | ------------------- |
| macOS    | zsh (or bash)       |
| Linux    | bash (or zsh, fish) |
| Windows  | PowerShell (or cmd) |

#### Scrollback Buffer

Your terminal output is preserved (up to 500KB). When you reopen a terminal session:

* Previous output is restored
* You can scroll back through command history
* A new shell process starts in the same directory

#### Command History

* Each terminal maintains its own command history file. Your shell's history (accessed via up/down arrows) persists across sessions.
* **Note**: Fish shell and Windows cmd have limited history persistence.

#### Process Management

* **Running process**: Commands run until complete or until you stop them with Ctrl+C
* **Process exit**: If the shell exits, press Enter to restart it
* **App quit**: When you close Nimbalyst, all terminal processes are stopped and scrollback is saved

### Worktrees

* Each worktree has a dedicated terminal button for quick access and separated work
* Each terminal session persists with its own storage

### Tips

* **Working directory**: Each terminal starts in your workspace folder
* **Copy/paste**: Use your normal system shortcuts (Cmd+C/Cmd+V on Mac, Ctrl+C/Ctrl+V on Windows/Linux)
* **Clear screen**: Use `clear` or Ctrl+L to clear the terminal
* Environment variables set during a session don't persist to new sessions


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nimbalyst.com/developer-features/terminal-window.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
