Terminal
The Codevre terminal runs a shell on Nodepod. Covers multiple terminals, the command input, history, keyboard shortcuts and Codevre's own commands.
On this page
Open the terminal with Ctrl+\** or **View ▸ Terminal**. **Ctrl+Shift+\ opens another one.
How it runs
Link to “How it runs”The shell runs on Nodepod, in a hidden runtime frame on preview.codevre.dev. Commands you type run on your device, in the browser:
node,npm,npxandgitare available- a bash-like shell with pipes (
|), redirects (>),&&chains and variables - common commands such as
ls,cd,cat,grep,find,sed,mkdir,rm,cp,mv
It's not a Linux machine. Some things a real OS provides don't exist. See What works in Nodepod.
Every new terminal starts in the project folder, even if another terminal has cd-ed elsewhere. The prompt looks like:
my-project:~/src$~ is the project root. Paths outside the project, such as /tmp, show in full.
Multiple terminals
Link to “Multiple terminals”- + (New terminal) opens another session:
Terminal 1,Terminal 2, … - With two or more, a list appears on the right. Click to switch, double-click to rename, use the trash icon or middle-click to close. Drag its edge to resize it.
- Closing a terminal ends what it was running. Codevre sends Ctrl+C first so servers shut down cleanly, and closes that server's Browser tabs.
The terminal view
Link to “The terminal view”Output is drawn as real text, so you can select it, double-click words, use Ctrl+F (the browser's Find) and click links. VS Code-style extras:
- Command markers: a dot beside each command you ran. Solid means finished; a pulsing hollow dot means still running. Click it for Copy Command, Copy Output or Rerun Command.
- Sticky header: when you scroll through long output, the command that produced it stays pinned at the top. Click it to jump there.
- Overview ruler: in place of a scrollbar, with ticks for commands (blue), errors (red) and warnings (yellow). Click or drag to scroll.
Right-click for Copy, Paste, Select All, Clear, Previous/Next Command, Interrupt, and link actions.
Keyboard
Link to “Keyboard”| Keys | Action |
|---|---|
| Ctrl+C | Copy if text is selected, otherwise interrupt the running program |
| Ctrl+Shift+C | Copy |
| Ctrl+V | Paste (multi-line is fine; nothing runs until you press Enter) |
| Ctrl+Shift+A (Cmd+A on Mac) | Select all |
| Ctrl+A / Ctrl+E | Start / end of line |
| Cmd+K (Mac) | Clear |
| Ctrl+↑ / Ctrl+↓ | Jump to previous / next command |
| Shift+Page Up / Page Down | Scroll |
Keys the shell handles, like Ctrl+C, are captured while the terminal has focus, so app shortcuts such as Ctrl+W and Ctrl+B don't fire by accident.
The command input
Link to “The command input”On some setups a command input appears under the terminal. It's handy on touch screens and for pasting.
- Enter runs; Shift+Enter adds a line. Multi-line input runs one line at a time, waiting for the prompt between lines.
- Autosuggestions from your history appear as ghost text, preferring commands you ran in the same folder. →, End or Tab accepts; Ctrl/Alt+→ accepts one word; Esc dismisses.
- ↑/↓ with text typed cycles through earlier commands that start with that text.
- With the input empty, Ctrl+D, Ctrl+Z, Ctrl+L, Ctrl+R and the arrow keys go to the shell.
Command history
Link to “Command history”The clock button opens your command history for this project: the command, the folder it ran in and when.
- Click to run again; Shift+click inserts it without running. Filter with the search box.
- Up to 300 commands per project are kept, and saved with the project.
- Only commands typed at the prompt are recorded, not answers you type into a running program.
- Clear history removes them.
Codevre commands
Link to “Codevre commands”Codevre installs two commands in /usr/local/bin, outside your project, so they never appear in the Explorer or get saved. They also work inside npm scripts and && chains.
Controls the localhost:codevre preview:
vre run [entry.html] start or rerun the preview (aliases: dev, preview, start, serve)
vre reload [entry.html] rerun without saving the active editor (aliases: refresh, restart)
vre stop stop the preview
vre status log status to the browser console
vre gh auth login|logout same as gh authA small stand-in for the GitHub CLI. Only authentication is supported:
gh auth login connect GitHub (opens a sign-in tab)
gh auth status ✓ Logged in to github.com via Codevre
gh auth logout disconnectOther gh commands print gh: only 'gh auth' commands are currently supported in Codevre.
Environment
Link to “Environment”| Variable | Value |
|---|---|
CODEVRE_PROJECT_ROOT | The project folder |
CODEVRE_GITHUB_LINKED | 1 if GitHub is connected, else 0 |
Your GitHub token is not in the environment. When you type a plain git push, pull, fetch or clone yourself, Codevre runs that one command with your credentials. Commands with pipes, ;, &&, redirects or $, and anything run by scripts, tasks or the Agent, run without them. See GitHub.
Servers
Link to “Servers”When a program in the terminal starts listening on a port, Codevre opens a localhost:PORT tab in the Browser and a link in the status bar. Links printed in the terminal (http://localhost:5173) open in the Browser when clicked. See Dev servers.
While a project is opening
Link to “While a project is opening”When you open a saved project, the terminal ignores input until all files have downloaded ("Syncing project files 120 of 300…"). A command run against half a project would just fail.
When the runtime restarts
Link to “When the runtime restarts”Signing in or out, and connecting or disconnecting GitHub, restart the runtime. Terminals start fresh, running processes end, and npm install runs again if the project has a package.json. Your files and history are kept.
Running commands without typing
Link to “Running commands without typing”- Terminal ▸ Run npm Script lists your
package.jsonscripts. - Terminal ▸ Run Active File runs a
.jsfile withnodeor previews an.htmlfile. - Terminal ▸ Run Selected Text runs the selection or current line.
- Tasks can run commands when the project opens.