Simon Willison released sqlite-utils 4.1, introducing several new features to the CLI tool and Python library.
- The `insert` and `upsert` commands now accept a `--code` option to define rows via inline Python code or a file path.
- These commands also support `--type column-name type` to override automatic column type detection, preserving leading zeros in fields like ZIP codes.
- A new `drop-index` command and `table.drop_index()` method allow dropping indexes by name with an optional ignore flag.
- The `query` command can now read SQL from standard input using `-` as the query argument.
- `upsert` automatically infers primary keys for existing tables, removing the need for `--pk`.
- `transform` and `transform_sql` methods gain `strict=True/False` options to toggle SQLite strict table mode.