Link Applications
- Inspecting Your Workspace
- Linking Your Workspace
- Running Commands
- Unlinking Your Workspace
- Next Steps
Your local workspace can be linked to an application running in Fermyon Wasm Functions. This is a convenience so that you don’t always have to specify the --app-name
when running commands.
A workspace is a directory on your local machine that contains the Spin application code and manifest file. It is where you develop and test your application before deploying it to Fermyon Wasm Functions. Any child directory of where the Spin manifest is located is also considered part of the workspace.
Inspecting Your Workspace
You can see information about the current workspace by navigating to the directory where your Spin application is located and running the following command:
$ spin aka info
Among other things this command will tell if your workspace is linked to an application on Fermyon Wasm Functions and if so which one.
Auth Info
Accounts: your-account
Workspace Info
Root dir: /Users/user/src/hello-spin
Linked app: hello-spin
When you run spin aka deploy
for the first time, it will automatically linked your workspace to the application you just deployed.
Linking Your Workspace
If your workspace is not linked to an application, you can link it by running the following command:
$ spin aka link
This command will prompt you to select an application to link to. You can also specify the application name directly:
$ spin aka link --app-name <app-name>
This will link your workspace to the specified application. You can verify that the workspace is linked by running the spin aka info
command again.
Running Commands
Now anytime you run a command in this workspace Fermyon Wasm Functions will automatically assume that you want to run it against the linked application. For example, if you run spin aka deploy
it will upgrade that application. If you run spin aka logs
, it will show the logs for that application and so on.
Unlinking Your Workspace
If you wish to unlink your workspace from the currently linked application, you can do so by running the following command:
$ spin aka unlink
You can run spin aka info
again to verify that the workspace is no longer linked to an application.
Note
Unlinking your workspace does not delete the application on Fermyon Wasm Functions. It simply removes the link between your local workspace and the application.