🎈 `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
Output Analyzer for you terminal commands

Output analyzer (OZER) You can specify a few words inside config.yaml file and specify the color you want to be used. installing: Install command usin

Ehsan Shirzadi 1 Oct 21, 2021
Cek Username IG Yang Masih Bisa Dipake

Cek Username IG Cara Install $ pkg update && pkg upgrade $ pkg install python $ pkg install git $ git clone https://github.com/Dekusec/ig-checker $ cd

Deku 3 Nov 28, 2021
kitty - the fast, feature-rich, cross-platform, GPU based terminal

kitty - the fast, feature-rich, cross-platform, GPU based terminal

Kovid Goyal 17.3k Jan 04, 2023
Fast as FUCK nvim completion. SQLite, concurrent scheduler, hundreds of hours of optimization.

Fast as FUCK nvim completion. SQLite, concurrent scheduler, hundreds of hours of optimization.

i love my dog 2.8k Jan 05, 2023
Simple tool, to update linux kernel on ubuntu

Kerbswap Simple tool, to update linux kernel on ubuntu Information At the moment, this tool only supports "Ubuntu" distributions, but will be expanded

dword 1 Oct 31, 2021
A Python-based command prompt concept which includes windows command emulation.

PythonCMD A Python-based command prompt concept which includes windows command emulation. Current features: echo: Input your message and it will be cl

1 Feb 05, 2022
A next-generation CLI and TUI that aims to be your personal assistant for everything competitive programming related. πŸš€

Competitive Programming Tool Kit The Competitive Programming Tool Kit (cptk for short), is a command line and terminal user interface (CLI and TUI) th

Alon 4 May 21, 2022
A powerful Minecraft command library.

Mecha A powerful Minecraft command library. from mecha import Mecha

32 Dec 10, 2022
A CLI tool that scans through a directory and organizes all loose files into folders by file type.

Organizer CLI Organizer CLI is a python command line tool that goes through a given directory and organizes all un-folder bound files into folders by

Mulaza Jacinto 6 Dec 14, 2022
Python3 library for multimedia functions at the command terminal

TERMINEDIA This is a Python library allowing using a text-terminal as a low-resolution graphics output, along with keyboard realtime reading, and a co

Joao S. O. Bueno 89 Dec 17, 2022
Rover is a command line interface application that allows through browse through mission data, images, metadata from the NASA Official Website

πŸ€– rover Rover is a command line interface application that allows through browse through mission data, images, metadata from the NASA Official Websit

Saketha Ramanjam 4 Jan 19, 2022
Seamlessly run Python code in IPython from Vim

Seamlessly run Python code from Vim in IPython, including executing individual code cells similar to Jupyter notebooks and MATLAB. This plugin also supports other languages and REPLs such as Julia.

Hans Chen 269 Dec 20, 2022
A simple Python CLI tool that draws routes/paths on a given map.

Map Router A simple Python CLI tool that draws routes/paths on a given map. Index Installation Usage Docs Why? License Support Installation Coming soo

Pedro Morim 1 Nov 07, 2021
Colab-xterm allows you to open a terminal in a cell

colab-xterm Colab-xterm allows you to open a terminal in a cell. Usage Install package and load the extension !pip install git+https://github.com/popc

InfuseAI 194 Dec 29, 2022
A command line tool to query source code from your current Python env

wxc wxc (pronounced "which") allows you to inspect source code in your Python environment from the command line. It is based on the inspect module fro

ClΓ©ment Robert 13 Nov 08, 2022
Detect secret in source code, scan your repo for leaks. Find secrets with GitGuardian and prevent leaked credentials. GitGuardian is an automated secrets detection & remediation service.

GitGuardian Shield: protect your secrets with GitGuardian GitGuardian shield (ggshield) is a CLI application that runs in your local environment or in

GitGuardian 1.2k Jan 06, 2023
CLI tool for one-line installation of C++/CMake projects.

cmakip When working on virtual environments, Python projects can be installed with a single command invocation, for example pip install --no-deps . .

Artificial and Mechanical Intelligence 4 Feb 15, 2022
dotfilery, configuration, environment settings, automation, etc.

β”Œβ”¬β”β”Œβ”€β”β”Œβ”€β”β”Œβ”€β”β”¬ β”¬β”Œβ”¬β”β”¬ β”¬β”¬β”Œβ”€β” β”‚β”‚β”‚β”œβ”€ β”‚ β”¬β”œβ”€β”€β”‚ β”‚ β”‚ β”œβ”€β”€β”‚β”‚ :: bits & bobs, dots & things. β”΄ β”΄β””β”€β”˜β””β”€β”˜β”΄ β”΄β”΄β”€β”˜β”΄ β”΄ β”΄ β”΄β”΄β””β”€β”˜ @megalithic πŸš€ Instal

Seth Messer 89 Dec 25, 2022
A python library for parsing multiple types of config files, envvars & command line arguments that takes the headache out of setting app configurations.

parse_it A python library for parsing multiple types of config files, envvars and command line arguments that takes the headache out of setting app co

Naor Livne 97 Oct 22, 2022
Command Line For Truecaller Written In Python

Truecaller-CLI Command Line Version For Truecaller Written In Python Never Login With A Number Over And Over Or It Will Be Banned Because Program Is S

Sandaru Ashen Fernando 16 Nov 08, 2022