janet-cli 0.2.8__tar.gz → 0.3.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.
- janet_cli-0.3.0/PKG-INFO +356 -0
- janet_cli-0.3.0/README.md +314 -0
- {janet_cli-0.2.8 → janet_cli-0.3.0}/janet/__init__.py +1 -1
- {janet_cli-0.2.8 → janet_cli-0.3.0}/janet/api/client.py +36 -0
- {janet_cli-0.2.8 → janet_cli-0.3.0}/janet/api/projects.py +20 -0
- {janet_cli-0.2.8 → janet_cli-0.3.0}/janet/api/tickets.py +144 -1
- {janet_cli-0.2.8 → janet_cli-0.3.0}/janet/auth/callback_server.py +5 -4
- {janet_cli-0.2.8 → janet_cli-0.3.0}/janet/auth/oauth_flow.py +0 -1
- {janet_cli-0.2.8 → janet_cli-0.3.0}/janet/auth/token_manager.py +31 -5
- janet_cli-0.3.0/janet/cli.py +1104 -0
- {janet_cli-0.2.8 → janet_cli-0.3.0}/janet/config/models.py +13 -1
- {janet_cli-0.2.8 → janet_cli-0.3.0}/janet/markdown/generator.py +74 -21
- {janet_cli-0.2.8 → janet_cli-0.3.0}/janet/markdown/yjs_converter.py +103 -17
- janet_cli-0.3.0/janet/sync/readme_generator.py +270 -0
- janet_cli-0.3.0/janet/sync/sse_watcher.py +264 -0
- {janet_cli-0.2.8 → janet_cli-0.3.0}/janet/sync/sync_engine.py +14 -5
- janet_cli-0.3.0/janet_cli.egg-info/PKG-INFO +356 -0
- {janet_cli-0.2.8 → janet_cli-0.3.0}/janet_cli.egg-info/SOURCES.txt +1 -0
- janet_cli-0.3.0/janet_cli.egg-info/top_level.txt +2 -0
- {janet_cli-0.2.8 → janet_cli-0.3.0}/pyproject.toml +1 -1
- {janet_cli-0.2.8 → janet_cli-0.3.0}/requirements.txt +1 -0
- janet_cli-0.2.8/PKG-INFO +0 -215
- janet_cli-0.2.8/README.md +0 -173
- janet_cli-0.2.8/janet/cli.py +0 -602
- janet_cli-0.2.8/janet/sync/readme_generator.py +0 -174
- janet_cli-0.2.8/janet_cli.egg-info/PKG-INFO +0 -215
- janet_cli-0.2.8/janet_cli.egg-info/top_level.txt +0 -1
- {janet_cli-0.2.8 → janet_cli-0.3.0}/.env.example +0 -0
- {janet_cli-0.2.8 → janet_cli-0.3.0}/LICENSE +0 -0
- {janet_cli-0.2.8 → janet_cli-0.3.0}/MANIFEST.in +0 -0
- {janet_cli-0.2.8 → janet_cli-0.3.0}/janet/__main__.py +0 -0
- {janet_cli-0.2.8 → janet_cli-0.3.0}/janet/api/__init__.py +0 -0
- {janet_cli-0.2.8 → janet_cli-0.3.0}/janet/api/models.py +0 -0
- {janet_cli-0.2.8 → janet_cli-0.3.0}/janet/api/organizations.py +0 -0
- {janet_cli-0.2.8 → janet_cli-0.3.0}/janet/auth/__init__.py +0 -0
- {janet_cli-0.2.8 → janet_cli-0.3.0}/janet/config/__init__.py +0 -0
- {janet_cli-0.2.8 → janet_cli-0.3.0}/janet/config/manager.py +0 -0
- {janet_cli-0.2.8 → janet_cli-0.3.0}/janet/markdown/__init__.py +0 -0
- {janet_cli-0.2.8 → janet_cli-0.3.0}/janet/sync/__init__.py +0 -0
- {janet_cli-0.2.8 → janet_cli-0.3.0}/janet/sync/file_manager.py +0 -0
- {janet_cli-0.2.8 → janet_cli-0.3.0}/janet/utils/__init__.py +0 -0
- {janet_cli-0.2.8 → janet_cli-0.3.0}/janet/utils/console.py +0 -0
- {janet_cli-0.2.8 → janet_cli-0.3.0}/janet/utils/errors.py +0 -0
- {janet_cli-0.2.8 → janet_cli-0.3.0}/janet/utils/paths.py +0 -0
- {janet_cli-0.2.8 → janet_cli-0.3.0}/janet_cli.egg-info/dependency_links.txt +0 -0
- {janet_cli-0.2.8 → janet_cli-0.3.0}/janet_cli.egg-info/entry_points.txt +0 -0
- {janet_cli-0.2.8 → janet_cli-0.3.0}/janet_cli.egg-info/requires.txt +0 -0
- {janet_cli-0.2.8 → janet_cli-0.3.0}/setup.cfg +0 -0
janet_cli-0.3.0/PKG-INFO
ADDED
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: janet-cli
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: CLI tool to sync Janet AI tickets to local markdown files
|
|
5
|
+
Author-email: Janet AI <support@janet-ai.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/janet-ai/janet-cli
|
|
8
|
+
Project-URL: Repository, https://github.com/janet-ai/janet-cli
|
|
9
|
+
Project-URL: Issues, https://github.com/janet-ai/janet-cli/issues
|
|
10
|
+
Keywords: cli,janet,tickets,markdown,sync
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Requires-Python: >=3.8
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
Requires-Dist: typer>=0.12.0
|
|
24
|
+
Requires-Dist: httpx>=0.27.0
|
|
25
|
+
Requires-Dist: pydantic>=2.0.0
|
|
26
|
+
Requires-Dist: pydantic-settings>=2.0.0
|
|
27
|
+
Requires-Dist: rich>=13.0.0
|
|
28
|
+
Requires-Dist: platformdirs>=4.0.0
|
|
29
|
+
Requires-Dist: keyring>=25.0.0
|
|
30
|
+
Requires-Dist: python-dateutil>=2.8.0
|
|
31
|
+
Requires-Dist: pycrdt>=0.9.0
|
|
32
|
+
Requires-Dist: InquirerPy>=0.3.4
|
|
33
|
+
Provides-Extra: dev
|
|
34
|
+
Requires-Dist: pytest>=8.0.0; extra == "dev"
|
|
35
|
+
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
|
|
36
|
+
Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
|
|
37
|
+
Requires-Dist: httpx-mock>=0.15.0; extra == "dev"
|
|
38
|
+
Requires-Dist: black>=24.0.0; extra == "dev"
|
|
39
|
+
Requires-Dist: mypy>=1.8.0; extra == "dev"
|
|
40
|
+
Requires-Dist: ruff>=0.2.0; extra == "dev"
|
|
41
|
+
Dynamic: license-file
|
|
42
|
+
|
|
43
|
+
# Janet AI CLI
|
|
44
|
+
|
|
45
|
+
> Sync your Janet AI tickets to local markdown files and enable AI coding agents to create and manage tickets.
|
|
46
|
+
|
|
47
|
+
[](https://opensource.org/licenses/MIT)
|
|
48
|
+
[](https://www.python.org/downloads/)
|
|
49
|
+
|
|
50
|
+
## What is Janet AI?
|
|
51
|
+
|
|
52
|
+
[Janet AI](https://tryjanet.ai) is an AI-native project management platform for modern software teams. The Janet CLI allows developers to:
|
|
53
|
+
|
|
54
|
+
- **Sync tickets** to local markdown files with real-time updates as changes are made on the platform
|
|
55
|
+
- **Create tickets** directly from the command line or via AI agents
|
|
56
|
+
- **Update tickets** without leaving your terminal
|
|
57
|
+
|
|
58
|
+
## Why Use the CLI?
|
|
59
|
+
|
|
60
|
+
AI coding assistants work better when they understand your project's tickets, requirements, and priorities. With Janet CLI, AI agents like Claude Code and Cursor can:
|
|
61
|
+
|
|
62
|
+
- Reference specific tickets while writing code
|
|
63
|
+
- Create new tickets when discovering bugs or needed features
|
|
64
|
+
- Update ticket status as work progresses
|
|
65
|
+
- Understand requirements and acceptance criteria
|
|
66
|
+
- Answer questions about project priorities
|
|
67
|
+
|
|
68
|
+
## Installation
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
pip install janet-cli
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Quick Start
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
# 1. Authenticate
|
|
78
|
+
janet login
|
|
79
|
+
|
|
80
|
+
# 2. Sync tickets and watch for real-time updates
|
|
81
|
+
janet sync
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Using with AI Coding Agents
|
|
85
|
+
|
|
86
|
+
### Claude Code
|
|
87
|
+
|
|
88
|
+
Add Janet CLI to your Claude Code workflow:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
# In your project directory
|
|
92
|
+
janet sync
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Claude Code can now reference, create, and update tickets. Example natural language prompts:
|
|
96
|
+
|
|
97
|
+
**Referencing tickets:**
|
|
98
|
+
- "Look at ticket BACK-42 and implement the authentication flow"
|
|
99
|
+
- "What are the high priority tickets in the Backend project?"
|
|
100
|
+
- "Show me all tickets assigned to me"
|
|
101
|
+
|
|
102
|
+
**Creating tickets:**
|
|
103
|
+
- "Create a high-priority bug ticket in BACK for the null pointer exception we just found in auth.py"
|
|
104
|
+
- "Make a new feature ticket in FRONT for dark mode support with the description from design-doc.md"
|
|
105
|
+
- "Create a ticket to add unit tests for the payment service, assign it to dev@example.com"
|
|
106
|
+
|
|
107
|
+
**Updating tickets:**
|
|
108
|
+
- "Update BACK-42 status to In Progress since I'm working on it now"
|
|
109
|
+
- "Mark FRONT-15 as Done and add a comment that it's deployed to staging"
|
|
110
|
+
- "Change the priority of BACK-38 to Critical"
|
|
111
|
+
|
|
112
|
+
Claude Code can run these commands directly:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
janet context --json # Discover available projects
|
|
116
|
+
janet ticket create "Bug: null pointer in auth" -p BACK --json
|
|
117
|
+
janet ticket update BACK-42 --status "In Progress"
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Cursor
|
|
121
|
+
|
|
122
|
+
1. Sync tickets to your workspace:
|
|
123
|
+
```bash
|
|
124
|
+
janet sync
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
2. Add to `.cursorrules` or system prompt:
|
|
128
|
+
```
|
|
129
|
+
Project tickets are in ./janet-tickets/ as markdown files.
|
|
130
|
+
Use `janet ticket create` to create new tickets.
|
|
131
|
+
Use `janet ticket update` to update ticket status.
|
|
132
|
+
Use `janet context --json` to see available projects.
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
3. Use natural language prompts:
|
|
136
|
+
|
|
137
|
+
**Referencing tickets:**
|
|
138
|
+
- "Read ticket BACK-42 and help me implement the OAuth flow"
|
|
139
|
+
- "What bugs are currently open in the Frontend project?"
|
|
140
|
+
|
|
141
|
+
**Creating tickets:**
|
|
142
|
+
- "Create a ticket in BACK for refactoring the database layer, high priority"
|
|
143
|
+
- "Make a bug ticket for the memory leak we found, include the stack trace"
|
|
144
|
+
|
|
145
|
+
**Updating tickets:**
|
|
146
|
+
- "Update ticket FRONT-28 to In Review status"
|
|
147
|
+
- "Mark BACK-51 as complete"
|
|
148
|
+
|
|
149
|
+
### GitHub Copilot / Other Agents
|
|
150
|
+
|
|
151
|
+
Any AI agent with terminal access can use the CLI:
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
# Get context about the workspace
|
|
155
|
+
janet context --json
|
|
156
|
+
|
|
157
|
+
# Create tickets programmatically
|
|
158
|
+
janet ticket create "Title" -p PROJECT --json
|
|
159
|
+
|
|
160
|
+
# Update tickets
|
|
161
|
+
janet ticket update PROJ-123 --status "Done" --json
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## Real-Time Sync
|
|
165
|
+
|
|
166
|
+
After syncing, the CLI stays connected to receive real-time updates:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
janet sync
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Output:
|
|
173
|
+
```
|
|
174
|
+
✓ Sync complete!
|
|
175
|
+
Projects: 2
|
|
176
|
+
Tickets: 42
|
|
177
|
+
|
|
178
|
+
Tickets saved to: ./janet-tickets
|
|
179
|
+
|
|
180
|
+
Watching for changes... (Ctrl+C to stop)
|
|
181
|
+
|
|
182
|
+
Watching 2 project(s) in My Org (Backend, Frontend)
|
|
183
|
+
|
|
184
|
+
BACK-123 (status)
|
|
185
|
+
BACK-124 (created)
|
|
186
|
+
FRONT-45 (title, description)
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
Real-time updates sync changes whenever tickets are created, updated, or deleted—whether from the web UI, API, or other CLI sessions. Press Ctrl+C to stop watching.
|
|
190
|
+
|
|
191
|
+
## File Organization
|
|
192
|
+
|
|
193
|
+
Tickets are organized in a clear hierarchy:
|
|
194
|
+
|
|
195
|
+
```
|
|
196
|
+
janet-tickets/
|
|
197
|
+
├── README.md # Context for AI agents
|
|
198
|
+
└── My Organization/
|
|
199
|
+
├── Backend/
|
|
200
|
+
│ ├── BACK-1.md
|
|
201
|
+
│ ├── BACK-2.md
|
|
202
|
+
│ └── BACK-42.md
|
|
203
|
+
└── Frontend/
|
|
204
|
+
├── FRONT-1.md
|
|
205
|
+
└── FRONT-15.md
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
## Markdown Format
|
|
209
|
+
|
|
210
|
+
Each ticket is exported with complete information:
|
|
211
|
+
|
|
212
|
+
```markdown
|
|
213
|
+
# PROJ-42: Add user authentication
|
|
214
|
+
|
|
215
|
+
## Metadata
|
|
216
|
+
- **Status:** In Progress
|
|
217
|
+
- **Priority:** High
|
|
218
|
+
- **Type:** Feature
|
|
219
|
+
- **Assignees:** John Doe, Jane Smith
|
|
220
|
+
- **Created:** Jan 07, 2026 10:30 AM
|
|
221
|
+
- **Updated:** Jan 07, 2026 02:45 PM
|
|
222
|
+
- **Labels:** backend, security
|
|
223
|
+
|
|
224
|
+
## Description
|
|
225
|
+
|
|
226
|
+
We need to implement OAuth authentication...
|
|
227
|
+
|
|
228
|
+
### Requirements
|
|
229
|
+
- Support multiple auth providers
|
|
230
|
+
- Handle token refresh
|
|
231
|
+
- Secure token storage
|
|
232
|
+
|
|
233
|
+
## Comments (2)
|
|
234
|
+
|
|
235
|
+
### John Doe - Jan 07, 2026 11:00 AM
|
|
236
|
+
|
|
237
|
+
Started working on the OAuth flow.
|
|
238
|
+
|
|
239
|
+
### Jane Smith - Jan 07, 2026 01:30 PM
|
|
240
|
+
|
|
241
|
+
Looks good! Add tests when done.
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
## Commands
|
|
245
|
+
|
|
246
|
+
### Authentication
|
|
247
|
+
|
|
248
|
+
```bash
|
|
249
|
+
janet login # Authenticate with Janet AI
|
|
250
|
+
janet logout # Clear credentials
|
|
251
|
+
janet auth status # Show authentication status
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
### Syncing Tickets
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
janet sync # Sync and watch for real-time updates
|
|
258
|
+
janet sync --all # Sync all projects and watch
|
|
259
|
+
janet sync --dir ./tickets # Specify custom directory
|
|
260
|
+
janet sync --no-watch # Sync once and exit (no real-time updates)
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
### Creating Tickets
|
|
264
|
+
|
|
265
|
+
```bash
|
|
266
|
+
janet ticket create "Title" --project PROJ # Basic creation
|
|
267
|
+
janet ticket create "Title" -p PROJ --priority High # With priority
|
|
268
|
+
janet ticket create "Title" -p PROJ --status "To Do" # With status
|
|
269
|
+
janet ticket create "Title" -p PROJ --type Bug # With type
|
|
270
|
+
janet ticket create "Title" -p PROJ --assignee dev@example.com
|
|
271
|
+
janet ticket create "Title" -p PROJ --tag backend --tag urgent
|
|
272
|
+
janet ticket create "Title" -p PROJ --json # JSON output for AI agents
|
|
273
|
+
cat desc.md | janet ticket create "Title" -p PROJ # Pipe description
|
|
274
|
+
|
|
275
|
+
# Full ticket with all fields
|
|
276
|
+
janet ticket create "Implement OAuth2 authentication" \
|
|
277
|
+
--project BACK \
|
|
278
|
+
--description "Add Google and GitHub OAuth providers with token refresh" \
|
|
279
|
+
--status "To Do" \
|
|
280
|
+
--priority High \
|
|
281
|
+
--type Feature \
|
|
282
|
+
--assignee dev@example.com \
|
|
283
|
+
--tag backend \
|
|
284
|
+
--tag security \
|
|
285
|
+
--tag authentication
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
### Updating Tickets
|
|
289
|
+
|
|
290
|
+
```bash
|
|
291
|
+
janet ticket update PROJ-123 --status "In Progress" # Update status
|
|
292
|
+
janet ticket update PROJ-123 --priority Critical # Update priority
|
|
293
|
+
janet ticket update PROJ-123 --title "New title" # Update title
|
|
294
|
+
janet ticket update PROJ-123 --assignee dev@example.com
|
|
295
|
+
janet ticket update PROJ-123 --json # JSON output
|
|
296
|
+
|
|
297
|
+
# Update multiple fields at once
|
|
298
|
+
janet ticket update BACK-42 \
|
|
299
|
+
--title "Fixed: OAuth authentication flow" \
|
|
300
|
+
--description "Implemented token refresh and error handling" \
|
|
301
|
+
--status "In Review" \
|
|
302
|
+
--priority High \
|
|
303
|
+
--assignee reviewer@example.com
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
### Context (for AI Agents)
|
|
307
|
+
|
|
308
|
+
```bash
|
|
309
|
+
janet context # Human-readable context
|
|
310
|
+
janet context --json # JSON output for AI agents/scripts
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
### Organization Management
|
|
314
|
+
|
|
315
|
+
```bash
|
|
316
|
+
janet org list # List your organizations
|
|
317
|
+
janet org select <org-id> # Switch organization
|
|
318
|
+
janet org current # Show current organization
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
### Project Management
|
|
322
|
+
|
|
323
|
+
```bash
|
|
324
|
+
janet project list # List projects in current org
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
### Status & Configuration
|
|
328
|
+
|
|
329
|
+
```bash
|
|
330
|
+
janet status # Show overall status
|
|
331
|
+
janet config show # Display configuration
|
|
332
|
+
janet config path # Show config file location
|
|
333
|
+
janet config reset # Reset to defaults
|
|
334
|
+
janet --version # Show CLI version
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
## Configuration
|
|
338
|
+
|
|
339
|
+
The CLI stores configuration at:
|
|
340
|
+
- **macOS:** `~/Library/Application Support/janet-cli/config.json`
|
|
341
|
+
- **Linux:** `~/.config/janet-cli/config.json`
|
|
342
|
+
- **Windows:** `%APPDATA%\janet-cli\config.json`
|
|
343
|
+
|
|
344
|
+
## Requirements
|
|
345
|
+
|
|
346
|
+
- Python 3.8 or higher
|
|
347
|
+
- Janet AI account ([sign up](https://tryjanet.ai))
|
|
348
|
+
|
|
349
|
+
## License
|
|
350
|
+
|
|
351
|
+
MIT License - see [LICENSE](LICENSE) file for details.
|
|
352
|
+
|
|
353
|
+
## Links
|
|
354
|
+
|
|
355
|
+
- [Janet AI](https://tryjanet.ai) - AI-native project management
|
|
356
|
+
- [Documentation](https://docs.tryjanet.ai)
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
# Janet AI CLI
|
|
2
|
+
|
|
3
|
+
> Sync your Janet AI tickets to local markdown files and enable AI coding agents to create and manage tickets.
|
|
4
|
+
|
|
5
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
|
+
[](https://www.python.org/downloads/)
|
|
7
|
+
|
|
8
|
+
## What is Janet AI?
|
|
9
|
+
|
|
10
|
+
[Janet AI](https://tryjanet.ai) is an AI-native project management platform for modern software teams. The Janet CLI allows developers to:
|
|
11
|
+
|
|
12
|
+
- **Sync tickets** to local markdown files with real-time updates as changes are made on the platform
|
|
13
|
+
- **Create tickets** directly from the command line or via AI agents
|
|
14
|
+
- **Update tickets** without leaving your terminal
|
|
15
|
+
|
|
16
|
+
## Why Use the CLI?
|
|
17
|
+
|
|
18
|
+
AI coding assistants work better when they understand your project's tickets, requirements, and priorities. With Janet CLI, AI agents like Claude Code and Cursor can:
|
|
19
|
+
|
|
20
|
+
- Reference specific tickets while writing code
|
|
21
|
+
- Create new tickets when discovering bugs or needed features
|
|
22
|
+
- Update ticket status as work progresses
|
|
23
|
+
- Understand requirements and acceptance criteria
|
|
24
|
+
- Answer questions about project priorities
|
|
25
|
+
|
|
26
|
+
## Installation
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
pip install janet-cli
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Quick Start
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
# 1. Authenticate
|
|
36
|
+
janet login
|
|
37
|
+
|
|
38
|
+
# 2. Sync tickets and watch for real-time updates
|
|
39
|
+
janet sync
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Using with AI Coding Agents
|
|
43
|
+
|
|
44
|
+
### Claude Code
|
|
45
|
+
|
|
46
|
+
Add Janet CLI to your Claude Code workflow:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# In your project directory
|
|
50
|
+
janet sync
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Claude Code can now reference, create, and update tickets. Example natural language prompts:
|
|
54
|
+
|
|
55
|
+
**Referencing tickets:**
|
|
56
|
+
- "Look at ticket BACK-42 and implement the authentication flow"
|
|
57
|
+
- "What are the high priority tickets in the Backend project?"
|
|
58
|
+
- "Show me all tickets assigned to me"
|
|
59
|
+
|
|
60
|
+
**Creating tickets:**
|
|
61
|
+
- "Create a high-priority bug ticket in BACK for the null pointer exception we just found in auth.py"
|
|
62
|
+
- "Make a new feature ticket in FRONT for dark mode support with the description from design-doc.md"
|
|
63
|
+
- "Create a ticket to add unit tests for the payment service, assign it to dev@example.com"
|
|
64
|
+
|
|
65
|
+
**Updating tickets:**
|
|
66
|
+
- "Update BACK-42 status to In Progress since I'm working on it now"
|
|
67
|
+
- "Mark FRONT-15 as Done and add a comment that it's deployed to staging"
|
|
68
|
+
- "Change the priority of BACK-38 to Critical"
|
|
69
|
+
|
|
70
|
+
Claude Code can run these commands directly:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
janet context --json # Discover available projects
|
|
74
|
+
janet ticket create "Bug: null pointer in auth" -p BACK --json
|
|
75
|
+
janet ticket update BACK-42 --status "In Progress"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Cursor
|
|
79
|
+
|
|
80
|
+
1. Sync tickets to your workspace:
|
|
81
|
+
```bash
|
|
82
|
+
janet sync
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
2. Add to `.cursorrules` or system prompt:
|
|
86
|
+
```
|
|
87
|
+
Project tickets are in ./janet-tickets/ as markdown files.
|
|
88
|
+
Use `janet ticket create` to create new tickets.
|
|
89
|
+
Use `janet ticket update` to update ticket status.
|
|
90
|
+
Use `janet context --json` to see available projects.
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
3. Use natural language prompts:
|
|
94
|
+
|
|
95
|
+
**Referencing tickets:**
|
|
96
|
+
- "Read ticket BACK-42 and help me implement the OAuth flow"
|
|
97
|
+
- "What bugs are currently open in the Frontend project?"
|
|
98
|
+
|
|
99
|
+
**Creating tickets:**
|
|
100
|
+
- "Create a ticket in BACK for refactoring the database layer, high priority"
|
|
101
|
+
- "Make a bug ticket for the memory leak we found, include the stack trace"
|
|
102
|
+
|
|
103
|
+
**Updating tickets:**
|
|
104
|
+
- "Update ticket FRONT-28 to In Review status"
|
|
105
|
+
- "Mark BACK-51 as complete"
|
|
106
|
+
|
|
107
|
+
### GitHub Copilot / Other Agents
|
|
108
|
+
|
|
109
|
+
Any AI agent with terminal access can use the CLI:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
# Get context about the workspace
|
|
113
|
+
janet context --json
|
|
114
|
+
|
|
115
|
+
# Create tickets programmatically
|
|
116
|
+
janet ticket create "Title" -p PROJECT --json
|
|
117
|
+
|
|
118
|
+
# Update tickets
|
|
119
|
+
janet ticket update PROJ-123 --status "Done" --json
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Real-Time Sync
|
|
123
|
+
|
|
124
|
+
After syncing, the CLI stays connected to receive real-time updates:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
janet sync
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Output:
|
|
131
|
+
```
|
|
132
|
+
✓ Sync complete!
|
|
133
|
+
Projects: 2
|
|
134
|
+
Tickets: 42
|
|
135
|
+
|
|
136
|
+
Tickets saved to: ./janet-tickets
|
|
137
|
+
|
|
138
|
+
Watching for changes... (Ctrl+C to stop)
|
|
139
|
+
|
|
140
|
+
Watching 2 project(s) in My Org (Backend, Frontend)
|
|
141
|
+
|
|
142
|
+
BACK-123 (status)
|
|
143
|
+
BACK-124 (created)
|
|
144
|
+
FRONT-45 (title, description)
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Real-time updates sync changes whenever tickets are created, updated, or deleted—whether from the web UI, API, or other CLI sessions. Press Ctrl+C to stop watching.
|
|
148
|
+
|
|
149
|
+
## File Organization
|
|
150
|
+
|
|
151
|
+
Tickets are organized in a clear hierarchy:
|
|
152
|
+
|
|
153
|
+
```
|
|
154
|
+
janet-tickets/
|
|
155
|
+
├── README.md # Context for AI agents
|
|
156
|
+
└── My Organization/
|
|
157
|
+
├── Backend/
|
|
158
|
+
│ ├── BACK-1.md
|
|
159
|
+
│ ├── BACK-2.md
|
|
160
|
+
│ └── BACK-42.md
|
|
161
|
+
└── Frontend/
|
|
162
|
+
├── FRONT-1.md
|
|
163
|
+
└── FRONT-15.md
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
## Markdown Format
|
|
167
|
+
|
|
168
|
+
Each ticket is exported with complete information:
|
|
169
|
+
|
|
170
|
+
```markdown
|
|
171
|
+
# PROJ-42: Add user authentication
|
|
172
|
+
|
|
173
|
+
## Metadata
|
|
174
|
+
- **Status:** In Progress
|
|
175
|
+
- **Priority:** High
|
|
176
|
+
- **Type:** Feature
|
|
177
|
+
- **Assignees:** John Doe, Jane Smith
|
|
178
|
+
- **Created:** Jan 07, 2026 10:30 AM
|
|
179
|
+
- **Updated:** Jan 07, 2026 02:45 PM
|
|
180
|
+
- **Labels:** backend, security
|
|
181
|
+
|
|
182
|
+
## Description
|
|
183
|
+
|
|
184
|
+
We need to implement OAuth authentication...
|
|
185
|
+
|
|
186
|
+
### Requirements
|
|
187
|
+
- Support multiple auth providers
|
|
188
|
+
- Handle token refresh
|
|
189
|
+
- Secure token storage
|
|
190
|
+
|
|
191
|
+
## Comments (2)
|
|
192
|
+
|
|
193
|
+
### John Doe - Jan 07, 2026 11:00 AM
|
|
194
|
+
|
|
195
|
+
Started working on the OAuth flow.
|
|
196
|
+
|
|
197
|
+
### Jane Smith - Jan 07, 2026 01:30 PM
|
|
198
|
+
|
|
199
|
+
Looks good! Add tests when done.
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
## Commands
|
|
203
|
+
|
|
204
|
+
### Authentication
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
janet login # Authenticate with Janet AI
|
|
208
|
+
janet logout # Clear credentials
|
|
209
|
+
janet auth status # Show authentication status
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### Syncing Tickets
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
janet sync # Sync and watch for real-time updates
|
|
216
|
+
janet sync --all # Sync all projects and watch
|
|
217
|
+
janet sync --dir ./tickets # Specify custom directory
|
|
218
|
+
janet sync --no-watch # Sync once and exit (no real-time updates)
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### Creating Tickets
|
|
222
|
+
|
|
223
|
+
```bash
|
|
224
|
+
janet ticket create "Title" --project PROJ # Basic creation
|
|
225
|
+
janet ticket create "Title" -p PROJ --priority High # With priority
|
|
226
|
+
janet ticket create "Title" -p PROJ --status "To Do" # With status
|
|
227
|
+
janet ticket create "Title" -p PROJ --type Bug # With type
|
|
228
|
+
janet ticket create "Title" -p PROJ --assignee dev@example.com
|
|
229
|
+
janet ticket create "Title" -p PROJ --tag backend --tag urgent
|
|
230
|
+
janet ticket create "Title" -p PROJ --json # JSON output for AI agents
|
|
231
|
+
cat desc.md | janet ticket create "Title" -p PROJ # Pipe description
|
|
232
|
+
|
|
233
|
+
# Full ticket with all fields
|
|
234
|
+
janet ticket create "Implement OAuth2 authentication" \
|
|
235
|
+
--project BACK \
|
|
236
|
+
--description "Add Google and GitHub OAuth providers with token refresh" \
|
|
237
|
+
--status "To Do" \
|
|
238
|
+
--priority High \
|
|
239
|
+
--type Feature \
|
|
240
|
+
--assignee dev@example.com \
|
|
241
|
+
--tag backend \
|
|
242
|
+
--tag security \
|
|
243
|
+
--tag authentication
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
### Updating Tickets
|
|
247
|
+
|
|
248
|
+
```bash
|
|
249
|
+
janet ticket update PROJ-123 --status "In Progress" # Update status
|
|
250
|
+
janet ticket update PROJ-123 --priority Critical # Update priority
|
|
251
|
+
janet ticket update PROJ-123 --title "New title" # Update title
|
|
252
|
+
janet ticket update PROJ-123 --assignee dev@example.com
|
|
253
|
+
janet ticket update PROJ-123 --json # JSON output
|
|
254
|
+
|
|
255
|
+
# Update multiple fields at once
|
|
256
|
+
janet ticket update BACK-42 \
|
|
257
|
+
--title "Fixed: OAuth authentication flow" \
|
|
258
|
+
--description "Implemented token refresh and error handling" \
|
|
259
|
+
--status "In Review" \
|
|
260
|
+
--priority High \
|
|
261
|
+
--assignee reviewer@example.com
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
### Context (for AI Agents)
|
|
265
|
+
|
|
266
|
+
```bash
|
|
267
|
+
janet context # Human-readable context
|
|
268
|
+
janet context --json # JSON output for AI agents/scripts
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
### Organization Management
|
|
272
|
+
|
|
273
|
+
```bash
|
|
274
|
+
janet org list # List your organizations
|
|
275
|
+
janet org select <org-id> # Switch organization
|
|
276
|
+
janet org current # Show current organization
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
### Project Management
|
|
280
|
+
|
|
281
|
+
```bash
|
|
282
|
+
janet project list # List projects in current org
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
### Status & Configuration
|
|
286
|
+
|
|
287
|
+
```bash
|
|
288
|
+
janet status # Show overall status
|
|
289
|
+
janet config show # Display configuration
|
|
290
|
+
janet config path # Show config file location
|
|
291
|
+
janet config reset # Reset to defaults
|
|
292
|
+
janet --version # Show CLI version
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
## Configuration
|
|
296
|
+
|
|
297
|
+
The CLI stores configuration at:
|
|
298
|
+
- **macOS:** `~/Library/Application Support/janet-cli/config.json`
|
|
299
|
+
- **Linux:** `~/.config/janet-cli/config.json`
|
|
300
|
+
- **Windows:** `%APPDATA%\janet-cli\config.json`
|
|
301
|
+
|
|
302
|
+
## Requirements
|
|
303
|
+
|
|
304
|
+
- Python 3.8 or higher
|
|
305
|
+
- Janet AI account ([sign up](https://tryjanet.ai))
|
|
306
|
+
|
|
307
|
+
## License
|
|
308
|
+
|
|
309
|
+
MIT License - see [LICENSE](LICENSE) file for details.
|
|
310
|
+
|
|
311
|
+
## Links
|
|
312
|
+
|
|
313
|
+
- [Janet AI](https://tryjanet.ai) - AI-native project management
|
|
314
|
+
- [Documentation](https://docs.tryjanet.ai)
|
|
@@ -126,3 +126,39 @@ class APIClient:
|
|
|
126
126
|
raise NetworkError(f"Request timeout after {self.timeout}s")
|
|
127
127
|
except Exception as e:
|
|
128
128
|
raise NetworkError(f"Network error: {e}")
|
|
129
|
+
|
|
130
|
+
def put(
|
|
131
|
+
self, endpoint: str, data: Optional[Dict] = None, include_org: bool = False, **kwargs
|
|
132
|
+
) -> Dict:
|
|
133
|
+
"""
|
|
134
|
+
Make PUT request.
|
|
135
|
+
|
|
136
|
+
Args:
|
|
137
|
+
endpoint: API endpoint (relative to base_url)
|
|
138
|
+
data: Request body data
|
|
139
|
+
include_org: Whether to include organization ID header
|
|
140
|
+
**kwargs: Additional arguments for httpx.put
|
|
141
|
+
|
|
142
|
+
Returns:
|
|
143
|
+
Response JSON
|
|
144
|
+
|
|
145
|
+
Raises:
|
|
146
|
+
NetworkError: If request fails
|
|
147
|
+
"""
|
|
148
|
+
url = f"{self.base_url}{endpoint}"
|
|
149
|
+
headers = self._get_headers(include_org=include_org)
|
|
150
|
+
|
|
151
|
+
try:
|
|
152
|
+
response = httpx.put(
|
|
153
|
+
url, headers=headers, json=data, timeout=self.timeout, **kwargs
|
|
154
|
+
)
|
|
155
|
+
response.raise_for_status()
|
|
156
|
+
return response.json()
|
|
157
|
+
except httpx.HTTPStatusError as e:
|
|
158
|
+
if e.response.status_code == 401:
|
|
159
|
+
raise AuthenticationError("Authentication failed. Please log in again.")
|
|
160
|
+
raise NetworkError(f"API request failed: {e.response.status_code} {e.response.text}")
|
|
161
|
+
except httpx.TimeoutException:
|
|
162
|
+
raise NetworkError(f"Request timeout after {self.timeout}s")
|
|
163
|
+
except Exception as e:
|
|
164
|
+
raise NetworkError(f"Network error: {e}")
|