Skip to content

Commit 8fbcb30

Browse files
author
SynTaek
committed
docs: add deployment guides and update README with correct repository URLs
1 parent 8e385d3 commit 8fbcb30

4 files changed

Lines changed: 410 additions & 10 deletions

File tree

DEPLOYMENT.md

Lines changed: 231 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,231 @@
1+
# Deployment Guide
2+
3+
This guide explains how to deploy `code-trajectory-mcp` to TestPyPI (for testing) and PyPI (for production).
4+
5+
## Prerequisites
6+
7+
### 1. Create TestPyPI Account
8+
9+
1. Go to [https://test.pypi.org/account/register/](https://test.pypi.org/account/register/)
10+
2. Create an account
11+
3. Verify your email
12+
13+
### 2. Create API Token
14+
15+
1. Log in to TestPyPI
16+
2. Go to [Account Settings](https://test.pypi.org/manage/account/)
17+
3. Scroll to "API tokens"
18+
4. Click "Add API token"
19+
5. Set name (e.g., "code-trajectory-upload")
20+
6. Set scope to "Entire account" (or specific project if you've created it)
21+
7. Copy the generated token (starts with `pypi-`)
22+
8. **Important:** Save this token securely - you won't see it again!
23+
24+
### 3. Configure `.pypirc` (Optional but Recommended)
25+
26+
Create or edit `~/.pypirc` (Windows: `%USERPROFILE%\.pypirc`):
27+
28+
```ini
29+
[distutils]
30+
index-servers =
31+
pypi
32+
testpypi
33+
34+
[testpypi]
35+
repository = https://test.pypi.org/legacy/
36+
username = __token__
37+
password = pypi-YOUR_TOKEN_HERE
38+
39+
[pypi]
40+
repository = https://pypi.org/legacy/
41+
username = __token__
42+
password = pypi-YOUR_TOKEN_HERE_WHEN_READY
43+
```
44+
45+
**Note:** Replace `pypi-YOUR_TOKEN_HERE` with your actual token.
46+
47+
---
48+
49+
## Deployment to TestPyPI
50+
51+
### Method 1: Using the Automation Script (Recommended)
52+
53+
```powershell
54+
.\deploy-testpypi.ps1
55+
```
56+
57+
This script will:
58+
1. Clean old build artifacts
59+
2. Build the package
60+
3. Upload to TestPyPI
61+
4. Test installation from TestPyPI
62+
63+
### Method 2: Manual Deployment
64+
65+
```powershell
66+
# 1. Clean old builds
67+
Remove-Item -Recurse -Force dist -ErrorAction SilentlyContinue
68+
69+
# 2. Build the package
70+
uv build
71+
72+
# 3. Install twine (if not already installed)
73+
uv pip install twine
74+
75+
# 4. Upload to TestPyPI
76+
twine upload --repository testpypi dist/*
77+
78+
# You'll be prompted for username and password:
79+
# Username: __token__
80+
# Password: pypi-YOUR_TOKEN_HERE
81+
```
82+
83+
---
84+
85+
## Testing the TestPyPI Package
86+
87+
### Install from TestPyPI
88+
89+
```bash
90+
# Using pip
91+
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ code-trajectory
92+
93+
# Using uv
94+
uv pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ code-trajectory
95+
```
96+
97+
**Note:** `--extra-index-url https://pypi.org/simple/` is needed because dependencies (like `mcp`, `gitpython`) are on regular PyPI, not TestPyPI.
98+
99+
### Test the Installation
100+
101+
```bash
102+
# Check version
103+
code-trajectory --version
104+
105+
# Or test with uvx
106+
uvx --from code-trajectory --index-url https://test.pypi.org/simple/ code-trajectory
107+
```
108+
109+
---
110+
111+
## Deployment to PyPI (Production)
112+
113+
**⚠️ Only deploy to PyPI when you're confident the package works correctly!**
114+
115+
### Prerequisites
116+
117+
1. Create PyPI account at [https://pypi.org/account/register/](https://pypi.org/account/register/)
118+
2. Generate API token (same process as TestPyPI)
119+
3. Update `~/.pypirc` with PyPI credentials
120+
121+
### Deploy to PyPI
122+
123+
```powershell
124+
# 1. Clean and build
125+
Remove-Item -Recurse -Force dist -ErrorAction SilentlyContinue
126+
uv build
127+
128+
# 2. Upload to PyPI
129+
twine upload dist/*
130+
```
131+
132+
---
133+
134+
## Automated CI/CD Deployment (Optional)
135+
136+
You can automate deployment with GitHub Actions. Create `.github/workflows/publish.yml`:
137+
138+
```yaml
139+
name: Publish to PyPI
140+
141+
on:
142+
release:
143+
types: [published]
144+
145+
jobs:
146+
deploy:
147+
runs-on: ubuntu-latest
148+
steps:
149+
- uses: actions/checkout@v4
150+
151+
- name: Install uv
152+
uses: astral-sh/setup-uv@v1
153+
154+
- name: Set up Python
155+
run: uv python install 3.14
156+
157+
- name: Build package
158+
run: uv build
159+
160+
- name: Publish to PyPI
161+
env:
162+
TWINE_USERNAME: __token__
163+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
164+
run: |
165+
uv pip install twine
166+
twine upload dist/*
167+
```
168+
169+
Add `PYPI_API_TOKEN` to your GitHub repository secrets.
170+
171+
---
172+
173+
## Troubleshooting
174+
175+
### Package Name Already Exists
176+
177+
If `code-trajectory` is already taken on PyPI, you'll need to:
178+
1. Choose a different name in `pyproject.toml`
179+
2. Rebuild and reupload
180+
181+
### Version Already Exists
182+
183+
PyPI doesn't allow re-uploading the same version. You need to:
184+
1. Increment version in `pyproject.toml`
185+
2. Rebuild and reupload
186+
187+
### Dependencies Not Found
188+
189+
TestPyPI doesn't have all packages. When installing from TestPyPI, always use:
190+
```bash
191+
--extra-index-url https://pypi.org/simple/
192+
```
193+
194+
---
195+
196+
## Version Management
197+
198+
Current version: `0.1.1` (in `pyproject.toml`)
199+
200+
To update version:
201+
1. Edit `pyproject.toml`
202+
2. Update `version = "0.1.2"` (or whatever the new version is)
203+
3. Commit changes
204+
4. Create new git tag: `git tag v0.1.2`
205+
5. Push tag: `git push origin v0.1.2`
206+
6. Build and deploy
207+
208+
---
209+
210+
## Package Information
211+
212+
- **Package name:** `code-trajectory`
213+
- **Import name:** `code_trajectory`
214+
- **Entry point:** `code-trajectory` command
215+
- **TestPyPI URL:** https://test.pypi.org/project/code-trajectory/
216+
- **PyPI URL:** https://pypi.org/project/code-trajectory/ (when published)
217+
218+
---
219+
220+
## Useful Commands
221+
222+
```powershell
223+
# Check what will be included in the package
224+
uv build --outdir dist-test
225+
226+
# Check package contents
227+
tar -tzf dist/code_trajectory-0.1.1.tar.gz
228+
229+
# Validate package before upload
230+
twine check dist/*
231+
```

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
[![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
88
[![Code Style: Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
99

10-
[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/SynTaek/code-trajectory/graphs/commit-activity)
11-
[![GitHub Stars](https://img.shields.io/github/stars/SynTaek/code-trajectory?style=social)](https://github.com/SynTaek/code-trajectory)
10+
[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/SynTaek/code-trajectory-mcp/graphs/commit-activity)
11+
[![GitHub Stars](https://img.shields.io/github/stars/SynTaek/code-trajectory-mcp?style=social)](https://github.com/SynTaek/code-trajectory-mcp)
1212

1313
[![README](https://img.shields.io/badge/README-ENGLISH-blue)](README.md)
1414
[![README_KR](https://img.shields.io/badge/README-KOREAN-blue)](README_ko.md)
@@ -71,7 +71,7 @@ Add the following to your `claude_desktop_config.json`:
7171
"command": "uvx",
7272
"args": [
7373
"--from",
74-
"git+https://github.com/SynTaek/code-trajectory.git",
74+
"git+https://github.com/SynTaek/code-trajectory-mcp.git",
7575
"code-trajectory"
7676
]
7777
}
@@ -86,7 +86,7 @@ Add the following to your `claude_desktop_config.json`:
8686
If you are using an MCP-compatible Gemini interface, use the following command settings:
8787

8888
* **Command:** `uvx`
89-
* **Args:** `--from git+https://github.com/SynTaek/code-trajectory.git code-trajectory`
89+
* **Args:** `--from git+https://github.com/SynTaek/code-trajectory-mcp.git code-trajectory`
9090

9191
### VSCode & Derivatives (Cursor, Windsurf, etc.)
9292

@@ -98,7 +98,7 @@ If you are using the MCP extension in **VSCode**, **Cursor**, **Windsurf**, **An
9898
"command": "uvx",
9999
"args": [
100100
"--from",
101-
"git+https://github.com/SynTaek/code-trajectory.git",
101+
"git+https://github.com/SynTaek/code-trajectory-mcp.git",
102102
"code-trajectory"
103103
]
104104
}

README_ko.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
[![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
88
[![Code Style: Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
99

10-
[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/SynTaek/code-trajectory/graphs/commit-activity)
11-
[![GitHub Stars](https://img.shields.io/github/stars/SynTaek/code-trajectory?style=social)](https://github.com/SynTaek/code-trajectory)
10+
[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/SynTaek/code-trajectory-mcp/graphs/commit-activity)
11+
[![GitHub Stars](https://img.shields.io/github/stars/SynTaek/code-trajectory-mcp?style=social)](https://github.com/SynTaek/code-trajectory-mcp)
1212

1313
[![README](https://img.shields.io/badge/README-ENGLISH-blue)](README.md)
1414
[![README_KR](https://img.shields.io/badge/README-KOREAN-blue)](README_ko.md)
@@ -72,7 +72,7 @@ git init
7272
"command": "uvx",
7373
"args": [
7474
"--from",
75-
"git+https://github.com/SynTaek/code-trajectory.git",
75+
"git+https://github.com/SynTaek/code-trajectory-mcp.git",
7676
"code-trajectory"
7777
]
7878
}
@@ -87,7 +87,7 @@ git init
8787
MCP 호환 Gemini 인터페이스를 사용하는 경우, 다음 명령 설정을 사용하세요:
8888

8989
* **Command:** `uvx`
90-
* **Args:** `--from git+https://github.com/SynTaek/code-trajectory.git code-trajectory`
90+
* **Args:** `--from git+https://github.com/SynTaek/code-trajectory-mcp.git code-trajectory`
9191

9292
### VSCode 및 파생 에디터 (Cursor, Windsurf 등)
9393

@@ -99,7 +99,7 @@ MCP 호환 Gemini 인터페이스를 사용하는 경우, 다음 명령 설정
9999
"command": "uvx",
100100
"args": [
101101
"--from",
102-
"git+https://github.com/SynTaek/code-trajectory.git",
102+
"git+https://github.com/SynTaek/code-trajectory-mcp.git",
103103
"code-trajectory"
104104
]
105105
}

0 commit comments

Comments
 (0)