| Crates.io | oeis-tui |
| lib.rs | oeis-tui |
| version | 1.0.0 |
| created_at | 2024-04-04 05:46:20.867032+00 |
| updated_at | 2025-11-29 12:03:56.72075+00 |
| description | A TUI and CLI for browsing the On-Line Encyclopedia of Integer Sequences (OEIS) in the terminal. |
| homepage | https://github.com/hako/oeis-tui |
| repository | https://github.com/hako/oeis-tui |
| max_upload_size | |
| id | 1195912 |
| size | 7,715,113 |
A TUI and CLI for browsing the On-Line Encyclopedia of Integer Sequences (OEIS) in the terminal.
Download the latest binary for your platform from the releases page.
brew install hako/oeis-tui/oeis-tui
eget hako/oeis-tui
cargo install oeis-tui
Requirements: Rust 1.70 or later
cd /path/to/oeis/rust
cargo build --release
# binary: target/release/oeis
![]() Welcome Screen |
![]() Search Results |
![]() Preview Pane |
![]() Code Tab |
![]() B-file Loading |
![]() Export |
![]() Line Chart (Collatz) |
![]() Line Chart (Fibonacci) |
![]() Pin Plot (Primes) |
![]() Log Scatter |
![]() Webcam Mode |
![]() Settings |
Launch the interactive terminal interface:
oeis
The CLI provides UNIX-friendly commands with multiple output formats, perfect for piping and integration with external tools.
# Search for sequences
oeis search "1,2,3,5,8"
oeis search "fibonacci"
oeis search "keyword:prime"
# Fetch a specific sequence
oeis fetch A000045
# Get a random sequence
oeis random
All commands support --format / -f flag with these options:
plain (default) - Human-readable outputjson - Complete JSON data (for jq and scripting)csv - Index,value pairs (for spreadsheets and plotters)tsv - Tab-separated values (gnuplot native format)values - Just the numbers, one per line (for simple piping)# Get Fibonacci sequence in different formats
oeis fetch A000045 -f values # Just numbers
oeis fetch A000045 -f csv # index,value pairs
oeis fetch A000045 -f tsv # Tab-separated (gnuplot)
oeis fetch A000045 -f json # Full JSON
oeis fetch A000045 -q # Quiet mode (no headers)
# Search and fetch multiple sequences
oeis search "fibonacci" -f values -l 5 | xargs -n1 oeis fetch
# Get just the numbers for processing
oeis fetch A000045 -f values -q | head -20
# Extract specific data with jq
oeis fetch A000045 -f json | jq '.data'
# Batch process sequences
cat sequences.txt | xargs -n1 oeis fetch -f csv > output.csv
# Search with verbose output (A-numbers + names)
oeis search "prime" -f values -v | column -t -s $'\t'
The CLI outputs data in formats compatible with gnuplot, matplotlib, R, and other plotting tools:
# Plot with gnuplot
oeis fetch A000045 -f tsv -q | gnuplot -p -e "plot '-' with lines"
# Save plot to file
oeis fetch A000045 -f tsv -q > fib.dat
gnuplot -e "set terminal png; set output 'fib.png'; plot 'fib.dat' with linespoints"
# Plot with matplotlib (Python)
oeis fetch A000045 -f csv -q | python -c "
import sys; import matplotlib.pyplot as plt
data = [line.split(',') for line in sys.stdin]
x, y = zip(*[(int(a), int(b)) for a, b in data])
plt.plot(x, y); plt.show()
"
# R plotting
oeis fetch A000045 -f csv | Rscript -e "
data <- read.csv('stdin', header=TRUE)
png('plot.png'); plot(data); dev.off()
"
# Daily random sequence
oeis random -q > /tmp/sequence-of-the-day.txt
# Compare two sequences side-by-side
paste <(oeis fetch A000045 -f values -q) <(oeis fetch A000079 -f values -q) | head
# Find and plot prime-related sequences
oeis search "keyword:prime" -f values | head -1 | xargs oeis fetch -f tsv -q | gnuplot -p -e "plot '-'"
# Export to spreadsheet format
oeis fetch A000045 -f csv > fibonacci.csv
Global
Ctrl+Q or Ctrl+C - QuitCtrl+H - HelpCtrl+A - AboutCtrl+T - Cycle themeCtrl+V - Toggle keybinding presetEsc - Go backSearch
i or / - Edit searchEnter - View sequence↑/↓ or k/j - Navigate results←/→ or h/l - Page navigationr - Random sequencew - Webcam modes - Settingsp - Toggle preview paneb - Toggle bookmarks panel1-6 - Quick preview tab selection (when preview open)Ctrl+U/Ctrl+D - Scroll preview (vim-style)Detail View
Tab / Shift+Tab - Switch tabs↑/↓ or k/j - Scroll content←/→ or h/l - Navigate A-number referencesg - View graphe - Export tabo - Open in browserb - Toggle bookmarkf - Fetch B-file dataBackspace - Go backGraph View
1-4 - Switch chart type (Line, Scatter, Log, Pin)Esc or Backspace - Back to detailExport
↑/↓ or k/j - Select format1-5 - Quick format selection (JSON, CSV, TXT, Markdown, B-File)Enter - Copy to clipboardCtrl+S - Save to fileWebcam Mode
Space or Enter - Load next sequenced - View sequence detailTab or → or l - Next sectionShift+Tab or ← or h - Previous section↑/↓ or k/j - Navigate options0-5 - Quick interval (0=Manual, 1=5s, 2=10s, 3=20s, 4=30s, 5=1m)Esc or Backspace - Back to searchSettings
Tab or → or l - Next panelShift+Tab or ← or h - Previous panel↑/↓ or k/j - Navigate optionsEnter - Select option1-6 - Quick language selectionEsc or Backspace - Back to search1,2,3,5,8,13,21 # Search by terms
id:A000045 # Search by A-number
keyword:nice # Search by keyword
author:Sloane # Search by author
name:prime # Search in names
1,2,_,5,8 # _ matches any single number
1,2,__,7,8 # __ matches any consecutive list
~/.config/oeis-tui/oeis_cache.db%APPDATA%\oeis-tui\oeis_cache.dbSettings live alongside the cache at ~/.config/oeis-tui/settings.json (or the platform equivalent).
cargo run # Run in dev mode
cargo test # Run tests
cargo clippy # Lint
cargo fmt # Format
All sequence data is provided by the On-Line Encyclopedia of Integer Sequences (OEIS), founded by Neil J. A. Sloane and maintained by The OEIS Foundation Inc. and its many contributors.
Special thanks to:
Sequence data © The OEIS Foundation Inc.
MIT
Note: oeis-tui is not officially affiliated with the OEIS Foundation.