Detect your stack. Generate a flake. Ship it.
Scan any repository and produce a production-ready flake.nix in seconds.
flkr looks at your code (language, framework, package manager, lockfiles, build commands) and generates a thin flake.nix that delegates to the flkr-templates registry. The result is a reproducible Nix closure: sandboxed, cacheable, and ready to deploy.
No Nix knowledge required.
# Interactive wizard: detect, review, generate
flkr init
# Or go headless
flkr detect --json # inspect what flkr sees
flkr generate # write flake.nix
flkr generate --dry-run # preview without writingAfter generation:
nix run # build and run
nix build # build only
nix develop # drop into a dev shell| Ecosystem | Package Managers | Frameworks |
|---|---|---|
| Go | gomod | Gin |
| Node.js | npm, yarn, pnpm | Next.js, Nuxt, Remix, Vite |
| Python | pip, poetry, pipenv, uv | Django, Flask, FastAPI |
| Rust | cargo | Actix |
| Ruby | bundler | Rails |
| Elixir | mix | Phoenix |
| PHP | composer | Laravel |
| Java | maven, gradle | Spring |
Detection is layered: a base detector identifies the language and package manager, then specialized detectors refine the framework, build commands, ports, and system dependencies.
{
description = "go-app -- generated by flkr";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flkr-templates.url = "github:narvanalabs/flkr-templates";
};
outputs = { self, nixpkgs, flkr-templates, ... }:
flkr-templates.lib.mkApp {
inherit nixpkgs;
src = ./.;
ecosystem = "go";
version = "1.25.0";
packageManager = "gomod";
buildCommand = "go build -o myapp .";
startCommand = "./myapp";
port = 8080;
vendorHash = "sha256-INXKKsT91oKPF7KYGTMKE2kCekumG8zuTylX2yEkIHQ=";
};
}The generated flake is config, not implementation. All build logic lives in flkr-templates: buildGoModule, buildRustPackage, mkDerivation, and friends.
Nix (recommended)
# Run directly
nix run github:narvanalabs/flkr -- init
# Or install to profile
nix profile install github:narvanalabs/flkrFrom source
git clone https://github.com/narvanalabs/flkr.git
cd flkr
make build # produces ./flkrRequires Go 1.25+.
go install
go install github.com/narvanalabs/flkr@latest your repo flkr flkr-templates
┌──────────┐ ┌──────────┐ ┌─────────────────────┐
│ go.mod │ │ Detect │ │ buildGoModule │
│ package. │───▸│ Generate │───▸│ buildRustPackage │───▸ Nix closure
│ Cargo. │ │ Hash │ │ mkDerivation │
│ etc. │ │ │ │ ... │
└──────────┘ └──────────┘ └─────────────────────┘
- Detect:scan the repo, build an
AppProfile(language, framework, commands, ports, deps) - Generate:render
flake.nixfrom the profile, computevendorHash/cargoHash - Build:the generated flake delegates to
flkr-templates.lib.mkAppfor sandboxed, cacheable Nix builds
cmd/ CLI (Cobra)
internal/
detector/ Language & framework detectors
generator/ flake.nix rendering
nixhash/ Nix hash computation
parser/ Config file parsers
tui/ Interactive wizard (Bubble Tea)
pkg/flkr/ Public API
flkr is the detection engine for Narvana, a Nix-native PaaS.
flkr → flkr-templates → Attic → sops-nix → Deploy
make all # vet + test + build
make test # tests only