Trying Fig: Intellisense in Your Terminal

Fig.io is a cool new tool that brings fancy autocompletion to your terminal. It is very similar to how VS Code's autocompletion works.

Folders and Files

We can see the main git commands:

Git Commands

We can see branches also:

Git Branches

I like that it gives descriptions for each command so I can remember which git stash command is which:

Git Stash

We can see npm init in action:

npm init

Fig autocompletes package names:

npm install tailwindcss

If we install a 3rd party package like the Vue CLI, we can see it's commands:

Vue CLI

The Fig docs are great at showing how you can add your own commands for your package.

javascript
export const completion: Fig.Spec = {
  name: "abc",
  description: "The stupid content tracker",
  subcommands: [
    {
      name: "checkout",
      description: "Switch branches or restore working tree files",
      options: [
        {
          name: ["-b"],
          description: "create and checkout a new branch",
          args: {
            name: "branch",
          },
        },
      ],
    },
  ],
  options: [
    {
      name: ["-v", "--version"],
      description: "View your current git version",
    },
  ],
};

The above code would create:

Fig Custom Command

I'm all for helping developers out with some Intellisense. It's why I love VS Code so much (and made a course on VS Code).

Sign up for the fig.io waitlist and give it a try!

Chris Sev

Chris Sev

Chris Sev is the co-founder of Better Dev. Coding better every day. Previously he created Scotch.io which was acquired.