ForSure Language

Define file structures with confidence

A human-readable language for defining and documenting file structures with rich metadata, designed for clarity and maintainability.

project.forsure
forsure
1root:
2  - Type: Directory
3  - Path: ./src
4  <description>
5  Source code directory for the application.
6  </description>
7
8  - Type: Directory
9    - Name: components/
10    <description>
11    React components used throughout the app.
12    </description>
13
14    - Type: File
15      - Name: Button.tsx
16      <description>
17      Reusable button component with variants.
18      </description>
19
20  - Type: Directory
21    - Name: utils/
22    <description>
23    Utility functions and helpers.
24    </description>
25
26    - Type: File
27      - Name: formatters.ts
28      <description>
29      Data formatting utilities.
30      </description>

What is ForSure?

ForSure is a declarative language designed to define, document, and generate file structures for software projects. It provides a human-readable way to specify directories, files, and their relationships, along with rich metadata.

Key Benefits

  • Self-documenting - Structures include built-in documentation
  • Reusable - Import common structures across projects
  • Maintainable - Easy to update and evolve over time
  • Generative - Automatically create file structures from definitions

ForSure Tip

Use indentation to represent nesting in your file structure

Add metadata tags to document your files and directories

Import common structures with @import directives

Use comments with # to add notes to your ForSure files

Create templates for reusable project structures


Get Started

Try ForSure Language

Edit the ForSure code below to see how the language works. The visualization will update in real-time to show the resulting file structure.

project.forsure
File Structure Preview
Unable to parse the ForSure code. Please check for syntax errors.

Language Features

Hierarchical Structure

Define nested directories and files with a clear, indentation-based syntax that mirrors the actual file system structure.

Rich Metadata

Add descriptions, purposes, authors, and other metadata to document your file structure and make it self-explanatory.

Import Directives

Reuse common file structures across projects with import directives, making your definitions modular and maintainable.

Advanced Features

Template Variables

Use variables in your ForSure files to create dynamic templates that can be customized at generation time.

${'PROJECT_NAME'}/src/
Content Templates

Define file content templates with placeholders that can be filled in during generation.

<content> export const ${COMPONENT_NAME} = () => {// ...}</content>
Conditional Logic

Use conditional logic to include or exclude files and directories based on variables.

# Only include if using TypeScript @if(TYPESCRIPT) - Type: File - Name: tsconfig.json @endif

Community & Resources

Community & Support
Connect with other ForSure users and get help

Next Steps