The Fig CLI
Last updated
Last updated
Fig's CLI makes it easy to access apps, commonly used files (), and commonly used scripts.
fig <command, app name, or file name> [subcommands] [inputs]
CLI Hierarchy explains how Fig parses and routes every command it receives
Examples gives some examples CLI commands and how Fig would route them
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 a file like , CMD/index.html
, , CMD.html
or an executable like CMD
, CMD.sh
, CMD.py
, or CMD.js
in any of the directories you have specified in your $FIGPATH
For help setting up your $FIGPATH, go to
Is there an App on the Fig App Store called CMD
fig dir
--> Opens the dir app
fig google hello world
--> Opens the Google app and searches "hello world"
fig web https://github.com/pulls
--> Open your Pulls page in Github
fig local index.html
--> Opens the index.html file in your current working directory
fig deploy --flag
--> Runs the deploy.sh script and passes in a flag
fig run heroku
--> Opens the interactive runbook, heroku, located in your current working directory
fig acme forkdb
--> Runs the forkdb subcommand specified by your acme file