- Mac users who develop on VTEX IO
- Permission to install programs on your Mac
vtexofficial CLI installed
- Basic command-line knowledge
When developing for VTEX IO, working across different accounts and workspaces can become confusing. Before committing actions like
vtex install and
vtex link, I'm always interested in checking if I'm logged in the right account and workspace.
To help you (and myself) with that, I'm gonna show how to display that information on Mac's Menu Bar, so it'll be visible for you all the time!
The Menu Bar is the fixed top bar on your computer, which shows icons, menus and other information.
Let's go! For this to work you need to:
- Install BitBar.
- Select a folder of your preference to be the plugins' folder (you're prompted when installing).
- Create the file
vtex.10s.shon the folder you've selected on the last step.
- Paste and save the following content to
- Inside the plugins folder on the terminal, run
chmod +x vtex.10s.sh
- Click on
BitBarmenu item on the Top Bar and click "Refresh"
That's it! It should work just fine ✨
If you want to display it colored like I've done, try this instead. I've removed it on the default snippet because some shells don't support it!
Extra: If you click on it, it opens that workspace's store on myvtex.com!
- The script reruns every 10 seconds, so it'll update after
vtex switch. If you want to configure this time, click here.
- I've edited the Shebang to
#!/bin/bashbecause most people use bash. If you use another shell (like zsh), update it accordingly.
- I've added some color using ANSI codes. Click here to see other options.