feat: add Atlas provider#1
Open
ThiagoSantosOFC wants to merge 9 commits into
Open
Conversation
added 5 commits
March 17, 2026 10:58
There was a problem hiding this comment.
Pull request overview
Adds a new AtlasProvider implementation so the tm CLI can manage Atlas tickets/projects, including credential-based auth and configuration via config file or env vars.
Changes:
- Added
AtlasProviderwith Axios client, auth interceptors, and ticket/project CRUD. - Extended config model + env var resolution to support an
atlasprovider. - Updated CLI wiring (
getProvider(),tm configoptions,--showoutput) and documented Atlas usage/env vars.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
src/providers/atlas.ts |
New provider implementation for Atlas tickets/projects, including auth + field mappings. |
src/config.ts |
Adds atlas config block and resolves ATLAS_* env vars in getEffectiveConfig(). |
src/index.ts |
Wires Atlas provider into CLI, adds config flags, and displays Atlas config in --show. |
bun.lock |
Updates Bun lockfile metadata. |
README.md |
Documents Atlas provider setup and usage. |
.env.example |
Adds ATLAS_* environment variable examples. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
58
to
69
| // Check if we have env vars for vikunja | ||
| if (process.env.VIKUNJA_API_URL && process.env.VIKUNJA_TOKEN) { | ||
| return { | ||
| provider: process.env.TM_PROVIDER || 'vikunja', | ||
| provider: process.env.TM_PROVIDER || "vikunja", | ||
| vikunja: { | ||
| apiUrl: process.env.VIKUNJA_API_URL, | ||
| token: process.env.VIKUNJA_TOKEN, | ||
| defaultProjectId: process.env.VIKUNJA_DEFAULT_PROJECT_ID | ||
| ? Number(process.env.VIKUNJA_DEFAULT_PROJECT_ID) | ||
| : fileConfig?.vikunja?.defaultProjectId, | ||
| }, | ||
| }; |
| } | ||
| if (options.url) newConfig.atlas.apiUrl = options.url; | ||
| if (options.email) newConfig.atlas.email = options.email; | ||
| if (options.password) newConfig.atlas.password = options.password; |
Comment on lines
+266
to
+275
| try { | ||
| const response = await this.client.get<{ project: AtlasProject }>( | ||
| `/api/v1/projects/${id}`, | ||
| ); | ||
| const p = (response.data as any).project ?? response.data; | ||
| return { | ||
| id: p.id, | ||
| name: p.name, | ||
| description: p.description ?? undefined, | ||
| }; |
| if (input.priority !== undefined) | ||
| payload.priority = taskPriorityToAtlas(input.priority); | ||
| if (input.dueDate !== undefined) | ||
| payload.dueDate = input.dueDate?.toISOString() ?? null; |
Comment on lines
+28
to
+38
| ```bash | ||
| # Configure Atlas | ||
| tm config --provider atlas --url http://localhost:3000 --email user@example.com --password yourpassword | ||
| tm config --project <atlas-project-uuid> # Set default project | ||
|
|
||
| # Use it | ||
| tm projects # List Atlas projects | ||
| tm list # List tickets (todo status) | ||
| tm list --all # All tickets | ||
| tm add "New ticket" # Create ticket | ||
| tm done <ticket-uuid> # Mark as done |
added 3 commits
March 17, 2026 11:03
- listTasks: API returns { data: [] } not { tickets: [] }
- getProject: API returns the project object directly, not wrapped in { project: ... }
- Remove as-any cast now that the shape is properly typed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AtlasProviderclass implementing theTaskProviderinterface, enabling thetmCLI to manage Atlas ticketsatlaskey in~/.config/task-manager/config.json; env varsATLAS_API_URL,ATLAS_EMAIL,ATLAS_PASSWORD,ATLAS_DEFAULT_PROJECT_IDalso supportedChanges
src/providers/atlas.ts(new) — FullAtlasProvider: axios client with interceptors, bidirectional status/priority enum mapping, all CRUD operations for tickets and projectssrc/config.ts— Addedatlasblock toTaskManagerConfiginterface; addedATLAS_*env-var handling ingetEffectiveConfig()src/index.ts— ImportedAtlasProvider, wired it intogetProvider(), added--email/--passwordoptions toconfigcommand, added Atlas display in--show.env.example/README.md— Documented Atlas setup and env varsHow to use
Verification
bun run typecheck→ 0 errorsbun run build→ exits 0tm config --helpshows--emailand--passwordtm config --showdisplays Atlas URL, email, and masked password (********)