crystal-supabase
Version, currently main branch1 version
- main branchlatestJun 24, 2025
github.com/Skrebnevf/crystal-supabase
Supabase client for Crystal lang
5 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
crystal-supabase:
github: Skrebnevf/crystal-supabase
branch: mainmain is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
>= 1.16.3- License
- MIT
- Author
- f.skrebnev
Dependencies
Development Dependencies
- webmock*github: manastech/webmock.cr, branch: masterdev
- crystalline*github: elbywan/crystalline, branch: masterdev
README
Supabase Crystal Client
Crystal client for Supabase REST API supporting basic CRUD operations with query building.
๐จ Installation
-
Add the dependency to your
shard.yml:dependencies: crystal-supabase: github: Skrebnevf/crystal-supabase -
Run
shards install
๐ฅ๏ธ Usage
require "crystal-supabase"
Select
response = client
.from("users")
.select("*")
.eq("active", "true")
.execute()
puts response
Insert
payload = %({"name": "Alice", "age": 30})
response = client
.from("users")
.insert(payload)
.execute()
puts response
Update
payload = %({"name": "Charlie"})
response = client
.from("users")
.eq("id", "1")
.update(payload)
.execute()
puts response
Upsert
payload = %({"id": 1, "name": "Bob"})
response = client
.from("users")
.upsert(payload, ["id"])
.execute()
puts response
Delete
response = client
.from("users")
.eq("id", "1")
.delete()
.execute()
puts response
Query Filters Examples
response = client
.from("products")
.select("id,name,price")
.gt("price", "100")
.lt("price", "500")
.like("name", "%book%")
.order_desc("price")
.limit(10)
.execute()
puts response
RPC
response = client.rpc("hello_world")
puts response
โ๏ธ TODO
- [x] Add basic CRUD
- [x] Add filters
- [x] Implement bulk for multiple rows
- [x] Add call of Postgres functions
- [ ] Add modifiers
๐ค Contributing
- Fork it (https://github.com/Skrebnevf/crystal-supabase/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
๐ Contributors
- f.skrebnev - creator and maintainer
- @hope_you_die - TG
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
main- Seen
- Jun 24, 2025
- Crystal
>= 1.16.3- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/Skrebnevf/crystal-supabase
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 14, 2026
- Synced
- Aug 14, 2026
- Versions
- 1