Installation & CLI Reference
Flame provides an all-in-one developer workspace toolchain containing a compiler, an automated code formatter, diagnostics engine, and a Smart ABI plugin system for seamless Rust interop.
Installation
Section titled “Installation”Quick Install (Recommended)
Section titled “Quick Install (Recommended)”Choose your operating system and preferred shell to install Flame and the Blaze toolchain:
Run in Windows PowerShell (Standard or Administrator):
irm https://raw.githubusercontent.com/sohamglx/flame/main/install.ps1 | iexOr from a local cloned repository:
.\install.ps1Run the universal bash script (Linux, macOS, and Windows via Git Bash / WSL / MSYS):
curl -fsSL https://raw.githubusercontent.com/sohamglx/flame/main/install.sh | bashOr from a local cloned repository:
bash install.shVerifying the Installation
Section titled “Verifying the Installation”Check that fmp is accessible from your terminal:
fmp --versionTo view the complete help menu and all available flags:
fmp --helpProject Structure & Manifest
Section titled “Project Structure & Manifest”Run fmp init <project_name> to create a new Flame project:
A standard Flame project contains a flame.toml manifest file and source code in src/:
my-flame-app/├── flame.toml # Project manifest, native crates & plugins└── src/ └── main.fm # Application entrypointManifest Example (flame.toml)
Section titled “Manifest Example (flame.toml)”[package]name = "my_flame_app"version = "0.1.0"entry = "src/main.fm"
[native-dependencies]uuid = { version = "1.0", features = ["v4"] }axum = "0.7"
[plugins]server = "./native"Just like a normal Cargo.toml, users can configure native crate features and version specifications manually by editing flame.toml.
CLI & Toolchain Reference
Section titled “CLI & Toolchain Reference”The fmp cli provides a unified command set for your entire development workflow:
1. Running & Building Applications
Section titled “1. Running & Building Applications”⚡ Quick-Run (fmp)
Section titled “⚡ Quick-Run (fmp)”Inside any Flame project directory (where flame.toml is present), simply type fmp and press enter to instantly compile and run your application entry point:
fmpfmp run
Section titled “fmp run”Runs the Flame entry file main.fm:
fmp runfmp build
Section titled “fmp build”Constructs an application-specific native runtime containing only the packages, standard library features, and native plugins imported by your project. It compiles the specialized runtime via Rust/Cargo/LLVM into an executable:
# Debug build in target/dev/ (uses normal filesystem, no VFS)fmp build
# Release build in target/release/ (uses normal filesystem, no VFS)fmp build --releasefmp build --exe / fmp build --vfs --release (Single Executable Mode)
Section titled “fmp build --exe / fmp build --vfs --release (Single Executable Mode)”When you require a self-contained single executable that bundles all application source files, packages, and .fmi interfaces directly inside the binary, pass --exe or --vfs:
# Self-contained single executable with embedded VFSfmp build --exe
# Optimized production single executable with embedded VFSfmp build --exe --release# orfmp build --vfs --release2. Package & Native Plugin Management
Section titled “2. Package & Native Plugin Management”fmp install
Section titled “fmp install”Resolves and installs all dependencies declared in flame.toml:
fmp installFlame downloads package repositories from their configured GitHub/registry sources, caches them in .flame/pkg/, and ensures .fmi interface metadata is generated for all packages with native plugins. Developers never manually copy Rust source or Cargo projects into the application.
fmp new <name>
Section titled “fmp new <name>”Initializes a new Flame workspace directory with a starter manifest and directory structure:
fmp new my_appfmp new --plugin <name> / fmp new -p <name>
Section titled “fmp new --plugin <name> / fmp new -p <name>”Scaffolds a native Rust plugin workspace (./native) inside your current project. It creates a starter Cargo.toml, bridge boilerplate code, and automatically registers the plugin in your flame.toml (alias: fmp native init):
fmp new --plugin server# or shorthand:fmp new -p serverNote on Naming: The Flame package name (in
flame.toml) and the native plugin name (innative/Cargo.toml) must be different. Using the same name causes Cargo workspace naming conflicts and linkage errors.
fmp add <url_or_name>
Section titled “fmp add <url_or_name>”Downloads and registers external Flame modules or packages into flame.toml:
fmp add https://github.com/example/flame-packagefmp add --native <crate_name> / fmp add -n <crate_name>
Section titled “fmp add --native <crate_name> / fmp add -n <crate_name>”Adds a Rust crate as a native dependency under [native-dependencies] in your flame.toml:
fmp add --native uuid# or shorthand:fmp add -n uuidJust like a normal Cargo.toml, users can configure crate features manually by editing flame.toml:
[native-dependencies]uuid = { version = "1.0", features = ["v4"] }fmp add --plugin <path_to_plugin> / fmp add -p <path_to_plugin>
Section titled “fmp add --plugin <path_to_plugin> / fmp add -p <path_to_plugin>”Registers an existing local or external native Rust plugin inside your flame.toml manifest. Flame automatically discovers the plugin name from its Cargo.toml, so --name is not required:
fmp add --plugin ./native# or shorthand:fmp add -p ./native3. Diagnostics & IDE Integration (check --json)
Section titled “3. Diagnostics & IDE Integration (check --json)”fmp check <file.fm> [--json] [--line N --col N]
Section titled “fmp check <file.fm> [--json] [--line N --col N]”Performs instantaneous syntactic analysis, type inference, and static diagnostics without compiling or linking binaries.
When invoked with --json, it emits structured metadata designed for IDEs and the Language Server Protocol (LSP):
- Precision Hover Metadata: Passing
--line N --col Nresolves the exact AST symbol under the cursor, returning inferred primitive types, native.fmistruct signatures, and identifying native AOT packages asplugin(e.g.server: plugin). - Autocomplete & IntelliSense: Extracts methods, parameters, docstrings, and struct layouts from standard libraries (
std.*) and native plugins (native.*). - Real-Time Diagnostics: Emits syntax errors, undefined symbols, and type mismatches with exact line and column numbers.
Example Command & JSON Payload
Section titled “Example Command & JSON Payload”fmp check automation/src/main.fm --json --line 47 --col 18{ "file": "automation/src/main.fm", "diagnostics": [], "std_modules": ["thread", "process", "fs", "math", "time", "os", "env"], "native_modules": ["server"], "plugins": [ { "name": "server", "source": "./native", "version": null, "is_local": true } ], "completions": [], "hover": { "label": "server", "documentation": "```flame\nserver: plugin\n```\nInferred type from AST" }}4. Code Formatting
Section titled “4. Code Formatting”fmp format <file.fm>
Section titled “fmp format <file.fm>”Automatically formats your source code to adhere to Flame’s canonical style rules:
# Format a specific file and write changesfmp format src/main.fm
# Output formatted code to stdout without writingfmp format src/main.fm --stdoutfmp format --all
Section titled “fmp format --all”Formats all .fm source files across your entire project workspace:
fmp format --all# or simply:fmp format5. Native Test Runner
Section titled “5. Native Test Runner”fmp test
Section titled “fmp test”Discovers and executes all @Test annotated functions across your project files:
fmp test6. Updating & Toolchain Maintenance
Section titled “6. Updating & Toolchain Maintenance”fmp update
Section titled “fmp update”Automatically updates your Flame compiler to the latest published release on Cargo (crates.io), synchronizes the fmp binary alias, and keeps your toolchain current:
fmp updatefmp uninstall
Section titled “fmp uninstall”Removes the Flame compiler binaries (fmp, flamelang) from your Cargo environment and purges the installed Blaze standard library definition directories:
fmp uninstall