{"id":23792379,"url":"https://github.com/henrriusdev/svelxios","last_synced_at":"2026-05-04T12:37:43.339Z","repository":{"id":209372896,"uuid":"723820929","full_name":"henrriusdev/svelxios","owner":"henrriusdev","description":"A CLI for a SvelteKit Axios Wrapper","archived":false,"fork":false,"pushed_at":"2023-11-28T14:25:11.000Z","size":259,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-05T14:19:21.794Z","etag":null,"topics":["axios","javascript","library","sveltekit","typescript","wrapper"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/svelxios","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/henrriusdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-26T21:07:33.000Z","updated_at":"2024-08-05T14:19:27.166Z","dependencies_parsed_at":"2024-08-05T14:19:26.140Z","dependency_job_id":"2b092f32-078d-43bc-bdc9-bae2ca9a5403","html_url":"https://github.com/henrriusdev/svelxios","commit_stats":null,"previous_names":["hbourgeot/svex","hbourgeot/svelxios","henrriusdev/svelxios"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henrriusdev%2Fsvelxios","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henrriusdev%2Fsvelxios/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henrriusdev%2Fsvelxios/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henrriusdev%2Fsvelxios/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/henrriusdev","download_url":"https://codeload.github.com/henrriusdev/svelxios/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240021314,"owners_count":19735303,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["axios","javascript","library","sveltekit","typescript","wrapper"],"created_at":"2025-01-01T18:31:10.710Z","updated_at":"2026-04-19T20:30:26.589Z","avatar_url":"https://github.com/henrriusdev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Svelxios logo](docs/svelxios.png)\n# Svelxios: Svelte Axios Wrapper\n\n## How to use?\n\nDownload the CLI to your **SvelteKit Project** with the package manager of your choice:\n\n```bash\nnpm i svelxios\n# or\nyarn add svelxios\n# or\npnpm add svelxios\n```\n\n**Note: After using the CLI, you can uninstall it.**\n\nThen, execute the CLI:\n\n```bash\nnpx svelxios\n```\n\nHere the CLI would install axios and write the code for the axios wrapper for sveltekit in these files:\n\n1. `src/app.d.ts`: In the app locals for better use on the server side.\n2. `src/lib/server/client.ts`: Here is the Axios Client.\n3. `src/lib/utils/debugger.ts`: Axios Debuggers\n4. `src/hooks.server.ts`: Here the client would be loaded to the app locals.\n\n## And then?\n\nUse it as a common axios client on the server side of your SvelteKit app:\n\n```typescript\nimport type {PageServerLoad} from './$types';\n\nexport const load: PageServerLoad = async ({locals:{svelxios}}) =\u003e {\n  const response = await svelxios.get('/your-api');\n  console.log(response);\n}\n```\n\n### Special notes\n\n* You must have a .env file that has a **baseUrl** for this axios client, this is used on the creation of the client.\n\n```typescript\nimport {baseUrl} from \"$env/static/private\";\n\nconst client = axios.create(\n  baseURL: baseUrl\n);\n// ...\n// more code\n\nexport {client}\n```\n\n* Once you has svelxios running properly, you can uninstall the CLI.\n\n## Special thanks to:\n\n* [4ndual](https://github.com/4ndual)\n* [gracrys](https://github.com/gracrys)\n* [Axios Team](https://github.com/axios/axios) (Great http client, thanks)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhenrriusdev%2Fsvelxios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhenrriusdev%2Fsvelxios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhenrriusdev%2Fsvelxios/lists"}