Launch HN: Fig (YC S20) – Autocomplete for the 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
[+] [-] dang|4 years ago|reply
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|4 years ago|reply
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:
(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|4 years ago|reply
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.
[+] [-] stackbeard|4 years ago|reply
[+] [-] oddmiral|4 years ago|reply
[0]: https://github.com/akinomyoga/ble.sh
[+] [-] unknown|4 years ago|reply
[deleted]
[+] [-] shadeslayer_|4 years ago|reply
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|4 years ago|reply
[+] [-] 12ian34|4 years ago|reply
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|4 years ago|reply
> 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?
[+] [-] stakkur|4 years ago|reply
[+] [-] simias|4 years ago|reply
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.
[+] [-] verdverm|4 years ago|reply
[+] [-] nerdponx|4 years ago|reply
#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.
[+] [-] rkeene2|4 years ago|reply
[+] [-] mschrage|4 years ago|reply
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.
[+] [-] zzyzxd|4 years ago|reply
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.
[+] [-] colonelpopcorn|4 years ago|reply
[+] [-] avinassh|4 years ago|reply
[+] [-] smsm42|4 years ago|reply
[+] [-] cholojuanito|4 years ago|reply
I am amazed that a CLI tool isn't made for Linux
[+] [-] pclark|4 years ago|reply
[+] [-] gtf21|4 years ago|reply
[+] [-] dangom|4 years ago|reply
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.
[+] [-] brendanfalk|4 years ago|reply
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).
[+] [-] unknown|4 years ago|reply
[deleted]
[+] [-] unknown|4 years ago|reply
[deleted]
[+] [-] vrtcn|4 years ago|reply
[+] [-] djrogers|4 years ago|reply
This decision alone removes my trust in your product and your company, sorry.
[+] [-] woodruffw|4 years ago|reply
My question, since you mentioned that Linux support is "not an afterthought": how do you intend to support Linux? Your architecture on macOS is essentially a (benign) keylogger that I'm liable to trust because of Apple's strong isolation of concerns/entitlements; no such isolation is (consistently) available across Linux distributions. I suspect that most developers on Linux won't want your proprietary client running as a logger over X11 or Wayland.
[+] [-] lasfter|4 years ago|reply
If you give Fig permissions to look at what you are typing into the terminal, you should be prepared for them to look at what you are typing into the terminal and use it how it best serves them. They're asking for more permissions than that of course.
Imagine giving FedEx a copy of your house keys "just so they can guarantee safe delivery" without any legal recourse if the delivery people decided to help themselves to the contents of your fridge, or make photocopies of your documents.
[+] [-] albertzeyer|4 years ago|reply
For example:
- TermKit (https://github.com/unconed/TermKit, https://news.ycombinator.com/item?id=2559734)
- GateOne (https://github.com/liftoff/GateOne)
- DomTerm (https://domterm.org/)
- Extraterm (https://extraterm.org/)
- GraphTerm (https://github.com/mitotic/graphterm)
- HTerm (https://news.ycombinator.com/item?id=7539648)
- Terminology (https://www.enlightenment.org/about-terminology)
I wonder about the state of these, or in general about terminal emulators.
I really miss some extended features, like foldable text (https://gitlab.freedesktop.org/terminal-wg/specifications/-/...) or even just standardized image support (https://gitlab.freedesktop.org/terminal-wg/specifications/-/...).
And maybe this could be further extended to also directly support sth like this autocomplete support.
It becomes tricky when you think about how this works well together with tmux, SSH, Mosh, etc.
[+] [-] mschrage|4 years ago|reply
We've tried to make everything as backwards compatible as possible. Our goal is for Fig to integrate seamlessly with your existing tools and workflows.
[+] [-] crazypython|4 years ago|reply
That means you contribute free ("open source") completions to them, but the scope and type of the completions is limited by their proprietary engine.
--- YC has pinned the founder comment and made it an impossible to reply to the top-level comment.
They say the most effective forms of advertising are the ones we don't realize are ads. Well, this is an ad.
[+] [-] vhanda|4 years ago|reply
However, Is there someway I can make Fig not send any data to anyone else? From what I understand, Fig does send telemetry information, but I'd like to be made aware of it before it asks me to give it "accessibility" powers.
Also, while Fig may not send the data to anyone. Does this also cover all the auto-completion scripts? I'm worried I'll need to audit each one.
(I haven't gone past the grant accessibility powers screen)
[+] [-] brendanfalk|4 years ago|reply
You can run `fig settings app.disableTelemetry true` to disable all telemetry except for one daily ping.
You also make a good point: in our onboarding we should move our privacy information to before granting accessibility! We will make this more clear
[+] [-] hnarn|4 years ago|reply
Expecting your terminal to have a default setting to not call home is not paranoia: it's absolute common sense.
[+] [-] bredren|4 years ago|reply
[+] [-] throwawayboise|4 years ago|reply
[+] [-] WORMS_EAT_WORMS|4 years ago|reply
Also, this experience really is great. Without knowing anything I was able to disable the "Menubar Icon" simply by guessing commands.
And to try for any constructive feedback, I personally don't like logo at all. It doesn't seem to make sense to me and is the reason for hiding the icon in the first place.
Feels like a window management icon like this: https://magnet.crowdcafe.com/
Great job, will follow this closely!
[+] [-] jlg23|4 years ago|reply
[+] [-] Closi|4 years ago|reply
My only worry would be this is obviously so great it's only a matter of time before Apple/Microsoft see the light and build something similar into their OS - however hopefully this happens via acquisition rather than what happened to Flux, Watson and Duet.
[+] [-] renewiltord|4 years ago|reply
* Telemetry page is scary, man. I disabled everything instantly. This "we send a ping every time you" is too much. It's not even the content. It's the fact that I fear some sort of limp CLI because of slow Internet. I have to admit I am glad you made a clear telemetry page but I am sad you chose to put all that stuff into it. I'm generally a high-telemetry guy so I would have given you a fucking shit ton of data (I even install popcon on Debian) but I don't want my shit to slow down noticeably as a result.
* Sign in at the end of the setup process. Clever. I've already committed work into it. Used car salesman tactic, but fine, I get it.
* Your tutorial page didn't autocomplete `fig` CLI commands. When I typed `fig se` and hit Tab I got `fig settings.json`. Not inspiring.
* Prompt for iTerm 2 very good.
* Tool itself is pretty good. UI quite snazzy. Some unpredictability in whether I can just go to a folder vs. it tab-completing to a subfolder. Still, so far I like it. I'll respond tomorrow.
[+] [-] vptr|4 years ago|reply
I really don't understand who would use this. Maybe i'm too oldschool and grew up with shell so i'm used to the complexity and power it provides.
Would probably never even try such a tool.
[+] [-] d--b|4 years ago|reply
[+] [-] mschrage|4 years ago|reply
[+] [-] pandemic_region|4 years ago|reply
[+] [-] klinskyc|4 years ago|reply