pyatv-cli 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. pyatv_cli-1.0.0/LICENSE +21 -0
  2. pyatv_cli-1.0.0/PKG-INFO +221 -0
  3. pyatv_cli-1.0.0/README.md +186 -0
  4. pyatv_cli-1.0.0/pyproject.toml +48 -0
  5. pyatv_cli-1.0.0/setup.cfg +4 -0
  6. pyatv_cli-1.0.0/src/pyatv_cli/__init__.py +2 -0
  7. pyatv_cli-1.0.0/src/pyatv_cli/cli.py +325 -0
  8. pyatv_cli-1.0.0/src/pyatv_cli/commands/__init__.py +1 -0
  9. pyatv_cli-1.0.0/src/pyatv_cli/commands/accounts.py +86 -0
  10. pyatv_cli-1.0.0/src/pyatv_cli/commands/apps.py +81 -0
  11. pyatv_cli-1.0.0/src/pyatv_cli/commands/audio.py +168 -0
  12. pyatv_cli-1.0.0/src/pyatv_cli/commands/keyboard.py +136 -0
  13. pyatv_cli-1.0.0/src/pyatv_cli/commands/media.py +106 -0
  14. pyatv_cli-1.0.0/src/pyatv_cli/commands/monitor.py +136 -0
  15. pyatv_cli-1.0.0/src/pyatv_cli/commands/power.py +94 -0
  16. pyatv_cli-1.0.0/src/pyatv_cli/commands/remote.py +143 -0
  17. pyatv_cli-1.0.0/src/pyatv_cli/commands/settings.py +106 -0
  18. pyatv_cli-1.0.0/src/pyatv_cli/commands/shell.py +147 -0
  19. pyatv_cli-1.0.0/src/pyatv_cli/commands/stream.py +73 -0
  20. pyatv_cli-1.0.0/src/pyatv_cli/commands/system.py +149 -0
  21. pyatv_cli-1.0.0/src/pyatv_cli/commands/touch.py +143 -0
  22. pyatv_cli-1.0.0/src/pyatv_cli/config.py +116 -0
  23. pyatv_cli-1.0.0/src/pyatv_cli/connection.py +98 -0
  24. pyatv_cli-1.0.0/src/pyatv_cli/output.py +143 -0
  25. pyatv_cli-1.0.0/src/pyatv_cli/tui/__init__.py +1 -0
  26. pyatv_cli-1.0.0/src/pyatv_cli/tui/app.py +615 -0
  27. pyatv_cli-1.0.0/src/pyatv_cli.egg-info/PKG-INFO +221 -0
  28. pyatv_cli-1.0.0/src/pyatv_cli.egg-info/SOURCES.txt +30 -0
  29. pyatv_cli-1.0.0/src/pyatv_cli.egg-info/dependency_links.txt +1 -0
  30. pyatv_cli-1.0.0/src/pyatv_cli.egg-info/entry_points.txt +2 -0
  31. pyatv_cli-1.0.0/src/pyatv_cli.egg-info/requires.txt +4 -0
  32. pyatv_cli-1.0.0/src/pyatv_cli.egg-info/top_level.txt +1 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Yigit Konur
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,221 @@
1
+ Metadata-Version: 2.4
2
+ Name: pyatv-cli
3
+ Version: 1.0.0
4
+ Summary: Comprehensive Apple TV CLI & TUI remote control powered by pyatv
5
+ Author-email: Yigit Konur <yigitkonur@gmail.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/yigitkonur/pyatv-cli
8
+ Project-URL: Repository, https://github.com/yigitkonur/pyatv-cli
9
+ Project-URL: Bug Tracker, https://github.com/yigitkonur/pyatv-cli/issues
10
+ Project-URL: Documentation, https://github.com/yigitkonur/pyatv-cli#readme
11
+ Keywords: apple-tv,remote-control,cli,tui,pyatv,airplay,tvos
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: End Users/Desktop
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: Programming Language :: Python :: 3.14
24
+ Classifier: Topic :: Home Automation
25
+ Classifier: Topic :: Multimedia
26
+ Classifier: Topic :: Utilities
27
+ Requires-Python: >=3.10
28
+ Description-Content-Type: text/markdown
29
+ License-File: LICENSE
30
+ Requires-Dist: pyatv>=0.15.0
31
+ Requires-Dist: click>=8.1.0
32
+ Requires-Dist: rich>=13.0.0
33
+ Requires-Dist: textual>=0.40.0
34
+ Dynamic: license-file
35
+
36
+ # 🍎 pyatv-cli — Apple TV Remote Control
37
+
38
+ [![PyPI](https://img.shields.io/pypi/v/pyatv-cli)](https://pypi.org/project/pyatv-cli/)
39
+ [![Python](https://img.shields.io/pypi/pyversions/pyatv-cli)](https://pypi.org/project/pyatv-cli/)
40
+ [![License](https://img.shields.io/pypi/l/pyatv-cli)](https://github.com/yigitkonur/pyatv-cli/blob/main/LICENSE)
41
+
42
+ A comprehensive CLI app to control your Apple TV entirely from the terminal. Built on [pyatv](https://github.com/postlund/pyatv) with beautiful Rich terminal output.
43
+
44
+ ## Installation
45
+
46
+ ```bash
47
+ pip install pyatv-cli
48
+ ```
49
+
50
+ Or install from source:
51
+
52
+ ```bash
53
+ git clone https://github.com/yigitkonur/pyatv-cli.git
54
+ cd pyatv-cli
55
+ pip install -e .
56
+ ```
57
+
58
+ ## Quick Start
59
+
60
+ ```bash
61
+ # 1. Discover Apple TVs on your network
62
+ atv scan
63
+
64
+ # 2. Pair with your Apple TV
65
+ atv pair
66
+
67
+ # 3. Control it!
68
+ atv power status
69
+ atv remote play
70
+ atv media info
71
+ ```
72
+
73
+ ## Commands
74
+
75
+ ### Discovery & Setup
76
+ | Command | Description |
77
+ |---------|-------------|
78
+ | `atv scan` | Discover Apple TVs on your network |
79
+ | `atv pair` | Pair with an Apple TV (interactive PIN flow) |
80
+ | `atv unpair` | Remove pairing credentials |
81
+ | `atv devices` | List all paired devices |
82
+ | `atv default <id>` | Set default device |
83
+
84
+ ### Power Control
85
+ | Command | Description |
86
+ |---------|-------------|
87
+ | `atv power status` | Show power state |
88
+ | `atv power on` | Turn on |
89
+ | `atv power off` | Turn off |
90
+ | `atv power toggle` | Toggle power state |
91
+
92
+ ### Remote Control (27 commands)
93
+ | Command | Description |
94
+ |---------|-------------|
95
+ | `atv remote up/down/left/right` | Navigation |
96
+ | `atv remote select` | Confirm selection |
97
+ | `atv remote menu` | Back/menu button |
98
+ | `atv remote home` | Home button |
99
+ | `atv remote play/pause/stop` | Playback control |
100
+ | `atv remote next/previous` | Track navigation |
101
+ | `atv remote skip-forward/skip-backward` | Skip |
102
+ | `atv remote set-position <seconds>` | Seek to position |
103
+ | `atv remote set-shuffle off\|songs\|albums` | Shuffle mode |
104
+ | `atv remote set-repeat off\|track\|all` | Repeat mode |
105
+ | `atv remote screensaver` | Activate screensaver |
106
+ | `atv remote guide` | Open guide |
107
+ | `atv remote control-center` | Open control center |
108
+
109
+ ### Media / Now Playing
110
+ | Command | Description |
111
+ |---------|-------------|
112
+ | `atv media info` | Show current track info |
113
+ | `atv media artwork -o file.png` | Download artwork |
114
+
115
+ ### App Management
116
+ | Command | Description |
117
+ |---------|-------------|
118
+ | `atv apps list` | List installed apps |
119
+ | `atv apps launch <bundle_id>` | Launch an app |
120
+
121
+ ### Audio Control
122
+ | Command | Description |
123
+ |---------|-------------|
124
+ | `atv audio get` | Show volume level |
125
+ | `atv audio set <0-100>` | Set volume |
126
+ | `atv audio up/down` | Adjust volume |
127
+ | `atv audio devices` | List output devices |
128
+
129
+ ### Virtual Keyboard
130
+ | Command | Description |
131
+ |---------|-------------|
132
+ | `atv keyboard status` | Focus state |
133
+ | `atv keyboard get` | Current text |
134
+ | `atv keyboard set <text>` | Replace text |
135
+ | `atv keyboard append <text>` | Append text |
136
+ | `atv keyboard clear` | Clear text |
137
+
138
+ ### Touch Gestures
139
+ | Command | Description |
140
+ |---------|-------------|
141
+ | `atv touch swipe up/down/left/right` | Directional swipe |
142
+ | `atv touch swipe-custom <x1> <y1> <x2> <y2>` | Custom swipe |
143
+ | `atv touch tap` | Single tap |
144
+ | `atv touch double-tap` | Double tap |
145
+ | `atv touch hold` | Long press |
146
+
147
+ ### Streaming
148
+ | Command | Description |
149
+ |---------|-------------|
150
+ | `atv stream url <url>` | Stream from URL |
151
+ | `atv stream file <path>` | Stream local file |
152
+
153
+ ### System Information
154
+ | Command | Description |
155
+ |---------|-------------|
156
+ | `atv system info` | Device info |
157
+ | `atv system features` | Feature support table |
158
+
159
+ ### User Accounts
160
+ | Command | Description |
161
+ |---------|-------------|
162
+ | `atv accounts list` | List accounts |
163
+ | `atv accounts switch <id>` | Switch account |
164
+
165
+ ### Device Settings
166
+ | Command | Description |
167
+ |---------|-------------|
168
+ | `atv settings show` | Show settings |
169
+ | `atv settings set <key> <value>` | Change setting |
170
+ | `atv settings remove <key>` | Remove setting |
171
+
172
+ ### Live & Interactive
173
+ | Command | Description |
174
+ |---------|-------------|
175
+ | `atv monitor` | Real-time playback status (Rich Live) |
176
+ | `atv shell` | Interactive REPL shell |
177
+
178
+ ### TUI Mode
179
+
180
+ Launch a full-screen interactive terminal UI for controlling your Apple TV:
181
+
182
+ ```bash
183
+ atv tui
184
+ ```
185
+
186
+ The TUI provides a visual remote control with real-time playback status, volume control, and navigation — all in your terminal.
187
+
188
+ ## Global Options
189
+
190
+ | Option | Description |
191
+ |--------|-------------|
192
+ | `--json` | Output in JSON format for scripting |
193
+ | `--version` | Show version |
194
+ | `--device <id>` | Target specific device |
195
+ | `--host <ip>` | Connect by IP address |
196
+
197
+ ## JSON Mode
198
+
199
+ All commands support `--json` for scripting:
200
+
201
+ ```bash
202
+ atv --json scan | jq '.[].name'
203
+ atv --json media info | jq '.Title'
204
+ atv --json audio get | jq '.volume'
205
+ ```
206
+
207
+ ## Configuration
208
+
209
+ Credentials and device config stored at `~/.config/pyatv-cli/config.json`.
210
+
211
+ ## Publishing
212
+
213
+ ```bash
214
+ pip install build twine
215
+ python -m build
216
+ twine upload dist/*
217
+ ```
218
+
219
+ ## License
220
+
221
+ MIT
@@ -0,0 +1,186 @@
1
+ # 🍎 pyatv-cli — Apple TV Remote Control
2
+
3
+ [![PyPI](https://img.shields.io/pypi/v/pyatv-cli)](https://pypi.org/project/pyatv-cli/)
4
+ [![Python](https://img.shields.io/pypi/pyversions/pyatv-cli)](https://pypi.org/project/pyatv-cli/)
5
+ [![License](https://img.shields.io/pypi/l/pyatv-cli)](https://github.com/yigitkonur/pyatv-cli/blob/main/LICENSE)
6
+
7
+ A comprehensive CLI app to control your Apple TV entirely from the terminal. Built on [pyatv](https://github.com/postlund/pyatv) with beautiful Rich terminal output.
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ pip install pyatv-cli
13
+ ```
14
+
15
+ Or install from source:
16
+
17
+ ```bash
18
+ git clone https://github.com/yigitkonur/pyatv-cli.git
19
+ cd pyatv-cli
20
+ pip install -e .
21
+ ```
22
+
23
+ ## Quick Start
24
+
25
+ ```bash
26
+ # 1. Discover Apple TVs on your network
27
+ atv scan
28
+
29
+ # 2. Pair with your Apple TV
30
+ atv pair
31
+
32
+ # 3. Control it!
33
+ atv power status
34
+ atv remote play
35
+ atv media info
36
+ ```
37
+
38
+ ## Commands
39
+
40
+ ### Discovery & Setup
41
+ | Command | Description |
42
+ |---------|-------------|
43
+ | `atv scan` | Discover Apple TVs on your network |
44
+ | `atv pair` | Pair with an Apple TV (interactive PIN flow) |
45
+ | `atv unpair` | Remove pairing credentials |
46
+ | `atv devices` | List all paired devices |
47
+ | `atv default <id>` | Set default device |
48
+
49
+ ### Power Control
50
+ | Command | Description |
51
+ |---------|-------------|
52
+ | `atv power status` | Show power state |
53
+ | `atv power on` | Turn on |
54
+ | `atv power off` | Turn off |
55
+ | `atv power toggle` | Toggle power state |
56
+
57
+ ### Remote Control (27 commands)
58
+ | Command | Description |
59
+ |---------|-------------|
60
+ | `atv remote up/down/left/right` | Navigation |
61
+ | `atv remote select` | Confirm selection |
62
+ | `atv remote menu` | Back/menu button |
63
+ | `atv remote home` | Home button |
64
+ | `atv remote play/pause/stop` | Playback control |
65
+ | `atv remote next/previous` | Track navigation |
66
+ | `atv remote skip-forward/skip-backward` | Skip |
67
+ | `atv remote set-position <seconds>` | Seek to position |
68
+ | `atv remote set-shuffle off\|songs\|albums` | Shuffle mode |
69
+ | `atv remote set-repeat off\|track\|all` | Repeat mode |
70
+ | `atv remote screensaver` | Activate screensaver |
71
+ | `atv remote guide` | Open guide |
72
+ | `atv remote control-center` | Open control center |
73
+
74
+ ### Media / Now Playing
75
+ | Command | Description |
76
+ |---------|-------------|
77
+ | `atv media info` | Show current track info |
78
+ | `atv media artwork -o file.png` | Download artwork |
79
+
80
+ ### App Management
81
+ | Command | Description |
82
+ |---------|-------------|
83
+ | `atv apps list` | List installed apps |
84
+ | `atv apps launch <bundle_id>` | Launch an app |
85
+
86
+ ### Audio Control
87
+ | Command | Description |
88
+ |---------|-------------|
89
+ | `atv audio get` | Show volume level |
90
+ | `atv audio set <0-100>` | Set volume |
91
+ | `atv audio up/down` | Adjust volume |
92
+ | `atv audio devices` | List output devices |
93
+
94
+ ### Virtual Keyboard
95
+ | Command | Description |
96
+ |---------|-------------|
97
+ | `atv keyboard status` | Focus state |
98
+ | `atv keyboard get` | Current text |
99
+ | `atv keyboard set <text>` | Replace text |
100
+ | `atv keyboard append <text>` | Append text |
101
+ | `atv keyboard clear` | Clear text |
102
+
103
+ ### Touch Gestures
104
+ | Command | Description |
105
+ |---------|-------------|
106
+ | `atv touch swipe up/down/left/right` | Directional swipe |
107
+ | `atv touch swipe-custom <x1> <y1> <x2> <y2>` | Custom swipe |
108
+ | `atv touch tap` | Single tap |
109
+ | `atv touch double-tap` | Double tap |
110
+ | `atv touch hold` | Long press |
111
+
112
+ ### Streaming
113
+ | Command | Description |
114
+ |---------|-------------|
115
+ | `atv stream url <url>` | Stream from URL |
116
+ | `atv stream file <path>` | Stream local file |
117
+
118
+ ### System Information
119
+ | Command | Description |
120
+ |---------|-------------|
121
+ | `atv system info` | Device info |
122
+ | `atv system features` | Feature support table |
123
+
124
+ ### User Accounts
125
+ | Command | Description |
126
+ |---------|-------------|
127
+ | `atv accounts list` | List accounts |
128
+ | `atv accounts switch <id>` | Switch account |
129
+
130
+ ### Device Settings
131
+ | Command | Description |
132
+ |---------|-------------|
133
+ | `atv settings show` | Show settings |
134
+ | `atv settings set <key> <value>` | Change setting |
135
+ | `atv settings remove <key>` | Remove setting |
136
+
137
+ ### Live & Interactive
138
+ | Command | Description |
139
+ |---------|-------------|
140
+ | `atv monitor` | Real-time playback status (Rich Live) |
141
+ | `atv shell` | Interactive REPL shell |
142
+
143
+ ### TUI Mode
144
+
145
+ Launch a full-screen interactive terminal UI for controlling your Apple TV:
146
+
147
+ ```bash
148
+ atv tui
149
+ ```
150
+
151
+ The TUI provides a visual remote control with real-time playback status, volume control, and navigation — all in your terminal.
152
+
153
+ ## Global Options
154
+
155
+ | Option | Description |
156
+ |--------|-------------|
157
+ | `--json` | Output in JSON format for scripting |
158
+ | `--version` | Show version |
159
+ | `--device <id>` | Target specific device |
160
+ | `--host <ip>` | Connect by IP address |
161
+
162
+ ## JSON Mode
163
+
164
+ All commands support `--json` for scripting:
165
+
166
+ ```bash
167
+ atv --json scan | jq '.[].name'
168
+ atv --json media info | jq '.Title'
169
+ atv --json audio get | jq '.volume'
170
+ ```
171
+
172
+ ## Configuration
173
+
174
+ Credentials and device config stored at `~/.config/pyatv-cli/config.json`.
175
+
176
+ ## Publishing
177
+
178
+ ```bash
179
+ pip install build twine
180
+ python -m build
181
+ twine upload dist/*
182
+ ```
183
+
184
+ ## License
185
+
186
+ MIT
@@ -0,0 +1,48 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "pyatv-cli"
7
+ version = "1.0.0"
8
+ description = "Comprehensive Apple TV CLI & TUI remote control powered by pyatv"
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ license = {text = "MIT"}
12
+ authors = [{name = "Yigit Konur", email = "yigitkonur@gmail.com"}]
13
+ keywords = ["apple-tv", "remote-control", "cli", "tui", "pyatv", "airplay", "tvos"]
14
+ classifiers = [
15
+ "Development Status :: 4 - Beta",
16
+ "Environment :: Console",
17
+ "Intended Audience :: End Users/Desktop",
18
+ "Intended Audience :: Developers",
19
+ "License :: OSI Approved :: MIT License",
20
+ "Operating System :: OS Independent",
21
+ "Programming Language :: Python :: 3",
22
+ "Programming Language :: Python :: 3.10",
23
+ "Programming Language :: Python :: 3.11",
24
+ "Programming Language :: Python :: 3.12",
25
+ "Programming Language :: Python :: 3.13",
26
+ "Programming Language :: Python :: 3.14",
27
+ "Topic :: Home Automation",
28
+ "Topic :: Multimedia",
29
+ "Topic :: Utilities",
30
+ ]
31
+ dependencies = [
32
+ "pyatv>=0.15.0",
33
+ "click>=8.1.0",
34
+ "rich>=13.0.0",
35
+ "textual>=0.40.0",
36
+ ]
37
+
38
+ [project.urls]
39
+ Homepage = "https://github.com/yigitkonur/pyatv-cli"
40
+ Repository = "https://github.com/yigitkonur/pyatv-cli"
41
+ "Bug Tracker" = "https://github.com/yigitkonur/pyatv-cli/issues"
42
+ Documentation = "https://github.com/yigitkonur/pyatv-cli#readme"
43
+
44
+ [project.scripts]
45
+ atv = "pyatv_cli.cli:cli"
46
+
47
+ [tool.setuptools.packages.find]
48
+ where = ["src"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,2 @@
1
+ """pyatv-cli — Comprehensive Apple TV CLI remote control."""
2
+ __version__ = "1.0.0"