Skip to content

Commit 232fddf

Browse files
authored
Merge pull request #338 from Tcode-Motion/refactor-python-installer-cmd-install-14294217717780634568
🧹 [code health improvement] Refactor cmd_install in python-installer __main__.py
2 parents b6c59f3 + 405500c commit 232fddf

12 files changed

Lines changed: 1319 additions & 0 deletions

File tree

‎python-installer/LICENSE‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Apache License 2.0
2+
3+
Copyright 2026 Tcode-Motion and TechScript contributors.
4+
5+
This package is distributed under the Apache License, Version 2.0. The complete license text is available in the repository root LICENSE file and at:
6+
7+
https://www.apache.org/licenses/LICENSE-2.0

‎python-installer/README.md‎

Lines changed: 224 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,224 @@
1+
# TechScript — Python Installer
2+
3+
<div align="center">
4+
5+
[![PyPI](https://img.shields.io/pypi/v/techscript?style=for-the-badge&color=0DF28B)](https://pypi.org/project/techscript/)
6+
[![Python](https://img.shields.io/pypi/pyversions/techscript?style=for-the-badge)](https://pypi.org/project/techscript/)
7+
[![License](https://img.shields.io/badge/license-Apache--2.0-green?style=for-the-badge)](../LICENSE)
8+
[![GitHub](https://img.shields.io/badge/GitHub-Tcode--Motion%2Ftechscript-black?style=for-the-badge)](https://github.com/Tcode-Motion/techscript)
9+
10+
**The official Python-based installer for the TechScript 2.0 programming language.**
11+
12+
</div>
13+
14+
---
15+
16+
## What This Package Does
17+
18+
This is a **lightweight bootstrapper only** — it contains no compiler binaries.
19+
20+
When you run `techscript install`, it:
21+
1. Detects your OS and CPU architecture
22+
2. Fetches the correct native binary from [GitHub Releases](https://github.com/Tcode-Motion/techscript/releases/latest)
23+
3. Installs it into your PATH
24+
4. Verifies the installation by running `tsc version`
25+
26+
> **The actual TechScript compiler remains distributed via GitHub Releases.**
27+
> This PyPI package is under 200 KB and contains only Python code.
28+
29+
---
30+
31+
## Supported Platforms
32+
33+
| Platform | Architecture | Status |
34+
|---|---|---|
35+
| Windows | x64 | ✅ Supported |
36+
| Windows | ARM64 | ✅ Supported |
37+
| Linux | x64 | ✅ Supported |
38+
| Linux | ARM64 | ✅ Supported |
39+
| macOS | Intel (x64) | ✅ Supported |
40+
| macOS | Apple Silicon (ARM64) | ✅ Supported |
41+
| Android Termux | ARM64 | ✅ Supported |
42+
| Android Termux | ARMv7 | 🔄 Optional |
43+
44+
---
45+
46+
## Installation
47+
48+
### Via pip (Recommended)
49+
50+
```bash
51+
pip install techscript
52+
techscript install
53+
```
54+
55+
### Via curl — Linux / macOS
56+
57+
```bash
58+
curl -fsSL https://raw.githubusercontent.com/Tcode-Motion/techscript/main/scripts/install.sh | bash
59+
```
60+
61+
### Via installer.exe — Windows
62+
63+
Download `TechScript_Setup.exe` from [GitHub Releases](https://github.com/Tcode-Motion/techscript/releases/latest).
64+
65+
### Via Termux — Android
66+
67+
```bash
68+
pkg update
69+
pkg install curl python
70+
# Option 1: Python installer
71+
pip install techscript
72+
techscript install
73+
74+
# Option 2: Shell installer
75+
curl -fsSL https://raw.githubusercontent.com/Tcode-Motion/techscript/main/scripts/install.sh | bash
76+
```
77+
78+
### Via Homebrew — macOS *(coming soon)*
79+
80+
```bash
81+
brew install tcode-motion/tap/techscript
82+
```
83+
84+
### Via Winget — Windows *(coming soon)*
85+
86+
```powershell
87+
winget install Tcode-Motion.TechScript
88+
```
89+
90+
### Via Scoop — Windows *(coming soon)*
91+
92+
```powershell
93+
scoop install techscript
94+
```
95+
96+
---
97+
98+
## Usage
99+
100+
### Install the compiler
101+
102+
```bash
103+
techscript install
104+
```
105+
106+
### Force reinstall / update
107+
108+
```bash
109+
techscript install --force
110+
```
111+
112+
### Check installed version
113+
114+
```bash
115+
techscript version
116+
```
117+
118+
### Check for updates
119+
120+
```bash
121+
techscript check
122+
```
123+
124+
### Uninstall
125+
126+
```bash
127+
techscript uninstall
128+
```
129+
130+
### Forward commands to tsc
131+
132+
```bash
133+
# These are equivalent:
134+
techscript run myfile.txs
135+
tsc run myfile.txs
136+
```
137+
138+
---
139+
140+
## Quick Start
141+
142+
After installing:
143+
144+
```bash
145+
# Create a new project
146+
tsc new hello_world
147+
cd hello_world
148+
149+
# Run it
150+
tsc run
151+
```
152+
153+
Your first `src/main.txs`:
154+
155+
```txs
156+
say "Hello, World! 🌍"
157+
name = ask "What is your name? "
158+
say $"Welcome, {name}! You are running TechScript 2.0."
159+
```
160+
161+
---
162+
163+
## Install Locations
164+
165+
| Platform | Location |
166+
|---|---|
167+
| Windows | `%LOCALAPPDATA%\TechScript\bin\tsc.exe` |
168+
| Linux / macOS | `~/.local/bin/tsc` |
169+
| Termux | `$PREFIX/bin/tsc` |
170+
171+
---
172+
173+
## Debug Mode
174+
175+
Enable verbose output and Python tracebacks:
176+
177+
```bash
178+
techscript install --debug
179+
```
180+
181+
---
182+
183+
## Requirements
184+
185+
- Python 3.8 or newer
186+
- Internet access (to download the compiler binary)
187+
- The `requests` library (installed automatically)
188+
189+
---
190+
191+
## Development
192+
193+
```bash
194+
git clone https://github.com/Tcode-Motion/techscript
195+
cd techscript/python-installer
196+
197+
# Install in editable mode
198+
pip install -e .
199+
200+
# Run tests
201+
python -m pytest tests/ -v
202+
203+
# Build wheel and sdist
204+
python -m build
205+
```
206+
207+
---
208+
209+
## Links
210+
211+
| Resource | Link |
212+
|---|---|
213+
| 🌐 Website | [techscript.is-a.dev](https://techscript.is-a.dev) |
214+
| 📦 GitHub | [Tcode-Motion/techscript](https://github.com/Tcode-Motion/techscript) |
215+
| 🐍 PyPI | [pypi.org/project/techscript](https://pypi.org/project/techscript/) |
216+
| 💻 VS Code Extension | [marketplace.visualstudio.com](https://marketplace.visualstudio.com/items?itemName=tanmoy.techscript) |
217+
| 🐛 Issues | [GitHub Issues](https://github.com/Tcode-Motion/techscript/issues) |
218+
| 💬 Discussions | [GitHub Discussions](https://github.com/Tcode-Motion/techscript/discussions) |
219+
220+
---
221+
222+
## License
223+
224+
Apache License 2.0 — Copyright 2026 [Tcode-Motion](https://github.com/Tcode-Motion)

‎python-installer/pyproject.toml‎

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
[build-system]
2+
requires = ["hatchling"]
3+
build-backend = "hatchling.build"
4+
5+
[project]
6+
name = "techscript"
7+
version = "2.0.0.1"
8+
description = "Official installer and launcher for the TechScript 2.0 programming language toolchain"
9+
readme = "README.md"
10+
license = { file = "LICENSE" }
11+
requires-python = ">=3.8"
12+
authors = [
13+
{ name = "Tcode-Motion", email = "tcode.motion@gmail.com" }
14+
]
15+
keywords = ["techscript", "compiler", "installer", "tsc", "programming-language"]
16+
classifiers = [
17+
"Development Status :: 5 - Production/Stable",
18+
"Environment :: Console",
19+
"Intended Audience :: Developers",
20+
"License :: OSI Approved :: Apache Software License",
21+
"Operating System :: OS Independent",
22+
"Programming Language :: Python :: 3",
23+
"Programming Language :: Python :: 3.8",
24+
"Programming Language :: Python :: 3.9",
25+
"Programming Language :: Python :: 3.10",
26+
"Programming Language :: Python :: 3.11",
27+
"Programming Language :: Python :: 3.12",
28+
"Topic :: Software Development :: Compilers",
29+
"Topic :: System :: Installation/Setup",
30+
]
31+
dependencies = [
32+
"requests>=2.28.0",
33+
]
34+
35+
[project.urls]
36+
Homepage = "https://techscript.is-a.dev"
37+
Repository = "https://github.com/Tcode-Motion/techscript"
38+
Issues = "https://github.com/Tcode-Motion/techscript/issues"
39+
Changelog = "https://github.com/Tcode-Motion/techscript/blob/main/CHANGELOG.md"
40+
41+
[project.scripts]
42+
techscript = "techscript.__main__:main"
43+
44+
[tool.hatch.build.targets.wheel]
45+
packages = ["techscript"]
46+
47+
[tool.hatch.build.targets.sdist]
48+
include = [
49+
"techscript/",
50+
"tests/",
51+
"README.md",
52+
"LICENSE",
53+
"pyproject.toml",
54+
]
55+
56+
[project.optional-dependencies]
57+
dev = ["build", "hatchling"]
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
"""
2+
TechScript 2.0 — Official Python Installer / Bootstrapper
3+
4+
Detects your platform, downloads the correct native binary from GitHub Releases,
5+
and installs the `tsc` compiler into the right location on your PATH.
6+
7+
Usage:
8+
techscript install # Install or update the compiler
9+
techscript install --force # Force reinstall
10+
techscript uninstall # Remove the compiler
11+
techscript version # Show installed version
12+
techscript check # Check for updates
13+
"""
14+
15+
__version__ = "2.0.0.1"
16+
__author__ = "Tcode-Motion"
17+
__repo__ = "https://github.com/Tcode-Motion/techscript"

0 commit comments

Comments
 (0)