nanoPyCodeAgent 0.1.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.
- nanopycodeagent-0.1.0/.github/workflows/release.yml +81 -0
- nanopycodeagent-0.1.0/.gitignore +218 -0
- nanopycodeagent-0.1.0/.python-version +1 -0
- nanopycodeagent-0.1.0/LICENSE +21 -0
- nanopycodeagent-0.1.0/PKG-INFO +69 -0
- nanopycodeagent-0.1.0/README.md +52 -0
- nanopycodeagent-0.1.0/README.zh-CN.md +52 -0
- nanopycodeagent-0.1.0/docs/changelogs/0.1.x.md +25 -0
- nanopycodeagent-0.1.0/docs/changelogs/README.md +7 -0
- nanopycodeagent-0.1.0/docs/dev_notes/README.md +13 -0
- nanopycodeagent-0.1.0/docs/dev_notes/en/0.1.x.md +21 -0
- nanopycodeagent-0.1.0/docs/dev_notes/zh-CN/0.1.x.md +21 -0
- nanopycodeagent-0.1.0/pyproject.toml +34 -0
- nanopycodeagent-0.1.0/src/nanopycodeagent/__init__.py +2 -0
- nanopycodeagent-0.1.0/uv.lock +7 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
# Build, publish to PyPI, and create a GitHub Release when a v* tag is pushed.
|
|
4
|
+
#
|
|
5
|
+
# Concerns are split into three jobs, each with the minimum permissions it
|
|
6
|
+
# needs, so the powerful id-token (PyPI) and contents:write (repo) scopes never
|
|
7
|
+
# coexist in one job:
|
|
8
|
+
# build -> no special permissions
|
|
9
|
+
# publish-to-pypi -> id-token: write (Trusted Publishing / OIDC, no tokens)
|
|
10
|
+
# github-release -> contents: write (create the release + upload assets)
|
|
11
|
+
#
|
|
12
|
+
# One-time prerequisite on PyPI — add a "pending publisher" at
|
|
13
|
+
# https://pypi.org/manage/account/publishing/ matching:
|
|
14
|
+
# owner = minixalpha, repo = nanoPyCodeAgent,
|
|
15
|
+
# workflow = release.yml, environment = (leave blank; this workflow sets none).
|
|
16
|
+
on:
|
|
17
|
+
push:
|
|
18
|
+
tags:
|
|
19
|
+
- "v*"
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
build:
|
|
23
|
+
name: Build distributions
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/checkout@v6
|
|
27
|
+
with:
|
|
28
|
+
fetch-depth: 0 # full history + tags so hatch-vcs can derive the version
|
|
29
|
+
- name: Install uv
|
|
30
|
+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
|
31
|
+
- name: Build
|
|
32
|
+
run: uv build
|
|
33
|
+
- name: Check distribution metadata
|
|
34
|
+
run: uvx twine check dist/*
|
|
35
|
+
- name: Upload artifacts
|
|
36
|
+
uses: actions/upload-artifact@v4
|
|
37
|
+
with:
|
|
38
|
+
name: dist
|
|
39
|
+
path: dist/
|
|
40
|
+
|
|
41
|
+
publish-to-pypi:
|
|
42
|
+
name: Publish to PyPI
|
|
43
|
+
needs: build
|
|
44
|
+
runs-on: ubuntu-latest
|
|
45
|
+
permissions:
|
|
46
|
+
id-token: write # required for Trusted Publishing (OIDC)
|
|
47
|
+
steps:
|
|
48
|
+
- name: Download artifacts
|
|
49
|
+
uses: actions/download-artifact@v4
|
|
50
|
+
with:
|
|
51
|
+
name: dist
|
|
52
|
+
path: dist/
|
|
53
|
+
- name: Install uv
|
|
54
|
+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
|
55
|
+
- name: Publish to PyPI
|
|
56
|
+
# --check-url makes re-runs idempotent: files already on the index are
|
|
57
|
+
# skipped instead of failing the job on "file already exists".
|
|
58
|
+
run: uv publish --check-url https://pypi.org/simple/
|
|
59
|
+
|
|
60
|
+
github-release:
|
|
61
|
+
name: Create GitHub Release
|
|
62
|
+
needs: publish-to-pypi # only after a successful PyPI publish
|
|
63
|
+
runs-on: ubuntu-latest
|
|
64
|
+
permissions:
|
|
65
|
+
contents: write # required to create the release and upload assets
|
|
66
|
+
steps:
|
|
67
|
+
- name: Download artifacts
|
|
68
|
+
uses: actions/download-artifact@v4
|
|
69
|
+
with:
|
|
70
|
+
name: dist
|
|
71
|
+
path: dist/
|
|
72
|
+
- name: Create GitHub Release
|
|
73
|
+
env:
|
|
74
|
+
GH_TOKEN: ${{ github.token }}
|
|
75
|
+
GH_REPO: ${{ github.repository }}
|
|
76
|
+
# --generate-notes builds notes from merged PRs since the previous tag;
|
|
77
|
+
# dist/* attaches the wheel and sdist as assets. Idempotent: skip if a
|
|
78
|
+
# release for this tag already exists, so re-runs don't fail.
|
|
79
|
+
run: |
|
|
80
|
+
gh release view "$GITHUB_REF_NAME" >/dev/null 2>&1 \
|
|
81
|
+
|| gh release create "$GITHUB_REF_NAME" dist/* --generate-notes
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
# Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# UV
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
# uv.lock
|
|
102
|
+
|
|
103
|
+
# poetry
|
|
104
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
105
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
106
|
+
# commonly ignored for libraries.
|
|
107
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
108
|
+
# poetry.lock
|
|
109
|
+
# poetry.toml
|
|
110
|
+
|
|
111
|
+
# pdm
|
|
112
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
113
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
114
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
115
|
+
# pdm.lock
|
|
116
|
+
# pdm.toml
|
|
117
|
+
.pdm-python
|
|
118
|
+
.pdm-build/
|
|
119
|
+
|
|
120
|
+
# pixi
|
|
121
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
122
|
+
# pixi.lock
|
|
123
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
124
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
125
|
+
.pixi
|
|
126
|
+
|
|
127
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
128
|
+
__pypackages__/
|
|
129
|
+
|
|
130
|
+
# Celery stuff
|
|
131
|
+
celerybeat-schedule
|
|
132
|
+
celerybeat.pid
|
|
133
|
+
|
|
134
|
+
# Redis
|
|
135
|
+
*.rdb
|
|
136
|
+
*.aof
|
|
137
|
+
*.pid
|
|
138
|
+
|
|
139
|
+
# RabbitMQ
|
|
140
|
+
mnesia/
|
|
141
|
+
rabbitmq/
|
|
142
|
+
rabbitmq-data/
|
|
143
|
+
|
|
144
|
+
# ActiveMQ
|
|
145
|
+
activemq-data/
|
|
146
|
+
|
|
147
|
+
# SageMath parsed files
|
|
148
|
+
*.sage.py
|
|
149
|
+
|
|
150
|
+
# Environments
|
|
151
|
+
.env
|
|
152
|
+
.envrc
|
|
153
|
+
.venv
|
|
154
|
+
env/
|
|
155
|
+
venv/
|
|
156
|
+
ENV/
|
|
157
|
+
env.bak/
|
|
158
|
+
venv.bak/
|
|
159
|
+
|
|
160
|
+
# Spyder project settings
|
|
161
|
+
.spyderproject
|
|
162
|
+
.spyproject
|
|
163
|
+
|
|
164
|
+
# Rope project settings
|
|
165
|
+
.ropeproject
|
|
166
|
+
|
|
167
|
+
# mkdocs documentation
|
|
168
|
+
/site
|
|
169
|
+
|
|
170
|
+
# mypy
|
|
171
|
+
.mypy_cache/
|
|
172
|
+
.dmypy.json
|
|
173
|
+
dmypy.json
|
|
174
|
+
|
|
175
|
+
# Pyre type checker
|
|
176
|
+
.pyre/
|
|
177
|
+
|
|
178
|
+
# pytype static type analyzer
|
|
179
|
+
.pytype/
|
|
180
|
+
|
|
181
|
+
# Cython debug symbols
|
|
182
|
+
cython_debug/
|
|
183
|
+
|
|
184
|
+
# PyCharm
|
|
185
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
186
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
187
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
188
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
189
|
+
# .idea/
|
|
190
|
+
|
|
191
|
+
# Abstra
|
|
192
|
+
# Abstra is an AI-powered process automation framework.
|
|
193
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
194
|
+
# Learn more at https://abstra.io/docs
|
|
195
|
+
.abstra/
|
|
196
|
+
|
|
197
|
+
# Visual Studio Code
|
|
198
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
199
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
200
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
201
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
202
|
+
# .vscode/
|
|
203
|
+
# Temporary file for partial code execution
|
|
204
|
+
tempCodeRunnerFile.py
|
|
205
|
+
|
|
206
|
+
# Ruff stuff:
|
|
207
|
+
.ruff_cache/
|
|
208
|
+
|
|
209
|
+
# PyPI configuration file
|
|
210
|
+
.pypirc
|
|
211
|
+
|
|
212
|
+
# Marimo
|
|
213
|
+
marimo/_static/
|
|
214
|
+
marimo/_lsp/
|
|
215
|
+
__marimo__/
|
|
216
|
+
|
|
217
|
+
# Streamlit
|
|
218
|
+
.streamlit/secrets.toml
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.13
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 minixalpha
|
|
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,69 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: nanoPyCodeAgent
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A nano code agent built from scratch in pure Python.
|
|
5
|
+
Project-URL: Homepage, https://github.com/minixalpha/nanoPyCodeAgent
|
|
6
|
+
Project-URL: Repository, https://github.com/minixalpha/nanoPyCodeAgent
|
|
7
|
+
Project-URL: Issues, https://github.com/minixalpha/nanoPyCodeAgent/issues
|
|
8
|
+
Author: minixalpha
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: agent,ai,code-agent,llm
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
+
Requires-Python: >=3.13
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
|
|
18
|
+
# nanoPyCodeAgent
|
|
19
|
+
|
|
20
|
+
[English](README.md) | [简体中文](README.zh-CN.md)
|
|
21
|
+
|
|
22
|
+
A nano code agent built in pure Python.
|
|
23
|
+
|
|
24
|
+
> "What I cannot create, I do not understand." — Richard Feynman, 1988
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
nanoPyCodeAgent requires Python 3.13 or newer.
|
|
29
|
+
|
|
30
|
+
### How to Run
|
|
31
|
+
|
|
32
|
+
There are a few ways to run it — pick whichever fits your workflow.
|
|
33
|
+
|
|
34
|
+
#### Run without installing
|
|
35
|
+
|
|
36
|
+
Use `uvx` to run the latest release without installing anything:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
uvx nanoPyCodeAgent
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
#### Run after installing
|
|
43
|
+
|
|
44
|
+
Install it as a persistent command-line tool, then run it from anywhere:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
uv tool install nanoPyCodeAgent # or: pipx install nanoPyCodeAgent
|
|
48
|
+
nanoPyCodeAgent
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
#### Run a branch or tagged version
|
|
52
|
+
|
|
53
|
+
Run an unreleased branch or a specific release tag straight from GitHub:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# latest commit on a branch
|
|
57
|
+
uvx --from "git+https://github.com/minixalpha/nanoPyCodeAgent@main" nanoPyCodeAgent
|
|
58
|
+
|
|
59
|
+
# a specific tag
|
|
60
|
+
uvx --from "git+https://github.com/minixalpha/nanoPyCodeAgent@v0.1.0" nanoPyCodeAgent
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### How to Update
|
|
64
|
+
|
|
65
|
+
Upgrade an installed tool to the latest release:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
uv tool upgrade nanoPyCodeAgent # or: pipx upgrade nanoPyCodeAgent
|
|
69
|
+
```
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# nanoPyCodeAgent
|
|
2
|
+
|
|
3
|
+
[English](README.md) | [简体中文](README.zh-CN.md)
|
|
4
|
+
|
|
5
|
+
A nano code agent built in pure Python.
|
|
6
|
+
|
|
7
|
+
> "What I cannot create, I do not understand." — Richard Feynman, 1988
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
nanoPyCodeAgent requires Python 3.13 or newer.
|
|
12
|
+
|
|
13
|
+
### How to Run
|
|
14
|
+
|
|
15
|
+
There are a few ways to run it — pick whichever fits your workflow.
|
|
16
|
+
|
|
17
|
+
#### Run without installing
|
|
18
|
+
|
|
19
|
+
Use `uvx` to run the latest release without installing anything:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
uvx nanoPyCodeAgent
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
#### Run after installing
|
|
26
|
+
|
|
27
|
+
Install it as a persistent command-line tool, then run it from anywhere:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
uv tool install nanoPyCodeAgent # or: pipx install nanoPyCodeAgent
|
|
31
|
+
nanoPyCodeAgent
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
#### Run a branch or tagged version
|
|
35
|
+
|
|
36
|
+
Run an unreleased branch or a specific release tag straight from GitHub:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# latest commit on a branch
|
|
40
|
+
uvx --from "git+https://github.com/minixalpha/nanoPyCodeAgent@main" nanoPyCodeAgent
|
|
41
|
+
|
|
42
|
+
# a specific tag
|
|
43
|
+
uvx --from "git+https://github.com/minixalpha/nanoPyCodeAgent@v0.1.0" nanoPyCodeAgent
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### How to Update
|
|
47
|
+
|
|
48
|
+
Upgrade an installed tool to the latest release:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
uv tool upgrade nanoPyCodeAgent # or: pipx upgrade nanoPyCodeAgent
|
|
52
|
+
```
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# nanoPyCodeAgent
|
|
2
|
+
|
|
3
|
+
[English](README.md) | [简体中文](README.zh-CN.md)
|
|
4
|
+
|
|
5
|
+
一个用纯 Python 构建的 Nano 级别的代码智能体。
|
|
6
|
+
|
|
7
|
+
> “凡我不能创造的,我便未能真正理解。” —— 理查德·费曼,1988
|
|
8
|
+
|
|
9
|
+
## 使用
|
|
10
|
+
|
|
11
|
+
nanoPyCodeAgent 需要 Python 3.13 或更高版本。
|
|
12
|
+
|
|
13
|
+
### 如何运行
|
|
14
|
+
|
|
15
|
+
有几种运行方式,任选其一即可。
|
|
16
|
+
|
|
17
|
+
#### 免安装运行
|
|
18
|
+
|
|
19
|
+
用 `uvx` 直接运行最新发布版,无需安装任何东西:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
uvx nanoPyCodeAgent
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
#### 安装后运行
|
|
26
|
+
|
|
27
|
+
将它作为常驻命令行工具安装,之后可在任意位置运行:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
uv tool install nanoPyCodeAgent # 或: pipx install nanoPyCodeAgent
|
|
31
|
+
nanoPyCodeAgent
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
#### 运行某个分支或标签版本
|
|
35
|
+
|
|
36
|
+
直接从 GitHub 运行未发布的分支,或某个具体的发布标签:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# 分支上的最新提交
|
|
40
|
+
uvx --from "git+https://github.com/minixalpha/nanoPyCodeAgent@main" nanoPyCodeAgent
|
|
41
|
+
|
|
42
|
+
# 某个具体 tag
|
|
43
|
+
uvx --from "git+https://github.com/minixalpha/nanoPyCodeAgent@v0.1.0" nanoPyCodeAgent
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### 如何更新
|
|
47
|
+
|
|
48
|
+
将已安装的工具升级到最新发布版:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
uv tool upgrade nanoPyCodeAgent # 或: pipx upgrade nanoPyCodeAgent
|
|
52
|
+
```
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Changelog — 0.1.x
|
|
2
|
+
|
|
3
|
+
All notable changes in the **0.1.x** release series are documented here.
|
|
4
|
+
|
|
5
|
+
## [Unreleased]
|
|
6
|
+
|
|
7
|
+
## [0.1.0] - 2026-06-20
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
- uv-managed project with the console-script entry point `nanoPyCodeAgent`.
|
|
11
|
+
- Tag-driven release pipeline: PyPI Trusted Publishing + GitHub Release.
|
|
12
|
+
- Bilingual README (English / 简体中文).
|
|
13
|
+
- changelogs and dev notes
|
|
14
|
+
|
|
15
|
+
<!--
|
|
16
|
+
When cutting a release, copy the relevant items from [Unreleased] into a new
|
|
17
|
+
version section above it, e.g.:
|
|
18
|
+
|
|
19
|
+
## [0.1.1] - YYYY-MM-DD
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
### Changed
|
|
23
|
+
### Fixed
|
|
24
|
+
### Removed
|
|
25
|
+
-->
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Changelogs
|
|
2
|
+
|
|
3
|
+
Changelogs for nanoPyCodeAgent, organized one file per `X.Y.x` release series
|
|
4
|
+
(e.g. [`0.1.x.md`](0.1.x.md)).
|
|
5
|
+
|
|
6
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
7
|
+
and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Development Notes
|
|
2
|
+
|
|
3
|
+
Development notes for nanoPyCodeAgent, organized one file per `X.Y.x` release
|
|
4
|
+
series (e.g. `0.1.x.md`).
|
|
5
|
+
|
|
6
|
+
Notes are bilingual, split by language:
|
|
7
|
+
|
|
8
|
+
- [`zh-CN/`](zh-CN/) — **hand-written Chinese source** (source of truth)
|
|
9
|
+
- [`en/`](en/) — **English, generated from the Chinese source** (do not edit by hand)
|
|
10
|
+
|
|
11
|
+
These are free-form notes — insights, takeaways, and design decisions gathered
|
|
12
|
+
while developing each series, with no fixed structure. User-facing changes live
|
|
13
|
+
in [`../changelogs/`](../changelogs/).
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Development Notes — 0.1.x
|
|
2
|
+
|
|
3
|
+
> Generated from the Chinese source [`../zh-CN/0.1.x.md`](../zh-CN/0.1.x.md). Do not edit by hand.
|
|
4
|
+
|
|
5
|
+
## 0.1.0 - 2026.06.20
|
|
6
|
+
|
|
7
|
+
The main purpose of this project is to deepen my understanding of agents by building a code agent myself. Without writing one by hand at least once, I feel I can't really grasp the details. Agents are devouring the world at a visible pace, and I can't stay indifferent to that.
|
|
8
|
+
|
|
9
|
+
I chose Python simply because I'm familiar with it, so that language-specific friction wouldn't get in the way of expressing what I mean while building by hand. Later I may build versions in other programming languages to further appreciate the differences between languages when building an agent.
|
|
10
|
+
|
|
11
|
+
This release mainly sets up the project skeleton. My biggest takeaway is that building a project in public feels mentally very different from a private one. A private, for-myself project often carries a "vibe" mindset — sometimes you don't care much about the details, and as long as it works, it's fine. But building in public is a kind of public commitment: you have to be very careful about what you ship, and must not put out garbage that pollutes the world.
|
|
12
|
+
|
|
13
|
+
I do use a code agent to generate things, but I follow a few principles.
|
|
14
|
+
|
|
15
|
+
First, I deliberate over what it generates, again and again.
|
|
16
|
+
|
|
17
|
+
Understand what the agent is doing, and keep questioning whether what it produced makes sense. I've found this process genuinely teaches me a lot. Knowledge-wise, I quickly pick up things I didn't know before — how to design a reasonable project structure, how to publish to PyPI, how to build a GitHub workflow — without having to search and filter on my own; I can learn the key parts directly. Beyond that, questioning what the AI generates leads me to learn things I didn't even know existed. For example, when I noticed `build-backend = "hatchling.build"` in `pyproject.toml` and wondered what it was and why it differed from the `build-backend = "uv_build"` in uv's official docs, the agent walked me through a detailed comparison, and from it I learned about dynamic versioning — and put what I'd just learned to use in the project. Later, reviewing the code, I noticed `pyproject.toml` no longer had a fixed version number, which left me a bit uneasy: I worried I wouldn't be able to quickly tell the project's version afterward. Through the discussion with the agent I learned the version can be obtained via `git describe`, and in the end decided to keep the dynamic-versioning design. All of this was learned in the course of "understanding what the AI actually generated"; had I only been vibing, I probably would never have learned any of it.
|
|
18
|
+
|
|
19
|
+
Working with a code agent also gives me a better sense of its limitations — limitations I uncovered by questioning what the AI generated and repeatedly asking whether it was really best practice. Time and again I've noticed a particular flaw in the agent, a kind of "A + B < A and A + B < B" problem: you have the AI generate A and B, each fine on its own, but together they are problematic. For instance, I initially created the project with `uv init`, then — because I wanted to run it directly with uvx — switched it to the [Packaged applications](https://docs.astral.sh/uv/concepts/projects/init/#packaged-applications) layout, and what came out was a hybrid of the two. Only when I questioned why there was duplicated code, and whether that was best practice, did the agent change it to a cleaner version. Another example: when first building [release.yml](../../../.github/workflows/release.yml), the agent merged publishing to PyPI and creating the GitHub release into a single job "for simplicity" — but I didn't want that simplification; I only wanted to know the best practice, and in the end the agent split the two distinct concerns apart.
|
|
20
|
+
|
|
21
|
+
Second, for the crucial parts, I still want to write them by hand as much as possible. This isn't one of those deadline-driven company projects; I don't need "delivery efficiency" — I need to taste as much as I can along the way. From past experience, people learn more from their mistakes, and I need to understand, through making errors, debugging, and revising, why a thing is designed the way it is and why it is written the way it is. Only for the relatively mechanical tasks do I let the agent generate things.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# 开发笔记 — 0.1.x
|
|
2
|
+
|
|
3
|
+
> 本文件为**手写中文源文件**(source of truth);英文版 [`../en/0.1.x.md`](../en/0.1.x.md) 由其生成。
|
|
4
|
+
|
|
5
|
+
## 0.1.0 - 2026.06.20
|
|
6
|
+
|
|
7
|
+
这个项目的主要目的,是我要通过对 Code Agent 的构建,增强对 Agent 的理解,如果不亲手写一次,我觉得自己难以理解其中的细节,agent 在以肉眼可见的速度吞噬世界,我不能对此无动于衷。
|
|
8
|
+
|
|
9
|
+
选择 Python,单纯是因为我对 Python 熟悉,使得手工构建时,语言相关的内容不会阻挡我的表达,以后可能会通过构建其他编程语言的版本,来进一步体会不同语言构建 agent 时候的区别。
|
|
10
|
+
|
|
11
|
+
这个版本主要完成了项目骨架的搭建,最主要的体会是一个公开构建的项目,和自己的私有项目,在心态上有很大不同。私有的,自用的项目,通常有种 "vibe" 心态,有时候并不在意一些细节,功能正常就 ok,但公开构建的项目,代表了自己的一种公开承诺,你需要对交付出去的东西慎之又慎,不能交付出去一个垃圾去污染这个世界。
|
|
12
|
+
|
|
13
|
+
我会使用 Code Agent 去生成一些东西,但会有几点原则。
|
|
14
|
+
|
|
15
|
+
一是对它生成的东西反复考量。
|
|
16
|
+
|
|
17
|
+
弄清楚 Agent 在做什么,反复思考生成的东西的合理性。我发现这个过程真的让我学到很多,从知识上,会快速学到一些之前不知道的事,比如怎么设计合理的项目结构,怎么发布到 pypi,怎么构建 GitHub Workflow,我不再需要自己去搜索,筛选,而能直接学习关键环节。另外,通过质疑 AI 生成的东西,还能学到以前不知道的东西,比如我发现 `pyproject.toml` 里,`build-backend = "hatchling.build"` 是什么,为什么与 uv 官方文档里的 `build-backend = "uv_build"` 不一样时,Agent 详细对比了二者的不同,从中我了解到了动态版本号的知识,并且把新学到的东西用在了项目里,后来 review 代码,我又看到 `pyproject.toml` 里没有了固定版本号,让我又有点纠结,担心后续无法快速获取项目版本号,在与 agent 的讨论中,又学到了可以用 `git describe` 得到版本号,最终再决定保留动态版本号的设计。这些学到的东西,都是在“了解 AI 到底生成了什么”中学到的,如果只是 "vibe",我大概永远学不到这些东西。
|
|
18
|
+
|
|
19
|
+
从人与 Code Agent 的协作上,也更能了解 Agent 的局限性,而这些局限性,是在我质疑 AI 生成的东西,反复访问这是否是最佳实践中得到的。我多次发现 Agent 有种缺陷,即一种 "A + B < A 且 A + B < B" 的缺陷,你通过 AI 生成了 A 和 B,单纯看没问题,但合在一起有问题,比如我一开始是通过 "uv init" 生成的项目,后来因为想用 uvx 直接运行,又改成了 [Packaged applications](https://docs.astral.sh/uv/concepts/projects/init/#packaged-applications) 的结构,结果最终生成的是两种东西的混合体,在我质疑为什么代码有重复,这是否是最佳实践时,Agent 才改成了更干净的版本。又比如在最初构建 [release.yml](../../../.github/workflows/release.yml) 时,Agent 说为了简化把发布到 pypi 和 github release 合并在一个 job 中,但我并不想要这种简化,只想知道什么是最佳实践,最终 Agent 把两个不同的事做了拆分。
|
|
20
|
+
|
|
21
|
+
二是关键的部分,我希望还是能尽量手写。这并非公司里那些有 deadline 的项目,我不需要“交付效率”,而需要在这个过程尝到尽可能多的东西。从过去的经验看,人在错误中能学到更多的东西,我需要在出错,调试,修改中,了解一个东西为什么要这样设计,为什么要这样写。只有那些相对比较机械的任务,我会通过 Agent 来生成。
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "nanoPyCodeAgent"
|
|
3
|
+
dynamic = ["version"]
|
|
4
|
+
description = "A nano code agent built from scratch in pure Python."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.13"
|
|
7
|
+
license = "MIT"
|
|
8
|
+
license-files = ["LICENSE"]
|
|
9
|
+
authors = [{ name = "minixalpha" }]
|
|
10
|
+
keywords = ["agent", "llm", "code-agent", "ai"]
|
|
11
|
+
classifiers = [
|
|
12
|
+
"Programming Language :: Python :: 3",
|
|
13
|
+
"Programming Language :: Python :: 3.13",
|
|
14
|
+
"Intended Audience :: Developers",
|
|
15
|
+
]
|
|
16
|
+
dependencies = []
|
|
17
|
+
|
|
18
|
+
[project.urls]
|
|
19
|
+
Homepage = "https://github.com/minixalpha/nanoPyCodeAgent"
|
|
20
|
+
Repository = "https://github.com/minixalpha/nanoPyCodeAgent"
|
|
21
|
+
Issues = "https://github.com/minixalpha/nanoPyCodeAgent/issues"
|
|
22
|
+
|
|
23
|
+
[project.scripts]
|
|
24
|
+
nanoPyCodeAgent = "nanopycodeagent:main"
|
|
25
|
+
|
|
26
|
+
[build-system]
|
|
27
|
+
requires = ["hatchling", "hatch-vcs"]
|
|
28
|
+
build-backend = "hatchling.build"
|
|
29
|
+
|
|
30
|
+
[tool.hatch.version]
|
|
31
|
+
source = "vcs"
|
|
32
|
+
|
|
33
|
+
[tool.hatch.build.targets.wheel]
|
|
34
|
+
packages = ["src/nanopycodeagent"]
|