Each ActiveState project (and the associated runtime) is installed in its own virtual directory to prevent dependency conflicts, when you activate a runtime you’re setting up a virtual environment to work from. This keeps your dependencies separate from those outside of the virtual environment’s parameters. This is important for the following reasons:
After exiting your runtime, files are cached on your local system until deletion. This helps keep reloading time fast. Regularly using the
state pull command will keep your project, and its virtual environment, up to date on your local installation.
You can end your activated state by typing
exit into the command prompt or terminal window. Closing the command prompt or terminal window will also deactivate your project.
There are two separate commands to uninstall your activated project, each with unique characteristics.
state clean cachewill remove all copies of cached versions of everything and reset the State Tool cache. This needs to be done from the main project directory, although it may work from other directories with newer language versions.
state clean uninstallgets rid of cached files, uninstalls the State Tool, installed language runtimes, and all configured information. It’s important to note that after confirming your choice to run this command, you will need to restore everything from the Platform. To find out more see here.
state projectswill give you a list of the projects that are installed locally on your machine.
exitinto the command line. This will deactivate your project.
state activate <organization name/project name>to activate the project you want to switch to.
state showwill return the project details for the current project and verify the switch has been made. Details like the name, organization, visibility (public or private), the operating systems and languages will be shown.
state showcommand, try pushing your local settings to the Platform by running
state push. Then re-enter
state showto receive your activated project’s details.
Comparing different versions of the same project is a great way to make sure changes have been logged and to track the progress of your projects. To compare two separate projects:
state activate <organization1/project1>into your command prompt.
state run <script1>.
exitto deactivate the project.
state activate <organization1/project2>into the command prompt.
state run <script2>and wait for the script to stop.
You can use the State Tool to check your current project for any potential vulnerabilities by activating the project using the
<organization name/project name>. After activating your project type
state cve to view the vulnerabilities associated with that project.
For a more detailed explanation of the vulnerabilities associated with your project, enter
state cve report. This will include an ID for each listed vulnerability so you can look them up to see how they may impact the security or performance of your project. To address the vulnerabilities found in your project see here.