docs: def cli(
      paths,
      dbname,
      separator,
      quoting,
      skip_errors,
      replace_tables,
      table,
      extract_column,
      date,
      datetime,
      datetime_format,
      primary_key,
      fts,
      index,
      shape,
      filename_column,
      no_index_fks,
      no_fulltext_fks,
  ):
      """
      PATHS: paths to individual .csv files or to directories containing .csvs
  
      DBNAME: name of the SQLite database file to create
      """
      # make plural for more readable code:
      extract_columns = extract_column
      del extract_column
  
      if extract_columns:
          click.echo("extract_columns={}".format(extract_columns))
      if dbname.endswith(".csv"):
          raise click.BadParameter("dbname must not end with .csv")
      if "." not in dbname:
          dbname += ".db"
  
      db_existed = os.path.exists(dbname)
  
      conn = sqlite3.connect(dbname)
  
      dataframes = []
      csvs = csvs_from_paths(paths)
      sql_type_overrides = None
      for name, path in csvs.items():
          try:
              df = load_csv(path, separator, skip_errors, quoting, shape)
              df.table_name = table or name
              if filename_column:
                  df[filename_column] = name
                  if shape:
                      shape += ",{}".format(filename_column)
              sql_type_overrides = apply_shape(df, shape)
              apply_dates_and_datetimes(df, date, datetime, datetime_format)
              dataframes.append(df)
          except LoadCsvError as e:
              click.echo("Could not load {}: {}".format(path, e), err=True)
  
      click.echo("Loaded {} dataframes".format(len(dataframes)))
  
      # Use extract_columns to build a column:(table,label) dictionary
      foreign_keys = {}
      for col in extract_columns:
          bits = col.split(":")
          if len(bits) == 3:
              foreign_keys[bits[0]] = (bits[1], bits[2])
          elif len(bits) == 2:
              foreign_keys[bits[0]] = (bits[1], "value")
          else:
              foreign_keys[bits[0]] = (bits[0], "value")
  
      # Now we have loaded the dataframes, we can refactor them
      created_tables = {}
      refactored = refactor_dataframes(
          conn, dataframes, foreign_keys, not no_fulltext_fks
      )
      for df in refactored:
          # This is a bit trickier because we need to
          # create the table with extra SQL for foreign keys
          if replace_tables and table_exists(conn, df.table_name):
              drop_table(conn, df.table_name)
          if table_exists(conn, df.table_name):
              df.to_sql(df.table_name, conn, if_exists="append", index=False)
          else:
              to_sql_with_foreign_keys(
                  conn,
                  df,
                  df.table_name,
                  foreign_keys,
                  sql_type_overrides,
                  primary_keys=primary_key,
                  index_fks=not no_index_fks,
              )
              created_tables[df.table_name] = df
          if index:
              for index_defn in index:
                  add_index(conn, df.table_name, index_defn)
  
      # Create FTS tables
      if fts:
          fts_version = best_fts_version()
          if not fts_version:
              conn.close()
              raise click.BadParameter(
                  "Your SQLite version does not support any variant of FTS"
              )
          # Check that columns make sense
          for table, df in created_tables.items():
              for fts_column in fts:
                  if fts_column not in df.columns:
                      raise click.BadParameter(
                          'FTS column "{}" does not exist'.format(fts_column)
                      )
  
          generate_and_populate_fts(conn, created_tables.keys(), fts, foreign_keys)
  
      conn.close()
  
      if db_existed:
          click.echo(
              "Added {} CSV file{} to {}".format(
                  len(csvs), "" if len(csvs) == 1 else "s", dbname
              )
          )
      else:
          click.echo(
              "Created {} from {} CSV file{}".format(
                  dbname, len(csvs), "" if len(csvs) == 1 else "s"
              )
          )