New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

greenseed

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

greenseed

Greenseed is a small CLI tool to seed a PostgreSQL database from JSON files.

latest
npmnpm
Version
0.1.8
Version published
Maintainers
1
Created
Source

Greenseed

Greenseed is a small CLI tool to seed a PostgreSQL database from JSON files.

It reads data from JSON files and inserts it into database tables safely using primary keys.

Install

npm install greenseed

Usage

greenseed push

Options:

-c, --config <file>   Config file (default: seed.config.json)
-d, --dbvar <name>    Override database env var name

Config file

Create a seed.config.json file.

Example:

{
  "seedFileExtensions": [".json"],
  "databaseUrlEnvVar": "DATABASE_URL",
  "onMissingFile": "error",
  "tables": [
    {
      "table": "users",
      "schema": "public",
      "primaryKeys": ["id"],
      "source": "./data/users.json"
    }
  ]
}

JSON data

Each source file must be a JSON array.

Example:

[
  { "id": 1, "name": "Alice" },
  { "id": 2, "name": "Bob" }
]

Extra fields not in the table are ignored.

Keywords

seed

FAQs

Package last updated on 21 Dec 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts