4d-project-info
4D Project Info
Analyze a 4D project and produce a JSON summary of its structure.
Usage
python3 scripts/project_info.py [path] [--format json|human|terse] [--compact]
path: Any path inside a 4D project, the project root itself, theProject/directory, or a direct path to the.4DProjectfile. Defaults to current directory.--format:jsonfor structured output,humanfor a readable text summary,tersefor a token-light text summary. Aliases:text,token,tokens,toon.--compact: Forjsonoutput, return only names and counts instead of full per-file details.
If no project root can be resolved, the script still exits with an error, but it also returns a list of nearby .4DProject files to use explicitly on the next run.
Output
JSON compact mode
{
"project_root": "/path/to/project",
"settings": { "project_file": "MyProject.4DProject", "compatibility_version": 2100 },
"summary": {
"methods_count": 12,
"classes_count": 5,
"forms_count": 3,
"database_methods": ["onStartup"],
"has_catalog": true,
"total_code_lines": 1847,
"dependencies": { "file_exists": true, "dependencies": { "SemVer": { "github": "mesopelagique/SemVer" } } }
},
"method_names": ["test_Feature", "utils_helper"],
"class_names": ["Employee", "DataStore"],
"form_names": ["MainForm", "Dialog_Settings"]
}
Human mode
Returns a short readable summary with project settings, counts, and comma-separated names.
Terse mode
Returns the same key facts in a token-light text format.
JSON full mode
Adds per-method line counts and per-class details (properties, functions, extends).
When to Use
- Before any refactoring or migration task
- When the user asks "what's in this project?"
- To provide project context to other skills (e.g., 4d-migrate-syntax, 4d-generate-doc)
- When onboarding onto an unfamiliar 4D codebase
More from e-marchand/skills
4d-check-syntax
Check syntax and compile a 4D project to find errors and type issues. Use this skill when the user wants to compile, check syntax, or validate a 4D project. Creates a _compile method if not present, then runs it using tool4d. Returns compilation errors in JSON format for easy parsing.
114d-run
Run a 4D project method. Use tool4d by default for fast dataless execution, and fall back to a user-provided 4D executable path when the method needs a real database or runtime features unavailable in tool4d. Includes Python helpers for macOS and Windows.
94d-find-command
Find 4D commands by keyword. Use this skill when the user wants to search for, find, or discover 4D commands matching a term. Searches the gram.4dsyntax file from tool4d.app to list matching command names and uses bundled syntax metadata for readable signatures and summaries. Filters out deprecated commands.
94d-clean-project
Clean a 4D project by removing generated files, caches, and system artifacts.
64d-add-dependency
Add dependencies to a 4D project. Use when the user wants to add a component, library, or dependency to their 4D project. Supports GitHub repos (owner/repo format), GitHub URLs (with automatic tag extraction from release URLs), and local folder paths. Handles dependencies.json and environment4d.json configuration.
64d-create-project
Create a new 4D project from scratch. Use this skill when the user wants to initialize, create, or start a new 4D project. Creates the required folder structure and .4DProject configuration file.
6