Skip to content
FutureBlitz

    Install

    Tools

    fb add

    Adds dependencies from a registry to project.toml.

    fb add [options] <package>[@<range>]...

    fb add adds each package to the [dependencies] of the package the current folder is in, keeping the file’s other lines as they are, then resolves its version, writes it to fb.lock, and downloads it. Without a range, it writes the newest version as one: colors = "1.4.2", which means 1.4.2 or any later 1.x. Versions and ranges lists the ranges.

    It says Adding for each package the resolver adds, and Downloading for each archive it downloads, with the target for a target’s own archive, as Downloading codec v0.3.0 (windows-x64). Added colors v1.4.2 to dependencies comes last, once project.toml has it.

    To take a dependency out, delete its line from project.toml, then run fb update.

    Options

    Option
    --registry <name>A registry that project.toml’s [registries] names. Without it, futureblitz.dev’s, or the mirror [registries] names for futureblitz, if there is one.
    --besideShips it beside the executable, as link = "beside", not inside it
    --offlineUses only what’s in the cache
    --color <when>Colors the output: auto, always, or never

    Examples

    In a new package, fb add colors adds the newest colors, and the package it depends on. A range after @ picks older versions, and one command adds several packages:

    fb new app
    cd app
    fb add colors
    fb add colors@1.2 markdown_ext@0.4
    Output
         Created package app in app
          Adding colors v1.4.2
          Adding palette v0.3.0
           Added colors v1.4.2 to dependencies
          Adding markdown v1.0.0
          Adding markdown_ext v0.4.1
           Added colors 1.2 to dependencies
           Added markdown_ext 0.4 to dependencies

    fb add tools --registry company adds from a registry that [registries] names company. The line fb add colors adds to project.toml:

    [dependencies]
    colors = "1.4.2"

    Report an issue with this page or with FutureBlitz on GitHub.