😀The Fig CLI
Fig CLI Structure
Fig's CLI makes it easy to access apps, commonly used files (like interactive runbooks), and commonly used scripts.
The general syntax for Fig commands is:
fig <command, app name, or file name> [subcommands] [inputs]
Below
CLI Hierarchy explains how Fig parses and routes every command it receives
Examples gives some examples CLI commands and how Fig would route them
Remember: Fig commands can display websites, fig apps, interactive runbooks (.run files). and execute scripts
CLI Hierarchy
Fig follows a specific hierarchy when determining how to parse any given command. Fig has a hierarchy to avoid conflicts. For example, fig deploy
could refer to an app named deploy and a script in your $FIGPATH named deploy.
Let's say you run fig CMD
. Fig will check (in this order):
Is
CMD
a native Fig command that can't be overridden?
Have you defined a custom Fig Alias for
CMD
?
Is there an App on the Fig App Store called
CMD
Examples
fig dir
--> Opens the dir appfig google hello world
--> Opens the Google app and searches "hello world"fig run heroku
--> Opens the interactive runbook, heroku.run, located in your current working directoryfig web https://github.com/pulls
--> Open your Pulls page in Githubfig local index.html
--> Opens the index.html file in your current working directoryfig deploy --flag
--> Runs the deploy.sh script and passes in a flagfig acme forkdb
--> Runs the forkdb subcommand specified by your acme.fig file
Hint: Just running fig
gives you a list of all the subcommands you have available.
Last updated