Using in the CLI

If you'd like to try out FeaturePeek without installing a GitHub App or setting up Continuous Integration, you can use FeaturePeek in your CLI. This is our free FeaturePeek Indie product, and is similar but separate from our paid FeaturePeek Teams product.

FeaturePeek Indie is great for quickly deploying a preview of your site to get feedback from your peers, teammates, Twitter followers, or anyone you share with.

Your URL will look like https://dashboard.featurepeek.com/peek/{id}, and you'll get a little widget in the bottom-left corner where your reviewers can leave feedback. Because of this, it's main purpose isn't for production use, but rather to collect feedback before you deploy to production.

If you want to create a deployment preview automatically on every pull request instead of manually from the CLI, check out FeaturePeek Teams.

Local vs global installation

There are a few ways you can set up FeaturePeek Indie on your machine and on your repo.

If you intend to build your project with others, you probably want to install FeaturePeek Indie as a dev dependency, so that it'll be available when others checkout your repo.

npm i @featurepeek/peek --save-dev
*or*
yarn add @featurepeek/peek --dev

If you want to use FeaturePeek on any of your projects without having to download and install it every time, you should install it globally on your machine. You can install it globally using npm/yarn, or homebrew.

npm i @featurepeek/peek -g
*or*
yarn add @featurepeek/peek --global
*or*
brew install featurepeek/tap/peek

Invoking FeaturePeek Indie

For your base command, use the following depending on your installation method:

  • npm run featurepeek if you installed locally via npm
  • yarn featurepeek if you installed locally via yarn
  • featurepeek if you installed globally via npm or yarn
  • peek if you installed via homebrew

Setup

(The following commands assume you installed FeaturePeek Indie via homebrew.)

  1. peek login – this will create a FeaturePeek account for you if you don't have one already, and authenticate you in your CLI.
  2. peek init – this generates a configuration file that the CLI uses.
    • For path, this is the path to your build directory, aka the directory to where your built assets get generated when you run npm run build or yarn build. For some projects, this value could be build, dist, or public, but it varies from project to project. Check what directory gets generated after you run your build command (or consult your .gitignore file) to find out.
    • For spa, set to true if your frontend is a Single-Page Application and relies on client-side routing, or false otherwise.

Usage

The typical usage flow looks like this:

  1. Commit and push your changes. You can be on any branch.
  2. Run your build command. Since you just committed and pushed your changes, your deployment will be tied to a hash in your git history, making it easy to see the source that generated your build.
  3. Invoke FeaturePeek. This is a command like yarn featurepeek or peek. Your deployment preview will be ready after a few moments.

That's all there is to it! After your assets are packaged and uploaded, a shareable URL will be returned.

You can send this URL to anyone to get their feedback on your implementation. They won't need a FeaturePeek account to view your deployment, but they will need to create one to leave comments or file issues in the FeaturePeek drawer overlay. If you'd like your URLs to be private, subscribe to FeaturePeek Teams.

FeaturePeek Teams

FeaturePeek Indie is great for sharing single commits on personal projects. For company projects, you'll want to use FeaturePeek Teams:

  • Enables private deployments that only your team can access.
  • Runs in your Continuous Integration pipeline for automatic deployment previews on every pull request.
  • Works with frontends containerized in Docker in addition to static frontends.