Readit News logoReadit News
Posted by u/mschrage 5 years ago
Launch HN: Fig (YC S20) – Autocomplete for the Terminalfig.io?ref=hn...
Hi HN! We’re Matt and Brendan, co-founders of Fig (https://fig.io/hn). Fig adds VSCode-style autocomplete to your existing terminal.

We built Fig because of our own struggles in the terminal: we were tired of context switching between man pages, Stack Overflow posts, and Medium tutorials anytime we got stuck. We wanted our CLI tools to be more discoverable.

The terminal is powerful, but unforgiving. It emulates the constraints of hardware (like teletype printers and video terminals) that became obsolete a generation ago. There are no built-in affordances. No hints about the 'right way' of using a tool or even finding the right tool for the job. Beginners are thrown in the deep end. And even seasoned developers can screw up their system with a few unfortunate keystrokes.

To solve this, we add a UI overlay that is linked with the interactive shell. As you type, Fig pops up subcommands, options, and contextually relevant arguments in your existing terminal. For example, you can type `npm run` and Fig will show you the scripts available in your package.json. You could also type `cd` when SSH'd into a remote machine and Fig will list the folders within your current directory on the remote machine.

We use the Accessibility API on Mac to insert text on your behalf and read what you've typed. We also integrate with the shell to determine the current process and working directory. We are built natively for macOS in swift. We built our UI using web technologies so we can ultimately go cross platform. We render it using a WKWebView (not Electron).

Fig is free for individuals and always will be. All completion specs - the templates used for generating CLI suggestions - are open source and anyone can contribute [0]. We plan to monetize by supporting autocomplete for companies' custom scripts and internal CLI tools. Ultimately, we want to bring other process documentation (like SRE runbooks or deployment workflows) closer to the environment where it's used. You can see an early iteration of Fig in this HN thread from last July. [1]

Fig is designed to be private. All processing happens locally on your device. None of your keystrokes are ever transmitted or stored by Fig.

We'd love to hear your feedback on what we’ve built! We're still in private beta (so things may break!!), but we are letting HN users skip our waitlist today and tomorrow using the link above! :)

----Edit----

We really appreciate all of this feedback! Brendan and I want to address some of the most common concerns below:

Telemetry: Fig has basic telemetry in order to help us make product decisions. We currently give the you option to opt out of all non-essential telemetry by running `fig settings app.disableTelemetry true`. This removes everything except for one daily ping. We use this ping to help us understand how many people were using Fig.

Adding this ping was a mistake. We have already removed it and will be pushing this change in our next build (v1.0.43).

Business Model: Under the hood, we've built an API layer on top of the terminal. This API lets you create visual apps. Autocomplete is the first app we've built using this API. We have many more planned for things like interactive runbooks for SREs and automating deployment workflows. You can see some early prototypes here. [2] We plan to monetize these team-based apps by charging per-seat.

Autocomplete will always be free for individuals. We will never sell your data.

[0] https://github.com/withfig/autocomplete

[1] https://news.ycombinator.com/item?id=23766980

[2] https://withfig.com/videos/old-sizzle-reel.mp4

dang · 5 years ago
All: this thread has multiple pages of comments. To see the rest, click More at the bottom of the page, or here:

https://news.ycombinator.com/item?id=27277819&p=2

(Sorry for the interruption. Comments like this will go away when we turn off pagination.)

nathancahill · 5 years ago
Very smooth, downloaded it and played around a bit.

My first thought is why not use built-in shell autocompletion functions instead of redefining them in JS?

Zsh completions are super powerful: https://github.com/zsh-users/zsh-completions/blob/master/zsh...

Typing `git a<TAB>` yields this in my terminal:

    ~ git add
    add        -- add file contents to index
    am         -- apply patches from a mailbox
    apply      -- apply patch to files and/or to index
    archimport -- import an Arch repository into git
    archive    -- create archive of files from named tree
