nepher-cli 0.2.4__tar.gz → 0.2.6__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 (28) hide show
  1. {nepher_cli-0.2.4 → nepher_cli-0.2.6}/.gitignore +8 -8
  2. {nepher_cli-0.2.4 → nepher_cli-0.2.6}/PKG-INFO +7 -3
  3. {nepher_cli-0.2.4 → nepher_cli-0.2.6}/README.md +172 -168
  4. {nepher_cli-0.2.4 → nepher_cli-0.2.6}/pyproject.toml +62 -62
  5. {nepher_cli-0.2.4 → nepher_cli-0.2.6}/src/nepher_cli/__init__.py +10 -10
  6. {nepher_cli-0.2.4 → nepher_cli-0.2.6}/src/nepher_cli/__main__.py +4 -4
  7. {nepher_cli-0.2.4 → nepher_cli-0.2.6}/src/nepher_cli/cli.py +64 -64
  8. {nepher_cli-0.2.4 → nepher_cli-0.2.6}/src/nepher_cli/commands/__init__.py +1 -1
  9. {nepher_cli-0.2.4 → nepher_cli-0.2.6}/src/nepher_cli/commands/account.py +718 -628
  10. {nepher_cli-0.2.4 → nepher_cli-0.2.6}/src/nepher_cli/commands/envhub.py +481 -481
  11. {nepher_cli-0.2.4 → nepher_cli-0.2.6}/src/nepher_cli/commands/hackathon.py +760 -760
  12. {nepher_cli-0.2.4 → nepher_cli-0.2.6}/src/nepher_cli/commands/highlight.py +307 -307
  13. {nepher_cli-0.2.4 → nepher_cli-0.2.6}/src/nepher_cli/commands/simstore.py +49 -49
  14. {nepher_cli-0.2.4 → nepher_cli-0.2.6}/src/nepher_cli/commands/tournament.py +685 -656
  15. nepher_cli-0.2.6/src/nepher_cli/config.py +47 -0
  16. {nepher_cli-0.2.4 → nepher_cli-0.2.6}/src/nepher_cli/core/__init__.py +1 -1
  17. {nepher_cli-0.2.4 → nepher_cli-0.2.6}/src/nepher_cli/core/credentials.py +243 -243
  18. {nepher_cli-0.2.4 → nepher_cli-0.2.6}/src/nepher_cli/core/http.py +90 -90
  19. {nepher_cli-0.2.4 → nepher_cli-0.2.6}/src/nepher_cli/envhub/__init__.py +1 -1
  20. {nepher_cli-0.2.4 → nepher_cli-0.2.6}/src/nepher_cli/envhub/cache.py +56 -56
  21. {nepher_cli-0.2.4 → nepher_cli-0.2.6}/src/nepher_cli/envhub/config.py +180 -176
  22. {nepher_cli-0.2.4 → nepher_cli-0.2.6}/src/nepher_cli/tournament/__init__.py +1 -1
  23. {nepher_cli-0.2.4 → nepher_cli-0.2.6}/src/nepher_cli/tournament/agent_check.py +60 -60
  24. {nepher_cli-0.2.4 → nepher_cli-0.2.6}/src/nepher_cli/tournament/api.py +117 -100
  25. {nepher_cli-0.2.4 → nepher_cli-0.2.6}/src/nepher_cli/tournament/packer.py +50 -50
  26. {nepher_cli-0.2.4 → nepher_cli-0.2.6}/src/nepher_cli/tournament/wallet.py +89 -89
  27. nepher_cli-0.2.4/src/nepher_cli/config.py +0 -25
  28. {nepher_cli-0.2.4 → nepher_cli-0.2.6}/src/nepher_cli/py.typed +0 -0
@@ -1,8 +1,8 @@
1
- .venv/
2
- __pycache__/
3
- *.py[cod]
4
- .ruff_cache/
5
- .pytest_cache/
6
- *.egg-info/
7
- dist/
8
- build/
1
+ .venv/
2
+ __pycache__/
3
+ *.py[cod]
4
+ .ruff_cache/
5
+ .pytest_cache/
6
+ *.egg-info/
7
+ dist/
8
+ build/
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nepher-cli
3
- Version: 0.2.4
3
+ Version: 0.2.6
4
4
  Summary: npcli — unified Nepher command-line interface for accounts, hackathons, EnvHub, tournaments, and SimStore
