Use TEN Manager
Updated
Use TEN Manager to create TEN packages, manage dependencies, launch tools, validate packages, and publish components.
In the TEN ecosystem, almost everything is a component. A TEN app, a TEN extension, and a TEN protocol are all components. To help developers manage operations related to these components, the TEN Framework provides a tool called TEN Manager.
Understand the tech
TEN Manager is the command-line package manager for the TEN Framework ecosystem. It provides essential tools for creating, installing, and managing TEN packages throughout your development workflow.
TEN Manager provides the following key functionalities:
- Package creation: Generate new apps, extensions, and protocol packages from templates
- Dependency management: Automatically resolve, fetch, and install required packages
- Cloud Store integration: Browse and install packages from the TEN Cloud Store
- Development tools: Launch the visual designer and run custom build scripts
- Validation: Check application graphs and package configurations for errors
TEN Manager handles the complexity of package dependencies and installations, allowing you to focus on building your applications rather than managing infrastructure.
tman is the command-line abbreviation for TEN Manager.
Set up TEN Manager
Follow these steps to install and run TEN Manager:
-
Open the TEN Framework releases page on GitHub.
-
Find the TEN Manager package for your operating system and architecture. The package uses the naming structure
tman-[OS]-release-[ARCH].zip. -
Download the package. For example, to download the Linux x64 package:
wget https://github.com/TEN-framework/ten-framework/releases/download/0.10.10/tman-linux-release-x64.zip -
Extract the package:
unzip tman-linux-release-x64.zip -
Optionally copy the binary to a directory in your system
PATH:sudo cp ten_manager/bin/tman /usr/local/bin/ -
Verify the installation:
tman --version
Package management
TEN Manager provides the following package management commands.
Create packages
Use tman create to generate new apps, extensions, protocols, and other package types using predefined templates. The command sets up proper directory structure, creates manifest.json and property.json configuration files, and provides template code to get you started quickly.
Usage
tman create [OPTIONS] --template <TEMPLATE> <PACKAGE_TYPE> <PACKAGE_NAME>See supported Package types.
Examples
# Create a new TEN application
tman create app my_app --template default_app_python
# Create a new extension
tman create extension my_extension --template default_extension_go
# Create a protocol package
tman create protocol my_protocol --template custom_protocolFetch packages
Use tman fetch to download packages from the TEN Cloud Store registry. The command allows you to specify target directories and control extraction behavior.
Usage
tman fetch [OPTIONS] <PACKAGE_TYPE> <PACKAGE_NAME>See supported Package types.
Examples
# Fetch and extract an extension package
tman fetch extension speech_recognition
# Fetch a specific version of an app
tman fetch app ai_agent@1.2.0
# Download package file only (no extraction) to specific directory
tman fetch protocol websocket --output-dir ./downloads --no-extract
# Fetch system package for specific platform
tman fetch system ten_runtime --os linux --arch x64Uninstall packages
Use tman uninstall to remove packages from your TEN application. This removes the package files and cleans up the local package directory structure.
Usage
tman uninstall <PACKAGE_TYPE> <PACKAGE_NAME>See supported Package types.
Examples
# Uninstall an extension package
tman uninstall extension speech_recognition
# Remove a protocol package
tman uninstall protocol websocket
# Uninstall a system component
tman uninstall system ten_runtimePackage TEN components
Use tman package to create distributable package files from your TEN packages. Run this command from the base directory of the package you want to distribute.
Usage
tman package [OPTIONS]Examples
# Create a package file from current directory
cd my_extension
tman package
# Create package file with custom output path
tman package --output-path ./dist/my_extension.zip
# Package an app for distribution
cd my_ten_app
tman package --output-path ../releases/my_app_v1.0.zipPublish packages
Use tman publish to publish your TEN packages to the TEN Cloud Store. Run this command from the base directory of the package you want to publish.
Usage
tman publishExamples
# Publish an extension to the Cloud Store
cd my_extension
tman publish
# Publish an app package
cd my_ten_app
tman publish
# Publish a protocol package
cd my_custom_protocol
tman publishDevelopment tools
TEN Manager provides the following development tools.
TEN designer
Use tman designer to start the TEN Designer visual development environment. This opens a browser-based interface for creating, editing, and managing TEN applications and extensions. See Use TEN Designer for details.
Usage
tman designer [OPTIONS]Examples
# Launch designer with default settings
tman designer
# Launch on a specific port
tman designer --port 8080
# Launch with custom IP and port
tman designer --ip 127.0.0.1 --port 3000
# Launch from a specific app directory
cd my_ten_app
tman designer --base-dir .Check consistency
Use tman check to validate various aspects of your TEN packages and configurations. This helps ensure your packages are properly configured before deployment.
Usage
tman check <COMMAND>The following commands are available:
manifest-json: Validate manifest.json files against JSON schemaproperty-json: Validate property.json files against JSON schema
Examples
# Check manifest.json validity
tman check manifest-json
# Check property.json validity
tman check property-jsonModify framework components
Use tman modify to modify various components and configurations within the TEN Framework. This allows you to update existing configurations without manually editing files.
Usage
tman modify <COMMAND>The following modify commands are available:
graph: Modify predefined graphs in property.json files
Run custom scripts
Use tman run to execute custom scripts defined in your package's manifest.json file. This allows you to run predefined build, start, test, or other custom commands for your TEN packages.
Usage
tman run <SCRIPT_NAME> [-- <EXTRA_ARGS>]Examples
# Run the start script
tman run start
# Run the build script
tman run build
# Run a custom script with additional arguments
tman run test -- --verbose
# Run stop script
tman run stopReference
Package types
The following package types are supported:
app: Main application containersextension: Functional components that implement specific featuresprotocol: Communication protocol handlerssystem: Core framework componentsaddon_loader: Specialized loaders for different programming languages
Common options
TEN Manager supports the following global options:
--verbose- Enable detailed output for debugging-y, --yes- Automatically confirm all prompts-c, --config-file <CONFIG_FILE>- Specify custom configuration file--user-token <USER_TOKEN>- Provide authentication token-h, --help- Display help information
Get help
Use the following options with tman to get help:
help- Display help information for each command--version- Show version information and check for updates
