Thin API-contract CLI for syn-data-gen — generate synthetic data and seed it into a live database
Project description
skogi
A small, standalone CLI that takes you from a CREATE TABLE script to a database full of realistic
fake data — in one command:
skogi run --ddl schema.sql --dsn postgresql://user@localhost:5432/dbname
Under that are the two halves it orchestrates, usable on their own:
skogi generate— asks the Skogi service for a dataset and writes the two files below. It authenticates with a personal access token and never embeds the generation engine, which stays server-side.skogi seed— materializes those files into a real database: create the tables from the DDL (or skip the ones that exist), then insert the rows, transactionally, with an undo.
┌──────────────────┐
schema.sql (DDL) ─┤ skogi generate ├─▶ schema.sql + data.sql + skogi.run.json
or a Template └──────────────────┘ │
▼
skogi seed ──▶ live database
└────────────── skogi run ──────────────┘
seed is fully offline — it talks to your database and nothing else, no token required — and it
consumes any DDL + data.sql pair, including one produced directly by
syn-data-gen. It never imports the generator's Python;
the only coupling is that emitted-file contract.
Targets. MVP is PostgreSQL only (the generated SQL is ANSI/Postgres, so it executes directly). The roadmap adds MySQL → SQLite, with Oracle later — see docs/ROADMAP.md.
New here? Read docs/usage.md to run it, docs/architecture.md for the design, and CLAUDE.md for contributor/agent guidance. For the product as a user sees it — website + CLI, no internal terminology — see docs/end-user-guide.md.
Status
All three verbs exist. Seed Phase 1 (the PostgreSQL MVP) is complete, and the Generate track has
shipped end to end: G0 (the skogi rename + subcommand split), G1 (skogi generate against
the control plane) and G2 (skogi run, generate --template-id, seed --run-dir, and the
--confirm-target guardrail on destructive work aimed off this machine).
Next up is close-out — distribution, licensing, contract versioning — plus the Seed track's dialect phases (MySQL → SQLite → Oracle). See docs/IMPLEMENTATION.md for the live tracker and docs/ROADMAP.md for the plan (issue #17 has the full rationale).
Setup
This project uses uv.
uv sync # create the env from the lockfile
uv run pytest # run tests
uv run ruff check . # lint
Usage
One command, generate + load (needs $SKOGI_TOKEN, minted in the web app under
Settings → CLI tokens):
uv run skogi run \
--ddl examples/retail.sql \
--dsn postgresql://user@localhost:5432/dbname
Or the two halves separately — seed can take both inputs straight from a generate run directory:
uv run skogi generate --ddl examples/retail.sql --out ./out
uv run skogi seed --run-dir ./out --dsn postgresql://user@localhost:5432/dbname
Secrets come from the environment, never a flag — SKOGI_TOKEN for generate, and
PGPASSWORD/DB_PASSWORD for seed. Copy .env.example to .env and fill it in.
Teardown (restore the DB to the state the loader found it in):
# load, recording provenance
uv run skogi seed --ddl examples/retail.sql --data out/data.sql \
--dsn postgresql://user@localhost:5432/dbname --record run.json
# later: undo exactly that run
uv run skogi seed --teardown --record run.json \
--dsn postgresql://user@localhost:5432/dbname
Destructive work (--on-conflict truncate, --teardown) against a database that is not on this
machine is refused until you name it with --confirm-target <dbname> — --yes is not enough,
because a confirmation that transfers between targets does not guard against picking the wrong one.
See docs/usage.md for the full guide — every flag, the conflict/create-table modes, dry-run, the teardown round-trip, and a GitHub Actions CI recipe.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file skogi-0.3.0.tar.gz.
File metadata
- Download URL: skogi-0.3.0.tar.gz
- Upload date:
- Size: 46.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fcdec667347cfe495a837e9b8cc8b4834930a8ca9f216db098474b6d6ac9b899
|
|
| MD5 |
264c3bb1728763d099a04d074b910c5f
|
|
| BLAKE2b-256 |
0a86859cf123dafd825189ec2c8d38f1aedac265ef7363a63a75929fa9b22f80
|
Provenance
The following attestation bundles were made for skogi-0.3.0.tar.gz:
Publisher:
release.yml on ysk125103/skogi-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
skogi-0.3.0.tar.gz -
Subject digest:
fcdec667347cfe495a837e9b8cc8b4834930a8ca9f216db098474b6d6ac9b899 - Sigstore transparency entry: 2343581464
- Sigstore integration time:
-
Permalink:
ysk125103/skogi-cli@c2a05845c79603fd290338af647652bf931f7b62 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/ysk125103
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c2a05845c79603fd290338af647652bf931f7b62 -
Trigger Event:
push
-
Statement type:
File details
Details for the file skogi-0.3.0-py3-none-any.whl.
File metadata
- Download URL: skogi-0.3.0-py3-none-any.whl
- Upload date:
- Size: 56.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62a384b59e389d18ad2ab20d756bd4b8acc7d02b8e33141265ea0c2625b16c9d
|
|
| MD5 |
7c5e59f0a641f7bdc5c11ff22c8d3e6d
|
|
| BLAKE2b-256 |
68ff49f2f937d78698a33310d9338707caa2545718728494681e7457cbca83b3
|
Provenance
The following attestation bundles were made for skogi-0.3.0-py3-none-any.whl:
Publisher:
release.yml on ysk125103/skogi-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
skogi-0.3.0-py3-none-any.whl -
Subject digest:
62a384b59e389d18ad2ab20d756bd4b8acc7d02b8e33141265ea0c2625b16c9d - Sigstore transparency entry: 2343581829
- Sigstore integration time:
-
Permalink:
ysk125103/skogi-cli@c2a05845c79603fd290338af647652bf931f7b62 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/ysk125103
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c2a05845c79603fd290338af647652bf931f7b62 -
Trigger Event:
push
-
Statement type: