Skip to main content

First Steps - Deploy and Use Your Project

After creating your project and installing the State Tool, you can get started using your project locally. This guide covers the essential first steps to deploy and work with your ActiveState project.

Before starting, ensure you have:

Table of Contents

Check Out Your Project

After creating your project, you need to download it to your local machine. This is called "checking out" the project.

Simple Checkout

To download your project to a new folder in your current directory:

state checkout <orgname>/<projectname>

For example: state checkout myOrg/python-project

This creates a new folder containing your project's activestate.yaml configuration file.

Checkout to Current Directory

If you're already in the directory where you want your project:

state checkout <orgname>/<projectname> .

For example: state checkout myOrg/python-project .

This downloads the configuration directly into your current directory without creating a new folder.

Find Your Projects

To see all projects you've checked out:

state projects

This shows the location of each project on your system.

note

Need more deployment options? See the Checkout and Activate guide for advanced options including custom paths, branch checkouts, and multi-project setups.

Activate Your Project

After checking out your project, you need to activate it to use the runtime environment.

The state shell command creates an isolated environment for your project:

state shell

Run this command from your project directory (where the activestate.yaml file is located). Your terminal prompt will change to show you're in the project environment.

To exit the environment, type exit.

Activate from anywhere:

state shell <orgname>/<projectname>

Using state use (System Default)

To set a project as your system default:

state use <orgname>/<projectname>

This makes the project available from anywhere on your system without activating a shell each time.

Check your default:

state use show

Remove default:

state use reset
note

Working with multiple projects? See the Checkout and Activate guide for strategies on managing multiple projects simultaneously.

Install and Remove Packages

By default, the State Tool operates on the project in your current working directory, looking for an activestate.yaml file.

caution

If an activestate.yaml is not present, running state install <packagename> will create a new project in your current directory. Make sure you're in the correct project folder before installing packages.

Install a Package

To install a new package:

state install <packagename[@version]>

For example: state install pandas@1.3.1

The version is optional. Without it, the most recent version will be installed.

Remove a Package

To remove a package:

state uninstall <packagename>

For example: state uninstall pandas

Search for Packages

To search for available packages:

state search <packagename>

For example: state search requests

Import Multiple Packages

If you have packages defined in a requirements file, you can import them:

state import requirements.txt

Supported file formats:

  • requirements.txt (Python)
  • cpanfile (Perl)
  • META.json (Perl)
  • Gemfile (Ruby)

For more information, see Manage Requirements.

View Installed Packages

To list all packages in your project:

state packages

Update Your Project

Once you've made changes to your project locally (installed packages, changed configuration), you can save those changes to the Platform.

Save Local Changes to Platform

To push your local changes:

state push

This creates a commit with your changes, generating a commit ID that you can use to revert if needed.

Get Updates from Platform

If others have made changes to the project, or you've made changes via the web interface:

state pull

This syncs your local project with the latest changes from the Platform.

Revert to Previous Version

If you need to revert to an earlier version:

state revert <commitID>

You can view commit IDs in the History tab of your project page on the Platform.

Next Steps

Now that you have your project set up and working locally, you can:

  1. Learn more about package management - Advanced package operations
  2. Set up IDE integration - Connect your project to development tools
  3. Share with team members - Collaborate with others
  4. Explore deployment options - Advanced deployment strategies

Troubleshooting

If you encounter issues:

  1. Authentication problems - Run state auth to re-authenticate
  2. Network issues - Check your internet connection and firewall settings
  3. Permission errors - Ensure you have the necessary permissions for the project
  4. Package conflicts - See the troubleshooting guide for common solutions

For more detailed troubleshooting, see the complete troubleshooting section.