You can create a new ActiveState project directly from your command line by entering:
state init <orgname>/<projectname> --language <language@version>
For example: state init jsmith/python-3.10 --language python@3.10
Your project will be automatically synced with your Platform account.
To download your runtime from the ActiveState Platform to a location on your local machine, enter the following command:
state checkout <orgname>/<projectname> --runtime-path <location of folder>
For example: state checkout jsmith/python-3.10 --runtime-path C:\python
If you are already in the directory you want to use as the location of the runtime, you can simply run:
state checkout <orgname>/<projectname>
More information on how to download your runtime to your local machine can be found here.
After checking out your project from the Platform to your local machine, you have two options for activating and using your runtime:
To set your runtime as your user default, enter:
state use <orgname>/<projectname>
To create a virtual environment for your project, enter:
state shell <orgname>/<projectname>
You can add packages to your project using either the Platform UI or directly from the command line.
To add packages to your project from the command line:
state install <package-name[@version]>
For example: state install requests@2.31.0
Note that the version information is optional. Entering only the package name will default to installing the most recent stable version.
To uninstall a package from your project (no version number is needed):
state uninstall <package-name>
To push local changes to your project to the Platform:
state push
To sync your local project by pulling in changes made via the Platform:
state pull
To see the location of all locally checked out projects:
state projects
The output returned will show the name of each project and the location of the folders for that project on the local machine.
To remove one project at a time, manually remove the folder shown after Executables. Then clean up the Local Checkout by either:
activestate.yaml file from the directory, orFor more information on package management, see the Package Management documentation.