{"html_url": "https://github.com/simonw/datasette/issues/2106#issuecomment-1646646931", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/2106", "id": 1646646931, "node_id": "IC_kwDOBm6k_c5iJdaT", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-07-22T18:34:04Z", "updated_at": "2023-07-22T18:34:04Z", "author_association": "OWNER", "body": "Here's the diff for adding it to `sqlite-utils`: https://github.com/simonw/sqlite-utils/commit/ef31210bf06f920e0890e171c3198f0b0dc8d72d", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1816857442, "label": "`datasette install -e` option"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/2106#issuecomment-1646648262", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/2106", "id": 1646648262, "node_id": "IC_kwDOBm6k_c5iJdvG", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-07-22T18:42:20Z", "updated_at": "2023-07-22T18:42:20Z", "author_association": "OWNER", "body": "Tested this locally with:\r\n```bash\r\ndatasette install -e ../datasette-graphql\r\n```\r\nRunning `datasette plugins` confirmed that the plugin had been installed.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1816857442, "label": "`datasette install -e` option"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/568#issuecomment-1646642666", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/568", "id": 1646642666, "node_id": "IC_kwDOCGYnMM5iJcXq", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-07-22T18:13:19Z", "updated_at": "2023-07-22T18:13:19Z", "author_association": "OWNER", "body": "https://sqlite-utils.datasette.io/en/stable/cli-reference.html#create-table\r\n\r\n```bash\r\nsqlite-utils create-table ... --replace\r\n```\r\nThat also has `--ignore`:\r\n\r\n```\r\n --ignore If table already exists, do nothing\r\n --replace If table already exists, replace it\r\n --transform If table already exists, try to transform the schema\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1816851056, "label": "table.create(..., replace=True)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/568#issuecomment-1646642959", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/568", "id": 1646642959, "node_id": "IC_kwDOCGYnMM5iJccP", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-07-22T18:14:49Z", "updated_at": "2023-07-22T18:14:49Z", "author_association": "OWNER", "body": "Here's where those are implemented for the `create-table` CLI command: https://github.com/simonw/sqlite-utils/blob/f7af23837deab5c98dae9441d1f68318065d7d8c/sqlite_utils/cli.py#L1543-L1564", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1816851056, "label": "table.create(..., replace=True)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/567#issuecomment-1646643379", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/567", "id": 1646643379, "node_id": "IC_kwDOCGYnMM5iJciz", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-07-22T18:16:54Z", "updated_at": "2023-07-22T18:16:54Z", "author_association": "OWNER", "body": "> Would this possibly make a bunch of `x-to-sqlite` tools obsolete? Or nudge some to become plugins?\r\n\r\nYeah, it could do! That's not a terrible idea to be honest, those things have really been proliferating.\r\n\r\nAlternatively, they could each register themselves as plugins in addition - so if you install e.g. `pocket-to-sqlite` you could then optionally also run it as `sqlite-utils pocket-to-sqlite ...`\r\n\r\nThe benefit there is for people who install `sqlite-utils` from Homebrew, where it gets its own virtual environment. They could run:\r\n\r\n```bash\r\nbrew install sqlite-utils\r\nsqlite-utils install pocket-to-sqlite\r\n\r\nsqlite-utils pocket-to-sqlite ...\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1801394744, "label": "Plugin system"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/567#issuecomment-1646643450", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/567", "id": 1646643450, "node_id": "IC_kwDOCGYnMM5iJcj6", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-07-22T18:17:18Z", "updated_at": "2023-07-22T18:17:18Z", "author_association": "OWNER", "body": "I'm going to start by adding the `register_command` hook using the exact same pattern as Datasette and LLM.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1801394744, "label": "Plugin system"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/569#issuecomment-1646643676", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/569", "id": 1646643676, "node_id": "IC_kwDOCGYnMM5iJcnc", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-07-22T18:18:24Z", "updated_at": "2023-07-22T18:18:24Z", "author_association": "OWNER", "body": "Here's where I added that to LLM: https://github.com/simonw/llm/commit/a396950f7934e82a9968703bb3ce9ab7ab62f7f8\r\n\r\n- https://github.com/simonw/llm/issues/49", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1816852402, "label": "register_command plugin hook"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/569#issuecomment-1646645990", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/569", "id": 1646645990, "node_id": "IC_kwDOCGYnMM5iJdLm", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-07-22T18:29:40Z", "updated_at": "2023-07-22T18:30:16Z", "author_association": "OWNER", "body": "Example plugin: https://gist.github.com/simonw/ccfbbf9b384a38ac7535b01849f57daf\r\n\r\n```bash\r\nsqlite-utils install https://gist.github.com/simonw/ccfbbf9b384a38ac7535b01849f57daf/archive/cd7960e476c441a3c5f619e2a44a641a39b91467.zip\r\n```\r\n`pyproject.toml`:\r\n```toml\r\n[project]\r\nname = \"sqlite-utils-hello-world\"\r\nversion = \"0.1\"\r\n\r\n[project.entry-points.sqlite_utils]\r\nhello_world = \"sqlite_utils_hello_world\"\r\n```\r\n`sqlite_utils_hello_world.py`:\r\n```python\r\nimport click\r\nimport sqlite_utils\r\n\r\n\r\n@sqlite_utils.hookimpl\r\ndef register_commands(cli):\r\n @cli.command()\r\n def hello_world():\r\n \"Say hello world\"\r\n click.echo(\"Hello world!\")\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1816852402, "label": "register_command plugin hook"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/568#issuecomment-1646653382", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/568", "id": 1646653382, "node_id": "IC_kwDOCGYnMM5iJe_G", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-07-22T19:13:20Z", "updated_at": "2023-07-22T19:13:20Z", "author_association": "OWNER", "body": "Demo:\r\n```pycon\r\n>>> from sqlite_utils import Database\r\n>>> db = Database(memory=True)\r\n>>> db[\"foo\"].create({\"id\": int})\r\n