agent-gandi-cli 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.
Files changed (49) hide show
  1. agent_gandi_cli-0.1.0/.claude/settings.local.json +32 -0
  2. agent_gandi_cli-0.1.0/.gitignore +15 -0
  3. agent_gandi_cli-0.1.0/CLAUDE.md +15 -0
  4. agent_gandi_cli-0.1.0/LICENSE +21 -0
  5. agent_gandi_cli-0.1.0/PKG-INFO +144 -0
  6. agent_gandi_cli-0.1.0/README.md +109 -0
  7. agent_gandi_cli-0.1.0/pyproject.toml +52 -0
  8. agent_gandi_cli-0.1.0/skills/api-reference.md +384 -0
  9. agent_gandi_cli-0.1.0/skills/gandi-api-billing.md +24 -0
  10. agent_gandi_cli-0.1.0/skills/gandi-api-certificate.md +61 -0
  11. agent_gandi_cli-0.1.0/skills/gandi-api-domain.md +65 -0
  12. agent_gandi_cli-0.1.0/skills/gandi-api-email.md +64 -0
  13. agent_gandi_cli-0.1.0/skills/gandi-api-livedns.md +61 -0
  14. agent_gandi_cli-0.1.0/skills/gandi-api-organization.md +53 -0
  15. agent_gandi_cli-0.1.0/skills/gandi-api-webhosting.md +41 -0
  16. agent_gandi_cli-0.1.0/skills/gandi-cli-command-pattern.md +155 -0
  17. agent_gandi_cli-0.1.0/src/gandi_cli/__init__.py +1 -0
  18. agent_gandi_cli-0.1.0/src/gandi_cli/client.py +130 -0
  19. agent_gandi_cli-0.1.0/src/gandi_cli/commands/__init__.py +0 -0
  20. agent_gandi_cli-0.1.0/src/gandi_cli/commands/auth.py +73 -0
  21. agent_gandi_cli-0.1.0/src/gandi_cli/commands/certificate.py +101 -0
  22. agent_gandi_cli-0.1.0/src/gandi_cli/commands/dns.py +191 -0
  23. agent_gandi_cli-0.1.0/src/gandi_cli/commands/domain.py +136 -0
  24. agent_gandi_cli-0.1.0/src/gandi_cli/commands/email.py +126 -0
  25. agent_gandi_cli-0.1.0/src/gandi_cli/commands/organization.py +97 -0
  26. agent_gandi_cli-0.1.0/src/gandi_cli/config.py +98 -0
  27. agent_gandi_cli-0.1.0/src/gandi_cli/main.py +50 -0
  28. agent_gandi_cli-0.1.0/src/gandi_cli/models/__init__.py +0 -0
  29. agent_gandi_cli-0.1.0/src/gandi_cli/output.py +100 -0
  30. agent_gandi_cli-0.1.0/tests/__init__.py +0 -0
  31. agent_gandi_cli-0.1.0/tests/conftest.py +28 -0
  32. agent_gandi_cli-0.1.0/tests/fixtures/certificate_detail.json +11 -0
  33. agent_gandi_cli-0.1.0/tests/fixtures/certificates.json +24 -0
  34. agent_gandi_cli-0.1.0/tests/fixtures/dns_records.json +7 -0
  35. agent_gandi_cli-0.1.0/tests/fixtures/domain_check.json +12 -0
  36. agent_gandi_cli-0.1.0/tests/fixtures/domain_detail.json +15 -0
  37. agent_gandi_cli-0.1.0/tests/fixtures/domains_list.json +24 -0
  38. agent_gandi_cli-0.1.0/tests/fixtures/email_forwards.json +4 -0
  39. agent_gandi_cli-0.1.0/tests/fixtures/mailboxes.json +4 -0
  40. agent_gandi_cli-0.1.0/tests/fixtures/organizations.json +4 -0
  41. agent_gandi_cli-0.1.0/tests/test_client.py +160 -0
  42. agent_gandi_cli-0.1.0/tests/test_commands/__init__.py +0 -0
  43. agent_gandi_cli-0.1.0/tests/test_commands/test_auth.py +159 -0
  44. agent_gandi_cli-0.1.0/tests/test_commands/test_certificate.py +174 -0
  45. agent_gandi_cli-0.1.0/tests/test_commands/test_dns.py +166 -0
  46. agent_gandi_cli-0.1.0/tests/test_commands/test_domain.py +177 -0
  47. agent_gandi_cli-0.1.0/tests/test_commands/test_email.py +129 -0
  48. agent_gandi_cli-0.1.0/tests/test_commands/test_organization.py +121 -0
  49. agent_gandi_cli-0.1.0/tests/test_config.py +86 -0
