This guide will help you get started with Fakestack in just a few minutes.
Choose your preferred installation method:
pip install fakestacknpm install fakestackbrew tap 0xdps/packages
brew install fakestackDownload pre-built binaries from GitHub Releases.
fakestack -d .This creates a schema.json file with an example database structure.
fakestack -c -p -f schema.jsonThis will:
- Create database tables based on the schema
- Populate them with realistic fake data
# For SQLite (default)
sqlite3 test.db "SELECT * FROM users LIMIT 5;"
# For MySQL
mysql -u root -p testdb -e "SELECT * FROM users LIMIT 5;"
# For PostgreSQL
psql -U postgres -d testdb -c "SELECT * FROM users LIMIT 5;"from fakestack import fakestack
# Generate database
exit_code = fakestack(['-c', '-p', '-f', 'schema.json'])
if exit_code == 0:
print("Database generated successfully!")import { fakestack } from 'fakestack';
// Generate database
const exitCode = await fakestack(['-c', '-p', '-f', 'schema.json']);
if (exitCode === 0) {
console.log('Database generated successfully!');
}- Schema Reference - Learn how to create custom schemas
- Data Generators - Explore all available data generators
- Database Support - Configure different databases
- Examples - See real-world examples
# Download example schema
fakestack -d .
# Create tables only
fakestack -c -f schema.json
# Populate data only (tables must exist)
fakestack -p -f schema.json
# Create and populate in one command
fakestack -c -p -f schema.json
# Get help
fakestack -hIf you get a "binary not found" error, make sure you've installed fakestack correctly:
# Python
pip install --upgrade fakestack
# Node.js
npm install --save fakestack
# Homebrew
brew upgrade 0xdps/fakestackThe binary might not have execute permissions:
chmod +x ~/.local/lib/python*/site-packages/fakestack/bin/fakestack-*Verify your database configuration in the schema file:
- Check credentials (username, password)
- Verify host and port
- Ensure database exists
- Check network connectivity
For more help, see Troubleshooting.