5
5
  Project-URL: Homepage, https://github.com/nepher-ai/nepher-cli
6
6
  Author: Nepher
@@ -68,7 +68,7 @@ npcli whoami
68
68
  npcli logout
69
69
  ```
70
70
 
71
- Get your API key at [account.nepher.ai](https://account.nepher.ai) → Account → API Keys.
71
+ Get your API key at [nepher.ai/account](https://nepher.ai/account) → Account → API Keys.
72
72
  For CI/CD, set `NEPHER_API_KEY=nepher_xxxxxxxx` instead of logging in.
73
73
 
74
74
  ### Tournaments
@@ -146,9 +146,13 @@ Full options:
146
146
 
147
147
  ### API Keys
148
148
 
149
+ `list` / `create` / `revoke` need a **JWT session** from `npcli account login`.
150
+ Do **not** pass `--api-key` on these commands (that flag sends `X-API-Key`, which the account API rejects for key management).
151
+
149
152
  ```bash
153
+ npcli account login --api-key nepher_...
150
154
  npcli account api-keys list
151
- npcli account api-keys create --name "CI key" --platform hackertone
155
+ npcli account api-keys create --name "CI key" --platform hackathon
152
156
  npcli account api-keys revoke <key_id>
153
157
  ```
154
158
 
@@ -1,168 +1,172 @@
1
- # nepher-cli
2
-
3
- The unified CLI for [Nepher Robotics](https://nepher.ai) — accounts, hackathons, EnvHub, tournaments, and SimStore from a single tool.
4
-
5
- **Requires:** Python 3.10+
6
-
7
- ## Install
8
-
9
- ```bash
10
- pip install nepher-cli
11
- ```
12
-
13
- Both `npcli` and `nepher-cli` entry points are registered after install.
14
-
15
- ```bash
16
- npcli --version
17
- npcli --help
18
- ```
19
-
20
- ## Commands
21
-
22
- | Command / Group | Description |
23
- |-----------------|-------------|
24
- | `npcli login` | Log in with a Nepher API key |
25
- | `npcli whoami` | Show the currently authenticated user |
26
- | `npcli logout` | Clear locally stored credentials |
27
- | `npcli account` | API keys and coldkey registration |
28
- | `npcli tournament` | Browse tournaments, submit agents, leaderboards |
29
- | `npcli envhub` | Manage Isaac Lab environment bundles |
30
- | `npcli hackathon` | Browse and submit to hackathons |
31
- | `npcli simstore` | SimStore marketplace *(coming soon)* |
32
-
33
- ## Quick Start
34
-
35
- ### Authenticate
36
-
37
- ```bash
38
- npcli login --api-key nepher_xxxxxxxx
39
- npcli whoami
40
- npcli logout
41
- ```
42
-
43
- Get your API key at [account.nepher.ai](https://account.nepher.ai) → Account → API Keys.
44
- For CI/CD, set `NEPHER_API_KEY=nepher_xxxxxxxx` instead of logging in.
45
-
46
- ### Tournaments
47
-
48
- ```bash
49
- npcli tournament list
50
- npcli tournament list-active
51
- npcli tournament status <tournament_id>
52
- npcli tournament leaderboard <tournament_id>
53
- ```
54
-
55
- Check your agent directory structure (no extra dependencies needed):
56
-
57
- ```bash
58
- npcli tournament check --path ./my-agent
59
- npcli tournament check --path ./my-agent --verbose # also show recommended-file warnings
60
- ```
61
-
62
- Submit an agent (requires `bittensor-wallet` for wallet signing):
63
-
64
- ```bash
65
- pip install bittensor-wallet
66
- # or: pip install "nepher-cli[bittensor]"
67
- ```
68
-
69
- ```bash
70
- npcli tournament submit --path ./my-agent --wallet-name miner --wallet-hotkey default
71
- ```
72
-
73
- Full options for `submit`:
74
-
75
- ```
76
- --path <path> Agent directory
77
- --wallet-name <str> Bittensor wallet name (default: miner)
78
- --wallet-hotkey <str> Bittensor wallet hotkey (default: default)
79
- --api-key <key> Nepher API key (falls back to stored credentials)
80
- --tournament-id <id> Target tournament ID (required when multiple are active)
81
- --api-url <url> Override tournament API URL
82
- -v / --verbose Verbose output
83
- ```
84
-
85
- ### EnvHub
86
-
87
- ```bash
88
- npcli envhub list
89
- npcli envhub download <env_id>
90
- npcli envhub upload ./my-bundle --category navigation
91
- npcli envhub cache list
92
- npcli envhub cache info
93
- npcli envhub cache clear
94
- ```
95
-
96
- ### Hackathons
97
-
98
- ```bash
99
- npcli hackathon list
100
-
101
- npcli hackathon submit \
102
- --title "My entry" \
103
- --submission ./my-project \
104
- --assets ./my-assets
105
- ```
106
-
107
- Full options:
108
-
109
- ```
110
- --hackathon-id <uuid> Required when multiple hackathons are open
111
- --title <str> Entry title
112
- --description <markdown> Entry description
113
- --thumbnail <file> Cover image (JPEG, PNG, WebP, GIF)
114
- --submission <path> Project folder or submission.zip
115
- --assets <path> Assets folder or assets.zip (images, videos, PDFs)
116
- --public-source Mark source as public
117
- ```
118
-
119
- ### API Keys
120
-
121
- ```bash
122
- npcli account api-keys list
123
- npcli account api-keys create --name "CI key" --platform hackertone
124
- npcli account api-keys revoke <key_id>
125
- ```
126
-
127
- ### Coldkey Registration
128
-
129
- Bind a Bittensor coldkey to your account (requires `bittensor-wallet`; `btcli` is optional fallback):
130
-
131
- ```bash
132
- pip install bittensor-wallet
133
- npcli account register-coldkey --wallet <wallet_name>
134
- ```
135
-
136
- Signing uses the local coldkey via `bittensor-wallet` and does not import `btcli`. If you still have a mixed Bittensor venv (`scalecodec` + `cyscale`), `register-coldkey` keeps working as long as `bittensor-wallet` is installed.
137
-
138
- ## API Key Requirements
139
-
140
- - Must start with `nepher_`
141
- - Must be active and not expired
142
- - `hackathon submit` requires **Hackathon** scope (or an unrestricted key)
143
- - `tournament submit` requires **Tournament** scope (or an unrestricted key)
144
-
145
- ## Troubleshooting
146
-
147
- | Error | Fix |
148
- |-------|-----|
149
- | `npcli: command not found` | Ensure `pip install` succeeded and Python scripts dir is on `PATH` |
150
- | `invalid api key format` | Key must start with `nepher_` |
151
- | `api key does not have hackathon access` | Enable Hackathon scope or use an unrestricted key |
152
- | `api key expired` | Run `npcli account api-keys create` |
153
- | `Several hackathons are accepting submissions` | Re-run with `--hackathon-id` |
154
- | `bittensor-wallet not installed` | `pip install bittensor-wallet` (needed for `tournament submit` and `account register-coldkey`) |
155
- | `Not logged in` | `npcli login --api-key nepher_...` |
156
- | `Conflict detected: 'scalecodec' ... conflicts with 'cyscale'` | Leftover `scalecodec` after a Bittensor upgrade. Prefer `pip install bittensor-wallet` so npcli never needs `btcli`. To repair `btcli` itself: `pip uninstall scalecodec cyscale -y && pip install -U cyscale --force-reinstall` |
157
-
158
- Run any command with `--help` for full flag details:
159
-
160
- ```bash
161
- npcli --help
162
- npcli hackathon submit --help
163
- npcli tournament submit --help
164
- ```
165
-
166
- ## License
167
-
168
- MIT
1
+ # nepher-cli
2
+
3
+ The unified CLI for [Nepher Robotics](https://nepher.ai) — accounts, hackathons, EnvHub, tournaments, and SimStore from a single tool.
4
+
5
+ **Requires:** Python 3.10+
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ pip install nepher-cli
11
+ ```
12
+
13
+ Both `npcli` and `nepher-cli` entry points are registered after install.
14
+
15
+ ```bash
16
+ npcli --version
17
+ npcli --help
18
+ ```
19
+
20
+ ## Commands
21
+
22
+ | Command / Group | Description |
23
+ |-----------------|-------------|
24
+ | `npcli login` | Log in with a Nepher API key |
25
+ | `npcli whoami` | Show the currently authenticated user |
26
+ | `npcli logout` | Clear locally stored credentials |
27
+ | `npcli account` | API keys and coldkey registration |
28
+ | `npcli tournament` | Browse tournaments, submit agents, leaderboards |
29
+ | `npcli envhub` | Manage Isaac Lab environment bundles |
30
+ | `npcli hackathon` | Browse and submit to hackathons |
31
+ | `npcli simstore` | SimStore marketplace *(coming soon)* |
32
+
33
+ ## Quick Start
34
+
35
+ ### Authenticate
36
+
37
+ ```bash
38
+ npcli login --api-key nepher_xxxxxxxx
39
+ npcli whoami
40
+ npcli logout
41
+ ```
42
+
43
+ Get your API key at [nepher.ai/account](https://nepher.ai/account) → Account → API Keys.
44
+ For CI/CD, set `NEPHER_API_KEY=nepher_xxxxxxxx` instead of logging in.
45
+
46
+ ### Tournaments
47
+
48
+ ```bash
49
+ npcli tournament list
50
+ npcli tournament list-active
51
+ npcli tournament status <tournament_id>
52
+ npcli tournament leaderboard <tournament_id>
53
+ ```
54
+
55
+ Check your agent directory structure (no extra dependencies needed):
56
+
57
+ ```bash
58
+ npcli tournament check --path ./my-agent
59
+ npcli tournament check --path ./my-agent --verbose # also show recommended-file warnings
60
+ ```
61
+
62
+ Submit an agent (requires `bittensor-wallet` for wallet signing):
63
+
64
+ ```bash
65
+ pip install bittensor-wallet
66
+ # or: pip install "nepher-cli[bittensor]"
67
+ ```
68
+
69
+ ```bash
70
+ npcli tournament submit --path ./my-agent --wallet-name miner --wallet-hotkey default
71
+ ```
72
+
73
+ Full options for `submit`:
74
+
75
+ ```
76
+ --path <path> Agent directory
77
+ --wallet-name <str> Bittensor wallet name (default: miner)
78
+ --wallet-hotkey <str> Bittensor wallet hotkey (default: default)
79
+ --api-key <key> Nepher API key (falls back to stored credentials)
80
+ --tournament-id <id> Target tournament ID (required when multiple are active)
81
+ --api-url <url> Override tournament API URL
82
+ -v / --verbose Verbose output
83
+ ```
84
+
85
+ ### EnvHub
86
+
87
+ ```bash
88
+ npcli envhub list
89
+ npcli envhub download <env_id>
90
+ npcli envhub upload ./my-bundle --category navigation
91
+ npcli envhub cache list
92
+ npcli envhub cache info
93
+ npcli envhub cache clear
94
+ ```
95
+
96
+ ### Hackathons
97
+
98
+ ```bash
99
+ npcli hackathon list
100
+
101
+ npcli hackathon submit \
102
+ --title "My entry" \
103
+ --submission ./my-project \
104
+ --assets ./my-assets
105
+ ```
106
+
107
+ Full options:
108
+
109
+ ```
110
+ --hackathon-id <uuid> Required when multiple hackathons are open
111
+ --title <str> Entry title
112
+ --description <markdown> Entry description
113
+ --thumbnail <file> Cover image (JPEG, PNG, WebP, GIF)
114
+ --submission <path> Project folder or submission.zip
115
+ --assets <path> Assets folder or assets.zip (images, videos, PDFs)
116
+ --public-source Mark source as public
117
+ ```
118
+
119
+ ### API Keys
120
+
121
+ `list` / `create` / `revoke` need a **JWT session** from `npcli account login`.
122
+ Do **not** pass `--api-key` on these commands (that flag sends `X-API-Key`, which the account API rejects for key management).
123
+
124
+ ```bash
125
+ npcli account login --api-key nepher_...
126
+ npcli account api-keys list
127
+ npcli account api-keys create --name "CI key" --platform hackathon
128
+ npcli account api-keys revoke <key_id>
129
+ ```
130
+
131
+ ### Coldkey Registration
132
+
133
+ Bind a Bittensor coldkey to your account (requires `bittensor-wallet`; `btcli` is optional fallback):
134
+
135
+ ```bash
136
+ pip install bittensor-wallet
137
+ npcli account register-coldkey --wallet <wallet_name>
138
+ ```
139
+
140
+ Signing uses the local coldkey via `bittensor-wallet` and does not import `btcli`. If you still have a mixed Bittensor venv (`scalecodec` + `cyscale`), `register-coldkey` keeps working as long as `bittensor-wallet` is installed.
141
+
142
+ ## API Key Requirements
143
+
144
+ - Must start with `nepher_`
145
+ - Must be active and not expired
146
+ - `hackathon submit` requires **Hackathon** scope (or an unrestricted key)
147
+ - `tournament submit` requires **Tournament** scope (or an unrestricted key)
148
+
149
+ ## Troubleshooting
150
+
151
+ | Error | Fix |
152
+ |-------|-----|
153
+ | `npcli: command not found` | Ensure `pip install` succeeded and Python scripts dir is on `PATH` |
154
+ | `invalid api key format` | Key must start with `nepher_` |
155
+ | `api key does not have hackathon access` | Enable Hackathon scope or use an unrestricted key |
156
+ | `api key expired` | Run `npcli account api-keys create` |
157
+ | `Several hackathons are accepting submissions` | Re-run with `--hackathon-id` |
158
+ | `bittensor-wallet not installed` | `pip install bittensor-wallet` (needed for `tournament submit` and `account register-coldkey`) |
159
+ | `Not logged in` | `npcli login --api-key nepher_...` |
160
+ | `Conflict detected: 'scalecodec' ... conflicts with 'cyscale'` | Leftover `scalecodec` after a Bittensor upgrade. Prefer `pip install bittensor-wallet` so npcli never needs `btcli`. To repair `btcli` itself: `pip uninstall scalecodec cyscale -y && pip install -U cyscale --force-reinstall` |
161
+
162
+ Run any command with `--help` for full flag details:
163
+
164
+ ```bash
165
+ npcli --help
166
+ npcli hackathon submit --help
167
+ npcli tournament submit --help
168
+ ```
169
+
170
+ ## License
171
+
172
+ MIT
@@ -1,62 +1,62 @@
1
- [build-system]
2
- requires = ["hatchling>=1.27,<1.32"]
3
- build-backend = "hatchling.build"
4
-
5
- [project]
6
- name = "nepher-cli"
7
- version = "0.2.4"
8
- description = "npcli — unified Nepher command-line interface for accounts, hackathons, EnvHub, tournaments, and SimStore"
9
- readme = "README.md"
10
- requires-python = ">=3.10"
11
- license = { text = "MIT" }
12
- authors = [{ name = "Nepher" }]
13
- keywords = ["nepher", "bittensor", "hackathon", "envhub", "cli", "tournament", "subnet"]
14
- classifiers = [
15
- "Development Status :: 4 - Beta",
16
- "Environment :: Console",
17
- "Intended Audience :: Developers",
18
- "Programming Language :: Python :: 3",
19
- "Programming Language :: Python :: 3.10",
20
- "Programming Language :: Python :: 3.11",
21
- "Programming Language :: Python :: 3.12",
22
- ]
23
- dependencies = [
24
- "httpx>=0.27.0",
25
- "rich>=13.7.0",
26
- "click>=8.1.0",
27
- "keyring>=25.0.0",
28
- "platformdirs>=4.0.0",
29
- ]
30
-
31
- [project.optional-dependencies]
32
- bittensor = ["bittensor-wallet>=4.1.0"]
33
- dev = [
34
- "pytest>=8.0.0",
35
- "ruff>=0.4.0",
36
- ]
37
-
38
- [project.scripts]
39
- npcli = "nepher_cli.cli:main"
40
- nepher-cli = "nepher_cli.cli:main"
41
-
42
- [project.urls]
43
- Homepage = "https://github.com/nepher-ai/nepher-cli"
44
-
45
- [tool.hatch.build.targets.wheel]
46
- packages = ["src/nepher_cli"]
47
- core-metadata-version = "2.4"
48
-
49
- [tool.hatch.build.targets.sdist]
50
- include = ["src/nepher_cli", "README.md", "pyproject.toml"]
51
- core-metadata-version = "2.4"
52
-
53
- [tool.ruff]
54
- line-length = 100
55
- target-version = "py310"
56
-
57
- [tool.ruff.lint]
58
- select = ["E", "F", "I", "UP", "B"]
59
-
60
- [tool.pytest.ini_options]
61
- testpaths = ["tests"]
62
- pythonpath = ["src"]
1
+ [build-system]
2
+ requires = ["hatchling>=1.27,<1.32"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "nepher-cli"
7
+ version = "0.2.6"
8
+ description = "npcli — unified Nepher command-line interface for accounts, hackathons, EnvHub, tournaments, and SimStore"
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ license = { text = "MIT" }
12
+ authors = [{ name = "Nepher" }]
13
+ keywords = ["nepher", "bittensor", "hackathon", "envhub", "cli", "tournament", "subnet"]
14
+ classifiers = [
15
+ "Development Status :: 4 - Beta",
16
+ "Environment :: Console",
17
+ "Intended Audience :: Developers",
18
+ "Programming Language :: Python :: 3",
19
+ "Programming Language :: Python :: 3.10",
20
+ "Programming Language :: Python :: 3.11",
21
+ "Programming Language :: Python :: 3.12",
22
+ ]
23
+ dependencies = [
24
+ "httpx>=0.27.0",
25
+ "rich>=13.7.0",
26
+ "click>=8.1.0",
27
+ "keyring>=25.0.0",
28
+ "platformdirs>=4.0.0",
29
+ ]
30
+
31
+ [project.optional-dependencies]
32
+ bittensor = ["bittensor-wallet>=4.1.0"]
33
+ dev = [
34
+ "pytest>=8.0.0",
35
+ "ruff>=0.4.0",
36
+ ]
37
+
38
+ [project.scripts]
39
+ npcli = "nepher_cli.cli:main"
40
+ nepher-cli = "nepher_cli.cli:main"
41
+
42
+ [project.urls]
43
+ Homepage = "https://github.com/nepher-ai/nepher-cli"
44
+
45
+ [tool.hatch.build.targets.wheel]
46
+ packages = ["src/nepher_cli"]
47
+ core-metadata-version = "2.4"
48
+
49
+ [tool.hatch.build.targets.sdist]
50
+ include = ["src/nepher_cli", "README.md", "pyproject.toml"]
51
+ core-metadata-version = "2.4"
52
+
53
+ [tool.ruff]
54
+ line-length = 100
55
+ target-version = "py310"
56
+
57
+ [tool.ruff.lint]
58
+ select = ["E", "F", "I", "UP", "B"]
59
+
60
+ [tool.pytest.ini_options]
61
+ testpaths = ["tests"]
62
+ pythonpath = ["src"]
@@ -1,10 +1,10 @@
1
- """npcli — unified Nepher command-line interface."""
2
-
3
- from __future__ import annotations
4
-
5
- from importlib.metadata import PackageNotFoundError, version
6
-
7
- try:
8
- __version__ = version("nepher-cli")
9
- except PackageNotFoundError: # pragma: no cover
10
- __version__ = "0.0.0"
1
+ """npcli — unified Nepher command-line interface."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from importlib.metadata import PackageNotFoundError, version
6
+
7
+ try:
8
+ __version__ = version("nepher-cli")
9
+ except PackageNotFoundError: # pragma: no cover
10
+ __version__ = "0.0.0"
@@ -1,4 +1,4 @@
1
- from nepher_cli.cli import main
2
-
3
- if __name__ == "__main__":
4
- raise SystemExit(main())
1
+ from nepher_cli.cli import main
2
+
3
+ if __name__ == "__main__":
4
+ raise SystemExit(main())