If you are working with Tinybird regularly, you know how important it is to stay aware of your current workspace and environment. Instead of running multiple commands to check these, wouldn't it be great to have this information right in your prompt?
In this guide, I'll help you to enhance your CLI experience by creating a custom Oh My Posh prompt that displays Tinybird-specific information.
Here is how your customized prompt will look once configured:
is a real-time data platform that lets developers build SQL-based APIs for working with massive datasets. It builds on ClickHouse, which is widely recognized as one of the fastest analytical databases for real-time data processing workloads.
While traditional data warehouses like Redshift excel at batch analytics and BI workloads - think of them as freight trains hauling massive amounts of data - Tinybird is more like a high-speed maglev train, optimized for real-time, user-facing analytics that require instant responses.
to display Tinybird information in your prompt
Prerequisites
You'll need the following tools installed:
- for prompt customization- A terminal that supports Unicode characters like the one bundled with Visual Studio Code
Before diving into Tinybird-specific customizations, let's set up Oh My Posh correctly. The installation process varies depending on your operating system.
Windows Installation
If you're using Windows, you have several installation options:
CODE# Option 1: Using winget (Recommended)
winget install JanDeDobbeleer.OhMyPosh
# Option 2: Using Scoop
scoop install https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/oh-my-posh.json
# Option 3: Using Chocolatey
choco install oh-my-posh
macOS Installation
For macOS users:
CODE# Option 1: Using Homebrew (Recommended)
brew install jandedobbeleer/oh-my-posh/oh-my-posh
# Option 2: Using MacPorts
sudo port selfupdate
sudo port install oh-my-posh
Linux Installation
For Linux systems:
CODE# Option 1: Using curl (Universal)
curl -s https://ohmyposh.dev/install.sh | bash -s
# Option 2: Using homebrew
brew install jandedobbeleer/oh-my-posh/oh-my-posh
For detailed installation instructions tailored to your specific setup and additional configuration options, consult the to display icons correctly.
Nerd Fonts are modified versions of popular programming fonts that add a vast collection of icons (glyphs) to the original font. Think of them as regular programming fonts supercharged with extra symbols - like the Git branch icon, folder symbols 📂, or platform-specific icons.
Installation
Oh My Posh has a CLI to help you select and install a Nerd Font:
CODE# To install the recommended font
oh-my-posh font install meslo
# For manual font selection
oh-my-posh font install
After installing a Nerd Font, you'll need to configure your terminal to use it. The configuration process varies depending on your terminal emulator.
Remember that each terminal maintains its own font settings. Configuring VS Code integrated terminal will not affect your standalone terminal emulator, and vice versa. For detailed configuration steps for each terminal type, refer to the official Oh My Posh
Save this as
~/.ohmyposh.json(or your preferred config location) and customize the colors, symbols, and segments to match your preferences:
CODE{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"segments": [
{
"background": "#FFA400",
"foreground": "#193549",
"leading_diamond": "\ue0b6",
"powerline_symbol": "\ue0b0",
"style": "diamond",
"template": " {{ .Profile }}{{ if .Region }}@{{ .Region }}{{ end }} ",
"trailing_diamond": "\ue0b0",
"type": "aws"
},
{
"type": "text",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#ffffff",
"background": "#f792c1",
"template": "{{ if eq \"devtest\" .Env.STAGE }} {{ else }} \uf635 {{ .Env.STAGE }} {{ end }}"
},
{
"type": "node",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#ffffff",
"background": "#6CA35E",
"template": "{{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}{{ .Full }} ",
"properties": { "fetch_package_manager": true }
},
{
"background": "#ff479c",
"foreground": "#ffffff",
"powerline_symbol": "\ue0b0",
"properties": {
"style": "folder"
},
"style": "powerline",
"template": " \ue5ff {{ .Path }} ",
"type": "path"
},
{
"background": "#fffb38",
"foreground": "#193549",
"powerline_symbol": "\ue0b0",
"properties": {
"fetch_stash_count": true,
"fetch_status": true,
"fetch_upstream_icon": true
},
"style": "powerline",
"template": " {{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0}} \uf692 {{ .StashCount }}{{ end }}{{ if gt .WorktreeCount 0}} \uf1bb {{ .WorktreeCount }}{{ end }} ",
"type": "git"
},
{
"type": "command",
"style": "powerline",
"powerline_symbol": "\ue0b0",
"foreground": "#00b7ff",
"background": "#193549",
"properties": {
"shell": "bash",
"script": "~/.aws/tb-prompt.sh"
},
"template": " \uf1c0 {{ .Output }} "
},
{
"background": "#6CA35E",
"foreground": "#ffffff",
"powerline_symbol": "\ue0b0",
"properties": {
"fetch_version": true
},
"style": "powerline",
"template": " \ue70c {{ if .Unsupported }}\uf071{{ else }}{{ .Full }}{{ end }} ",
"type": "dotnet"
},
{
"background": "#ffff66",
"foreground": "#ffffff",
"powerline_symbol": "\ue0b0",
"style": "powerline",
"template": " \uf0e7 ",
"type": "root"
},
{
"background": "#8800dd",
"foreground": "#ffffff",
"powerline_symbol": "\ue0b0",
"properties": {
"style": "austin",
"threshold": 500
},
"style": "powerline",
"template": " <#fefefe>\ufbab</> {{ .FormattedMs }} ",
"type": "executiontime"
},
{
"background": "#2e9599",
"background_templates": ["{{ if gt .Code 0 }}#f1184c{{ end }}"],
"foreground": "#ffffff",
"powerline_symbol": "\ue0b0",
"properties": {
"always_enabled": true
},
"style": "powerline",
"template": " {{ if gt .Code 0 }}\uf00d{{ else }}\uf42e{{ end }} ",
"trailing_diamond": "\ue0b4",
"type": "exit"
}
],
"type": "prompt"
}
],
"final_space": true,
"version": 2
}
The Impact of a Better Prompt
Configuring your command prompt goes beyond aesthetics - it's about developer productivity and safety. Having instant visibility into your workspace and environment status helps prevent common mistakes and speeds up your workflow.
It's about making your daily work smoother and safer.
Think of it as your development cockpit - just as pilots rely on their (super cool!) instruments, developers need clear visibility of their working context. This becomes especially crucial when working with multiple Tinybird workspaces and AWS environments.
With instant visibility into your workspace and environment status, you can confidently avoid those costly mistakes that happen when context isn't clear.
Where to Next?
This is just the beginning of improving your Tinybird development experience. In the upcoming articles, I will explore:
Tinybird Console Pro Tips - unlocking the full-width view and most importantly, the dark mode - vampires like me 🧛 fear the light!
IaC Blueprint - structuring your Tinybird projects like a pro
Multi-tenancy Guide - implementing secure and scalable multi-tenant analytics with Tinybird and AWS
Production Checklist - everything you need for truly production-ready analytics
Node.js SDK - Tinybird SDK for Node.js that you never knew you needed!
Data Re-population CLI Tool - for efficiently managing and reloading your datasets- and many more!
Stay tuned!
Note
This is my first technical writeup in quite a while (I usually write about craft beer, and in my native language at that!). I'd love to hear your thoughts, suggestions, or even gentle 😄 corrections - don't hesitate to drop a comment.
Your feedback, whether it's a nod of approval or pointing out areas for improvement, will help me craft better content in the future!
Disclaimer
This article is an independent developer guide. I am not affiliated with, sponsored by, or officially connected to Tinybird in any way. All views and recommendations expressed are my own.
While these customizations are generally safe, if your coding adventures somehow result in your workstation spontaneously combusting, I must respectfully decline any responsibility for damage to you or your property. However, as a courtesy to your friendly Engineering Vampire 🧛 please do give advance notice of any potential... mishaps. It would be terribly wasteful to let good blood 🩸 go to waste. Just saying!
↗ Original-Artikel auf dev.to lesenVollständiger Original-BerichtAusführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
SOCIAL SHARE CARD GENERATOR