Forgen
Forgen is a declarative project structure language. Write a simple .fg script to describe your project layout — folders, files, and their contents — and let Forgen build it for you.
Installation
pip install forgen
Quick Start
Create a script myproject.fg:
project "MyProject"
set build_dir "build"
set resource_dir "resource"
folder "src"
folder "src/utils"
write "README.md" """
# MyProject
Generated by Forgen.
"""
write "src/main.py" """
def main():
print("Hello, world!")
"""
Then build it:
forgen build myproject.fg ./output
Commands
| Command | Description |
|---|---|
forgen build <script|pkg> <outdir> |
Build a project from a .fg script or .fgp package |
forgen init <dir> |
Initialise a new Forgen project directory |
forgen validate <script> |
Check a .fg script for errors |
forgen pack <projectdir> <out.fgp> |
Bundle a project into a portable .fgp package |
forgen make <dir> <out.fg> |
Reverse-engineer an existing directory into a .fg script |
build flags
| Flag | Description |
|---|---|
--clean |
Delete the output directory before building |
--dry-run |
Parse and resolve without writing any files |
--verbose |
Print each action as it runs |
.fg Script Reference
# Comments start with #
project "ProjectName" # Required — declares the project name
set key "value" # Set a variable (string, int, bool, or list)
folder "path/to/dir" # Create a directory
write "file.txt" "content" # Write a file with inline content
write "file.txt" """ # Or use a triple-quoted multiline string
multi
line
content
"""
copy "src/file" -> "dest/file" # Copy a file from resource_dir
for x in [1, 2, 3] { # Loop over a list
folder "module-{x}"
}
if some_var { # Conditional block
write "debug.log" "enabled"
}
.fgp Packages
A .fgp file is a ZIP archive containing a script.fg entry point and an optional resource/ directory for binary assets. Use forgen pack to create one and forgen build to extract and run it.
License
Server-Lab Open-Control License (SOCL) 1.0 — © 2025 Sourasish Das
Metadata
Release files for forgen-tools 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| forgen_tools-0.1.0.tar.gz | 11.8 kB | Without provenance | Details for forgen_tools-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| forgen_tools-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for forgen_tools-0.1.0-py3-none-any.whl |
Total release size: 23.8 kB
Release files / forgen_tools-0.1.0.tar.gz
| Download URL | forgen_tools-0.1.0.tar.gz |
|---|---|
| Size | 11.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c54a46915b255fa645549d6320142159fe58937126315aeb9ea1a383290bb89b
|
|
BLAKE2b-256 checksum How to use checksums |
c59c712e2090b42070018c0d87ab75c0ea96ed0f4e98b093da9307b245993e06
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / forgen_tools-0.1.0-py3-none-any.whl
| Download URL | forgen_tools-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
551ad0bd277596049ca1c53084e47417829c1d8a2a9bdf891771814170a3223f
|
|
BLAKE2b-256 checksum How to use checksums |
2f53642e6ad544b404bdcd08264c491d5074ab02ece30c2308974e12fbdf1da2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Security for forgen-tools 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.