├── README.md ├── launch.json ├── pinokio.js └── start.json /README.md: -------------------------------------------------------------------------------- 1 | # Langflow One-Click Install 2 | 3 | ## What This Script Does 4 | 5 | When you run the script, it will prompt you to set up a virtual environment or activate one. 6 | 7 | This script performs the following steps automatically: 8 | 9 | ### Create a Python virtual environment: 10 | 11 | A new isolated Python environment will be created specifically for Langflow. This helps keep your global Python environment clean and prevents conflicts with other packages. 12 | 13 | ### Activate the virtual environment: 14 | 15 | The newly created Python virtual environment is then activated, ready for the installation of Langflow. 16 | 17 | ### Install Langflow: 18 | 19 | The script will install the latest version of Langflow within the activated virtual environment. This ensures that you'll always start with the latest features and improvements. 20 | 21 | ### Launch Langflow: 22 | 23 | The script doesn't stop at just installing Langflow. It goes the extra mile and launches the Langflow server for you. 24 | 25 | ### Open Langflow in a browser: 26 | 27 | Finally, to make things even more convenient, the script will automatically open Langflow in a new browser tab. You'll be ready to start using Langflow immediately. 28 | -------------------------------------------------------------------------------- /launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "run": [ 3 | { 4 | "method": "shell.start" 5 | }, 6 | { 7 | "method": "shell.enter", 8 | "params": { 9 | "message": "{{self.config.activate_command}}", 10 | "on": [{ 11 | "event": null, 12 | "return": true 13 | }] 14 | } 15 | }, 16 | { 17 | "method": "shell.enter", 18 | "params": { 19 | "message": "python -m langflow", 20 | "on": [{ 21 | "event": "/Access (http[0-9\/.:]+)/", 22 | "return": "{{event.matches[0][1]}}" 23 | }] 24 | } 25 | }, 26 | { 27 | "method": "browser.open", 28 | "params": { 29 | "uri": "{{input}}", 30 | "target": "_blank" 31 | } 32 | }, 33 | { 34 | "method": "process.wait" 35 | } 36 | ] 37 | } 38 | -------------------------------------------------------------------------------- /pinokio.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | menu: [ 3 | { 4 | html: " Install", 5 | href: "start.json", 6 | }, 7 | { 8 | html: " Launch", 9 | href: "launch.json", 10 | }, 11 | ], 12 | }; 13 | -------------------------------------------------------------------------------- /start.json: -------------------------------------------------------------------------------- 1 | { 2 | "run": [ 3 | { 4 | "method": "input", 5 | "params": { 6 | "title": "Setup", 7 | "form": [ 8 | { 9 | "key": "create_venv", 10 | "title": "Create virtualenv", 11 | "description": "Command to create virtualenv", 12 | "default": "python -m venv .langflow_venv" 13 | }, 14 | { 15 | "key": "activate_command", 16 | "title": "Activate virtualenv", 17 | "description": "Command to activate virtualenv", 18 | "default": "{{os.platform() === 'win32' ? '.langflow_venv\\\\Scripts\\\\activate' : 'source .langflow_venv/bin/activate'}}" 19 | } 20 | ] 21 | } 22 | }, 23 | { 24 | "method": "self.set", 25 | "params": { 26 | "config.json": { 27 | "create_venv": "{{input.create_venv}}", 28 | "activate_command": "{{input.activate_command}}" 29 | } 30 | } 31 | }, 32 | { 33 | "method": "shell.start" 34 | }, 35 | { 36 | "method": "shell.enter", 37 | "params": { 38 | "message": "{{self.config.create_venv}}", 39 | "on": [{ 40 | "event": null, 41 | "return": true 42 | }] 43 | } 44 | }, 45 | { 46 | "method": "shell.enter", 47 | "params": { 48 | "message": "{{self.config.activate_command}}", 49 | "on": [{ 50 | "event": null, 51 | "return": true 52 | }] 53 | } 54 | }, 55 | { 56 | "method": "shell.enter", 57 | "params": { 58 | "message": "python -m pip install langflow -U", 59 | "on": [{ 60 | "event": null, 61 | "return": true 62 | }] 63 | } 64 | }, 65 | { 66 | "method": "shell.enter", 67 | "params": { 68 | "message": "python -m langflow", 69 | "on": [{ 70 | "event": "/Access (http[0-9\/.:]+)/", 71 | "return": "{{event.matches[0][1]}}" 72 | }] 73 | } 74 | }, 75 | { 76 | "method": "browser.open", 77 | "params": { 78 | "uri": "{{input}}", 79 | "target": "_blank" 80 | } 81 | }, 82 | { 83 | "method": "process.wait" 84 | } 85 | ] 86 | } 87 | --------------------------------------------------------------------------------