🎈 `st` is a CLI to quickly kick-off your new Streamlit project

Related tags

Command-line Toolsst
Overview

🎈 st - a friendly Streamlit CLI

st is a CLI that helps you kick-off a new Streamlit project so you can start crafting the app as soon as possible!

How it works

✨ Simple as:

$ st .
demo_quick.mov

πŸš€ Usage

Prerequisites

This is a working setup for anyone using Microsoft VS Code. Has been tested solely on Mac OSX.

Manually

  1. Install requirements:
pip install -r requirements.txt
  1. Make sure to enable your CLI to access VS Code. See this link.

  2. Add the alias to your ~/.bashrc:

# Alias for st
alias st='python ~/your/path/to/st/st.py -p'
  1. Source it:
source ~/.bash_profile

Getting started

Run:

$ st {directory}

Documentation

$ python st.py --help

Usage: st.py [OPTIONS]

Options:
  -p, --path TEXT                 Path where you want to create your Streamlit
                                  project.

  --open_project_in_vs_code INTEGER
                                  Open VS code with the newly created file.
  --run_app INTEGER               Run Streamlit script
  --open_app_in_browser INTEGER   Open Streamlit app in browser
  --help                          Show this message and exit.

Troubleshooting

xcode-select --install
Comments
  • Cookiecutter, tests and new API

    Cookiecutter, tests and new API

    πŸ“š Context

    Adding some work on top of what @snehankekre started! Inspired by thoughts in here

    🧠 Description of changes

    On top of https://github.com/arnaudmiribel/st/pull/3:

    • Replaced pip with pip3 and python with python3
    • Added tests for GitHub URL validation and parsing
    • Better .gitignore!
    • Now using st-cookiecutter to enable customizing the template

    πŸ”₯ In addition, now supporting...

    $python3 main.py
    Usage: main.py [OPTIONS] COMMAND [ARGS]...
    
      🎈 Welcome to st 🎈
    
      This is an experimental CLI to help you kick off and maintain Streamlit
      projects as fast as possible!
    
    Options:
      --help  Show this message and exit.
    
    Commands:
      clone  πŸ‘― Clone an existing Streamlit project
      go     😎 Open VS Code and your app in Chrome!
      kill   πŸ”« Kill a given Streamlit app running locally!
      list   🀯 List running Streamlit apps under ports 85**
      new    πŸ†• Create a new Streamlit project from an empty template
    
    • clone:
    python3 main.py clone https://github.com/arnaudmiribel/stoggle/blob/main/streamlit_app.py 
    βž• Cloning repo https://github.com/arnaudmiribel/stoggle
    βž• Changing directory to 'app/'
    βž• Creating a new environment with venv
    βž• Installing dependencies
    DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
    DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
    WARNING: You are using pip version 22.0.4; however, version 22.1.2 is available.
    You should consider upgrading via the '/usr/local/opt/[email protected]/bin/python3.9 -m pip install --upgrade pip' command.
    βž• Opening project in VS Code...
    βž• Running app...
    
    • list:
    $python3 main.py list
    
    Let's look at your apps running locally...
                           App URL
    App ID                        
    1110    http://localhost:8501 
    
    • kill:
    $python3 main.py kill --id 1110
    Killing 1110...
    
    • new:
    $python3 main.py new
    
    You just asked for a `new` Streamlit project. Let's go!
    New directory name [app]: 
    Want to customize the template? [y/N]: y
    Title of your app [Balloons]: Surfin' USA
    Will you be using secrets? [Y/n]:  
    Will your app use more than one page? [Y/n]: 
    Are you connecting to Snowflake in this app? [y/N]: y
    
    
    πŸŽ‰ Successfully created your new Streamlit app in directory 'app'!
    

    πŸ–₯️ Test!

    1. Clone this repo and go on this branch
    2. Now go ahead and try out python3 main.py!
    opened by arnaudmiribel 2
  • Support GitHub url of main script

    Support GitHub url of main script

    :books: Context

    @arnaudmiribel you had mentioned that you'd someday like to support st {template}, where template is a GitHub repo. This PR makes incremental progress towards that vision.

    :brain: Description of changes

    • Supports st {template}, where template is the GitHub (.py) url of the main script. E.g.

      st https://github.com/streamlit/streamlit-example/blob/master/streamlit_app.py
      
    • Creates a virtualenv with venv

    TODO

    • Refactor into functions to more conveniently reuse code
    • Support Conda, Poetry
    opened by snehankekre 1
  • added a couple new features

    added a couple new features

    Hey @arnaudmiribel, I thought it might be interesting to add a snowflake flag that automatically adds space in the secrets file for usernames, passwords, etc, and also adds a sample query. This isn't exactly ready yet (mostly because the streamlit app doesn't work OOB with this setup), but I just wanted to toss this idea by you (i'm also super bored)

    opened by tylerjrichards 1
  • Refactoring + CI

    Refactoring + CI

    • Split all main.py into multiple files, one for the entrypoint and one for each command (within their own subdirectory)
    • Remove unused functions
    • Set up GitHub Action for releases to PyPi
    opened by arnaudmiribel 0
  • Show main file name in `st list`

    Show main file name in `st list`

    Shows the Streamlit apps' main file name in the output of st list:

    $python3 main.py list
    
    Let's look at your apps running locally...
                           App URL          Main file
    App ID                                           
    6487    http://localhost:8501              yes.py
    7121    http://localhost:8502             user.py
    9239    http://localhost:8505   get_mainscript.py
    
    opened by snehankekre 0
Releases(v0.1.1)
  • v0.1.0(Sep 11, 2022)

    What's Changed

    • Support GitHub url of main script by @snehankekre in https://github.com/arnaudmiribel/streamlit-kickoff-cli/pull/3
    • Show main file name in st list by @snehankekre in https://github.com/arnaudmiribel/streamlit-kickoff-cli/pull/5
    • Cookiecutter, tests and new API by @arnaudmiribel in https://github.com/arnaudmiribel/streamlit-kickoff-cli/pull/4
    • Pass directory name even if not customizing template by @blackary in https://github.com/arnaudmiribel/streamlit-kickoff-cli/pull/6
    • Handle cases where python is a substring of the command by @blackary in https://github.com/arnaudmiribel/streamlit-kickoff-cli/pull/7
    • Refactoring + CI by @arnaudmiribel in https://github.com/arnaudmiribel/streamlit-kickoff-cli/pull/8

    New Contributors

    • @snehankekre made their first contribution in https://github.com/arnaudmiribel/streamlit-kickoff-cli/pull/3
    • @arnaudmiribel made their first contribution in https://github.com/arnaudmiribel/streamlit-kickoff-cli/pull/4
    • @blackary made their first contribution in https://github.com/arnaudmiribel/streamlit-kickoff-cli/pull/6

    Full Changelog: https://github.com/arnaudmiribel/streamlit-kickoff-cli/commits/v0.0.4

    Source code(tar.gz)
    Source code(zip)
Owner
Arnaud
Arnaud
Linux commands Interpreter for Windows and Mac based systems using Python

DBHTermEcIbP Linux commands Interpreter for Windows and Mac based systems using Python Basic Linux commands supported viewing current working director

Vraj Patel 1 Dec 26, 2021
Borderless-Window-Utility - Modifies window style to force most applications into a borderless windowed mode

Borderless-Window-Utility Modifies window style to force most applications into

8 Oct 22, 2022
A handy command-line utility for generating and sending iCalendar events

A handy command-line utility for generating and sending iCalendar events This simple command-line utility is designed to generate an iCalendar event,

Baochun Li 17 Nov 21, 2022
🌍 Harness the power of whatsmydns from the command-line.

chkdns Harness the power of whatsmydns from the command-line. Installing with pip pip install chkdns Run chkdns --host github.com Alternatively you ca

Craig Gumbley 3 Oct 29, 2022
Universal Command Line Interface for Amazon Web Services

This package provides a unified command line interface to Amazon Web Services.

Amazon Web Services 13.3k Jan 07, 2023
Message commands extension for discord-py-interactions

interactions-message-commands Message commands extension for discord-py-interactions README IS NOT FINISHED YET BUT IT IS A GOOD START Installation pi

2 Aug 04, 2022
Simple script to download OTA packages from Realme's endpoint.

Realme OTA Downloader CLI tool (based on this C# program) to create requests to the Realme's endpoint. Requirements Python 3.9. pycryptodome. Installa

Roger Ortiz 64 Dec 28, 2022
doq (python docstring generator) extension for coc.nvim

coc-pydocstring doq (python docstring generator) extension for coc.nvim Install CocInstall: :CocInstall coc-pydocstring vim-plug: Plug 'yaegassy/coc-p

yaegassy 27 Jan 04, 2023
Chat with Rem in Terminal!

Chat with Rem in Terminal!

bariscodefx 1 Dec 19, 2021
This is a simple Termo application in command line style

my-termo This is a simple Termo application in command line style. This app run a Linux crontab task every day to get a new word. Type termo in your t

Gustavo Soares 1 Feb 14, 2022
A CLI for advanced management of your notes with simple commands

PyNoteManager This is a CLI for advanced management of your notes with simple co

3 Dec 30, 2021
ForX - get forex quotes from the terminal

A command line tool for checking exchange rates between currencies, both crypto and fiat.

Gabe Banks 52 Dec 10, 2022
Browse Hacker News like a haxor: A Hacker News command line interface (CLI).

haxor-news Coworker who sees me looking at something in a browser: "Glad you're not busy; I need you to do this, this, this..." Coworker who sees me s

Donne Martin 3.8k Jan 07, 2023
Ideas on how to quickly learn to build command-line tools

CLI-Bootcamp Ideas on how to quickly learn to build command-line tools Part 1-Bash Week1: Using Linux Lesson 1: Using Linux Shell Lab Lesson 2: How sh

Noah Gift 10 Apr 18, 2022
Patool is a portable command line archive file manager

Patool Patool is an archive file manager. Various archive formats can be created, extracted, tested, listed, searched, repacked and compared with pato

318 Jan 04, 2023
Professor Wordlist is a free open source command line tool written in python

Professor Wordlist is a free open source command line tool written in python, With the aim of generating custom wordlists with a variety of unique parameters and functions providing many possibilitie

γ‚ͺγƒΌγ‚―O A K Z E H γ‚ͺγƒΌγ‚― 1 Oct 28, 2021
Commandline Python app to Autodownload mediafire folders and files.

Commandline Python app to Autodownload mediafire folders and files.

Tharuk Renuja 3 May 12, 2022
Simple Python Library to display text with color in Python Terminal

pyTextColor v1.0 Introduction pyTextColor is a simple Python Library to display colorful outputs in Terminal, etc. Note: Your Terminal or any software

Siddhesh Chavan 1 Jan 23, 2022
Install python modules from pypi from a previous date in history

pip-rewind is a command-line tool that can rewind pypi module versions (given as command-line arguments or read from a requirements.txt file) to a previous date in time.

Amar Paul 4 Jul 03, 2021
An interactive cheatsheet tool for the command-line

navi An interactive cheatsheet tool for the command-line. navi allows you to browse through cheatsheets (that you may write yourself or download from

Denis Isidoro 12.2k Dec 31, 2022