pkanban 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.
pkanban-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,309 @@
1
+ Metadata-Version: 2.4
2
+ Name: pkanban
3
+ Version: 0.1.0
4
+ Summary: CLI client for Kanban boards
5
+ Author-email: Pearachute <hello@pearachute.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/pearachute/kanban
8
+ Project-URL: Repository, https://github.com/pearachute/kanban
9
+ Project-URL: Issues, https://github.com/pearachute/kanban/issues
10
+ Keywords: kanban,cli,productivity,task-management
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: End Users/Desktop
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.8
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Requires-Python: >=3.8
22
+ Description-Content-Type: text/markdown
23
+ Requires-Dist: requests>=2.31.0
24
+ Requires-Dist: pyyaml>=6.0
25
+ Requires-Dist: typer>=0.9.0
26
+ Requires-Dist: rich>=13.0.0
27
+
28
+ # Kanban Board
29
+
30
+ A full-stack Kanban board application with Python/FastAPI backend, Svelte frontend, and CLI client.
31
+
32
+ ## CLI Installation
33
+
34
+ Install the CLI to manage your Kanban boards from the command line:
35
+
36
+ ```bash
37
+ pip install pkanban
38
+ ```
39
+
40
+ ## CLI Usage
41
+
42
+ Configure the CLI to use our hosted service or your self-hosted instance:
43
+
44
+ ```bash
45
+ # Use our hosted service (kanban.pearachute.com)
46
+ kanban config --url https://kanban.pearachute.com
47
+
48
+ # Or use a local/self-hosted instance
49
+ kanban config --url http://localhost:8000
50
+
51
+ # Login
52
+ kanban login <username> --password <password>
53
+
54
+ # Or use an API key (for agents/CI)
55
+ kanban --api-key <key> board list
56
+
57
+ # List boards
58
+ kanban board list
59
+
60
+ # Create a board
61
+ kanban board create "My Project"
62
+
63
+ # Show board details
64
+ kanban board get 1
65
+
66
+ # Create a card
67
+ kanban card create 1 "To Do" "First task" --position 0
68
+
69
+ # Share a board with a team
70
+ kanban share 1 <team-id>
71
+ # Or make a board private
72
+ kanban share 1 private
73
+
74
+ # Column management
75
+ kanban column create 1 "To Do" 0
76
+
77
+ # Organization management
78
+ kanban org create "My Company"
79
+ kanban org get 1
80
+
81
+ # Team management
82
+ kanban team create 1 "Engineering"
83
+ kanban team list --org-id 1
84
+ ```
85
+
86
+ ### Available Commands
87
+
88
+ | Command | Description |
89
+ |---------|-------------|
90
+ | `kanban config [--url URL]` | Show or set server URL |
91
+ | `kanban login <user> --password <pass>` | Login to the server |
92
+ | `kanban logout` | Logout and clear credentials |
93
+ | `kanban --api-key <key>` | Use API key for authentication (global option) |
94
+ | `kanban apikey create <name>` | Generate a new API key |
95
+ | `kanban apikey list` | List your API keys |
96
+ | `kanban apikey revoke <id>` | Revoke (deactivate) an API key |
97
+ | `kanban apikey activate <id>` | Reactivate a deactivated API key |
98
+ | `kanban board list` | List all boards |
99
+ | `kanban board create <name>` | Create a new board |
100
+ | `kanban board get <id>` | Show board details |
101
+ | `kanban board delete <id>` | Delete a board |
102
+ | `kanban board update <id> <name>` | Update board name |
103
+ | `kanban share <board_id> <team_id\|private>` | Share board with team or make private |
104
+ | `kanban column create <board_id> <name> <position>` | Create a column |
105
+ | `kanban column delete <id>` | Delete a column |
106
+ | `kanban card create <column_id> <title> [--description TEXT] [--position NUM]` | Create a card |
107
+ | `kanban card update <id> <title> [--description TEXT] [--position NUM] [--column NUM]` | Update a card |
108
+ | `kanban card delete <id>` | Delete a card |
109
+ | `kanban org list` | List all organizations |
110
+ | `kanban org create <name>` | Create a new organization |
111
+ | `kanban org get <org-id>` | Show organization details |
112
+ | `kanban org members <org-id>` | List organization members |
113
+ | `kanban org member-add <org-id> <username>` | Add member to organization |
114
+ | `kanban org member-remove <org-id> <user-id>` | Remove member from organization |
115
+ | `kanban team list --org-id <org-id>` | List teams in organization |
116
+ | `kanban team create <org-id> <name>` | Create a new team |
117
+ | `kanban team get <team-id>` | Show team details |
118
+ | `kanban team members <team-id>` | List team members |
119
+ | `kanban team member-add <team-id> <username>` | Add member to team |
120
+ | `kanban team member-remove <team-id> <user-id>` | Remove member from team |
121
+
122
+ ## 📚 CLI Documentation for Agents
123
+
124
+ For agents who need to quickly get up to speed with the CLI tool:
125
+
126
+ - **[CLI Quick Start Guide](docs/cli-quickstart.md)** - Get productive in minutes
127
+ - **[CLI Command Reference](docs/cli-reference.md)** - Complete command cheat sheet
128
+ - **[Common Workflows](docs/cli-workflows.md)** - Real-world examples and patterns
129
+
130
+ ## 🔑 API Keys for Agents
131
+
132
+ Instead of sharing passwords, users can generate one-off API keys for agents and CI/CD pipelines:
133
+
134
+ ```bash
135
+ # Generate an API key (shown only once - save it securely!)
136
+ kanban apikey create "CI Agent"
137
+
138
+ # Use the API key for any command
139
+ kanban --api-key kanban_abc123... board list
140
+
141
+ # Or set it as default
142
+ export KANBAN_API_KEY=kanban_abc123...
143
+ kanban board list
144
+ ```
145
+
146
+ ### API Key Features
147
+
148
+ - **Secure**: API keys are bcrypt-hashed in the database (like passwords)
149
+ - **Revokable**: Deactivate or reactivate keys at any time
150
+ - **Identifiable**: Each key has a prefix for identification in logs
151
+ - **Trackable**: Last used timestamp recorded for each key
152
+
153
+ ### Security Notes
154
+
155
+ - API keys are shown only once at creation time - copy and store securely
156
+ - Use environment variables or secure secret management for CI/CD
157
+ - Rotate keys periodically and revoke compromised keys
158
+
159
+ ## Self-Hosting
160
+
161
+ ### 1. Clone the repository
162
+
163
+ ```bash
164
+ git clone https://github.com/pearachute/kanban.git
165
+ cd kanban
166
+ ```
167
+
168
+ ### 2. Set up the virtualenv and install dependencies
169
+
170
+ ```bash
171
+ # Create virtualenv (if not already created)
172
+ python -m venv venv
173
+
174
+ # Activate the virtualenv
175
+ source venv/bin/activate # Linux/Mac
176
+ # or on Windows:
177
+ venv\Scripts\activate
178
+
179
+ # Install backend dependencies
180
+ pip install -r backend/requirements.txt
181
+
182
+ # Install frontend dependencies
183
+ cd frontend
184
+ npm install
185
+ ```
186
+
187
+ ### 3. Initialize the database and create a user
188
+
189
+ ```bash
190
+ # From the project root, with venv activated
191
+ python manage.py init
192
+ python manage.py user-create admin mypassword --admin
193
+ ```
194
+
195
+ ### 4. Run the server
196
+
197
+ ```bash
198
+ # From the project root, with venv activated
199
+ python manage.py server
200
+ ```
201
+
202
+ The server will start at http://localhost:8000.
203
+
204
+ The frontend will be built to `backend/static/` and served automatically.
205
+
206
+ ## Development
207
+
208
+ The virtualenv is at `./venv` in the project root.
209
+
210
+ ```bash
211
+ # Activate the virtualenv
212
+ source venv/bin/activate # Linux/Mac
213
+ # or on Windows:
214
+ venv\Scripts\activate
215
+ ```
216
+
217
+ ### Running the Server
218
+
219
+ ```bash
220
+ # With auto-reload (default)
221
+ python manage.py server
222
+
223
+ # With custom host/port
224
+ python manage.py server --host 127.0.0.1 --port 9000
225
+
226
+ # Disable auto-reload
227
+ python manage.py server --no-reload
228
+
229
+ # Set log level
230
+ python manage.py server --log-level debug
231
+ ```
232
+
233
+ ### Frontend (with hot reload)
234
+
235
+ ```bash
236
+ cd frontend
237
+ npm run dev
238
+ ```
239
+
240
+ ### Database Management
241
+
242
+ ```bash
243
+ # Initialize database (create all tables)
244
+ python manage.py init
245
+
246
+ # Wipe database (drop all tables and recreate)
247
+ python manage.py wipe
248
+
249
+ # Check database status
250
+ python manage.py status
251
+
252
+ # Create a user
253
+ python manage.py user-create <username> <password> [--email EMAIL] [--admin]
254
+ ```
255
+
256
+ ### Server Options
257
+
258
+ | Option | Description |
259
+ |--------|-------------|
260
+ | `--host HOST` | Host to bind to (default: 0.0.0.0) |
261
+ | `--port PORT` | Port to bind to (default: 8000) |
262
+ | `--reload` | Enable auto-reload (default) |
263
+ | `--no-reload` | Disable auto-reload |
264
+ | `--log-level LEVEL` | Set logging level (debug, info, warning, error) |
265
+
266
+ ## Multi-Tenant Organizations
267
+
268
+ See [docs/multi-tenant.md](docs/multi-tenant.md) for details on the organization model, team-based board sharing, and API endpoints.
269
+
270
+ ## API Reference
271
+
272
+ ### Authentication
273
+
274
+ - `POST /api/token` - Login (returns JWT)
275
+ - `X-API-Key` header - Use API key for authentication (alternative to Bearer token)
276
+
277
+ ### API Keys
278
+
279
+ - `GET /api/api-keys` - List your API keys
280
+ - `POST /api/api-keys` - Create a new API key (returns key once)
281
+ - `DELETE /api/api-keys/{id}` - Revoke (deactivate) an API key
282
+ - `POST /api/api-keys/{id}/activate` - Reactivate a deactivated API key
283
+
284
+ ### Boards
285
+
286
+ - `GET /api/boards` - List accessible boards (owned + shared)
287
+ - `POST /api/boards` - Create a new board
288
+ - `GET /api/boards/{id}` - Get board with columns and cards
289
+ - `POST /api/boards/{id}` - Update board (owner or team member)
290
+ - `DELETE /api/boards/{id}` - Delete board (owner only)
291
+
292
+ ### Columns
293
+
294
+ - `POST /api/columns` - Create column
295
+ - `PUT /api/columns/{id}` - Update column
296
+ - `DELETE /api/columns/{id}` - Delete column
297
+
298
+ ### Cards
299
+
300
+ - `POST /api/cards` - Create card
301
+ - `PUT /api/cards/{id}` - Update card (including position)
302
+ - `DELETE /api/cards/{id}` - Delete card
303
+
304
+ ## Tests
305
+
306
+ ```bash
307
+ # Run all tests
308
+ python -m pytest backend/tests/
309
+ ```
@@ -0,0 +1,282 @@
1
+ # Kanban Board
2
+
3
+ A full-stack Kanban board application with Python/FastAPI backend, Svelte frontend, and CLI client.
4
+
5
+ ## CLI Installation
6
+
7
+ Install the CLI to manage your Kanban boards from the command line:
8
+
9
+ ```bash
10
+ pip install pkanban
11
+ ```
12
+
13
+ ## CLI Usage
14
+
15
+ Configure the CLI to use our hosted service or your self-hosted instance:
16
+
17
+ ```bash
18
+ # Use our hosted service (kanban.pearachute.com)
19
+ kanban config --url https://kanban.pearachute.com
20
+
21
+ # Or use a local/self-hosted instance
22
+ kanban config --url http://localhost:8000
23
+
24
+ # Login
25
+ kanban login <username> --password <password>
26
+
27
+ # Or use an API key (for agents/CI)
28
+ kanban --api-key <key> board list
29
+
30
+ # List boards
31
+ kanban board list
32
+
33
+ # Create a board
34
+ kanban board create "My Project"
35
+
36
+ # Show board details
37
+ kanban board get 1
38
+
39
+ # Create a card
40
+ kanban card create 1 "To Do" "First task" --position 0
41
+
42
+ # Share a board with a team
43
+ kanban share 1 <team-id>
44
+ # Or make a board private
45
+ kanban share 1 private
46
+
47
+ # Column management
48
+ kanban column create 1 "To Do" 0
49
+
50
+ # Organization management
51
+ kanban org create "My Company"
52
+ kanban org get 1
53
+
54
+ # Team management
55
+ kanban team create 1 "Engineering"
56
+ kanban team list --org-id 1
57
+ ```
58
+
59
+ ### Available Commands
60
+
61
+ | Command | Description |
62
+ |---------|-------------|
63
+ | `kanban config [--url URL]` | Show or set server URL |
64
+ | `kanban login <user> --password <pass>` | Login to the server |
65
+ | `kanban logout` | Logout and clear credentials |
66
+ | `kanban --api-key <key>` | Use API key for authentication (global option) |
67
+ | `kanban apikey create <name>` | Generate a new API key |
68
+ | `kanban apikey list` | List your API keys |
69
+ | `kanban apikey revoke <id>` | Revoke (deactivate) an API key |
70
+ | `kanban apikey activate <id>` | Reactivate a deactivated API key |
71
+ | `kanban board list` | List all boards |
72
+ | `kanban board create <name>` | Create a new board |
73
+ | `kanban board get <id>` | Show board details |
74
+ | `kanban board delete <id>` | Delete a board |
75
+ | `kanban board update <id> <name>` | Update board name |
76
+ | `kanban share <board_id> <team_id\|private>` | Share board with team or make private |
77
+ | `kanban column create <board_id> <name> <position>` | Create a column |
78
+ | `kanban column delete <id>` | Delete a column |
79
+ | `kanban card create <column_id> <title> [--description TEXT] [--position NUM]` | Create a card |
80
+ | `kanban card update <id> <title> [--description TEXT] [--position NUM] [--column NUM]` | Update a card |
81
+ | `kanban card delete <id>` | Delete a card |
82
+ | `kanban org list` | List all organizations |
83
+ | `kanban org create <name>` | Create a new organization |
84
+ | `kanban org get <org-id>` | Show organization details |
85
+ | `kanban org members <org-id>` | List organization members |
86
+ | `kanban org member-add <org-id> <username>` | Add member to organization |
87
+ | `kanban org member-remove <org-id> <user-id>` | Remove member from organization |
88
+ | `kanban team list --org-id <org-id>` | List teams in organization |
89
+ | `kanban team create <org-id> <name>` | Create a new team |
90
+ | `kanban team get <team-id>` | Show team details |
91
+ | `kanban team members <team-id>` | List team members |
92
+ | `kanban team member-add <team-id> <username>` | Add member to team |
93
+ | `kanban team member-remove <team-id> <user-id>` | Remove member from team |
94
+
95
+ ## 📚 CLI Documentation for Agents
96
+
97
+ For agents who need to quickly get up to speed with the CLI tool:
98
+
99
+ - **[CLI Quick Start Guide](docs/cli-quickstart.md)** - Get productive in minutes
100
+ - **[CLI Command Reference](docs/cli-reference.md)** - Complete command cheat sheet
101
+ - **[Common Workflows](docs/cli-workflows.md)** - Real-world examples and patterns
102
+
103
+ ## 🔑 API Keys for Agents
104
+
105
+ Instead of sharing passwords, users can generate one-off API keys for agents and CI/CD pipelines:
106
+
107
+ ```bash
108
+ # Generate an API key (shown only once - save it securely!)
109
+ kanban apikey create "CI Agent"
110
+
111
+ # Use the API key for any command
112
+ kanban --api-key kanban_abc123... board list
113
+
114
+ # Or set it as default
115
+ export KANBAN_API_KEY=kanban_abc123...
116
+ kanban board list
117
+ ```
118
+
119
+ ### API Key Features
120
+
121
+ - **Secure**: API keys are bcrypt-hashed in the database (like passwords)
122
+ - **Revokable**: Deactivate or reactivate keys at any time
123
+ - **Identifiable**: Each key has a prefix for identification in logs
124
+ - **Trackable**: Last used timestamp recorded for each key
125
+
126
+ ### Security Notes
127
+
128
+ - API keys are shown only once at creation time - copy and store securely
129
+ - Use environment variables or secure secret management for CI/CD
130
+ - Rotate keys periodically and revoke compromised keys
131
+
132
+ ## Self-Hosting
133
+
134
+ ### 1. Clone the repository
135
+
136
+ ```bash
137
+ git clone https://github.com/pearachute/kanban.git
138
+ cd kanban
139
+ ```
140
+
141
+ ### 2. Set up the virtualenv and install dependencies
142
+
143
+ ```bash
144
+ # Create virtualenv (if not already created)
145
+ python -m venv venv
146
+
147
+ # Activate the virtualenv
148
+ source venv/bin/activate # Linux/Mac
149
+ # or on Windows:
150
+ venv\Scripts\activate
151
+
152
+ # Install backend dependencies
153
+ pip install -r backend/requirements.txt
154
+
155
+ # Install frontend dependencies
156
+ cd frontend
157
+ npm install
158
+ ```
159
+
160
+ ### 3. Initialize the database and create a user
161
+
162
+ ```bash
163
+ # From the project root, with venv activated
164
+ python manage.py init
165
+ python manage.py user-create admin mypassword --admin
166
+ ```
167
+
168
+ ### 4. Run the server
169
+
170
+ ```bash
171
+ # From the project root, with venv activated
172
+ python manage.py server
173
+ ```
174
+
175
+ The server will start at http://localhost:8000.
176
+
177
+ The frontend will be built to `backend/static/` and served automatically.
178
+
179
+ ## Development
180
+
181
+ The virtualenv is at `./venv` in the project root.
182
+
183
+ ```bash
184
+ # Activate the virtualenv
185
+ source venv/bin/activate # Linux/Mac
186
+ # or on Windows:
187
+ venv\Scripts\activate
188
+ ```
189
+
190
+ ### Running the Server
191
+
192
+ ```bash
193
+ # With auto-reload (default)
194
+ python manage.py server
195
+
196
+ # With custom host/port
197
+ python manage.py server --host 127.0.0.1 --port 9000
198
+
199
+ # Disable auto-reload
200
+ python manage.py server --no-reload
201
+
202
+ # Set log level
203
+ python manage.py server --log-level debug
204
+ ```
205
+
206
+ ### Frontend (with hot reload)
207
+
208
+ ```bash
209
+ cd frontend
210
+ npm run dev
211
+ ```
212
+
213
+ ### Database Management
214
+
215
+ ```bash
216
+ # Initialize database (create all tables)
217
+ python manage.py init
218
+
219
+ # Wipe database (drop all tables and recreate)
220
+ python manage.py wipe
221
+
222
+ # Check database status
223
+ python manage.py status
224
+
225
+ # Create a user
226
+ python manage.py user-create <username> <password> [--email EMAIL] [--admin]
227
+ ```
228
+
229
+ ### Server Options
230
+
231
+ | Option | Description |
232
+ |--------|-------------|
233
+ | `--host HOST` | Host to bind to (default: 0.0.0.0) |
234
+ | `--port PORT` | Port to bind to (default: 8000) |
235
+ | `--reload` | Enable auto-reload (default) |
236
+ | `--no-reload` | Disable auto-reload |
237
+ | `--log-level LEVEL` | Set logging level (debug, info, warning, error) |
238
+
239
+ ## Multi-Tenant Organizations
240
+
241
+ See [docs/multi-tenant.md](docs/multi-tenant.md) for details on the organization model, team-based board sharing, and API endpoints.
242
+
243
+ ## API Reference
244
+
245
+ ### Authentication
246
+
247
+ - `POST /api/token` - Login (returns JWT)
248
+ - `X-API-Key` header - Use API key for authentication (alternative to Bearer token)
249
+
250
+ ### API Keys
251
+
252
+ - `GET /api/api-keys` - List your API keys
253
+ - `POST /api/api-keys` - Create a new API key (returns key once)
254
+ - `DELETE /api/api-keys/{id}` - Revoke (deactivate) an API key
255
+ - `POST /api/api-keys/{id}/activate` - Reactivate a deactivated API key
256
+
257
+ ### Boards
258
+
259
+ - `GET /api/boards` - List accessible boards (owned + shared)
260
+ - `POST /api/boards` - Create a new board
261
+ - `GET /api/boards/{id}` - Get board with columns and cards
262
+ - `POST /api/boards/{id}` - Update board (owner or team member)
263
+ - `DELETE /api/boards/{id}` - Delete board (owner only)
264
+
265
+ ### Columns
266
+
267
+ - `POST /api/columns` - Create column
268
+ - `PUT /api/columns/{id}` - Update column
269
+ - `DELETE /api/columns/{id}` - Delete column
270
+
271
+ ### Cards
272
+
273
+ - `POST /api/cards` - Create card
274
+ - `PUT /api/cards/{id}` - Update card (including position)
275
+ - `DELETE /api/cards/{id}` - Delete card
276
+
277
+ ## Tests
278
+
279
+ ```bash
280
+ # Run all tests
281
+ python -m pytest backend/tests/
282
+ ```
@@ -0,0 +1,3 @@
1
+ """Kanban CLI client for managing boards from the command line."""
2
+
3
+ __version__ = "0.1.0"
@@ -0,0 +1,4 @@
1
+ from kanban.cli import main
2
+
3
+ if __name__ == "__main__":
4
+ main()