Skip to content

AvitalTamir/termsheet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

termsheet

A terminal-based interface for Google Sheets with Emacs-style keybindings.

termsheet screenshot

Features

  • Real-time sync - Bi-directional sync with Google Sheets via polling
  • Emacs keybindings - Navigate and edit with familiar shortcuts
  • Cell editing - Edit cells with formulas, auto-saves to Google Sheets
  • Cell formatting - Bold, italic, colors (synced from/to Google Sheets)
  • Multiple themes - 7 built-in themes including retro and synthwave styles
  • Formula bar - View and edit formulas at the top of the screen
  • Search - Find text across all cells
  • Multi-sheet support - Switch between sheets in a spreadsheet

Installation

From Source

git clone https://github.com/avitaltamir/termsheet.git
cd termsheet
make build
./bin/termsheet

Go Install

go install github.com/avitaltamir/termsheet@latest

Google Sheets Setup

To connect to Google Sheets, you need to create your own OAuth credentials:

1. Create a Google Cloud Project

  1. Go to Google Cloud Console
  2. Create a new project (or select an existing one)
  3. Note your project name for later

2. Enable the Google Sheets API

  1. Go to APIs & Services > Library
  2. Search for "Google Sheets API"
  3. Click Enable

3. Create OAuth Credentials

  1. Go to APIs & Services > Credentials
  2. Click Create Credentials > OAuth client ID
  3. If prompted, configure the OAuth consent screen:
    • Choose External user type
    • Fill in the required fields (app name, email)
    • Add your email as a test user
  4. For Application type, select Desktop app
  5. Name it (e.g., "termsheet")
  6. Click Create

4. Download and Install Credentials

  1. Click the download button (⬇️) next to your new credential
  2. Save the file as credentials.json
  3. Move it to the config directory:
mkdir -p ~/.config/termsheet
mv ~/Downloads/client_secret_*.json ~/.config/termsheet/credentials.json

5. Connect to a Sheet

  1. Run termsheet
  2. Press M-x and type connect-sheet
  3. Paste your Google Sheets URL or ID
  4. A browser window will open for authentication
  5. Grant access to your Google account

Your token is saved locally - you won't need to re-authenticate unless it expires.

Usage

Starting termsheet

# Start with default theme
termsheet

# Start with a specific theme
termsheet -theme miami-nights

Keybindings

Navigation

Key Command Description
C-n / next-line Move down
C-p / previous-line Move up
C-f / forward-char Move right
C-b / backward-char Move left
C-a beginning-of-row Jump to column A
C-e end-of-row Jump to last column with data
M-< beginning-of-sheet Jump to cell A1
M-> end-of-sheet Jump to last cell with data
C-l recenter Center view on cursor

Editing

Key Command Description
Enter edit-cell Edit the current cell
Backspace clear-cell Clear the current cell
C-x b toggle-bold Toggle bold formatting
C-x i toggle-italic Toggle italic formatting

Column Resizing

Key Command Description
} widen-column Make column wider
{ narrow-column Make column narrower

Search

Key Command Description
C-s search-forward Search for text

Sheets

Key Command Description
M-x connect-sheet Connect to a Google Sheet
M-x switch-sheet Switch between sheets
M-x refresh-sheet Force refresh data
M-x disconnect-sheet Disconnect from sheet

General

Key Command Description
M-x execute-command Open command palette
M-t cycle-theme Cycle through themes
C-g cancel Cancel current operation
C-x C-c quit Exit termsheet

Key Notation

  • C- = Control key (e.g., C-n = Ctrl+N)
  • M- = Meta/Alt key (e.g., M-x = Alt+X)
  • M-< = Alt+Shift+, (less than)
  • M-> = Alt+Shift+. (greater than)

Themes

termsheet comes with 7 built-in themes:

Theme Description
default Modern dark theme with blue accents
dark Pure black background
light Clean white background
granddad Retro green CRT (Quattro Pro vibes)
pina-colada Warm tropical with golden accents
lobster-boy Nautical red and ocean blue
miami-nights Synthwave neon with magenta and cyan

Switch themes:

  • Press M-t to cycle through themes
  • Press M-x and type set-theme to pick from a list

Development

# Run tests
make test

# Run with verbose test output
make test-verbose

# Build
make build

# Run directly
make run

# Format code
make fmt

# Run all checks
make check

Configuration

Config files are stored in ~/.config/termsheet/:

File Purpose
credentials.json OAuth client credentials (you create this)
token.json OAuth access token (auto-generated)

License

MIT

Acknowledgments

About

Terminal-based Google Sheets Client

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors