Skip to content

Prototype of a whole bunch of features inspired by Datasette feature comparison#28

Closed
simonw wants to merge 9 commits intomainfrom
claude/dclient-datasette-review-t8XER
Closed

Prototype of a whole bunch of features inspired by Datasette feature comparison#28
simonw wants to merge 9 commits intomainfrom
claude/dclient-datasette-review-t8XER

Conversation

@simonw
Copy link
Owner

@simonw simonw commented Feb 12, 2026

Experimental prototype, I let Claude Code go wild against the Datasette documentation.

Detailed feature gap analysis and tiered implementation plan covering:

  • Core table browsing and schema exploration (databases, tables, schema, rows, get)
  • Write operations (upsert, update, delete, drop, create-table)
  • Output format improvements (CSV, TSV, table, NL-JSON)
  • Authentication UX (browser login, env vars, keyring, auth status)
  • Discoverability features (info, URL inference, shell completions)

https://claude.ai/code/session_01DoiJf9Gbvbw2asN9yvP6dx

claude and others added 9 commits February 12, 2026 00:09
…tures

Detailed feature gap analysis and tiered implementation plan covering:
- Core table browsing and schema exploration (databases, tables, schema, rows, get)
- Write operations (upsert, update, delete, drop, create-table)
- Output format improvements (CSV, TSV, table, NL-JSON)
- Authentication UX (browser login, env vars, keyring, auth status)
- Discoverability features (info, URL inference, shell completions)

https://claude.ai/code/session_01DoiJf9Gbvbw2asN9yvP6dx
- Replace setup.py with pyproject.toml using uv_build backend
- Add dependency-groups.dev for test dependencies
- Configure flat layout with module-root = ""
- Fix pre-existing test failures (updated error message, optional mock)
- Add uv.lock and dist/ to .gitignore
- uv run pytest (39 passed) and uv build both work

https://claude.ai/code/session_01DoiJf9Gbvbw2asN9yvP6dx
Refactored shared infrastructure:
- _resolve_url(), _resolve_token(), _api_get(), _api_post() helpers
- Shared output formatters: JSON, CSV, TSV, NL-JSON, text table
- DCLIENT_TOKEN and DCLIENT_URL environment variable support

T1 - Core table browsing:
- `databases` - list databases on a Datasette instance
- `tables` - list tables with optional --schema flag
- `schema` - show CREATE TABLE SQL for database/table
- `rows` - browse rows with filtering (-w), sorting, pagination,
  column selection, faceting, full-text search, --limit, --all
- `get` - fetch a single row by primary key

T2 - Write operations:
- `upsert` - insert-or-update rows from file (CSV/TSV/JSON/JSONL)
- `update` - update a single row by PK with key=value pairs
- `delete` - delete a row by PK (with --yes to skip confirmation)
- `drop` - drop a table (shows row count, requires confirmation)
- `create-table` - create empty table with --column name type --pk

Output formats added to query and rows:
- --csv, --tsv, --nl, --json, --table flags

23 new tests covering all commands (62 total, all passing).

https://claude.ai/code/session_01DoiJf9Gbvbw2asN9yvP6dx
- Fix _api_get to follow redirects (needed for query endpoint on
  newer Datasette which redirects /{db}.json?sql= to /{db}/-/query)
- Add demo.md showing all new commands against a live Datasette instance:
  create-table, insert, databases, tables, schema, rows (with filtering,
  sorting, column selection, CSV export), get, query, update, upsert,
  delete, drop

https://claude.ai/code/session_01DoiJf9Gbvbw2asN9yvP6dx
- Update README.md with new commands summary and uv development workflow
- Add docs/exploring.md covering databases, tables, schema, rows, get
  commands with filtering, sorting, pagination, and output format examples
- Add docs/writing.md covering create-table, upsert, update, delete, drop
- Update docs/queries.md with output format options (--csv, --tsv, --nl, --table)
- Update docs/inserting.md with cross-references to upsert/update
- Update docs/index.md toctree to include new pages
- Regenerate all cog --help blocks with current command signatures

https://claude.ai/code/session_01DoiJf9Gbvbw2asN9yvP6dx
Executable demo covering all new commands against a live Datasette:
- create-table, insert (CSV via stdin)
- databases, tables, schema (exploration)
- rows with --table, -w filtering, --sort-desc, --col, --csv, --limit
- get (single row by PK)
- query with --table and --nl output formats
- update (single row by PK with key=value pairs)
- upsert (bulk insert-or-update from JSON)
- delete and drop with --yes

Replaces the old root-level demo.md with a proper demos/ directory.

https://claude.ai/code/session_01DoiJf9Gbvbw2asN9yvP6dx
@simonw simonw closed this Feb 27, 2026
@simonw simonw changed the title Add comprehensive improvement plan comparing dclient to Datasette features Prototype of a whole bunch of features inspired by Datasette feature comparison Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants