managing-streamlit-apps
यह क्या करती है
यह स्किल आपको PostHog के अंदर Streamlit डेटा ऐप बनाने और चलाने के चरण दिखाती है, पहले संस्करण से लेकर साझा करने योग्य लिंक तक। यह उन लोगों के लिए है जिन्हें अपने PostHog डेटा पर बना एक सरल इंटरैक्टिव डैशबोर्ड या टूल चाहिए।
कब इस्तेमाल करें
- ✓जब आप ऐसा Streamlit ऐप बनाना चाहें जो PostHog डेटा दिखाए।
- ✓जब आपका Streamlit ऐप नहीं चल रहा और आपको कारण जानना हो।
- ✓जब आप किसी ऐप को शुरू, रोकना या अपनी टीम के साथ साझा करना चाहें।
Skill का लिंक
https://github.com/PostHog/posthog/blob/master/products/streamlit_apps/skills/managing-streamlit-apps/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“ऐसा Streamlit ऐप बनाइए जो हमारे साप्ताहिक साइनअप दिखाए, और उसका लिंक मेरी टीम के साथ साझा कीजिए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
यह ऐप बनाती है, उसका Python सोर्स सेट करती है, और उसे चलाने वाला सैंडबॉक्स शुरू करती है। जब ऐप चलता दिखे तो आपको साझा करने के लिए PostHog लिंक मिलता है, और देखने वालों को उसे देखने के लिए लॉग इन होना ज़रूरी है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Managing Streamlit apps
A Streamlit app is a Python data app running in an isolated sandbox inside PostHog.
Each app has immutable versions of its code; one version is active; a sandbox process serves the active version.
The full lifecycle is driven with the streamlit-apps-* MCP tools.
The happy path: create → set source → start → share
streamlit-apps-createwith aname(optionallydescription,cpu_cores0.25–8,memory_gb0.5–16, defaults 0.5 / 1). The app exists but has no code yet.streamlit-apps-set-sourcewith the completeapp.pysource as one string. Extra files ride along in the same call:filesmaps a project-relative path to text (helper modules, CSV, JSON),assetsmaps a path to base64 (Parquet, images). This creates version 1 and activates it. Write the source per thewriting-streamlit-appsskill — in particular useposthog_apps.query()for PostHog data, neverimport posthog.streamlit-apps-start. Returns immediately; the sandbox boots asynchronously.- Poll
streamlit-apps-statusuntilstatusisrunning(typically well under a minute). If it lands onerror, readlast_error— see Troubleshooting below. - Share the app: the
_posthogUrlreturned by create/get/start (/streamlit-apps/{short_id}) is the app's page in PostHog. That link is what you give humans. Viewers need to be logged into PostHog with access to the project (the app renders in an authenticated iframe; there is no public URL).
Whose data the app reads
The app's queries run with the data access of the person who authored the active version — set the source, and the app reads what you can read. Anyone who can view the app sees those results, so treat publishing an app as sharing that data with everyone on the project. An app whose version author has since been deleted can't start; upload a new version to fix it.
Updating code
Change an existing app in two steps, so you never ship an old copy over newer work:
streamlit-apps-get-sourcereads the active version (orversion_numberfor an older one). It returnsversion_number, a manifest of every file, and the text of each text file. Binary files appear without content. For a large app, passpaths(comma-separated) to read only the files you need.streamlit-apps-edit-sourcewithbase_versionset to thatversion_number.file_editsholds exactold→newtext replacements per file,create_filesadds new text files,delete_filesremoves files. Eacholdmust match exactly once, so include enough surrounding lines to make it unique. Files you do not touch stay byte-for-byte the same in the new version.
If the active version changed after your read, edit-source returns 409 with current_version.
This happens when another session ships a version, or when a person rolls the app back to an older version.
Read current_version again and redo your edits on it.
Do not fall back to set-source to force your copy through.
Keep streamlit-apps-set-source for a new app or a full rewrite.
It replaces every file, so pass files and assets again too; a version holds only what that call carried.
Both tools create the next version and activate it.
A running sandbox is stopped so it can't keep serving stale code — call streamlit-apps-start afterwards to serve the new version.
Versions are immutable, but not permanent: streamlit-apps-versions lists the newest 50, and non-active versions older than 30 days are deleted along with their code.
There is no rollback tool: to roll back, read the old version with streamlit-apps-get-source and set its files again with set-source.
Binary assets are not inlined there, so a rollback of an app with assets also needs a saved copy of those files.
Stopping, idling, and deleting
streamlit-apps-stopstops the sandbox; code and versions are untouched. Starting again later is cheap.- Idle sandboxes are stopped automatically after a period of no activity — a stopped app is normal, not an error. Start it again when needed.
streamlit-apps-deletestops any sandbox and soft-deletes the app. Confirm with the user before deleting anything you didn't create in this conversation.
Troubleshooting
status: errorwithlast_error: "Start failed: ..."— the sandbox failed to provision or boot. Retrystreamlit-apps-startonce; if it persists, surfacelast_errorto the user (provisioning failures are usually platform-si
अक्सर पूछे जाने वाले सवाल
साझा किया गया ऐप कौन खोल सकता है?
देखने वालों को ऐप देखने के लिए PostHog में लॉग इन होना चाहिए।
अगर ऐप में कोई त्रुटि दिखे तो?
स्किल ऐप की आख़िरी त्रुटि पढ़ती है और उसकी समस्या ठीक करने में मदद करती है।
क्या मैं ऐप को कितनी कंप्यूटिंग शक्ति मिले, यह चुन सकता हूँ?
हाँ। बनाते समय आप तय सीमाओं के भीतर उसका CPU और मेमोरी सेट करते हैं।
जानकारी
लेखक का मूल विवरण
Create, deploy, and operate Streamlit apps in PostHog via the streamlit-apps MCP tools — create an app, set its source, read and patch its code, start and stop its sandbox, poll status, list versions, delete, and share the app with humans via its PostHog URL. Use when asked to "create a streamlit app", "deploy a data app", "ship a dashboard app", "restart/stop my app", "why is my app not running", or "give me a link to the app".
repo: PostHog/posthog
लोकप्रियता
- GitHub स्टार
- 41k
- रैंकिंग में स्थान
- #6954
- लाइसेंस
- —
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
depot-ci
41kयह आपके एजेंट को Depot CI वर्कफ़्लो सेट अप करने, चलाने और माइग्रेट करने में मदद करती है, साथ ही रन के लॉग पढ़ने में।
depot-container-builds
41kयह आपके एजेंट को Depot के रिमोट बिल्डर पर Docker इमेज बनाने में मदद करती है, जिसमें मल्टी-प्लेटफ़ॉर्म इमेज और बिल्ड सुधार शामिल हैं।
depot-github-runners
41kयह आपके एजेंट को GitHub Actions जॉब Depot के मैनेज्ड रनर पर ले जाने, रनर का साइज़ और लेबल चुनने, और रनर सेटअप की समस्याएँ ठीक करने में मदद करती है।
editing-agents-md
41kयह आपके एजेंट को तय करने में मदद करती है कि कोई नियम AGENTS.md या CLAUDE.md में जाए या नहीं, और उसे ऐसे लिखे कि फ़ाइल भारी न हो।
मिलती-जुलती skills
gitcrawl
394kयह आपके एजेंट को GitHub issues और pull requests के सेव आर्काइव में खोजने, मिलते-जुलते मामलों को समूह में रखने और लाइव स्थिति जांचने देती है।
slacrawl
394kयह आपके एजेंट को स्थानीय Slack आर्काइव में संदेश खोजने और गिनने, उसकी ताज़गी जांचने और ज़रूरत पड़ने पर उसे ताज़ा करने देती है।
goplaces
394kयह आपके एजेंट को Google Places से जगहें खोजने, उनका विवरण और समीक्षाएं पाने, और जगह के नाम हल करने में मदद करती है, स्क्रिप्ट के लिए JSON आउटपुट के साथ।