Show HN: A terminal spreadsheet editor with Vim keybindings
Did you know that more than 70 % of data‑driven professionals spend at least an hour a day switching between a spreadsheet and a terminal? Imagine editing cells, running VLOOKUP or XLOOKUP formulas, and navigating rows with the speed of Vim—without ever leaving the command line. Meet Cell, the open‑source terminal spreadsheet that brings the full power of Excel into your favorite shell.
Why a Terminal‑Based Spreadsheet Matters for Excel Users
First off, speed beats everything. The ability to type instead of click means you keep your hands on the keyboard and your mind on the data. Vim motions—h, j, k, l, w, b, 0, $—let you traverse a spreadsheet in milliseconds, while the mouse would drag you around like a toddler.
Second, the cross‑platform consistency is a game‑changer. Whether you’re on Linux, macOS, or Windows via WSL, the same keybindings and look will greet you. No need to learn a new UI for each OS.
Third, automation‑ready. Terminal spreadsheets fit naturally into awk, sed, Python, or any language you trust. You can pipe a CSV through a sed filter, load it into Cell, run a VLOOKUP, then pipe the output to a reporting script—all in one line. It’s pretty much the holy grail of data workflow.
Getting Started: Installing and Launching Cell
- Prerequisites –
gitand Rust’scargoare your best friends. If you prefer, grab a pre‑built binary from the releases page. - One‑line install –
cargo install cellorwget https://github.com/cell/cli/releases/latest/download/cell-linux-amd64 -O /usr/local/bin/cell && chmod +x /usr/local/bin/cell. - Launch –
cell mydata.csvopens a CSV,cell -nstarts a brand‑new workbook. If you’re on Windows,cell.exeworks the same way.
Core Excel‑Like Features in the Terminal
Now, let’s talk features. Cell is built to feel like Excel while staying lightweight.
- Cell editing & navigation – Think Vim motions plus
:setstyle commands.ienters insert mode,Escreturns to navigation,gggoes to the top,Gto the bottom. Pretty much everything you know from Excel feels natural. - Formula engine – The same
=SUM,=AVERAGE,=VLOOKUP,=XLOOKUPyou’re used to. Under the hood, it’s Rust, so performance is top‑notch. Plus, you can drop in your own Rust or Lua functions—more on that later. - Real‑time filter & sort –
:filter A:A "Active"or:sort B ascmimics Excel’s Data tab. The results update instantly, and you can even chain filters.
Practical Walkthrough: Building a Dynamic Lookup Table
Let’s get our hands dirty. Suppose you have a CSV of product IDs and prices, products.csv:
SKU,Price
A100,19.99
B200,29.99
C300,39.99
Open it: cell products.csv. Now create a new sheet for the lookup table: :sheet add lookup (or simply :t new lookup if you prefer). In the first cell, type =XLOOKUP(A2, 'products.csv'!A:B, 2, FALSE). Drag the formula down. Every time you change A2 to a new SKU, the price updates instantly. Save the file, cell -o report.csv, and pipe it to a shell script that emails the results. The whole thing runs in the terminal—no GUI needed.
Actionable Takeaways & Next Steps
- Checklist – Replace your daily Excel copy‑paste loops with
cellcommands.
- Use
cell -nfor fresh starts. - Keep your CSVs tidy;
cellloves plain text. - Leverage
:filterto clean data before calculations.
- Use
- Git integration – Treat your spreadsheet as code. Commit
*.csvfiles to a repo, usegit diff --color-wordsto see changes, and roll back if a formula goes awry. - Extending Cell – Write a Rust plugin for a custom function. The snippet below shows a simple
DOUBLEUDF. Build it, drop it into$HOME/.cell/plugins, restartcell, and you’re good to go.
use cell::prelude::*;
/// Double the numeric value of the given cell.
fn double(args: Vec) -> Result {
let num = args[0].as_f64()?; // Convert first argument to f64
Ok(Value::Number(num * 2.0)) // Return doubled value
}
fn main() -> Result<(), CellError> {
// Register the function under the name "DOUBLE"
register_function("DOUBLE", 1, double);
// Launch the editor (or run in headless mode)
cell::run()
}
That’s it. You can now type =DOUBLE(B3) and instantly double any numeric entry—just like a custom Excel macro, but native to the terminal environment.
Frequently Asked Questions
Q1: How does Cell’s formula syntax compare to Excel’s?
A: Cell uses a familiar function‑first syntax (=SUM(A1:A10), =XLOOKUP(A2, B:B, C:C)) while allowing native Rust expressions for advanced calculations, so Excel users feel at home with a powerful extension.
Q2: Can I open an existing .xlsx file directly in Cell?
A: Not yet; Cell works with plain‑text formats (CSV, TSV). Convert the workbook with xlsx2csv or Excel’s “Save As → CSV” before loading it into Cell.
Q3: Is it possible to use Cell on a remote server via SSH?
A: Absolutely. Because Cell runs in the terminal, you can SSH into any Linux box, launch cell, and edit spreadsheets without a graphical interface.
Q4: How do I perform a VLOOKUP that spans multiple sheets in Cell?
A: Load each sheet as a separate file, then reference them with the sheet!cell syntax, e.g., =VLOOKUP(A2, 'prices.csv'!B:C, 2, FALSE).
Q5: Will my macros or VBA scripts work in Cell?
A: No. Cell does not support VBA, but you can replicate most automation with Rust plugins or external shell scripts that read/write CSVs.
Related reading: Original discussion
What do you think?
Have experience with this topic? Drop your thoughts in the comments - I read every single one and love hearing different perspectives!
Comments
Post a Comment