Get Started
Start building Fig apps today
In order to start building Fig apps, you'll need to download Fig.
- Currently, Fig is a limited beta. To sign up for the developer preview, please fill out this form and join our developer community. We're really excited to see what you build. :) 
- Once you have Fig, you'll need to create the project structure for your Fig app. - Luckily, this is very simple. The minimal project requires no dependencies (besides - fig.jswhich is included automatically at runtime) and no build process.
<html>
  <head>
    <meta fig:app = "sample-app">
    <script>
      fig.init = (stdin, options) => {
        // fig.init is the entry point to your app's logic.
        // Calling any fig command prior will result in undefined behavior. 
        
        fig.title = fig.env.PWD
        fig.icon = `fig://${fig.env.PWD}`
        
        fig.execute('ls -1', (files) => {
          document.body.innerText = files
        })
      }
    </script>
  </head>
  <body>
  </body>
</html>fig local sample.html
- Debugging your app. - You can open the Safari Web Inspector by right clicking on your app. The Fig API is still maturing, so if you run into unexpected behavior, please let me know at matt@withfig.com or in the #bugs channels of the Slack community. 
- Running your app - fig local path/to/app.htmlWhile testing, it can be useful to add this snippet to your sidebar for quick access.- Run - fig home
- Press "Add Code Snippet" button 
- Choose an emoji and a name 
- Add - fig local path/to/app.html
 
- (Advanced) Adding apps to your - $FIGPATH- If you want to access your Fig apps without typing out the full path, you can add them to your - FIGPATH- a colon separated list of paths where Fig will check for a matching app. For instance, if you run- fig sample-app, Fig will check every directory added to your- FIGPATHfor...- sample-app.html
- sample-app/index.html
 - You can update your - FIGPATHby adding something like- export FIGPATH=/User/mschrage/path/to/appsto your- .profile.
Last updated
