State Tool FAQ

Below are some commonly asked questions about using the State Tool. If you have questions please check the online forums, or reach out to contact us.

Common Questions

Where does my runtime go when I state activate?

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:

  • It’s good for developers so their work won’t conflict with production
  • It won’t conflict with work done by other developers
  • it won’t conflict with your other work, as each runtime is contained in its own virtual environment.

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.

How to stop state activate?

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.

How do I uninstall a state activate?

There are two separate commands to uninstall your activated project, each with unique characteristics.

  • state clean cache will 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 uninstall gets 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.

How do I switch to another project?

  • Typing state projects will give you a list of the projects that are installed locally on your machine.
  • After finding the project you want to work on, exit your current activated project by typing exit into the command line. This will deactivate your project.
  • Type state activate <organization name/project name> to activate the project you want to switch to.
  • Type state show will 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.
  • If you receive an error in your state show command, try pushing your local settings to the Platform by running state push. Then re-enter state show to receive your activated project’s details.

How do I compare projects using the State Tool?

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:

  • Begin by activating your first project by typing state activate <organization1/project1> into your command prompt.
  • Run the script by entering state run <script1>.
  • When project1 stops type exit to deactivate the project.
  • Activate the second project by entering state activate <organization1/project2> into the command prompt.
  • Run the project2 script by entering state run <script2> and wait for the script to stop.
  • Now, by scrolling down you can view a side-by-side comparison of the projects.

How do I use the State Tool to check my project for vulnerabilities?

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.