MCPcopy Index your code
hub / github.com/dream-horizon-org/datagen

github.com/dream-horizon-org/datagen @0.2.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.2.0 ↗ · + Follow
755 symbols 2,694 edges 108 files 169 documented · 22%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

datagen

Go Version License Go Report Card Join our Discord

datagen is a tool to generate coherent, synthetic data generation from models expressed in a simple, declarative DSL.

Watch the Demo

Watch the video

Salient features: * A declarative DSL for defining data models with Go-like syntax * High performance through transpilation to native Go code * Multiple output formats (CSV, JSON, XML, stdout) * Database integration with direct loading to MySQL * Model relationships via cross-references using self.datagen * Tag-based filtering for selective data generation * Built-in functions for common data items

Install

See the Installation Guide for detailed installation instructions.

Usage

You can launch datagen for trying it out with:

# Create a simple model file
cat > user.dg << 'EOF'
model user {
  metadata { count: 100 }
  fields {
    id() int
    name() string
  }
  gens {
    func id() { return iter + 1 }
    func name() { return Name() }
  }
}
EOF

# Generate data
datagenc gen user.dg -f csv -o ./output

this will generate a user.csv file in output directory with 100 user records.

More information

Contributing

Refer to CONTRIBUTING.md

License

MIT License, see LICENSE.

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Function 495
Method 179
Struct 69
FuncType 6
Interface 3
TypeAlias 3

Languages

Go100%

Modules by API surface

runner/testdata/transpiledTestFiles/stdlib.go147 symbols
parser/lex.go41 symbols
codegen/generators.go26 symbols
runner/testdata/transpiledTestFiles/multiple_types.go19 symbols
runner/testdata/transpiledTestFiles/with_slices.go17 symbols
runner/testdata/transpiledTestFiles/with_misc.go17 symbols
runner/testdata/transpiledTestFiles/with_conditionals.go17 symbols
runner/testdata/transpiledTestFiles/with_builtin_functions.go17 symbols
codegen/codegen.go17 symbols
runner/testdata/transpiledTestFiles/nested.go16 symbols
parser/grammar.go16 symbols
runner/testdata/transpiledTestFiles/with_metadata.go15 symbols

For agents

$ claude mcp add datagen \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page