Skip to content

add command ​

Add a dependency to the fobos, resolved through the package indexes (the fobos gets its URL).

bash
fobis add NAME|INDEX:NAME|URL [options]

How to use it, with examples: Packages and indexes.

All options ​

Arguments: PACKAGE

OptionValueDefaultDescription
--moduleTEXTAdd the package providing this module.
--asTEXTName of the dependency in the fobos.
--semverTEXTVersion range (default: ^ the newest).
--tagTEXTPin a tag.
--revTEXTPin a commit.
--branchTEXTFollow a branch.
--useTEXTsources (compiled with yours, default) or fobos (built apart).
--mode, -mTEXTMode of the dependency's fobos (use=fobos).
--devA test-only dependency.
--forceReplace an existing dependency of that name.
--fobos, -fTEXTfobosThe fobos to edit.
--fpmEdit fpm.toml (the default when the project has one and no fobos).
--configTEXTUser configuration file (default ~/.config/fobis/config.ini).
--depthINTEGER2How far 'follows' is walked (0: configured indexes only).
--refreshFetch the indexes again instead of using the cache.
--jsonMachine-readable output.