flox-environments
Fungsinya
Flox membantu membuat lingkungan pengembangan yang identik untuk semua orang dalam sebuah proyek, sehingga kode berjalan dengan cara yang sama di komputer yang berbeda (macOS dan Linux). Flox memasang semua alat dan paket yang dibutuhkan secara terorganisir.
Kapan dipakai
- βSaat Anda ingin proyek berjalan sama di mesin mana pun.
- βSaat memasang beberapa alat pemrograman sekaligus (misalnya Python dan Node.js).
- βUntuk memastikan tim Anda menggunakan versi program yang sama.
Link skill
https://github.com/affaan-m/ECC/blob/main/skills/flox-environments/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βSiapkan lingkungan untuk proyek saya dengan Python 3.11, Node.js 20, dan PostgreSQL 16.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Anda menentukan program dan versi apa saja yang diinginkan dalam sebuah file konfigurasi. Saat lingkungan diaktifkan, Flox memasang semua yang diminta sehingga siap digunakan.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
Flox Environments
Flox creates reproducible development environments defined in a single TOML manifest. Every developer on the team gets identical packages, tools, and configuration β across macOS and Linux β without containers or VMs. Built on Nix with access to over 150,000 packages.
When to Activate
Use this skill when the user has an environment management problem β even if they haven't mentioned Flox. Flox is the right tool when:
- The project needs system-level packages (compilers, databases, CLI tools) alongside language-specific dependencies
- Reproducibility matters β the setup should work identically on a teammate's machine, in CI, or on a fresh laptop
- The user needs multiple tools to coexist β e.g., Python 3.11 + PostgreSQL 16 + Redis + Node.js in one environment
- Cross-platform support is needed (macOS and Linux from the same config)
- AI agents need to install tools β Flox lets agents add packages to a project-scoped environment without sudo, system pollution, or sandbox restrictions
If the user just needs a single language runtime with no system dependencies, standard tooling (nvm, pyenv, rustup alone) may suffice. If they need full OS-level isolation, containers might be more appropriate. Flox sits in the sweet spot: declarative, reproducible environments without container overhead.
Prerequisite: Flox must be installed first β see flox.dev/docs for macOS, Linux, and Docker.
Core Concepts
Flox environments are defined in .flox/env/manifest.toml and activated with flox activate. The manifest declares packages, environment variables, setup hooks, and shell configuration β everything needed to reproduce the environment anywhere.
Key paths:
.flox/env/manifest.tomlβ Environment definition (commit this)$FLOX_ENVβ Runtime path to installed packages (like/usrβ containsbin/,lib/,include/)$FLOX_ENV_CACHEβ Persistent local storage for caches, venvs, data (survives rebuilds)$FLOX_ENV_PROJECTβ Project root directory (where.flox/lives)
Essential Commands
flox init # Create new environment
flox search <package> [--all] # Search for packages
flox show <package> # Show available versions
flox install <package> # Add a package
flox list # List installed packages
flox activate # Enter environment
flox activate -- <cmd> # Run a command in the environment without a subshell
flox edit # Edit manifest interactively
Manifest Structure
# .flox/env/manifest.toml
[install]
# Packages to install β the core of the environment
ripgrep.pkg-path = "ripgrep"
jq.pkg-path = "jq"
[vars]
# Static environment variables
DATABASE_URL = "postgres://localhost:5432/myapp"
[hook]
# Non-interactive setup scripts (run every activation)
on-activate = """
echo "Environment ready"
"""
[profile]
# Shell functions and aliases (available in interactive shell)
common = """
alias dev="npm run dev"
"""
[options]
# Supported platforms
systems = ["x86_64-linux", "aarch64-linux", "x86_64-darwin", "aarch64-darwin"]
Package Installation Patterns
Basic Installation
[install]
nodejs.pkg-path = "nodejs"
python.pkg-path = "python311"
rustup.pkg-path = "rustup"
Version Pinning
[install]
nodejs.pkg-path = "nodejs"
nodejs.version = "^20.0" # Semver range: latest 20.x
postgres.pkg-path = "postgresql"
postgres.version = "16.2" # Exact version
Platform-Specific Packages
[install]
# Linux-only tools
valgrind.pkg-path = "valgrind"
valgrind.systems = ["x86_64-linux", "aarch64-linux"]
# macOS frameworks
Security.pkg-path = "darwin.apple_sdk.frameworks.Security"
Security.systems = ["x86_64-darwin", "aarch64-darwin"]
# GNU tools on macOS (where BSD defaults differ)
coreutils.pkg-path = "coreutils"
coreutils.systems = ["x86_64-darwin", "aarch64-darwin"]
Resolving Package Conflicts
When two packages install the same binary, use priority (lower number wins):
[install]
gcc.pkg-path = "gcc12"
gcc.priority = 3
clang.pkg-path = "clang_18"
clang.priority = 5 # gcc wins file conflicts
Use pkg-group to group packages that should resolve versions together:
[install]
python.pkg-path = "python311"
python.pkg-group = "python-stack"
pip.pkg-path = "python311Packages.pip"
β¦
Pertanyaan umum
Apakah saya perlu memasang Flox terlebih dahulu?
Ya, Flox harus dipasang di komputer Anda terlebih dahulu. Petunjuknya ada di situs web resmi Flox.
Apa arti 'reproducible'?
Artinya lingkungan yang dibuat akan persis sama di komputer mana pun tempat Flox diaktifkan, sehingga menghindari masalah 'di komputer saya berjalan'.
Bisakah saya menggunakannya di Windows?
Saat ini Flox mendukung macOS dan Linux. Untuk Windows, Anda bisa menggunakannya di dalam lingkungan Docker.
Detail
Deskripsi asli dari pembuat
Create reproducible, cross-platform (macOS/Linux) development environments with Flox, a declarative Nix-based environment manager. Use when setting up project toolchains, installing system-level dependencies (compilers, databases, native libs), pinning exact package versions for a team, onboarding developers, running local services (PostgreSQL, Redis, Kafka), or solving 'works on my machine' probl
repo: affaan-m/ECC
Popularitas
- Bintang GitHub
- 280k
- Peringkat
- #316
- Lisensi
- MIT
- Diperbarui
- 15/10/2026
Komentar
- β¦
Skill lain dari repositori ini
accessibility
280kMembantu agent Anda membuat antarmuka yang ramah untuk semua orang. Memastikan website dan aplikasi tetap bisa dipakai penyandang disabilitas, seperti tunanetra.
agent-architecture-audit
280kMembuat agent Anda memeriksa apakah semuanya berjalan dengan benar. Agent akan menemukan dan memperbaiki masalah pada sistem AI agar bekerja sesuai harapan.
agent-eval
280kMembantu agent Anda membandingkan berbagai alat coding AI. Mengukur mana yang lebih cepat, lebih murah, dan lebih andal untuk tugas tertentu.
agent-harness-construction
280kMembuat agent Anda lebih memahami cara menyelesaikan tugas. Agent mengoptimalkan alat dan instruksi yang digunakan agar peluang berhasilnya lebih besar.
Skill serupa
openclaw-update
394kMembantu agent Anda memperbarui OpenClaw Gateway yang sudah ada, dengan memilih metode pembaruan yang sesuai cara pemasangannya dan menjaga sesi Anda tetap berjalan.
diagnose-gateway
394kMembantu agent Anda mencari tahu mengapa OpenClaw Gateway gagal dengan memeriksa pengaturan, channel, dan port tanpa mengubah apa pun.
crabbox-apps
394kMembantu agent Anda membuka dan menjalankan aplikasi di mesin cloud sementara, lalu menampilkan tampilannya di panel samping chat Anda.