Getting Started Guide

This guide brings you up to speed on how to browse and publish to the sneakerweb. In particular, it teaches you how to view the contents of .snk files (pronounced sneak files), and how to create your own. The guide assumes knowledge of how to run command line applications.

First, you need to install the sneakerweb CLI application from the downloads page. If there is no prebuilt binary for your platform, you can compile the application yourself by running cargo install sneakerweb (requires a working Rust development environment).

Once installed, you can use the sneakerweb import path/to/file.snk command to import all sneakerwebsites stored in the file at path/to/file.snk into your local sneakerweb collection. This collection is stored in ~/.sneakerweb. Good to know: if you already have sites in your collection, and the file you are importing contains outdated versions of those sites, those are skipped automatically.

Next, run sneakerweb serve. This runs a webserver at http://sneakerweb.localhost:1312/. Open that URL in a browser of your choice, and you can browse your collection of sneakerwebsites (including those you just imported from the .snk file). Actually, your browser of choice should be Firefox or Safari, because Chromium-based browsers and Edge do not implement .localhost (sub-) domains correctly and fail to correctly fetch sneakerwebsites.

When opening http://sneakerweb.localhost:1312/, you will see a list of sneakerwebsites. Each site has a preview panel, and on the bottom-right there is a digest (a random-looking string of characters) that links to the sneakerwebsite proper. Chances are that the preview panel also contains a link to the main sneakerwebsite.

To publish your own sneakerwebsite, start by running sneakerweb domain. This generates a public key and a secret key. The public key serves as an identifier for the sneakerwebsite you publish; the site’s URL will be http://the-public-key.localhost:1312/. The secret key you must supply every time you want to update your site. Nobody can update the site unless they know the secret key.

The sneakerweb application does not automatically save the keys, you have to manage these yourself. Keep your secret key(s) safe. If anyone else gets them, they can modify your site. If you yourself lose them, you lose the ability to modify your site.

Next, you need a directory containing a static website. You want to have an index.html page, this will be the entry point to your site. Another file you want to have is sneakerweb.html. On the local sneakerweb frontpage, this file is served inside an iframe (with a height of 150px) as a preview for your site.

When you have prepared this directory, run sneakerweb publish path/to/website/directory. The terminal will prompt you for the private and public key. This will publish the contents of the website directory to the domain in question (by copying a bunch of data into your ~/.sneakerweb directory). If you later want to update the contents of the domain, simply run sneakerweb publish again and supply the same keys. You can create and publish to as many domains as you want.

Finally, to share the new sneakerwebsite with other people, run sneakerweb export some/path.snk to export your collection (i.e., all sneakerwebsites you have) into a new .snk file. Pass this file to your friends via USB drive or local network, and then they can sneakerweb import it and access your sneakerwebsite.

In theory, you can share .snk files over the internet, of course. But we strongly encourage you to embrace the slowness of physical transport instead. It really makes a difference for how the sneakerweb will feel to you.

And finally: the sneakerweb CLI has several commands and options not covered in this guide. Run sneakerweb --help to get a general overview, or run sneakerweb subcommand --help to obtain more information about subcommand. For example, sneakerweb publish --help will tell you how to supply keys as argument rather than waiting for an interactive promt, or sneakerweb export --help will tell you how to export only parts of your collection.