# am3
AM3 = Application Manager written with python 3
English | [中文](README_zh.md)
A command-line tool for managing and monitoring applications.
## 🦮 Table of Contents
<!--ts-->
* [am3](#am3)
* [🦮 Table of Contents](#-table-of-contents)
* [🔧 Installation](#-installation)
* [📖 Basic Usage](#-basic-usage)
* [List Applications](#list-applications)
* [Start an Application](#start-an-application)
* [Stop an Application](#stop-an-application)
* [Restart an Application](#restart-an-application)
* [Delete an Application](#delete-an-application)
* [View Logs](#view-logs)
* [Save and Load Application List](#save-and-load-application-list)
* [⚙️ Advanced Features](#️-advanced-features)
* [Configuration Files](#configuration-files)
* [Auto Restart](#auto-restart)
* [API Service](#api-service)
* [Startup on Boot](#startup-on-boot)
* [🔄 Command Reference](#-command-reference)
* [Global Commands](#global-commands)
* [Application Management Commands](#application-management-commands)
* [API Service Commands](#api-service-commands)
* [🙏 Acknowledgements](#-acknowledgements)
<!--te-->
## 🔧 Installation
Python 3 is required, which should be available on most modern Linux distributions.
Install am3 with this command:
```bash
pip install am3
```
After installation, you can use either the `am` or `am3` command.
---
## 📖 Basic Usage
### List Applications
Retrieve and display information about running applications, including their name, ID, and other details.
```bash
am list
# or use the shorthand
am ls
```
Display more detailed information:
```bash
am list --all
```
---
### Start an Application
There are multiple ways to start an application:
**1. Start a registered application by ID**
```bash
am start 0
```
**2. Start a new application**
```bash
am start --start "ping" --params "127.0.0.1"
```
**3. Start using a configuration file**
```bash
am start --conf example/counter_config.json
```
**4. Start all applications**
```bash
am start all
```
**Start options:**
- `--start` or `-s`: Specify the target path
- `--interpreter` or `-i`: Specify the interpreter path
- `--working-directory` or `-d`: Specify the working directory
- `--params` or `-p`: Specify command parameters
- `--name` or `-n`: Specify application name
- `--restart-control/--no-restart-control`: Control whether to restart the program
---
### Stop an Application
Stop a running application by ID:
```bash
am stop 0
```
Stop all applications:
```bash
am stop all
```
---
### Restart an Application
Restart a specific application by ID:
```bash
am restart 0
```
Restart all applications:
```bash
am restart all
```
---
### Delete an Application
Remove an application from the management list:
```bash
am delete 0
```
Delete all applications (will prompt for confirmation):
```bash
am delete all
```
---
### View Logs
View AM3's own logs:
```bash
am log
```
View logs for a specific application:
```bash
am log 0
```
Continuously view logs (similar to `tail -f`):
```bash
am log 0 --follow
```
Specify the number of lines to display:
```bash
am log 0 --lines 100
```
---
### Save and Load Application List
Save the current application list configuration:
```bash
am save
```
Load application list from saved configuration:
```bash
am load
```
---
## ⚙️ Advanced Features
### Configuration Files
You can save application configurations to a file for reuse:
```bash
am start --start example/counter.py --interpreter python3 --generate example/counter_config.json
```
Then start the application using the configuration file:
```bash
am start --conf example/counter_config.json
```
### Auto Restart
AM3 supports automatic restart based on keywords or regular expressions:
```bash
am start --start example/counter.py --restart-keyword "Exception" --restart-keyword-regex "Error.*"
```
Set restart wait time:
```bash
am start --start example/counter.py --restart-wait-time 3
```
### API Service
Initialize the API service:
```bash
am api init
```
Start the API service:
```bash
am api start
```
Stop the API service:
```bash
am api stop
```
### Startup on Boot
Set AM3 to start on system boot:
```bash
am startup
```
---
## 🔄 Command Reference
### Global Commands
- `am --version`: Display version information
- `am --help`: Display help information
### Application Management Commands
- `am list`: List applications
- `am start`: Start an application
- `am stop`: Stop an application
- `am restart`: Restart an application
- `am delete`: Delete an application
- `am log`: View logs
- `am save`: Save application list
- `am load`: Load application list
- `am startup`: Set startup on boot
### API Service Commands
- `am api init`: Initialize API service
- `am api start`: Start API service
- `am api stop`: Stop API service
---
# 🙏 Acknowledgements
Thanks for the great IDE Pycharm from Jetbrains.
[](https://jb.gg/OpenSource)
Raw data
{
"_id": null,
"home_page": "https://github.com/nriver/am3",
"name": "am3",
"maintainer": null,
"docs_url": null,
"requires_python": "<4,>=3.6",
"maintainer_email": null,
"keywords": "application manger, process manager",
"author": "Nriver",
"author_email": null,
"download_url": null,
"platform": null,
"description": "# am3\n\nAM3 = Application Manager written with python 3\n\nEnglish | [\u4e2d\u6587](README_zh.md)\n\nA command-line tool for managing and monitoring applications.\n\n## \ud83e\uddae Table of Contents\n\n<!--ts-->\n* [am3](#am3)\n * [\ud83e\uddae Table of Contents](#-table-of-contents)\n * [\ud83d\udd27 Installation](#-installation)\n * [\ud83d\udcd6 Basic Usage](#-basic-usage)\n * [List Applications](#list-applications)\n * [Start an Application](#start-an-application)\n * [Stop an Application](#stop-an-application)\n * [Restart an Application](#restart-an-application)\n * [Delete an Application](#delete-an-application)\n * [View Logs](#view-logs)\n * [Save and Load Application List](#save-and-load-application-list)\n * [\u2699\ufe0f Advanced Features](#\ufe0f-advanced-features)\n * [Configuration Files](#configuration-files)\n * [Auto Restart](#auto-restart)\n * [API Service](#api-service)\n * [Startup on Boot](#startup-on-boot)\n * [\ud83d\udd04 Command Reference](#-command-reference)\n * [Global Commands](#global-commands)\n * [Application Management Commands](#application-management-commands)\n * [API Service Commands](#api-service-commands)\n* [\ud83d\ude4f Acknowledgements](#-acknowledgements)\n<!--te-->\n\n\n## \ud83d\udd27 Installation\n\nPython 3 is required, which should be available on most modern Linux distributions.\n\nInstall am3 with this command:\n\n```bash\npip install am3\n```\n\nAfter installation, you can use either the `am` or `am3` command.\n\n---\n\n## \ud83d\udcd6 Basic Usage\n\n### List Applications\n\nRetrieve and display information about running applications, including their name, ID, and other details.\n\n```bash\nam list\n# or use the shorthand\nam ls\n```\n\nDisplay more detailed information:\n\n```bash\nam list --all\n```\n\n---\n\n### Start an Application\n\nThere are multiple ways to start an application:\n\n**1. Start a registered application by ID**\n\n```bash\nam start 0\n```\n\n**2. Start a new application**\n\n```bash\nam start --start \"ping\" --params \"127.0.0.1\"\n```\n\n**3. Start using a configuration file**\n\n```bash\nam start --conf example/counter_config.json\n```\n\n**4. Start all applications**\n\n```bash\nam start all\n```\n\n**Start options:**\n\n- `--start` or `-s`: Specify the target path\n- `--interpreter` or `-i`: Specify the interpreter path\n- `--working-directory` or `-d`: Specify the working directory\n- `--params` or `-p`: Specify command parameters\n- `--name` or `-n`: Specify application name\n- `--restart-control/--no-restart-control`: Control whether to restart the program\n\n---\n\n### Stop an Application\n\nStop a running application by ID:\n\n```bash\nam stop 0\n```\n\nStop all applications:\n\n```bash\nam stop all\n```\n\n---\n\n### Restart an Application\n\nRestart a specific application by ID:\n\n```bash\nam restart 0\n```\n\nRestart all applications:\n\n```bash\nam restart all\n```\n\n---\n\n### Delete an Application\n\nRemove an application from the management list:\n\n```bash\nam delete 0\n```\n\nDelete all applications (will prompt for confirmation):\n\n```bash\nam delete all\n```\n\n---\n\n### View Logs\n\nView AM3's own logs:\n\n```bash\nam log\n```\n\nView logs for a specific application:\n\n```bash\nam log 0\n```\n\nContinuously view logs (similar to `tail -f`):\n\n```bash\nam log 0 --follow\n```\n\nSpecify the number of lines to display:\n\n```bash\nam log 0 --lines 100\n```\n\n---\n\n### Save and Load Application List\n\nSave the current application list configuration:\n\n```bash\nam save\n```\n\nLoad application list from saved configuration:\n\n```bash\nam load\n```\n\n---\n\n## \u2699\ufe0f Advanced Features\n\n### Configuration Files\n\nYou can save application configurations to a file for reuse:\n\n```bash\nam start --start example/counter.py --interpreter python3 --generate example/counter_config.json\n```\n\nThen start the application using the configuration file:\n\n```bash\nam start --conf example/counter_config.json\n```\n\n### Auto Restart\n\nAM3 supports automatic restart based on keywords or regular expressions:\n\n```bash\nam start --start example/counter.py --restart-keyword \"Exception\" --restart-keyword-regex \"Error.*\"\n```\n\nSet restart wait time:\n\n```bash\nam start --start example/counter.py --restart-wait-time 3\n```\n\n### API Service\n\nInitialize the API service:\n\n```bash\nam api init\n```\n\nStart the API service:\n\n```bash\nam api start\n```\n\nStop the API service:\n\n```bash\nam api stop\n```\n\n### Startup on Boot\n\nSet AM3 to start on system boot:\n\n```bash\nam startup\n```\n\n---\n\n## \ud83d\udd04 Command Reference\n\n### Global Commands\n\n- `am --version`: Display version information\n- `am --help`: Display help information\n\n### Application Management Commands\n\n- `am list`: List applications\n- `am start`: Start an application\n- `am stop`: Stop an application\n- `am restart`: Restart an application\n- `am delete`: Delete an application\n- `am log`: View logs\n- `am save`: Save application list\n- `am load`: Load application list\n- `am startup`: Set startup on boot\n\n### API Service Commands\n\n- `am api init`: Initialize API service\n- `am api start`: Start API service\n- `am api stop`: Stop API service\n\n---\n\n# \ud83d\ude4f Acknowledgements\n\nThanks for the great IDE Pycharm from Jetbrains.\n\n[](https://jb.gg/OpenSource)\n",
"bugtrack_url": null,
"license": null,
"summary": "Application Manager written with python 3",
"version": "1.1.1",
"project_urls": {
"Bug Reports": "https://github.com/nriver/am3/issues",
"Funding": "https://github.com/nriver/am3",
"Homepage": "https://github.com/nriver/am3",
"Say Thanks!": "https://github.com/nriver/am3",
"Source": "https://github.com/nriver/am3/"
},
"split_keywords": [
"application manger",
" process manager"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "f818507e20c76acc8eb451c03fb5d5270863f0bec532b91cdff8f20ceefd34bc",
"md5": "02c1b51a38763f9e7e34b3d596a91a51",
"sha256": "1366f59e67b156756fbe2891310de8b53522bf0153c26e116a2296067ecd8371"
},
"downloads": -1,
"filename": "am3-1.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "02c1b51a38763f9e7e34b3d596a91a51",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4,>=3.6",
"size": 46195,
"upload_time": "2025-10-09T03:40:39",
"upload_time_iso_8601": "2025-10-09T03:40:39.335017Z",
"url": "https://files.pythonhosted.org/packages/f8/18/507e20c76acc8eb451c03fb5d5270863f0bec532b91cdff8f20ceefd34bc/am3-1.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-09 03:40:39",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "nriver",
"github_project": "am3",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "loguru",
"specs": []
},
{
"name": "flask",
"specs": []
},
{
"name": "psutil",
"specs": []
},
{
"name": "PrettyTable",
"specs": []
},
{
"name": "python-socketio",
"specs": [
[
"==",
"5.14.0"
]
]
},
{
"name": "websockets",
"specs": [
[
"==",
"12.0"
]
]
},
{
"name": "watchdog",
"specs": []
},
{
"name": "click",
"specs": []
}
],
"tox": true,
"lcname": "am3"
}