powered by
LOGO

FASTN: Package Manager

ftd is a “programming language for prose”, and fastn is the package manager for ftd.

FASTN.ftd
To create a “fastn package”, create a FASTN.ftd file in any folder:

FASTN.ftd marks a folder as fastn package
-- import: fastn

-- fastn.package: fastn.dev
zip: github.com/fifthtry/fastn.dev/archive/refs/heads/main.zip
base: https://raw.githubusercontent.com/fifthtry/fastn.dev/main
We have created a package named fastn.dev. Packages in FASTN are named after the domain where they would be published. {ds.highlight: Every FASTN package is a website.}

Dependencies
FASTN support package dependencies. To add a dependency add it in FASTN.ftd file:

-- import: fastn

-- fastn.package: fastn.dev
zip: github.com/fifthtry/fastn.dev/archive/refs/heads/main.zip

-- fastn.dependency: fifthtry.github.io/doc-site as ds
Here fastn.dev has a dependency on fifthtry.github.io/doc-site.

We have also used “alias” feature to bind the name of this dependency to ds, so FTD files can write -- import: ds instead of having to use the full path, e.g. -- import: fifthtry.github.io/doc-site.

Distributed Package Manager
Unlike other package managers like pypi, npm and crates, there is no central package repository in FASTN. Since every FASTN package is a website, that website acts as the package repository.

What this means is when fastn sees fifthtry.github.io/doc-site as a dependency, it fetches the content of fifthtry.github.io/doc-site/FASTN.ftd file which acts as the meta data for the package, and the meta data includes the URL from where the package ZIP can be downloaded.

In our examples we use Github’s zip serving feature to let Github generate and distribute our .zip file. If you are not using Github, you can store the zip file containing entire package in some other location, like S3, or a server you control, and fastn will work with that.

LOGO

FASTN: Package Manager

ftd is a “programming language for prose”, and fastn is the package manager for ftd.

FASTN.ftd
To create a “fastn package”, create a FASTN.ftd file in any folder:

FASTN.ftd marks a folder as fastn package
-- import: fastn

-- fastn.package: fastn.dev
zip: github.com/fifthtry/fastn.dev/archive/refs/heads/main.zip
base: https://raw.githubusercontent.com/fifthtry/fastn.dev/main
We have created a package named fastn.dev. Packages in FASTN are named after the domain where they would be published. {ds.highlight: Every FASTN package is a website.}

Dependencies
FASTN support package dependencies. To add a dependency add it in FASTN.ftd file:

-- import: fastn

-- fastn.package: fastn.dev
zip: github.com/fifthtry/fastn.dev/archive/refs/heads/main.zip

-- fastn.dependency: fifthtry.github.io/doc-site as ds
Here fastn.dev has a dependency on fifthtry.github.io/doc-site.

We have also used “alias” feature to bind the name of this dependency to ds, so FTD files can write -- import: ds instead of having to use the full path, e.g. -- import: fifthtry.github.io/doc-site.

Distributed Package Manager
Unlike other package managers like pypi, npm and crates, there is no central package repository in FASTN. Since every FASTN package is a website, that website acts as the package repository.

What this means is when fastn sees fifthtry.github.io/doc-site as a dependency, it fetches the content of fifthtry.github.io/doc-site/FASTN.ftd file which acts as the meta data for the package, and the meta data includes the URL from where the package ZIP can be downloaded.

In our examples we use Github’s zip serving feature to let Github generate and distribute our .zip file. If you are not using Github, you can store the zip file containing entire package in some other location, like S3, or a server you control, and fastn will work with that.