FlintNUU Flint Docs
Modules

Imports

Pull content from other Flints into your workspace.

Purpose

The Imports module lets you bring exported content from other registered Flints into your own workspace. When another Flint has published an export bundle (via the Exports module), you can import that bundle to reference their documentation, templates, or shared resources.

Imports are one-way and read-only. The source Flint publishes to its Exports/ folder; you import that export into your Imports/ folder. The source maintains control over the content - you receive a copy that gets updated when you sync.

Import Structure

Imported files are organized by source Flint and export name:

Imports/
└── NUU Flint/              # Source flint name
    └── Guide/              # Export name
        ├── E (NUU Flint) Index.md
        ├── E (NUU Flint) Quick Start.md
        └── E (NUU Flint) CLI Commands.md

File Naming

Imported files retain their export naming convention:

  • Files are prefixed with E (Source Flint) to indicate their origin
  • This prevents naming conflicts with your local Mesh files
  • The prefix also serves as attribution to the source

Configuring Imports

Imports are configured in the [imports] section of flint.toml:

[imports]
required = [
  "NUU Flint/Guide",
  "NUU Mesh/Reference"
]

Each entry follows the format "<flint-name>/<export-name>":

  • flint-name: The name of the source Flint (as registered in the Flint registry)
  • export-name: The specific export bundle to import

The flint import Command

The import command manages your workspace's imports.

List Available Imports

# Show all flints with exports
flint import list

# Show exports from a specific flint
flint import list "NUU Flint"

The list command shows:

  • All registered Flints that have exports available
  • Each export bundle within those Flints
  • Your current imports (from flint.toml)

Add an Import

flint import add "NUU Flint/Guide"

This adds the import reference to your flint.toml. The actual files are not copied until you run flint sync.

Requirements:

  • The source Flint must be registered (flint register in that Flint)
  • The export must exist (created via flint export build in the source)

Remove an Import

# Remove from flint.toml only
flint import remove "NUU Flint/Guide"

# Remove from config and delete imported files
flint import remove "NUU Flint/Guide" --delete-files

Without --delete-files, the import is removed from configuration but files remain until the next sync cleans them up.

Import Sources

Imports work with the Flint registry system. A Flint can be imported if:

  1. It is registered in your global Flint registry (flint register)
  2. It has built exports (flint export build)

The registry tracks each Flint's available exports, making them discoverable via flint import list.

Sync Behavior

Imports are synced during flint sync. The sync process:

  1. Reads required imports from flint.toml
  2. Locates source Flints in the registry
  3. Builds exports fresh from the source (ensures up-to-date content)
  4. Copies files to your Imports/ folder
  5. Cleans up stale imports - removes any imported content no longer in your required list

Sync Results

After sync, you will see import status for each configured import:

StatusMeaning
syncedSuccessfully pulled and updated
not_foundSource Flint or export not in registry
not_builtExport manifest exists but build failed
removedImport was in Imports/ but no longer required
errorAn error occurred during sync

Automatic Cleanup

When you remove an import from flint.toml, the next flint sync will:

  • Delete the corresponding folder from Imports/
  • Clean up empty parent directories

Use Cases

Sharing Documentation

A central "docs" Flint can export style guides, templates, or reference material that other project Flints import:

# In your project flint.toml
[imports]
required = ["Company Docs/Style Guide"]

Referencing Architecture Docs

When building an implementation, import the architecture Flint's exports:

[imports]
required = ["System Architecture/API Reference"]

Template Distribution

A templates Flint can export common document structures:

[imports]
required = ["Templates/Project Templates"]

Examples

Adding Your First Import

# 1. Check what's available
flint import list

# Output:
# Available Imports
#
# NUU Flint
#   - Guide
#   - Reference

# 2. Add an import
flint import add "NUU Flint/Guide"

# Output:
# Added NUU Flint/Guide to flint.toml
# Run 'flint sync' to pull the files.

# 3. Sync to get the files
flint sync

How Imported Files Appear

After syncing NUU Flint/Guide:

Imports/
└── NUU Flint/
    └── Guide/
        ├── E (NUU Flint) Index.md
        ├── E (NUU Flint) Quick Start.md
        ├── E (NUU Flint) CLI Commands.md
        └── E (NUU Flint) Configuration.md

Keeping Imports Up to Date

# Regular sync updates all imports
flint sync

# View sync results
# Imports:
#   NUU Flint/Guide: synced (4 files)

Each sync rebuilds exports from source, ensuring you always have the latest content.

Best Practices

Import curated exports, not everything. Source Flints should prepare focused export bundles. Import only what you need.

Treat imports as read-only. Imported files will be overwritten on the next sync. If you need to modify content, copy it to your Mesh first.

Keep imports organized. The folder structure (Imports/<Flint>/<Export>/) keeps sources clear. Reference files using their full paths.

Sync regularly. Run flint sync to pull updates from source Flints. This keeps your imported content current.

Reference imports in your Mesh. Link to imported docs from your own notes to maintain context about why you imported them.