Skip to content
This repository has been archived by the owner on Apr 23, 2021. It is now read-only.

githubocto/flat-vscode

Repository files navigation

🚨 📦 This repository is archived, superseded by flat-editor


Flat

Flat is a VSCode extension that steps you through the process of creating a Flat action, which makes it easy to fetch data and commit it to your repository as flatfiles.

Just as materialized views make it easier and faster to work the results of a query, Flat makes it easy to materialize data from anywhere into your workspace.

Flat streamlines a pattern popularized by Simon Willison and Alex Gaynor). The pattern of pulling data into git is an interesting one that deserves a dead-simple developer experience. Flat is an experiment from GitHub's Office of the CTO to make it easier for anyone to employ this pattern.

Usage

VS Code & Codespaces

To use Flat, install the extension and click the Flat icon in the sidebar. You will prompted to authenticate with GitHub (nb: Flat uses the user:email and repo scopes):

Screenshot of initial auth view for Flat extension

Once authenticated, Flat will either guide you through the steps for creating a Flat action, or list all workflow runs of said action.

Screenshot of starting view for Flat extension

Creating an HTTP action

Screenshot of HTTP creation view for Flat extension

To create an HTTP action, you'll be asked for the following inputs:

  1. A URL
  2. A CRON schedule
  3. A name

These inputs will be used to generate and commit a .github/workflows/flat.yaml file to your repository.

Creating a SQL action

Screenshot of SQL creation view for Flat extension

To create a SQL action, you'll be asked for the following inputs:

  1. A database connection string *
  2. A CRON schedule
  3. A format for saving your data (CSV or JSON)
  4. A name

* Note that we will encrypt this value and create a GitHub secret in your repository for this connection string. No sensitive data will be committed to your repository.

These inputs will be used to generate and commit a .github/workflows/flat.yaml file to your repository.

Viewing Workflow Runs

If Flat determines that you already have an action with runs, it will instead list these runs:

Screenshot of past runs in Flat extension

Appendix

For documentation of the various configuration options that this extension uses in flat.yaml, see the Flat action documentation.

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published