ForSure Logo
ForSure
CLILanguageDocumentationComponents

Getting Started

IntroductionInstallationQuick StartDownloads

Syntax

Basic SyntaxFile StructureCommentsAttributesImport Directives

AI & Neural Network

OverviewExamplesAdvanced FeaturesTeam UsageAPI Reference

Examples

Basic ExamplesIntermediate ExamplesAdvanced Examples

CLI Reference

CommandsOptionsConfiguration

API Reference

OverviewNode APIProgrammatic Usage

Tools & Extensions

VS Code ExtensionSyntax HighlightingEditor Integrations
ForSure Logo
ForSure

A powerful file structure definition language and CLI tool for developers.

GitHubTwitter

Products

CLI LanguageWeb EditorIDE Extensions

Resources

DocumentationExamplesTemplatesBlog

Company

AboutCareersContactPrivacy Policy

© 2026 ForSure. All rights reserved.

TermsPrivacyCookies
Syntax

Import Directives

How to import and reuse existing ForSure files and templates.

Basic Import

Import other ForSure files to reuse structures and templates.

forsure
# Import common web app structure @import "common/web-app.forsure" # Import React component templates @import "templates/react-components.forsure" root: - Type: Directory - Name: my-project/ <description> My custom project with imported structure </description>

Namespace Import

Import with namespaces to avoid naming conflicts.

forsure
@import "templates/react.forsure" as react @import "templates/vue.forsure" as vue root: - Type: Directory - Name: components/ # Use React component template - react:Button - Name: PrimaryButton.jsx - Props: { variant: "primary" } # Use Vue component template - vue:Button - Name: PrimaryButton.vue - Props: { type: "primary" }

Selective Import

Import only specific items from a ForSure file.

forsure
# Import only specific templates @import "templates/all.forsure" { ReactComponent, UtilityFile, ConfigFile } root: - Type: Directory - Name: src/ # Use imported template - ReactComponent - Name: Header.jsx - Props: { title: "My App" } - UtilityFile - Name: helpers.js - ConfigFile - Name: app.config.js

Dynamic Import

Use variables and conditions in import statements.

forsure
# Conditional imports @import "templates/${FRAMEWORK}.forsure" @import "configs/${ENVIRONMENT}.forsure" if ENVIRONMENT # Variable-based imports @import "user-templates/${USER_TEMPLATE}.forsure" root: - Type: Directory - Name: project/ <description> Project structure with dynamic imports </description>

Import Resolution

ForSure resolves imports in this order:

forsure
# 1. Relative paths @import "./local-template.forsure" # 2. Project templates directory @import "templates/web-app.forsure" # 3. Global templates @import "standard/react-app.forsure" # 4. Remote templates (if available) @import "https://templates.example.com/nextjs.forsure"