{"id":20128729,"url":"https://github.com/nriver/am3","last_synced_at":"2025-07-16T03:37:31.890Z","repository":{"id":57677234,"uuid":"489602656","full_name":"Nriver/am3","owner":"Nriver","description":"Application Manager","archived":false,"fork":false,"pushed_at":"2025-05-06T08:24:10.000Z","size":72,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-08T07:56:06.608Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Nriver.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-07T07:28:02.000Z","updated_at":"2025-05-06T08:22:12.000Z","dependencies_parsed_at":"2024-11-13T20:31:38.189Z","dependency_job_id":"4de17982-aa23-402a-9550-27e3028d7c0e","html_url":"https://github.com/Nriver/am3","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Nriver/am3","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nriver%2Fam3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nriver%2Fam3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nriver%2Fam3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nriver%2Fam3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nriver","download_url":"https://codeload.github.com/Nriver/am3/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nriver%2Fam3/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265479641,"owners_count":23773575,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T20:29:16.619Z","updated_at":"2025-07-16T03:37:31.873Z","avatar_url":"https://github.com/Nriver.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# am3\n\nAM3 = Application Manager written with python 3\n\nEnglish | [中文](README_zh.md)\n\nA command-line tool for managing and monitoring applications.\n\n## 🦮 Table of Contents\n\n\u003c!--ts--\u003e\n* [am3](#am3)\n   * [🦮 Table of Contents](#-table-of-contents)\n   * [🔧 Installation](#-installation)\n   * [📖 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   * [⚙️ Advanced Features](#️-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   * [🔄 Command Reference](#-command-reference)\n      * [Global Commands](#global-commands)\n      * [Application Management Commands](#application-management-commands)\n      * [API Service Commands](#api-service-commands)\n* [🙏 Acknowledgements](#-acknowledgements)\n\u003c!--te--\u003e\n\n\n## 🔧 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## 📖 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## ⚙️ 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## 🔄 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# 🙏 Acknowledgements\n\nThanks for the great IDE Pycharm from Jetbrains.\n\n[![Jetbrains](docs/jetbrains.svg)](https://jb.gg/OpenSource)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnriver%2Fam3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnriver%2Fam3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnriver%2Fam3/lists"}