Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TIDE — Terminal IDE

A lightweight, terminal-only IDE for watching and editing a git repo while Claude, Antigravity, or you change the code. File tree on the left, a live-updating diff / split-diff / syntax-highlighted code view on the right, plus staging and committing — all inside the terminal.

Built with Ink (React for the terminal), chokidar (file watching), and simple-git.


Features

  • File tree — full recursive browser of the repo. Changed files are colored and marked ●.
  • Live diff — the diff refreshes automatically the moment a file is written (by you, Claude, or Antigravity).
  • Three view modes — unified diff, side-by-side split diff, and syntax-highlighted code.
  • Stage / commit — stage or unstage files and commit, without leaving the terminal.
  • Edit — open any file in your $EDITOR, save, and land back in TIDE with the change already shown.

Install

Published on npm as tide-tui.

Option A — npm (no folder to keep)

Run it without installing (fetched + cached on first run):

npx tide-tui ~/path/to/your-repo    # or `npx tide-tui .` inside a repo

Or install the tide command globally:

npm install -g tide-tui             # may need sudo on macOS/Linux
tide ~/path/to/your-repo            # or `tide .` inside a repo

With either, there is no project folder to manage — npm keeps the code in its own cache / global directory.

Option B — from source

# 1. Clone (or you already have it at ~/Desktop/terminal-ide)
git clone https://github.com/rohan4naik/terminal-ide.git ~/Desktop/terminal-ide

# 2. Install dependencies
cd ~/Desktop/terminal-ide
npm install

# 3. Add the `tide` launcher to your shell
cat >> ~/.zshrc <<'EOF'

# terminal-ide launcher: `tide` opens current folder, `tide <path>` opens that repo
tide() {
  local target="${1:-$PWD}"
  "$HOME/Desktop/terminal-ide/node_modules/.bin/tsx" "$HOME/Desktop/terminal-ide/src/index.jsx" "$target"
}
EOF

# 4. Reload the shell (once per open terminal, or open a new one)
source ~/.zshrc

If you keep the project somewhere other than ~/Desktop/terminal-ide, update the two paths in the tide function to match.


Run

# Open TIDE in the current folder (must be a git repo)
cd ~/path/to/your-repo
tide

# Or point at a repo directly
tide ~/path/to/your-repo

Alternative launch methods (no tide function needed):

# From the project folder
cd ~/Desktop/terminal-ide
npm start ~/path/to/your-repo

# From anywhere, without the launcher
npx tsx ~/Desktop/terminal-ide/src/index.jsx ~/path/to/your-repo

The target folder must be a git repository. If it isn't one yet:

cd ~/path/to/your-repo
git init

Keybindings

Key Action
j / ↓ Move cursor down
k / ↑ Move cursor up
enter / l Open file (loads diff + code) / expand directory
h Collapse directory
e Edit the open file in your $EDITOR
space Stage / unstage the file under the cursor
c Commit staged changes (type a message, enter)
1 View mode: unified diff
2 View mode: side-by-side split diff
3 View mode: syntax-highlighted code
d / PgDn Scroll the view down
u / PgUp Scroll the view up
r Refresh / rebuild the file tree
q Quit

Opening an unchanged file jumps straight to the code view; opening a changed file shows its diff.


Editor for e

e hands the whole terminal to a real editor, then returns to TIDE and refreshes. Pick your editor by setting $EDITOR in ~/.zshrc:

export EDITOR=nano       # default; ctrl-o save, ctrl-x quit
export EDITOR=vim        # if you know vim
export EDITOR="code -w"  # VS Code — the -w makes TIDE wait until the tab closes

Then source ~/.zshrc. If $EDITOR is unset, TIDE falls back to nano.


How the live update works

TIDE watches the repo with chokidar (ignoring .git, node_modules, dist, .next, build). On any write it re-runs git status and re-computes the diff of the open file — so when an agent edits code, the diff panel updates on its own. New/deleted files appear in the tree after pressing r (this preserves your expanded folders).


Project layout

src/
  index.jsx         Entry point; takes the repo path as an argument
  app.jsx           Main layout, watcher, keybindings, state
  git.js            git status / diff / stage / commit
  tree.js           Recursive lazy-loaded file tree
  splitDiff.js      Parses a unified diff into side-by-side rows
  highlight.js      Syntax highlighting (extension → language)
  editor.js         Launches the external editor
  FileTree.jsx      File-tree renderer
  DiffView.jsx      Unified diff renderer
  SplitDiffView.jsx Side-by-side diff renderer
  CodeView.jsx      Highlighted code renderer with line numbers

Requirements

  • Node.js 18+ (tested on 24)
  • git
  • A terminal (it's an interactive TUI — run it in a real terminal, not inside another tool)

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages