cli

module
v0.0.0-...-7426b64 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2024 License: BSD-3-Clause

README

State Tool

State Tool is the Command Line Interface for accessing ActiveState Platform functionality. It is a cross-platform tool written in Go supporting Windows, Linux and Mac. We're working on extending support to more versions and distributions in tandem with the Platform (feel free to let us know if you have issues in your favorite OS).

State Tool helps with mananging the package dependencies of a language runtime, for the languages supported by the ActiveState Platform (Dynamic Open Source Languages like Python, Perl and Tcl). It functions as a package manager (of sorts, more development is ongoing in this area) and a virtual environment for developers that isolates their project environment and allows easy switching between different projects on the same machine. Additional neat developer features of State Tool includes cross-platform scripting and support for secrets. State Tool also has functionality to support deployment of the language runtimes (supported by ActiveState like CEs or Custom Runtimes created by the users on the Platform) into environments like VMs and containers used in CI/CD systems.

State Tool has a stated goal of "Replacing the Makefile". We're making progress, and always open for new ideas/suggestions/issue reports and code contributions.

Installation

Linux & macOS

In your favourite terminal:

sh <(curl -q https://platform.activestate.com/dl/cli/install.sh)
Windows

In Powershell with Administrator privileges:

IEX(New-Object Net.WebClient).downloadString('https://platform.activestate.com/dl/cli/install.ps1')

Usage

For usage information please refer to the State Tool Documentation.

Development

Requirements
  • Go 1.16 or above
Building & Testing

First run state run install-deps followed by state run preprocess if you are building for the first time.

  • Building: state run build
    • The built executable will be stored in the build directory
    • If you modified assets or switched branches, you need to re-run state run preprocess first
  • Testing:
    • Unit tests*: state run test
    • Integration tests: state run integration-tests
* Our unit tests are in a state of slowly being converted to standalone integration tests, meaning that while we refer to them as unit tests they still contain a lot of tests that are better described as integration tests.

Directories

Path Synopsis
cmd
internal
app
ipc
Package ipc provides server and client types for inter-process communications.
Package ipc provides server and client types for inter-process communications.
ipc/internal/flisten
Package flisten provides a type that manages a file-based unix domain socket.
Package flisten provides a type that manages a file-based unix domain socket.
logging
A simple logging module that mimics the behavior of Python's logging module.
A simple logging module that mimics the behavior of Python's logging module.
runbits
Package runbits comprises logic that is shared between controllers, ie., code that prints
Package runbits comprises logic that is shared between controllers, ie., code that prints
runners/hello
Package hello provides "hello command" logic and associated types.
Package hello provides "hello command" logic and associated types.
svcctl
Package svcctl provides functions that make use of an IPC device, as well as common IPC handlers and requesters.
Package svcctl provides functions that make use of an IPC device, as well as common IPC handlers and requesters.
svcctl/svcmsg
Package svcmsg models the Exit Code data that the executor must communicate to the service.
Package svcmsg models the Exit Code data that the executor must communicate to the service.
terminal
Package terminal includes helper functions for terminal capabilities
Package terminal includes helper functions for terminal capabilities
unarchiver
Package unarchiver provides a method to unarchive tar.gz or zip archives with progress bar feedback Currently, this implementation copies a lot of methods that are internal to the ActiveState/archiver dependency.
Package unarchiver provides a method to unarchive tar.gz or zip archives with progress bar feedback Currently, this implementation copies a lot of methods that are internal to the ActiveState/archiver dependency.
pkg
platform/runtime/envdef
Package envdef implements a parser for the runtime environment for alternative builds
Package envdef implements a parser for the runtime environment for alternative builds
platform/runtime/executors/execmeta
Package execmeta models the executor meta data that is communicated from the state tool to executors via file.
Package execmeta models the executor meta data that is communicated from the state tool to executors via file.
scripts
test

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL