Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
@withfig/autocomplete
Advanced tools
Fig makes the command line easier for individuals and more collaborative for teams.
Our most popular product is Autocomplete. As you type, Fig pops up subcommands, options, and contextually relevant arguments in your existing terminal.
brew install fig
NOTE: Once it's downloaded, launch the app to set up Fig!
A completion spec is a declarative schema that specifies the subcommands
,
options
and args
for a CLI tool. Fig uses these schemas to generate
suggestions.
Use the steps below or follow our getting started guide: fig.io/docs
Prerequisites:
Steps
Make sure you have pnpm
installed, as
that's the package manager used in this repo.
Click here to fork this repo.
Clone your forked repo and create an example spec
# Replace `YOUR_GITHUB_USERNAME` with your own GitHub username
git clone https://github.com/YOUR_GITHUB_USERNAME/autocomplete.git fig-autocomplete
cd fig-autocomplete
# Add withfig/autocomplete as a remote
git remote add upstream https://github.com/withfig/autocomplete.git
# Install packages
pnpm install
# Create an example spec (call it "abc")
pnpm create-spec abc
# Turn on "dev mode"
pnpm dev
Now go to your terminal and type abc[space]
. Your example spec will appear.
😊
src/
folderbuild/
folderbuild
folder, and generators run
every keystroke.You can use Fig's autocomplete for your own tools too. Here's how to create private completions:
import { ai } from "@fig/autocomplete-generators"
...
generators: [
ai({
// the prompt
prompt: "Generate a git commit message",
// Send any relevant local context.
message: async ({ executeShellCommand }) => {
return executeShellCommand("git diff")
},
// turn each newline into a suggestion (can specify instead a `postProcess1 function if more flexibility is required)
splitOn: "\n",
})
]
# Typecheck all specs in the src/ folder
pnpm test
# Compile typescripts specs from src/ folder to build/ folder
pnpm build
# Lint and fix issues
pnpm lint:fix
We would love contributions for:
If you aren't able to contribute, please feel free to open an issue.
Want to use Fig to add autocomplete internal CLI tools? Or want to use Fig at work but have security / compliance concerns?
We would love to help get you set up. Please email enterprise@fig.io
Fig works with the native macOS Terminal app, iTerm, Tabby, Hyper, Kitty, WezTerm, and Alacritty. It also works in the integrated terminals of VSCode, JetBrains IDEs, Android Studio, and Nova.
Want to see another terminal included? Check our issue tracker and add your support for it!
Fig uses the Accessibility API on Mac to position the window, and integrates with your shell to read what you've typed.
Not yet, Fig is only available on macOS for now. Windows and Linux support is in progress!
Run brew install fig
or, downloading the app at
fig.io/download. Then, launch the Fig app!
Yes! Check out our guide on how to get started building autocomplete specs.
Check out our How to Contribute guide. Many of Fig's 200+ contributors made their first open source contribution to Fig!
Join the Discord server and we'll debug it. Fixing Fig in your setup will fix it for other people too! 🙂
Get in touch at hello@fig.io or chat with us on Discord.
FAQs
Fig Autocomplete Specs
The npm package @withfig/autocomplete receives a total of 27,804 weekly downloads. As such, @withfig/autocomplete popularity was classified as popular.
We found that @withfig/autocomplete demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.