Work With Projects

After creating your project, you need to deploy the runtime on your machine by running a checkout command. You can check out more than one runtime to your machine or the same runtime to different locations on your system.

This guide covers:

Different ways to use state checkout

Many of these methods deal with your activestate.yaml file. Click here for more information about this file and why it is important.

Simple check out

To check out your project and download a project folder containing your project’s activestate.yaml file to your current working directory, enter

state checkout <orgname>/<projectname>

For example state checkout exampleorg/Project1.

  • Your activestate.yaml file is entirely owned by the user and acts as a shortcut to your project. The file includes project details such as its location online, language and package information, and security features.
  • Your project, in its entirety, exists elsewhere on your machine. Run state projects to see where the local checkout (containing your activestate.yaml file) and the cached executable checkout locations for each project checked out from the Platform.

Download your activestate.yaml file directly into your working directory

To download the activestate.yaml file directly, enter:

state checkout <orgname>/<projectname> .
  • Your activestate.yaml file is entirely owned by the user and acts as a shortcut to your project. The file includes project details such as its location online, language and package information, and security features.
  • Your project, in its entirety, exists elsewhere on your machine. Run state projects to see the local checkout (containing your activestate.yaml file) and the cached executable checkout locations for each project checked out from the Platform.

For example state checkout Exampleorg/Project1 C:/Perl.

  • This is helpful when using your activestate.yaml file for automation, as it saves having to go into the newly created project folder to access it.

Download a project folder containing the activestate.yaml file into a specific location

To checkout a project to another location on your system and not your current working directory, enter:

state checkout <orgname>/<projectname> <location>

For example state checkout Exampleorg/Project1 C:/Perl.

  • This method is functionally identical to checking out a project to your working directory.
  • It will create a project folder containing your activestate.yaml file at the specified location.

Download the composing files and folders of your project

To download all files associated with your project (.dll, .bat, .exe, etc.) to a specific location on your system, enter:

state checkout <orgname>/<projectname> --runtime-path <folder location>

For example state checkout Exampleorg/Project1 --runtime-path C:/Perl. Using this command will bring the entire installation into the directory specified. This method is useful if you prefer having your project installation in a known location on your machine (e.g. c:/Perl). Or if you need to know the location of specific files or folders related to your project.

Check out a project branch

You can checkout a specific branch of a larger project using the following command:

state checkout --branch <branchname> <org/project> <path>

For example state checkout --branch Childbranch1 Exampleorg/Project1 C:\Perl.

Using this command brings the entire installation into the directory specified. This method is useful if you prefer having your project installation in a known location on your machine (e.g., C:/Perl) or if you need to know the location of specific files or folders related to your project.

Find checked out projects on your system

To find all projects checked out locally, enter the following command:

state projects

This will produce a list of all currently checked out projects and their locations on your system.

Work with Multiple Projects

After checking out two or more projects using the state checkout command, you can launch separate instances of your projects by using the state shell and state use commands. This allows you to work on multiple projects simultaneously without conflicts.

Launch separate shells simultaneously with no default runtime

Open two separate terminal windows and navigate to the directories containing your checked out ActiveState projects (“project1” and “project2” in this example). Projects can be from the same organization or different organizations.

In one terminal window enter:

state shell myOrg/project1 

and in the other window enter:

state shell MyOrg/project2

The State Tool will generate two separate virtual shells for your projects, ensuring that each instance will not interfere with the other or with existing system tools and settings. This is useful if you want to switch between projects without setting a global environment for your machine.

Once your working session has ended (by typing exit into the command prompt or closing the application), you will need to repeat the state shell command to open a shell for your project for any future work.

Launch projects with an existing default runtime

Setting your default project with the state use command does not prevent you from working on two or more projects at the same time.

To find which project is currently set as the system default, enter:

state use show

The project shown in the command output will be the default for your entire system (with the exception of those operating inside a virtual shell).

To launch another project (“project2”) while still having your default project (“project1”) set, enter:

state shell <orgname>/project2

This will open a new shell to work on project2 without disrupting your current default project runtime.