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

Related tags

CLI Tools st
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
Quickly open any path on your terminal window in your $EDITOR of choice!

Tmux fpp Plugin wrapper around Facebook PathPicker. Quickly open any path on your terminal window in your $EDITOR of choice! Demo Dependencies fpp - F

null 257 Dec 28, 2022
The project help you to quickly build layouts in terminal,cross-platform

The project help you to quickly build layouts in terminal,cross-platform

gojuukaze 133 Nov 30, 2022
Sink is a CLI tool that allows users to synchronize their local folders to their Google Drives. It is similar to the Git CLI and allows fast and reliable syncs with the drive.

Sink is a CLI synchronisation tool that enables a user to synchronise local system files and folders with their Google Drives. It follows a git C

Yash Thakre 16 May 29, 2022
flora-dev-cli (fd-cli) is command line interface software to interact with flora blockchain.

Install git clone https://github.com/Flora-Network/fd-cli.git cd fd-cli python3 -m venv venv source venv/bin/activate pip install -e . --extra-index-u

null 14 Sep 11, 2022
AWS Interactive CLI - Allows you to execute a complex AWS commands by chaining one or more other AWS CLI dependency

AWS Interactive CLI - Allows you to execute a complex AWS commands by chaining one or more other AWS CLI dependency

Rafael Torres 2 Dec 10, 2021
Python-Stock-Info-CLI: Get stock info through CLI by passing stock ticker.

Python-Stock-Info-CLI Get stock info through CLI by passing stock ticker. Installation Use the following command to install the required modules at on

Ayush Soni 1 Nov 5, 2021
A simple CLI based any Download Tool, that find files and let you stream or download thorugh WebTorrent CLI or Aria or any command tool

Privateer A simple CLI based any Download Tool, that find files and let you stream or download thorugh WebTorrent CLI or Aria or any command tool How

Shreyash Chavan 2 Apr 4, 2022
Yts-cli-streamer - A CLI movie streaming client which works on yts.mx API written in python

YTSP It is a CLI movie streaming client which works on yts.mx API written in pyt

null 1 Feb 5, 2022
[WIP]An ani-cli like cli tool for movies and webseries

mov-cli A cli to browse and watch movies. Installation This project is a work in progress. However, you can try it out python git clone https://github

null 166 Dec 30, 2022
dbt-subdocs is a python CLI you can used to generate a dbt-docs for a subset of your dbt project

dbt-subdocs dbt-subdocs is a python CLI you can used to generate a dbt-docs for a subset of your dbt project ?? Description This project is useful if

Jambe 6 Jan 3, 2023
Limit your docker image size with a simple CLI command. Perfect to be used inside your CI process.

docker-image-size-limit Limit your docker image size with a simple CLI command. Perfect to be used inside your CI process. Read the announcing post. I

wemake.services 102 Dec 14, 2022
open a remote repo locally quickly

A command line tool to peek a remote repo hosted on github or gitlab locally and view it in your favorite editor. The tool handles cleanup of the repo once you exit your editor.

Rahul Nair 44 Dec 16, 2022
QueraToCSV is a simple python CLI project to convert the Quera results file into CSV files.

Quera is an Iranian Learning management system (LMS) that has an online judge for programming languages. Some Iranian universities use it to automate the evaluation of programming assignments.

Amirmahdi Namjoo 16 Nov 11, 2022
A CLI tools to get you started on any project in any language

Any Template A faster easier to Quick start any programming project. Installation pip3 install any-template Features No third party dependencies. Tem

Adwaith Rajesh 2 Jan 11, 2022
CLI program that allows you to change your Alacritty config with one command without editing the config file.

Pycritty Change your alacritty config on the fly! Installation: pip install pycritty By default, only the program itself will be installed, but you ca

Antonio Sarosi 184 Jan 7, 2023
Simple CLI tool to track your cryptocurrency portfolio in real time.

Simple tool to track your crypto portfolio in realtime. It can be used to track any coin on the BNB network, even obscure coins that are not listed or trackable by major portfolio tracking applications.

Trevor White 69 Oct 24, 2022
CLI helper to install Github releases on your system.

gh-release-install is a CLI helper to install Github releases on your system. It can be used for pretty much anything, to install a formatter in your CI, deploy some binary using an orcherstration tool, or on your desktop.

Jonas L. 28 Nov 6, 2022
A command-line based, minimal torrent streaming client made using Python and Webtorrent-cli. Stream your favorite shows straight from the command line.

A command-line based, minimal torrent streaming client made using Python and Webtorrent-cli. Installation pip install -r requirements.txt It use

Jonardon Hazarika 17 Dec 11, 2022