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 run flint sync.
Import Structure
Imported files are organized by source Flint and export name:
Imports/
└── NUU Flint/ # Source flint name
└── Guide/ # Export name
├── Import - (NUU Flint) Guide.md
├── Import - (NUU Flint) Quick Start.md
└── Import - (NUU Flint) CLI Commands.mdFile Naming
Imported files are renamed from their export naming to use the Import - prefix:
- Export files prefixed
Export - (Source Flint)becomeImport - (Source Flint) - This prevents naming conflicts with your local Mesh files and with exports
- The prefix serves as attribution to the source
- Internal wiki-links are also rewritten:
[Export - (X)](/export-x)becomes[Import - (X)](/import-x)
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 and immediately pulls the files into your Imports/ folder.
Requirements:
- The source Flint must be registered (
flint registerin that Flint) - The export must exist (created via
flint export buildin the source)
Update Imports
Imports are automatically updated during flint sync. The sync process rebuilds exports from source, renames files with the Import - prefix, rewrites internal links, and cleans up stale imports.
flint syncRemove 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-filesWithout --delete-files, the import is removed from configuration but files remain until the next update cleans them up.
Import Sources
Imports work with the Flint registry system. A Flint can be imported if:
- It is registered in your global Flint registry (
flint register) - It has built exports (
flint export build)
The registry tracks each Flint's available exports, making them discoverable via flint import list.
Update Behavior
Imports are updated during flint sync. The update process:
- Reads required imports from
flint.toml - Locates source Flints in the registry (checks for
(Export)files in their Mesh) - Builds exports fresh from the source (ensures up-to-date content)
- Copies and renames files to your
Imports/folder (Export -prefix becomesImport -) - Rewrites internal links (
[Export - (X)](/export-x)becomes[Import - (X)](/import-x)) - Cleans up stale imports - removes any imported content no longer in your required list
Update Results
After updating, you will see import status for each configured import:
| Status | Meaning |
|---|---|
| synced | Successfully pulled and updated |
| not_found | Source Flint or export not in registry |
| not_built | Export document exists but build failed |
| removed | Import was in Imports/ but no longer required |
| error | An error occurred during update |
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 (automatically pulls files)
flint import add "NUU Flint/Guide"
# Output:
# Added NUU Flint/Guide to flint.toml
# Pulling NUU Flint/Guide...
# Imported 4 files.How Imported Files Appear
After adding NUU Flint/Guide:
Imports/
└── NUU Flint/
└── Guide/
├── Import - (NUU Flint) Guide.md
├── Import - (NUU Flint) Quick Start.md
├── Import - (NUU Flint) CLI Commands.md
└── Import - (NUU Flint) Configuration.mdKeeping Imports Up to Date
# Sync pulls latest import content automatically
flint sync
# Output includes:
# 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 update. 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.
Update 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.
Related
- Module - Exports - Create exports that others can import
- Module - Mesh - Where imported content is referenced
- Reference - CLI Commands - Full command reference