@@ -0,0 +1,32 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(agent-browser:*)",
5
+ "Bash(ls -lh /Users/kyle/Projects/lyhcode/gandi-cli/docs/*.md)",
6
+ "Bash(python3:*)",
7
+ "Bash(gandi:*)",
8
+ "Bash(agent-browser eval:*)",
9
+ "Bash(pip install:*)",
10
+ "Bash(export:*)",
11
+ "Bash(uvx:*)",
12
+ "Bash(python:*)",
13
+ "Bash(git push:*)",
14
+ "Bash(mkdir -p /Users/kyle/Projects/lyhcode/gandi-cli-go)",
15
+ "Read(//Users/kyle/Projects/lyhcode/**)",
16
+ "Bash(source:*)",
17
+ "Bash(go version:*)",
18
+ "Bash(brew install:*)",
19
+ "Bash(go mod:*)",
20
+ "Bash(curl:*)",
21
+ "Bash(go build:*)",
22
+ "Bash(./gandi:*)",
23
+ "Bash(gh repo:*)",
24
+ "Bash(op item:*)",
25
+ "WebSearch",
26
+ "WebFetch(domain:docs.gandi.net)",
27
+ "Bash(git:*)",
28
+ "Bash(pip show:*)",
29
+ "Bash(pip index:*)"
30
+ ]
31
+ }
32
+ }
@@ -0,0 +1,15 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *$py.class
4
+ *.egg-info/
5
+ dist/
6
+ build/
7
+ .eggs/
8
+ *.egg
9
+ .venv/
10
+ venv/
11
+ .env
12
+ .pytest_cache/
13
+ .coverage
14
+ htmlcov/
15
+ docs/
@@ -0,0 +1,15 @@
1
+ # Claude Code Project Instructions
2
+
3
+ ## Skills & API Reference
4
+ Refer to `skills/` directory for Gandi API skills and development patterns:
5
+ - `skills/gandi-cli-command-pattern.md` — How to add new CLI commands
6
+ - `skills/gandi-api-*.md` — API endpoint reference with business rules
7
+ - `skills/api-reference.md` — Complete Gandi API v5 endpoint index (208 endpoints)
8
+
9
+ ## Gandi Reference Documentation Sources
10
+ - User docs: https://docs.gandi.net/en/
11
+ - API docs: https://api.gandi.net/docs/
12
+
13
+ ## Important Rules
14
+ - Never commit official documentation files downloaded from Gandi
15
+ - Workflow: download official docs → update skills/summaries → remove originals
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Kyle Lin
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,144 @@
1
+ Metadata-Version: 2.4
2
+ Name: agent-gandi-cli
3
+ Version: 0.1.0
4
+ Summary: CLI tool for Gandi.net API
5
+ Project-URL: Homepage, https://github.com/lyhcode/gandi-cli
6
+ Project-URL: Repository, https://github.com/lyhcode/gandi-cli
7
+ Project-URL: Issues, https://github.com/lyhcode/gandi-cli/issues
8
+ Author: Kyle Lin
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: cli,dns,domain,gandi
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Intended Audience :: System Administrators
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Topic :: Internet :: Name Service (DNS)
22
+ Classifier: Topic :: System :: Systems Administration
23
+ Requires-Python: >=3.11
24
+ Requires-Dist: httpx>=0.25.0
25
+ Requires-Dist: platformdirs>=3.0
26
+ Requires-Dist: pydantic>=2.0
27
+ Requires-Dist: rich>=13.0
28
+ Requires-Dist: tomli-w>=1.0
29
+ Requires-Dist: typer>=0.9.0
30
+ Provides-Extra: dev
31
+ Requires-Dist: pytest-cov>=4.0; extra == 'dev'
32
+ Requires-Dist: pytest-httpx>=0.30.0; extra == 'dev'
33
+ Requires-Dist: pytest>=7.0; extra == 'dev'
34
+ Description-Content-Type: text/markdown
35
+
36
+ # gandi-cli
37
+
38
+ CLI tool for [Gandi.net](https://www.gandi.net/) API.
39
+
40
+ - Manage domains, DNS records, email, SSL certificates, and organizations
41
+ - Multiple output formats: table, JSON, plain text
42
+ - Sandbox mode for safe testing
43
+ - Config file or environment variable authentication
44
+
45
+ ## Quick Start
46
+
47
+ Run directly without installing:
48
+
49
+ ```bash
50
+ uvx --from git+https://github.com/lyhcode/gandi-cli gandi --help
51
+ ```
52
+
53
+ ## Install
54
+
55
+ ```bash
56
+ pip install agent-gandi-cli
57
+ ```
58
+
59
+ ## Authentication
60
+
61
+ Set your [Gandi Personal Access Token (PAT)](https://admin.gandi.net/organizations/account/pat):
62
+
63
+ ```bash
64
+ export GANDI_PAT=your-token-here
65
+ ```
66
+
67
+ Or save it to config:
68
+
69
+ ```bash
70
+ gandi auth login
71
+ gandi auth status # verify authentication
72
+ gandi auth set-org # set default organization
73
+ gandi auth logout # remove saved token
74
+ ```
75
+
76
+ ## Usage
77
+
78
+ ```bash
79
+ # Domains
80
+ gandi domain list
81
+ gandi domain info example.com
82
+ gandi domain check myname.com
83
+
84
+ # DNS Records
85
+ gandi dns list example.com
86
+ gandi dns list example.com --type A --name www
87
+ gandi dns get example.com www A
88
+ gandi dns create example.com www A 1.2.3.4
89
+ gandi dns update example.com www A --value 5.6.7.8
90
+ gandi dns delete example.com www A
91
+ gandi dns export example.com
92
+
93
+ # Email Forwarding
94
+ gandi email forward list example.com
95
+ gandi email forward create example.com info user@gmail.com
96
+ gandi email forward delete example.com info
97
+
98
+ # Mailboxes
99
+ gandi email mailbox list example.com
100
+ gandi email mailbox info example.com <mailbox-id>
101
+
102
+ # SSL Certificates
103
+ gandi cert list
104
+ gandi cert info <cert-id>
105
+
106
+ # Organizations
107
+ gandi org list
108
+ gandi org info <org-id>
109
+ gandi org whoami
110
+
111
+ # Output formats
112
+ gandi -o json domain list
113
+ gandi -o plain domain list
114
+ gandi -o table domain list # default
115
+ ```
116
+
117
+ ## Sandbox
118
+
119
+ Use `--sandbox` to test against the [Gandi Sandbox API](https://api.sandbox.gandi.net/docs/):
120
+
121
+ ```bash
122
+ gandi --sandbox domain list
123
+ ```
124
+
125
+ ## Configuration
126
+
127
+ Config file: `~/.config/gandi-cli/config.toml`
128
+
129
+ ```toml
130
+ [auth]
131
+ pat = "your-token"
132
+
133
+ [defaults]
134
+ output = "table"
135
+ sharing_id = "your-org-id"
136
+ ```
137
+
138
+ ## Claude Code Skills
139
+
140
+ The `skills/` directory contains [Claude Code](https://claude.com/claude-code) skill files for developing and extending this CLI. They include API endpoint references, command patterns, and business rules for each Gandi API area.
141
+
142
+ ## License
143
+
144
+ MIT
@@ -0,0 +1,109 @@
1
+ # gandi-cli
2
+
3
+ CLI tool for [Gandi.net](https://www.gandi.net/) API.
4
+
5
+ - Manage domains, DNS records, email, SSL certificates, and organizations
6
+ - Multiple output formats: table, JSON, plain text
7
+ - Sandbox mode for safe testing
8
+ - Config file or environment variable authentication
9
+
10
+ ## Quick Start
11
+
12
+ Run directly without installing:
13
+
14
+ ```bash
15
+ uvx --from git+https://github.com/lyhcode/gandi-cli gandi --help
16
+ ```
17
+
18
+ ## Install
19
+
20
+ ```bash
21
+ pip install agent-gandi-cli
22
+ ```
23
+
24
+ ## Authentication
25
+
26
+ Set your [Gandi Personal Access Token (PAT)](https://admin.gandi.net/organizations/account/pat):
27
+
28
+ ```bash
29
+ export GANDI_PAT=your-token-here
30
+ ```
31
+
32
+ Or save it to config:
33
+
34
+ ```bash
35
+ gandi auth login
36
+ gandi auth status # verify authentication
37
+ gandi auth set-org # set default organization
38
+ gandi auth logout # remove saved token
39
+ ```
40
+
41
+ ## Usage
42
+
43
+ ```bash
44
+ # Domains
45
+ gandi domain list
46
+ gandi domain info example.com
47
+ gandi domain check myname.com
48
+
49
+ # DNS Records
50
+ gandi dns list example.com
51
+ gandi dns list example.com --type A --name www
52
+ gandi dns get example.com www A
53
+ gandi dns create example.com www A 1.2.3.4
54
+ gandi dns update example.com www A --value 5.6.7.8
55
+ gandi dns delete example.com www A
56
+ gandi dns export example.com
57
+
58
+ # Email Forwarding
59
+ gandi email forward list example.com
60
+ gandi email forward create example.com info user@gmail.com
61
+ gandi email forward delete example.com info
62
+
63
+ # Mailboxes
64
+ gandi email mailbox list example.com
65
+ gandi email mailbox info example.com <mailbox-id>
66
+
67
+ # SSL Certificates
68
+ gandi cert list
69
+ gandi cert info <cert-id>
70
+
71
+ # Organizations
72
+ gandi org list
73
+ gandi org info <org-id>
74
+ gandi org whoami
75
+
76
+ # Output formats
77
+ gandi -o json domain list
78
+ gandi -o plain domain list
79
+ gandi -o table domain list # default
80
+ ```
81
+
82
+ ## Sandbox
83
+
84
+ Use `--sandbox` to test against the [Gandi Sandbox API](https://api.sandbox.gandi.net/docs/):
85
+
86
+ ```bash
87
+ gandi --sandbox domain list
88
+ ```
89
+
90
+ ## Configuration
91
+
92
+ Config file: `~/.config/gandi-cli/config.toml`
93
+
94
+ ```toml
95
+ [auth]
96
+ pat = "your-token"
97
+
98
+ [defaults]
99
+ output = "table"
100
+ sharing_id = "your-org-id"
101
+ ```
102
+
103
+ ## Claude Code Skills
104
+
105
+ The `skills/` directory contains [Claude Code](https://claude.com/claude-code) skill files for developing and extending this CLI. They include API endpoint references, command patterns, and business rules for each Gandi API area.
106
+
107
+ ## License
108
+
109
+ MIT
@@ -0,0 +1,52 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "agent-gandi-cli"
7
+ version = "0.1.0"
8
+ description = "CLI tool for Gandi.net API"
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ requires-python = ">=3.11"
12
+ authors = [{ name = "Kyle Lin" }]
13
+ keywords = ["gandi", "cli", "domain", "dns"]
14
+ classifiers = [
15
+ "Development Status :: 3 - Alpha",
16
+ "Environment :: Console",
17
+ "Intended Audience :: Developers",
18
+ "Intended Audience :: System Administrators",
19
+ "License :: OSI Approved :: MIT License",
20
+ "Programming Language :: Python :: 3",
21
+ "Programming Language :: Python :: 3.11",
22
+ "Programming Language :: Python :: 3.12",
23
+ "Programming Language :: Python :: 3.13",
24
+ "Topic :: Internet :: Name Service (DNS)",
25
+ "Topic :: System :: Systems Administration",
26
+ ]
27
+ dependencies = [
28
+ "typer>=0.9.0",
29
+ "rich>=13.0",
30
+ "httpx>=0.25.0",
31
+ "pydantic>=2.0",
32
+ "platformdirs>=3.0",
33
+ "tomli-w>=1.0",
34
+ ]
35
+
36
+ [project.urls]
37
+ Homepage = "https://github.com/lyhcode/gandi-cli"
38
+ Repository = "https://github.com/lyhcode/gandi-cli"
39
+ Issues = "https://github.com/lyhcode/gandi-cli/issues"
40
+
41
+ [tool.hatch.build.targets.wheel]
42
+ packages = ["src/gandi_cli"]
43
+
44
+ [project.scripts]
45
+ gandi = "gandi_cli.main:app"
46
+
47
+ [project.optional-dependencies]
48
+ dev = [
49
+ "pytest>=7.0",
50
+ "pytest-httpx>=0.30.0",
51
+ "pytest-cov>=4.0",
52
+ ]