Coder Social home page Coder Social logo

tfz's Introduction

tfz

Fuzzy filter and open all your TFC workspaces.

Installation

This tool uses fzf to do fuzzy finding, make sure you have that installed.

tfz is built with deno install it via:

$ deno install -A https://raw.githubusercontent.com/scnewma/tfz/main/tfz.ts

Usage

You must have a valid terraform token first.

$ terraform login

Create a configuration file with your TFC organization name that you want to filter workspaces for.

$ mkdir -p ~/.config/tfz
$ echo '{"org":"<YOUR-ORG-HERE>"}' > ~/.config/tfz/config.json

tfz filtering works on a local cache so that filtering is FAST. You can instruct tfz to refresh it's cache before beginning filtering by passing the --sync or -S option.

Any selected items are automatically opened in your browser. tfz executes fzf with --multi so you can select multiple workspaces and they will each be opened.

$ tfz -S

After the cache is populated, you can drop the -S to search the local cache quickly.

$ tfz

An initial query can be provided as well in case you want to have a shell entry that can be repeated many times more easily.

$ tfz my-workspace-prefix-

Alfred Integration

If you use alfred, you can integrate tfz directly with alfred to allow fuzzy searching from outside of the terminal! Create a new workflow with a "Script Filter" and put the following in the script. That script filter can then be connected to "Open URL" to automatically launch the selected workspace.

# you may need to update this location depending on how you install tfz
export PATH="$HOME/.deno/bin:$PATH"
tfz -A $1

tfz's People

Contributors

scnewma avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.