{"id":13521434,"url":"https://github.com/nalgeon/sqlpkg-cli","last_synced_at":"2025-06-17T11:13:14.120Z","repository":{"id":177853734,"uuid":"660840635","full_name":"nalgeon/sqlpkg-cli","owner":"nalgeon","description":"SQLite package manager","archived":false,"fork":false,"pushed_at":"2025-05-05T04:55:39.000Z","size":260,"stargazers_count":238,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-12T12:54:32.958Z","etag":null,"topics":["package-manager","sqlite","sqlite-extension"],"latest_commit_sha":null,"homepage":"https://sqlpkg.org","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nalgeon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-07-01T02:01:01.000Z","updated_at":"2025-05-30T14:47:49.000Z","dependencies_parsed_at":"2024-01-23T16:39:32.529Z","dependency_job_id":null,"html_url":"https://github.com/nalgeon/sqlpkg-cli","commit_stats":null,"previous_names":["nalgeon/sqlpkg-cli"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/nalgeon/sqlpkg-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nalgeon%2Fsqlpkg-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nalgeon%2Fsqlpkg-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nalgeon%2Fsqlpkg-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nalgeon%2Fsqlpkg-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nalgeon","download_url":"https://codeload.github.com/nalgeon/sqlpkg-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nalgeon%2Fsqlpkg-cli/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260347083,"owners_count":22995161,"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":["package-manager","sqlite","sqlite-extension"],"created_at":"2024-08-01T06:00:34.348Z","updated_at":"2025-06-17T11:13:09.086Z","avatar_url":"https://github.com/nalgeon.png","language":"Go","readme":"# The (unofficial) SQLite package manager\n\n`sqlpkg` manages SQLite extensions, just like `pip` does with Python packages or `brew` does with macOS programs.\n\nIt works primarily with the [SQLite package registry](https://sqlpkg.org/), but is not limited to it. You can install SQLite extensions from GitHub repositories or other websites. All you need is a package spec file (more on that later).\n\n```\nsqlpkg is a package manager for installing and updating SQLite extensions.\n\nUSAGE\n  sqlpkg [global-options] \u003ccommand\u003e [arguments]\n\nGLOBAL OPTIONS\n  -v  verbose output\n\nCOMMANDS\n   help       Display help\n   info       Display package information\n   init       Init project scope\n   install    Install packages\n   list       List installed packages\n   uninstall  Uninstall package\n   update     Update installed packages\n   version    Display version\n   which      Display path to extension file\n```\n\n`sqlpkg` is implemented in Go and has zero dependencies (see [Writing a package manager](https://antonz.org/writing-package-manager) for details).\n\n[Download](#download-and-install-preferred-method) •\n[Install packages](#installing-packages) •\n[Package location](#package-location) •\n[Load into SQLite](#loading-installed-extensions-in-sqlite) •\n[Other commands](#other-commands) •\n[Lockfile](#lockfile)\n\n## Download and install (preferred method)\n\nLinux/macOS:\n\n```sh\ncurl -sS https://webi.sh/sqlpkg | sh\n```\n\nWindows:\n\n```sh\ncurl.exe https://webi.ms/sqlpkg | powershell\n```\n\nTo update or switch versions, run `webi sqlpkg@stable` (or `@v1.1`, `@beta`, etc).\n\n## Download and install (manual)\n\n`sqlpkg` is a binary executable file (`sqlpkg.exe` on Windows, `sqlpkg` on Linux/macOS). Download it from the link below, unpack and put somewhere in your `PATH` ([what's that?](https://gist.github.com/nex3/c395b2f8fd4b02068be37c961301caa7)), so you can run it from anyhwere on your computer.\n\n[**Download**](https://github.com/nalgeon/sqlpkg-cli/releases/latest)\n\nThen run it from the command line (terminal) as described below.\n\n**Note for macOS users**. macOS disables unsigned binaries and prevents the `sqlpkg` from running. To resolve this issue, remove the build from quarantine by running the following command in Terminal (replace `/path/to/folder` with an actual path to the folder containing the `sqlpkg` binary):\n\n```\nxattr -d com.apple.quarantine /path/to/folder/sqlpkg\n```\n\n## Installing packages\n\nInstall a package from the registry:\n\n```\nsqlpkg install nalgeon/stats\n```\n\n`nalgeon/stats` is the ID of the extension as shown in the registry.\n\nInstall a package from a GitHub repository (it should have a package spec file):\n\n```\nsqlpkg install github.com/nalgeon/sqlean\n```\n\nInstall a package from a spec file somewhere on the Internet:\n\n```\nsqlpkg install https://antonz.org/assets/stats.json\n```\n\nInstall a package from a local spec file:\n\n```\nsqlpkg install ./stats.json\n```\n\n## Package location\n\nBy default, `sqlpkg` installs all extensions in the home folder:\n\n-   `%USERPROFILE%\\.sqlpkg` on Windows\n-   `~/.sqlpkg` on Linux/macOS\n\nFor example, given the user `anton` and the package `nalgeon/stats`, the location will be:\n\n-   `C:\\Users\\anton\\.sqlpkg\\nalgeon\\stats\\stats.dll` on Windows\n-   `/home/anton/.sqlpkg/nalgeon/stats/stats.so` on Linux\n-   `/Users/anton/.sqlpkg/nalgeon/stats/stats.dylib` on macOS\n\nThis is what it looks like:\n\n```\nsqlpkg install nalgeon/stats\n\u003e installing nalgeon/stats...\n✓ installed package nalgeon/stats to /Users/anton/.sqlpkg/nalgeon/stats\n```\n\n```\nsqlpkg install asg017/hello\n\u003e installing asg017/hello...\n✓ installed package asg017/hello to /Users/anton/.sqlpkg/asg017/hello\n```\n\n```\n.sqlpkg\n├── asg017\n│   └── hello\n│       ├── hello0.dylib\n│       ├── hola0.dylib\n│       └── sqlpkg.json\n└── nalgeon\n    └── stats\n        ├── sqlpkg.json\n        └── stats.dylib\n```\n\n## Loading installed extensions in SQLite\n\nTo load an extension, you'll need the path to the extension file. Run the `which` command to see it:\n\n```\nsqlpkg which nalgeon/stats\n```\n\n```\n/Users/anton/.sqlpkg/nalgeon/stats/stats.dylib\n```\n\nUse this path to load the extension with a `.load` shell command, a `load_extension()` SQL function, or other means. See this guide for details:\n\n[How to Install an SQLite Extension](https://antonz.org/install-sqlite-extension/)\n\n## Other commands\n\n`sqlpkg` provides other basic commands you would expect from a package manager.\n\n### `update`\n\n```\nsqlpkg update\n```\n\nUpdates all installed packages to the latest versions.\n\n### `uninstall`\n\n```\nsqlpkg uninstall nalgeon/stats\n```\n\nUninstalls a previously installed package.\n\n### `list`\n\n```\nsqlpkg list\n```\n\nLists installed packages.\n\n### `info`\n\n```\nsqlpkg info nalgeon/stats\n```\n\nDisplays package information. Works with both local and remote packages.\n\n### `version`\n\n```\nsqlpkg version\n```\n\nDisplays `sqlpkg` version number.\n\n## Project vs. global scope\n\nBy default, `sqlpkg` installs all extensions in the home folder (global scope). If you are writing a Python (JavaScript, Go, ...) application — you may prefer to put them in the project folder (project scope, like virtual environment in Python or `node_modules` in JavaScript).\n\nTo do that, run the `init` command:\n\n```\nsqlpkg init\n```\n\nIt will create an `.sqlpkg` folder in the current directory. After that, all other commands run from the same directory will use it instead of the home folder.\n\n## Package spec file\n\nThe package spec file describes a particular package so that `sqlpkg` can work with it. It is usually created by the package author, so if you are a `sqlpkg` user, you don't need to worry about that.\n\nIf you _are_ a package author, who wants your package to be installable by `sqlpkg`, learn how to create a [spec file](https://github.com/nalgeon/sqlpkg/blob/main/spec.md).\n\n## Lockfile\n\n`sqlpkg` stores information about the installed packages in a special file (the _lockfile_) — `sqlpkg.lock`. If you're using a project scope, it's a good idea to commit `sqlpkg.lock` along with other code. This way, when you check out the code on another machine, you can install all the packages at once.\n\nTo install the packages listed in the lockfile, simply run `install` with no arguments:\n\n```\nsqlpkg install\n```\n\n`sqlpkg` will detect the lockfile (in the current folder or the user's home folder) and install all the packages listed in it.\n\n──\n\nThat's all for now. Now try some packages!\n\n[⬇️ Download](https://github.com/nalgeon/sqlpkg-cli/releases/latest) •\n[✨ Explore](https://sqlpkg.org/) •\n[🚀 Follow](https://antonz.org/subscribe/)\n","funding_links":[],"categories":["Members","Go","sqlite"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnalgeon%2Fsqlpkg-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnalgeon%2Fsqlpkg-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnalgeon%2Fsqlpkg-cli/lists"}