Linux command
supabase 命令
文本
Copy it and replace filenames, paths, or keywords as needed.
命令示例
Initialize project
supabase init
Start local development
supabase start
Stop local services
supabase stop
Generate types
supabase gen types typescript --local
Create migration
supabase migration new [migration_name]
Apply migrations
supabase db push
Link to project
supabase link --project-ref [project-id]
View status
supabase status
说明
supabase is the command-line interface for managing Supabase projects, an open-source Firebase alternative built on PostgreSQL. It provides tools for local development, database migration management, type generation, and deployment to hosted Supabase projects. The local development environment runs a complete Supabase stack using Docker, including PostgreSQL, authentication services, object storage, realtime subscriptions, and Edge Functions. This allows developing and testing against a production-equivalent environment without needing a remote project. Database migrations track schema changes in version control. The CLI can generate TypeScript types from the database schema for type-safe client code. Linking connects the local project to a hosted Supabase instance for deploying migrations and Edge Functions to production.
参数
- init
- Initialize project.
- start
- Start local stack.
- stop
- Stop local stack.
- link
- Link to remote project.
- db push
- Push migrations.
- gen types
- Generate types.
- migration new _NAME_
- Create migration.
- status
- Show status.
- --project-ref _ID_
- Project reference.
FAQ
What is the supabase command used for?
supabase is the command-line interface for managing Supabase projects, an open-source Firebase alternative built on PostgreSQL. It provides tools for local development, database migration management, type generation, and deployment to hosted Supabase projects. The local development environment runs a complete Supabase stack using Docker, including PostgreSQL, authentication services, object storage, realtime subscriptions, and Edge Functions. This allows developing and testing against a production-equivalent environment without needing a remote project. Database migrations track schema changes in version control. The CLI can generate TypeScript types from the database schema for type-safe client code. Linking connects the local project to a hosted Supabase instance for deploying migrations and Edge Functions to production.
How do I run a basic supabase example?
Run `supabase init` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does init do in supabase?
Initialize project.