Scripts2026年4月10日·1 分钟阅读

Teable — No-Code Postgres Spreadsheet Database

Teable is an open-source Airtable alternative built on PostgreSQL. Spreadsheet UI with real-time collaboration, API access, and no-code app building capabilities.

SC
Script Depot · Community
快速使用

先拿来用,再决定要不要深挖

这里应该同时让用户和 Agent 知道第一步该复制什么、安装什么、落到哪里。

git clone https://github.com/teableio/teable.git
cd teable
docker compose up -d

Open http://localhost:3000 — create your first base and start organizing data.

介绍

Teable is an open-source, no-code database platform that combines the simplicity of a spreadsheet with the power of PostgreSQL. It serves as a self-hosted Airtable alternative, letting teams build apps, manage data, and collaborate in real-time — all without writing code, while keeping data in a standard PostgreSQL database.

With 21.1K+ GitHub stars, Teable stands out by using PostgreSQL as its storage engine, meaning your data is always accessible via standard SQL and never locked into a proprietary format.

What Teable Does

Teable provides a powerful data management experience:

  • Spreadsheet Interface: Familiar grid view with sorting, filtering, grouping, and conditional formatting
  • Multiple Views: Grid, Kanban, Gallery, Form, and Calendar views for the same data
  • Real-time Collaboration: Multiple users editing simultaneously with live updates
  • Field Types: 20+ field types including text, number, date, attachment, link, formula, rollup, lookup, and rating
  • API Access: Auto-generated REST API for every table with full CRUD operations
  • Automations: Trigger-action workflows for notifications, data sync, and integrations
  • Forms: Public forms for data collection with customizable layouts
  • PostgreSQL Native: All data stored in standard PostgreSQL tables, accessible via SQL

Architecture

┌──────────────┐     ┌──────────────┐     ┌──────────────┐
│  Next.js     │────▶│  NestJS      │────▶│  PostgreSQL  │
│  Frontend    │     │  Backend     │     │  (Your Data) │
└──────────────┘     └──────┬───────┘     └──────────────┘
                            │
                     ┌──────┴───────┐
                     │  Redis       │
                     │  (Realtime)  │
                     └──────────────┘

Self-Hosting

Docker Compose

services:
  teable:
    image: ghcr.io/teableio/teable:latest
    ports:
      - "3000:3000"
    environment:
      PRISMA_DATABASE_URL: postgresql://teable:teable@postgres:5432/teable
      BACKEND_CACHE_PROVIDER: redis
      BACKEND_CACHE_REDIS_URI: redis://redis:6379/0
    depends_on:
      - postgres
      - redis

  postgres:
    image: postgres:16-alpine
    environment:
      POSTGRES_USER: teable
      POSTGRES_PASSWORD: teable
      POSTGRES_DB: teable
    volumes:
      - pg-data:/var/lib/postgresql/data

  redis:
    image: redis:7-alpine

volumes:
  pg-data:

Key Features

PostgreSQL Native

Unlike Airtable, all Teable data lives in standard PostgreSQL:

-- Your Teable data is just PostgreSQL tables
SELECT * FROM tbl_customers WHERE status = 'active' ORDER BY created_at DESC;

-- Join across tables
SELECT c.name, COUNT(o.id) as order_count
FROM tbl_customers c
JOIN tbl_orders o ON o.customer_id = c.id
GROUP BY c.name;

This means you can:

  • Query data with any SQL client or BI tool
  • Connect Metabase, Grafana, or Tableau directly
  • Use pg_dump for backups
  • Write custom reports with raw SQL

Formula Fields

// Basic formulas
{Total} = {Price} * {Quantity}
{Full Name} = CONCATENATE({First Name}, " ", {Last Name})
{Days Until Due} = DATETIME_DIFF({Due Date}, NOW(), 'days')

// Conditional
{Status} = IF({Progress} >= 100, "Done", IF({Progress} > 0, "In Progress", "Not Started"))

Auto-Generated API

Every table gets a REST API automatically:

# List records
curl http://localhost:3000/api/table/{tableId}/record 
  -H "Authorization: Bearer YOUR_TOKEN"

# Create record
curl -X POST http://localhost:3000/api/table/{tableId}/record 
  -H "Authorization: Bearer YOUR_TOKEN" 
  -d '{"fields": {"Name": "John", "Email": "john@example.com"}}'

Teable vs Alternatives

Feature Teable Airtable NocoDB Baserow
Open Source Yes No Yes (AGPL) Yes (MIT)
Database PostgreSQL Proprietary MySQL/PostgreSQL PostgreSQL
SQL Access Direct No Limited Limited
Real-time Yes Yes Yes Yes
Self-hosted Yes No Yes Yes
Row limit Unlimited 125K/base Unlimited Unlimited
Pricing Free (self-host) $20/seat/mo Free (self-host) Free (self-host)

常见问题

Q: Teable 的数据真的是标准 PostgreSQL 吗? A: 是的。每个 Teable 表对应一张 PostgreSQL 表,字段映射为 PostgreSQL 列。你可以用任何 PostgreSQL 工具直接查询和操作数据。

Q: 可以连接已有的 PostgreSQL 数据库吗? A: 支持。Teable 可以连接外部 PostgreSQL 数据库,将已有表格映射为 Teable 视图,无需数据迁移。

Q: 性能如何?大数据量能用吗? A: 由于底层是 PostgreSQL,Teable 可以处理百万级行的数据。建议对大表添加合适的索引以保持查询性能。

来源与致谢

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产