State Tool

State Tool - ActiveState's CLI Solution

The State Tool is the command line interface (CLI) for the ActiveState Platform. It lets you manage your Python and Perl projects right from the command prompt. You can work on your projects and environments, all with a single tool that supports Python and Perl on Windows and Linux!

  • Create new runtime environments for your projects
  • Add, remove, update and otherwise manage the packages and dependencies in your environments
  • Automatically create virtual environments for each of your projects on your local Windows, Linux or Mac machine

Quick-Start Guide

Get started with the steps below to set up your first Python runtime with the PyTorch package.

Step 1: Install the CLI

Our CLI gives you access to our language & package catalog.

If you’d prefer to install via Powershell, you can find the CLI instructions in our State Tool Cheat Sheet

				
					sh <(curl -q https://platform.activestate.com/dl/cli/w19880l01/install.sh)
				
			

Run the above command in your terminal to install the State Tool

				
					sh <(curl -q https://platform.activestate.com/dl/cli/w19880m01/install.sh)

				
			

Run the above command in your terminal to install the State Tool

Step 2: Create an account

Your ActiveState account gives you access to our services.

				
					state auth signup
				
			
Step 3: Set up your Python environment

This creates a Project on the ActiveState platform and downloads all of the required binaries onto your machine.

				
					state init <org-name>/<project-name> --language python@3.10
				
			
org-name The name of your organization.
project-name Pick a project name that describes what you’re working on.
python@3.10 We recommend 3.10 but pick whatever version you like
This command adds an activestate.yaml in the folder where you ran the command. This file keeps all the details of your environment.
Step 4: Install packages

We take care of all the dependencies and build packages from source.

				
					state install torch@2.0.1
				
			
Try popular packages like flask, tensorflow,matplotlib,Django.
You can even import your requirements.txt or pipfile
Step 5: Save your local changes

Sync your local environment changes with the remote environment.

				
					state push
				
			
We keep track of which packages and dependencies (and their versions) you have installed so that you can re-deploy this environment exactly anywhere else.
Step 6: Start using your Python

Share your environment with others on your team or run it in your CI.

Option 1 – Set it as your global Python installation
It will be accessible anywhere on your machine. Run state use reset to unset it.
				
					state use <org-name>/<project-name>
				
			
Option 2 – Run python in a Virtual environment
This will run your Python in isolation in a sub-shell. Run exit to stop.
				
					state shell <org-name>/<project-name>
				
			
Deploy your new environment anywhere

Share your environment with others on your team or deploy it in your CI/CD environment.

				
					state checkout <org-name>/<project-name>
				
			

Web Dashboard Integration

The ActiveState CLI is powered by the ActiveState Platform, a build platform that lets you create, manage and collaborate on multiple environments. When you create your account, whatever you do on the ActiveState CLI is automatically synced to the web UI.

  • Create and configure multiple environments
  • View package vulnerabilities across your environments
  • View a history of changes in your environments
  • Create organizations and manage members & access
ActiveState Platform - Automatically build runtime environments
Scroll to Top