[{"data":1,"prerenderedAt":189},["ShallowReactive",2],{"\u002Fdatabases\u002Fcloudflare-d1":3},{"id":4,"title":5,"body":6,"description":164,"extension":165,"faq":166,"headline":179,"lastUpdated":180,"meta":181,"navigation":182,"path":183,"seo":184,"stem":187,"__hash__":188},"databases\u002F4.databases\u002F8.cloudflare-d1.md","A Native Cloudflare D1 Client for Mac, With Backups",{"type":7,"value":8,"toc":159},"minimark",[9,18,38,151,156],[10,11,12,13,17],"p",{},"TableStudio is a native Mac client for Cloudflare D1. Cloudflare's own tools are ",[14,15,16],"code",{},"wrangler"," and the dashboard. TableStudio gives you a real table browser and SQL editor for your D1 databases, backups on your Mac, and a safe way in for coding agents like Claude Code, Codex and Cursor.",[19,20,23,31],"lead-feature",{"icon":21,"title":22},"i-ph-cloud-arrow-down","Back up D1 to your Mac",[10,24,25,26,30],{},"D1 has no dump tool you can run locally. TableStudio copies a database's schema and rows over the D1 API into a SQLite file, on your Mac or in any S3 bucket. Before a risky change, take a ",[27,28,29],"strong",{},"restore point"," and roll back to it if you need to.",[10,32,33,34,37],{},"Want to try something without touching the real database? A ",[27,35,36],{},"sandbox"," copies it into a SQLite file on your Mac, with its real rows or none, so you can experiment, or let an agent experiment, offline.",[39,40,43,67,85,100,118,136],"feature-cards",{"description":41,"title":42},"A desktop home for the databases behind your Workers.","What TableStudio does for D1",[44,45,48],"feature-card",{"icon":46,"title":47},"i-ph-shield-check","Agents in your Workers projects",[49,50,51,55,58,61,64],"ul",{},[52,53,54],"li",{},"Claude Code, Codex, Cursor and OpenCode reach D1 by name, with no API token in a config file.",[52,56,57],{},"Agent reads are checked by their SQL before they run.",[52,59,60],{},"Production changes are staged for your review and applied with Touch ID.",[52,62,63],{},"The rows an agent is about to touch are copied first, so one bad change can be put back.",[52,65,66],{},"Values the agent reads from D1 are marked as untrusted, so a row can't pass itself off as instructions.",[44,68,71],{"icon":69,"title":70},"i-ph-plugs-connected","Sign in, not set up",[49,72,73,76,79],{},[52,74,75],{},"Sign in with Cloudflare and import every D1 database in the account.",[52,77,78],{},"Or use an API token with D1 edit access, kept in the macOS Keychain.",[52,80,81,82,84],{},"Find the D1 databases named in your projects' ",[14,83,16],{}," files.",[44,86,89],{"icon":87,"title":88},"i-ph-chart-bar","Query Insights from D1 analytics",[49,90,91,94,97],{},[52,92,93],{},"The statements your database spends its time on, read from Cloudflare's own D1 analytics.",[52,95,96],{},"What's wrong with each, in plain words.",[52,98,99],{},"Widget packs for D1's health and schema objects on the dashboard.",[44,101,104],{"icon":102,"title":103},"i-ph-tree-structure","Schema, SQLite-style",[49,105,106,109,112,115],{},[52,107,108],{},"Change a column, and TableStudio rebuilds the table the way SQLite requires, after a restore point.",[52,110,111],{},"Views, triggers, indexes and foreign keys.",[52,113,114],{},"Schema checks for loose SQLite typing, duplicate indexes and foreign keys without one.",[52,116,117],{},"Watch your Drizzle or Prisma migrations folder: pending, applied and drifted.",[44,119,122],{"icon":120,"title":121},"i-ph-table","Browse and edit",[49,123,124,127,130,133],{},[52,125,126],{},"Filter, sort and search, and hover a foreign key to preview its row.",[52,128,129],{},"Edits apply one by one, since D1 has no transactions to group them.",[52,131,132],{},"CSV and TSV import; export to CSV, TSV, JSON, SQL, Markdown or Excel.",[52,134,135],{},"Fake rows that follow your foreign keys, for a staging database that looks real.",[44,137,140],{"icon":138,"title":139},"i-ph-swap","Move and compare",[49,141,142,145,148],{},[52,143,144],{},"Compare two D1 databases, say production and staging, and get the script that closes the gap.",[52,146,147],{},"Move a D1 database into Postgres or MySQL with a pre-flight report.",[52,149,150],{},"Sync rows between databases, copying only what changed.",[152,153,155],"h2",{"id":154},"what-d1-cant-do","What D1 can't do",[10,157,158],{},"D1 runs SQLite behind an HTTP API, which shapes what any client can offer. There are no transactions, so a batch of edits applies one by one and a dry run can name a statement but not count its rows. There's no interactive shell, so there's no \"Open in Terminal\". TableStudio is upfront about each of these in the app, rather than pretending D1 is a local SQLite file.",{"title":160,"searchDepth":161,"depth":161,"links":162},"",2,[163],{"id":154,"depth":161,"text":155},"Browse, edit and query your Cloudflare D1 databases in a native Mac app instead of wrangler and the dashboard, back them up to your Mac, and let your coding agent in under rules you set.","md",[167,170,173,176],{"label":168,"content":169},"How do I connect TableStudio to D1?","Sign in with your Cloudflare account and import its D1 databases, or use your account ID, the database ID and an API token with D1 edit access. TableStudio can also find D1 databases in your projects' wrangler files.",{"label":171,"content":172},"Can I back up a D1 database?","Yes. TableStudio copies the schema and rows over the D1 API into a SQLite file on your Mac or an S3 bucket. You can also take a restore point before a risky change and roll back to it.",{"label":174,"content":175},"Can I work on a D1 database offline?","Make a sandbox. It copies the D1 database into a SQLite file on your Mac, with its real rows or none, that you can change freely without touching Cloudflare.",{"label":177,"content":178},"Is it safe to let my coding agent work on D1?","Production changes are staged for your review, where you apply them with Touch ID, and the rows an agent is about to change are saved first so you can undo it. D1 has no transactions, so TableStudio checks an agent's reads by their SQL rather than in the database, and a dry run on D1 can name the statement but not count the rows it would change.","Cloudflare D1","2026-10-29",{},true,"\u002Fdatabases\u002Fcloudflare-d1",{"title":185,"description":186},"Cloudflare D1 GUI Client for Mac with Backups and MCP","TableStudio is a native Mac GUI for Cloudflare D1. Sign in with Cloudflare, browse and edit tables, back up to your Mac or S3, read D1 analytics, and give Claude Code or Cursor a safe way in.","4.databases\u002F8.cloudflare-d1","XuGa1VQa0_evKVPv4kr7FXJ7eBF3px7ILLrl6p8rZVM",1793299920587]