(btw, broken link at the bottom of this page: https://fig.io/docs/getting-started - https://fig.io/concepts/dynamic-suggestions should be https://fig.io/docs/concepts/dynamic-suggestions)

mschrage · 5 years ago
This is something we definitely should add as a fallback when a Fig completion spec doesn't exist!

The reason we created our own standard is because traditional shell autocomplete doesn't always provide metadata, like descriptions, priority or icons. Also it is a little tricky to write by hand, unless you're pretty familiar with shell scripting.

verdverm · 5 years ago
Many CLI libraries provide the ability to generate auto-completion scripts. Cobra for Golang is an excellent example. It provides functions for all the major shells and is quite simple to add to any Go CLI using the library. It also supports dynamic calls for when someone wants to autocomplete on a resource known only to the running CLI.

For python argparse, there is argcomplete in the same vein

stackbeard · 5 years ago
I have this in my zshrc. Hopefully it is helpful to others:

  # tab completion
  setopt hash_list_all
  # https://stackoverflow.com/a/14900496/8514646
  bindkey '^i' expand-or-complete-prefix
  # by category
  # https://old.reddit.com/r/zsh/comments/6l797o/organizing_co mpletions_by_category/
  # https://github.com/sorinionescu/prezto/blob/master/modules/completion/init.zsh#L60
  zstyle ':completion:*:*:*:*:*' menu select
  zstyle ':completion:*:matches' group 'yes'
  zstyle ':completion:*:options' description 'yes'
  zstyle ':completion:*:options' auto-description '%d'
  zstyle ':completion:*:corrections' format ' %F{green}-- %d (errors: %e) --%f'
  zstyle ':completion:*:descriptions' format ' %F{yellow}-- %d --%f'
  zstyle ':completion:*:messages' format ' %F{purple} -- %d -- %f'
  zstyle ':completion:*:warnings' format ' %F{red}-- no matches found --%f'
  zstyle ':completion:*:default' list-prompt '%S%M matches%s'
  zstyle ':completion:*' format ' %F{yellow}-- %d --%f'
  zstyle ':completion:*' group-name ''
  zstyle ':completion:*' verbose yes
`

oddmiral · 5 years ago
ble.sh[0] is also good autocompletion and syntax highlighting solution for bash.

[0]: https://github.com/akinomyoga/ble.sh

Deleted Comment

shadeslayer_ · 5 years ago
I have been using zsh-autosuggestions [1] to achieve something similar, so seeing a new product that seems infinitely easier to configure and much more powerful is very.. heartening. I might not move over right this moment, but I'll be cheering you on.

PS: I read the fine print and I (and many others, I'm sure) would really, really like to pay some money for you to not send ANY telemetry data at all. Would be great if you kept this demographic in mind.

Congrats on the launch, and all the best!

[1]: https://github.com/zsh-users/zsh-autosuggestions

mschrage · 5 years ago
Thanks so much for this! We've heard the feedback on telemetry loud and clear - definitely will rework this in the future.
12ian34 · 5 years ago
Nice website, but I wouldn't switch to this from Fish/Zsh on account of:

1. Cannot identify any killer features above what I already have with forever free tools with much larger support communities.

2. Less trust in you as a YC startup. What if you fail? What if you sell out?

3. Requirement of email.

4. Telemetry and privacy concerns raised by others.

5. Not available for Linux, and I get the feeling that Linux would forever be an afterthought since you released for Mac first (presumably, this was driven by financial reasons).

zumu · 5 years ago
> 2. Less trust in you as a YC startup. What if you fail? What if you sell out?

> 3. Requirement of email.

> 4. Telemetry and privacy concerns raised by others.

Dovetailing on these...

Like why is a CLI tool VC backed? Is the business model just selling our data? Is the VC backing for another product and the CLI tool is just a PR thing?

dvt · 5 years ago
Just adding, from their website:

> Investors: We've raised several million dollars from amazing VCs like General Catalyst and Kleiner Perkins, and angels like Jason Warner, Adam Gross, Olivier Pomel, Scott Belsky, Will Gaybrick and a handful of other impressive dev tool founders and executives.

The fact that a CLI tool raised millions of dollars while also being basically powered by open-source contributions is also kind of a wtf moment to me, but what do I know.

mschrage · 5 years ago
> Is the VC backing for another product and the CLI tool is just a PR thing?

Autocomplete is our first product. The bigger vision that Fig can enable an ecosystem of terminal extensions. Here are some early prototypes we built [0] and here is the discussion from when we were posted on HN last summer [1].

> Is the business model just selling our data?

We will never sell data. That just isn't the business we want to build - Brendan and I like hacking on the terminal because it's interesting and we get to solve our own problems.

We've been lucky enough to find investors, most of whom have an engineering background, who understand how important the terminal and believe there is a lot of room for improvement.

Obviously, we would like Fig to become a sustainable business. We plan to monetize in the short term by offering autocomplete for internal CLI tools and scripts. Longer term, we think that there is a lot of stuff that developers do in the browser that make more sense in the terminal. Fig's autocomplete product is powered by an API that lets anyone build graphical extensions that are connected to the terminal.

[0] https://fig.io/videos/old-sizzle-reel.mp4

[1] https://news.ycombinator.com/item?id=23766980

heavyset_go · 5 years ago
> Like why is a CLI tool VC backed? Is the business model just selling our data?

Agreed. Take a look at Nabu Casa, the developers of Home Assistant and Home Assistant Cloud. They are 100% self-funded by their revenue from HA Cloud and the hardware they sell.

Because of this, I don't have to worry about investors demanding a return on investment by any means necessary and potentially generating revenue from users' private data.

version_five · 5 years ago
CLI is a relatively "pristine" environment, where a lot of people's time is spent and nothing competes for our attention (or data as was pointed out). Any business model that could plausibly exploit this environment for financial gain would be an easy sell to investors.

I don't know anything about this product's intentions, but it's easy to imagine the possibilities once you start getting permission to pop something up in someone's terminal window.

Deleted Comment

stakkur · 5 years ago
You summarized my exact feelings about it, especially #1, 4, and 5. I get the feeling that the team hasn't done their homework on potential users and existing solutions.
mwcampbell · 5 years ago
No, I think it's incumbent on us developers to be more willing to pay for things. We know now that free doesn't really work.
simias · 5 years ago
I agree with all of your points and I probably would never use this product. That being said regarding Linux support, given the fact that Fig effectively needs to hook into your terminal emulator and your shell to drive a custom overlay, it seems like it would be a huge headache to add support for Linux given how heterogeneous the terminal setups can be on the platform. Imagine having to support urxvt running zsh on X11 and the gnome terminal running bash on Wayland or xterm running tcsh or...

I think on Linux it would make more sense to directly modify one of the many existing terminal emulators to add this functionality or you'll have to severely limit the supported configurations.

mschrage · 5 years ago
Thanks for your insight here! We are still deciding the exact implementation, but completely agree - Linux is a challenge due to the heterogeneity of distros, window managers, compositors, etc.

Our macOS approach might not work everywhere.

verdverm · 5 years ago
Point 2 is how I feel these days. It's hard to trust any low-level (installable) dev tools supported by VCs. Personally, that hard to trust is also moving up the stack, maybe more so because of the increased attacks on the software supply chain vendors (i.e. CodeCov, SolarWinds)
ljm · 5 years ago
I agree, and since it's VC backed it also feels like this is going to end up as SaaS for your terminal.

I would honestly feel less skeptical if this was a Show HN and the founders had just organically launched an app that did autocomplete and asked for some money to buy a license. I'd put that along side similar attempts like Xiki.

VC-backed changes it though, it feels different. It'll start with a subscription model and if this requires elevated privileges to run as what could essentially be a keylogger, it won't be long before the privacy promise goes away and the marketing team takes hold.

paulgb · 5 years ago
> maybe more so because of the increased attacks on the software supply chain vendors

I'm intrigued by this but not 100% sure I follow. Is the implication that VC-backed startups are more likely to suffer from a supply-chain attack, or just more general reluctance to incorporate any new tech into the stack as it increases the attack surface area?

nerdponx · 5 years ago
#1 I do not agree with. This is a great idea for a tool, and I am willing to pay for it. This is an extension to my terminal and a useful adjunct to my shell, not a replacement for either.

#5, maybe but that's fine. Lots of things are Mac-only or Linux-only. It's a proof of concept. Moreover they appear to be working on some kind of standard specification for completion meta-data, which other tools can start to adopt and use if it turns out to be a useful spec.

#2-4, it's open source (at least it looks like it's open source from the website). If the startup sells out, the project can be forked.

jrm4 · 5 years ago
I have found "it's open source" to be a real-life meaningless response to "I prefer tools that I am likely able to have a significant amount of autonomous control over in the future."

The software market has very effectively figured out how to make things "open source" in name only (offhand, Canvas is the one that's killing me these days), and unfortunately now all such claims must be taken with a huge grain of salt.

12ian34 · 5 years ago
#1 That's fair. Each to their own. For me I wouldn't be willing to pay even £1 a year for it.

#2-4 Firstly, just because it can be forked is not to say that it will. It's not easy to maintain a whole project in your spare time. Also, this may be a moot point since the completion engine is supposedly proprietary (as per another commenter).

cerved · 5 years ago
#5 is crucial, I highly value cross platform comparability. The existing differences are annoying enough as it is
rkeene2 · 5 years ago
Point #4 is particularly salient since it seems like telemetry information for a CLI-based tool which monitors the user's keystrokes doesn't provide the user any advantages.
mschrage · 5 years ago
We started with macOS because I have a background in Swift development. Linux is definitely not an after thought to us!

As for the telemetry concerns, I totally get that. We've tried to strike a balance and it seems like we've got it wrong. This will be fixed in the next update.

sidlls · 5 years ago
The correct balance is 0% of terminal activity is sent with telemetry, unless the user explicitly and specifically authorizes it.
Cyberdog · 5 years ago
> I have a background in Swift development.

Then why on earth did you go out of the way to implement this in JavaScript instead?

tasuki · 5 years ago
> Linux is definitely not an after thought to us!

Care to share more about this? Which terminals are you planning to support?

zzyzxd · 5 years ago
> 1. Cannot identify any killer features above what I already have with forever free tools with much larger support communities.

It does have the features I want, although not enough to convince me to switch right now. cli can be painful if you are working on commands you are not familiar with. IMHO, this is a better interface than the ones in Fish/Zsh, that provides richer information regarding command choices, hence can be a huge improvement for discoverability.

Imagine that you are not familiar with AWS EC2 and want to spin up an instance to play with. If you do that via awscli, first you need to run a bunch of `--help` commands to find the correct subcommands(`aws ec2`, and then `aws ec2 run-instances`), after that, there are 40+ flags for `run-instances`, some are mandatory, some are optional. If you do that from the web console, there's a very friendly wizard with several pages breaking down by networking, storage, OS...etc, intuitive and easy to understand.

mschrage · 5 years ago
The aws-cli is a monster! This exactly the type of situation where we envision Fig being really helpful :)
colonelpopcorn · 5 years ago
You can stop at #1. Why do I need this when oh-my-zsh exists?
quickthrower2 · 5 years ago
As soon as I saw the title I anticipated the Dropbox conversation!

I’m guessing people like me who use the shell as a means to an end. Honestly most of the time I’m using git bash “coz it’s there” and hate typing in commands. I actively avoid it. I installed LENS for kubernetes to avoid it.

I’d rather write a script in an IDE and run that than be working at the command line. Because then I can treat it like code, review before running and it’s repeatable.

I really get the benefits of this tool but I won’t use it because I prefer to avoid excessive command line use - preferring GUI and scripts BUT I do get why it is useful if I have to do interactive command line sessions

Exuma · 5 years ago
which oh-my-zsh plugins do you use that can do this? Is there an all-encompassing one or do you need to download tons of different ones like a docker plugin, git plugin, etc
nerdponx · 5 years ago
They are totally different things. This is like asking why you need a computer at home when you already get the newspaper delivered every morning.
avinassh · 5 years ago
Can you suggest some tools which auto suggest like Fig and work with zsh? The built in auto complete in zsh works nicely, but how do I get the drop down of all options?
kubami · 5 years ago
Each needs to define an autocomplete script. oh-my-zsh provides plugins that do that for common tools like git.

Those scripts are usually supplied by the CLI tool itself. For example for terraform: https://www.terraform.io/docs/cli/commands/index.html#shell-...

vishnugupta · 5 years ago
This is the closest I see: https://github.com/ohmyzsh/ohmyzsh

Since switching to it from the default shell of Mac OS terminal (zsh I think) I have found it immensely productive. Some of the things it does seem Magic like auto completing uncommitted files when I say “git add <tab>”

_h9mb · 5 years ago
You need no tool at all as you can do I reverse search in any shell with ^R. If you want to do it with a better UX you can use fzf. If you want the suggestions you can use zsh-autosuggestions or fish shell. Setting them up is straightforward. And if you want an example config for Zsh you can look mine. Zinit, the package manager, automatically load/install the plugins when loading the shell.

https://github.com/danisztls/dotfiles/blob/main/shell/zshrc

skratlo · 5 years ago
Fish does that by default
FractalHQ · 5 years ago
I really like Navi
smsm42 · 5 years ago
4 is a killer for me. I like the idea, I'd probably like the tool, but no way I'm installing a thing that sends out everything (or substantial part of) I type into CLI to the external server. Too much risk. I am ready to trust they mean well and make the maximum effort to make it work securely, but it's just not something I'd ever feel comfortable with.
cholojuanito · 5 years ago
>5. Not available for Linux, and I get the feeling that Linux would forever be an afterthought since you released for Mac first (presumably, this was driven by financial reasons).

I am amazed that a CLI tool isn't made for Linux

pclark · 5 years ago
#2 is really quite absurd - especially here of all places - how do you decide if a product or service will never "sell out"?
12ian34 · 5 years ago
Absurd? I'm definitely more confident that Fish/Zsh will stay free forever without changing their incentives, licensing and pricing than a YC-backed startup whose primary goal is to make money.
jokethrowaway · 5 years ago
I generally try to avoid startups and either go for established companies (business offers are more likely to stay there and work as expected) or small bootstrapped business (cheap, more likely to stay true to their roots, do one thing well without breaking everything in the future).

Startups are good for free trials as they have VC money to spend or finished deals (purchase once, consume once, forget about them).

gtf21 · 5 years ago
I don't really understand what's so different from the ZSH completions which I already have in my terminal but with no data leaving my machine?
dangom · 5 years ago
People who can configure their shells are not their target audience. For once, if you walk into any research center or academic environment and look over the shoulders of people who have to code or use a terminal because they have no other option, you would see that the vast majority know little beyond cd and ls. I wouldn't be surprised some would pay for directory completion alone.

Can those who know what zsh mean do a better job with existing tools or custom made scripts? 100%, but that doesn't matter.

Beyond that, you can level up even further by firing up Emacs and never again needing a terminal for things that require completion.

f6v · 5 years ago
> if you walk into any research center or academic environment

If they use their institution's infrastructure, it's managed by the dedicated system admins. No way they're going to allow this tool to be installed.

gtf21 · 5 years ago
Perhaps, but then a better option would be to contribute back to the ecosystem by creating a nice DSL to compile back to zsh etc. completions and making a nice installer on top of that. I don't see how "autocomplete in your terminal" is really a company given that the people who would pay for tools like this will probably be power users, who would (I assume) prefer the built-in tools.
brendanfalk · 5 years ago
Traditional shell completions are quite difficult to make. Many CLI tools have completions for subcommands and options, but not for arguments. Only the big CLI tools like `git` and `docker` have arguments completions (e.g. git push [remote] [branch]`.

Fig's declarative schema makes building the completions for subcommands, options and arguments very easy. This means we can support much more powerful autocomplete for many more CLIs.

Fig's standard format also makes it possible to suggest shortcuts for standard workflows (similar to aliases but more visual).

Finally, zsh and fish have good support for traditional autocomplete, but bash does not. Fig works the same across all shells (even when in an SSH session or a docker container).

skratlo · 5 years ago
> Fig's standard format

How is that a standard when you just came up with it? Any other existing autocompletion format is more standard than whatever you just released.

gtf21 · 5 years ago
So wouldn't a better solution be to make a nicer DSL for describing shell completions which is then translated into zsh, fish, etc. completions?

Agree RE bash but at some point doesn't one just use the tool with the featureset one wants?

yogevyuval · 5 years ago
What exactly do you mean by even when in SSH or docker?

Deleted Comment

Deleted Comment

vrtcn · 5 years ago
Highly dubious... asking for access to control the computer, asking for email, communicating with their servers. I don't care how much time this would save me, it absolutely isn't worth the risk.
djrogers · 5 years ago
This looks nice, but requiring an email during setup, with no explanation or discernible reason - and demanding a work email at that - seems very creepy.

This decision alone removes my trust in your product and your company, sorry.

GordonS · 5 years ago
Requiring a work email is a common tactic for B2B sales, so that sales people can contact you and try to get you to buy. This doesn't seem like a B2B kind of product, so it does seem... odd.
mschrage · 5 years ago
The reason we suggest logging in with your work email is so that you can share shortcuts and completions for internal CLI tools with your team.

We should probably add this explanation to the login page because I can see how this would be confusing.

niek_pas · 5 years ago
To those who, like me, are unwilling to share their email:

https://temp-mail.org

chrisjarvis · 5 years ago
Ya I closed the app and removed the Accessibility permission at this step. I don't need this app to "connect with my coworkers"