flox agent import reads such a repository, finds its plugins and skills, and writes a package pinned to one commit into your environment.
This guide imports a repository, builds the package with flox build, checks it, and installs it.
Prerequisites
- An environment with
flox/flox-agentinstalled, as in the quickstart. - Logged in to FloxHub with
flox auth login, which installing and publishing need. - The environment’s folder is a git repository, because
flox buildreads only files git tracks:
flox agent is available.
Import the repository
Pass the repository asowner/repo, a GitHub URL, or a local clone whose origin is on GitHub:
.flox/pkgs holding two files:
default.jsonrecords the pinned source, the skills, and the import that produced them, including its warnings.default.nixreadsdefault.jsonand is the same in every package.
.flox/agent-lib/ and the flox-agent that ran the import in .flox/pkgs/flox-agent/.
Import only reads from GitHub.
Repositories hosted elsewhere are rejected.
Choose what gets imported
Most repositories need no flags. When discovery finds the wrong thing, these flags adjust it, and import records them indefault.json so a later re-import repeats them:
See the
flox agent import reference for how discovery works.
Build and check the package
Track the new files, then build the plugin:Install it into your environment
Publish the package to your catalog, then install it from there:flox publish needs the repository pushed to a remote, with the commit you publish on its branch.
See flox publish for what it checks.
flox agent list now shows the plugin, and the next flox agent launch loads it.
Update the package
Run the same import again to move to the repository’s latest commit. To repeat the flags recorded the first time, use--replay:
unchanged, regenerated, or the old and new commit, with the skills added and removed.
Build and publish again to ship the new version.
The agent plugin packages in the agent-stacks catalog are made the same way, in the agent-pkgs repository.
To have a plugin published there, open a pull request to agent-pkgs with the generated folder.
Packages there are re-imported automatically when their upstream moves.
Related
flox agent importreferenceflox agent check-pluginreference