# Use TEN Manager (/en/ai/ten-agent/get-started/use-ten-manager)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

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 [#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.

<CalloutContainer type="info">
  <CalloutDescription>
    `tman` is the command-line abbreviation for TEN Manager.
  </CalloutDescription>
</CalloutContainer>

## Set up TEN Manager [#set-up-ten-manager]

Follow these steps to install and run TEN Manager:

1. Open the [TEN Framework releases page](https://github.com/TEN-framework/ten-framework/releases) on GitHub.

2. Find the TEN Manager package for your operating system and architecture. The package uses the naming structure `tman-[OS]-release-[ARCH].zip`.

3. Download the package. For example, to download the Linux x64 package:

   ```bash
   wget https://github.com/TEN-framework/ten-framework/releases/download/0.10.10/tman-linux-release-x64.zip
   ```

4. Extract the package:

   ```bash
   unzip tman-linux-release-x64.zip
   ```

5. Optionally copy the binary to a directory in your system `PATH`:

   ```bash
   sudo cp ten_manager/bin/tman /usr/local/bin/
   ```

6. Verify the installation:

   ```bash
   tman --version
   ```

## Package management [#package-management]

TEN Manager provides the following package management commands.

### Create packages [#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 [#usage]

```text
tman create [OPTIONS] --template <TEMPLATE> <PACKAGE_TYPE> <PACKAGE_NAME>
```

See supported [Package types](#package-types).

#### Examples [#examples]

```bash
# 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_protocol
```

### Fetch packages [#fetch-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 [#usage-1]

```bash
tman fetch [OPTIONS] <PACKAGE_TYPE> <PACKAGE_NAME>
```

See supported [Package types](#package-types).

#### Examples [#examples-1]

```bash
# 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 x64
```

### Uninstall packages [#uninstall-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 [#usage-2]

```bash
tman uninstall <PACKAGE_TYPE> <PACKAGE_NAME>
```

See supported [Package types](#package-types).

#### Examples [#examples-2]

```bash
# 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_runtime
```

### Package TEN components [#package-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 [#usage-3]

```bash
tman package [OPTIONS]
```

#### Examples [#examples-3]

```bash
# 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.zip
```

### Publish packages [#publish-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 [#usage-4]

```bash
tman publish
```

#### Examples [#examples-4]

```bash
# 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 publish
```

## Development tools [#development-tools]

TEN Manager provides the following development tools.

### TEN designer [#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](./use-ten-designer) for details.

#### Usage [#usage-5]

```bash
tman designer [OPTIONS]
```

#### Examples [#examples-5]

```bash
# 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 [#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 [#usage-6]

```bash
tman check <COMMAND>
```

The following commands are available:

* `manifest-json`: Validate manifest.json files against JSON schema
* `property-json`: Validate property.json files against JSON schema

#### Examples [#examples-6]

```bash
# Check manifest.json validity
tman check manifest-json

# Check property.json validity
tman check property-json
```

### Modify framework components [#modify-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 [#usage-7]

```bash
tman modify <COMMAND>
```

The following modify commands are available:

* `graph`: Modify predefined graphs in property.json files

### Run custom scripts [#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 [#usage-8]

```bash
tman run <SCRIPT_NAME> [-- <EXTRA_ARGS>]
```

#### Examples [#examples-7]

```bash
# 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 stop
```

## Reference [#reference]

### Package types [#package-types]

The following package types are supported:

* `app`: Main application containers
* `extension`: Functional components that implement specific features
* `protocol`: Communication protocol handlers
* `system`: Core framework components
* `addon_loader`: Specialized loaders for different programming languages

### Common options [#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 [#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
