Skip to main content

State Tool CLI Reference

The ActiveState State Tool is a command-line interface (CLI) that simplifies the management and deployment of programming language environments. This section provides comprehensive reference documentation for all State Tool commands, configuration options, and advanced features.

Overview​

The State Tool enables developers to:

  • Create and manage language-specific runtime environments
  • Install and manage packages across multiple languages
  • Share consistent environments across teams
  • Deploy projects to various environments
  • Integrate with development tools and CI/CD pipelines

Reference Documentation​

Commands​

Configuration​

Advanced Topics​

  • Advanced Topics - Advanced features and use cases
    • Git hooks integration
    • Project locking mechanisms
    • Secrets management
    • Version notation systems

Quick Command Reference​

Project Management​

state init <org/project> # Create new project
state checkout <org/project> # Check out existing project
state pull # Update local project
state push # Save changes to Platform

Environment Activation​

state shell # Start project shell
state use <org/project> # Set as system default
state use show # Show current default
state use reset # Remove default

Package Management​

state install <package> # Install package
state uninstall <package> # Remove package
state packages # List installed packages
state search <term> # Search for packages

Project Information​

state projects # List local projects
state history # Show project history
state platforms # Show/manage target platforms
state branch # Manage project branches

Authentication​

state auth # Authenticate with Platform
state auth --show # Show auth status
state auth --logout # Sign out

Installation​

If you haven't installed the State Tool yet, see the Installation Guide.

Getting Help​

Built-in Help​

state --help # General help
state <command> --help # Command-specific help
state learn # Interactive learning tool

Documentation Resources​

Version Information​

To check your State Tool version:

state --version

To update to the latest version:

state update

Configuration Files​

The State Tool uses several configuration files:

  • activestate.yaml - Project configuration (in project directories)
  • config.yaml - User configuration (in State Tool config directory)
  • auth.yaml - Authentication tokens (in State Tool config directory)

Command Categories​

  • Core Project Commands: Basic project operations like creating, checking out, and managing projects.

  • Package Management Commands: Installing, removing, and searching for packages and dependencies.

  • Environment Commands: Activating and managing runtime environments.

  • Collaboration Commands: Sharing projects, managing branches, and working with teams.

  • Platform Commands: Managing target operating systems and architectures.

  • Utility Commands: Authentication, configuration, and diagnostic tools.

Shell Integration​

The State Tool integrates with various shells:

  • Bash - Full integration with completion
  • Zsh - Full integration with completion
  • PowerShell - Windows integration

To enable shell completion:

state export new-shell-completion

API and Automation​

The State Tool is designed for automation and can be used in:

  • CI/CD pipelines - Automated testing and deployment
  • Build scripts - Consistent build environments
  • Development workflows - Automated environment setup
  • Infrastructure as Code - Declarative environment management

Support Channels​

If you need additional help:

  • Documentation - This comprehensive guide
  • Community Forum - ActiveState community discussions
  • Support Tickets - For paid tier customers
  • GitHub Issues - For State Tool bugs and feature requests