aboutsummaryrefslogtreecommitdiffstats
path: root/docs/index.md
diff options
context:
space:
mode:
authorEugene Triguba <hello@eugenetriguba.com>2025-10-10 23:11:16 -0400
committerEugene Triguba <hello@eugenetriguba.com>2025-10-10 23:11:16 -0400
commitc500a84b35338ac0f429133a0b07ced8d457976f (patch)
tree54d526e4c07c0171f8e6f41933b607a8ab09127c /docs/index.md
parentAdd note on contributing guide to README (diff)
downloadcli-c500a84b35338ac0f429133a0b07ced8d457976f.zip
Refactor docs to use mkdocs and sourcehut pages
Diffstat (limited to 'docs/index.md')
-rw-r--r--docs/index.md90
1 files changed, 90 insertions, 0 deletions
diff --git a/docs/index.md b/docs/index.md
new file mode 100644
index 0000000..c14c32c
--- /dev/null
+++ b/docs/index.md
@@ -0,0 +1,90 @@
+# Bolt
+
+![Version](https://img.shields.io/badge/version-0.10.1-blue)
+[![Build Status](https://builds.sr.ht/~eugenetriguba/bolt/commits/main.svg)](https://builds.sr.ht/~eugenetriguba/bolt/commits/main?)
+[![GoDoc](https://godoc.org/git.sr.ht/~eugenetriguba/bolt?status.svg)](https://godoc.org/git.sr.ht/~eugenetriguba/bolt)
+[![Go Report Card](https://goreportcard.com/badge/git.sr.ht/~eugenetriguba/bolt)](https://goreportcard.com/report/git.sr.ht/~eugenetriguba/bolt)
+
+Bolt is a command-line tool designed to simplify and streamline your database migration process.
+
+It is distributed as a standalone binary, making it easy to run anywhere without having to setup any tooling, and it is language independent. It doesn't matter what programming language you're using, you can use Bolt for any project you have.
+
+## Features
+
+- **Plain SQL migrations** - Schema migrations are written in plain SQL
+- **Flexible versioning** - Migrations can be versioned sequentially or by creation timestamp
+- **Transactional by default** - All migrations run in transactions by default
+- **Bidirectional migrations** - Supports up and down migrations and jumping to any particular schema version
+- **Multi-database support** - Supports PostgreSQL, MySQL, SQL Server, and SQLite3
+
+## Quick Start
+
+### Install Bolt
+
+=== "Go install"
+
+ ```bash
+ go install git.sr.ht/~eugenetriguba/bolt/cmd/bolt@latest
+ ```
+
+ This will install Bolt to your `$GOBIN` directory. Make sure that `$GOBIN` is in your `$PATH`.
+
+=== "Homebrew"
+
+ ```bash
+ brew tap eugenetriguba/bolt https://git.sr.ht/~eugenetriguba/homebrew-bolt
+ brew install bolt
+ ```
+
+### Create your first migration
+
+```bash
+bolt new -m "create users table"
+```
+
+### Write your migration
+
+Edit the generated SQL file in the `migrations/` directory:
+
+```sql
+-- migrate:up
+CREATE TABLE users (
+ id SERIAL PRIMARY KEY,
+ name VARCHAR(255) NOT NULL,
+ email VARCHAR(255) NOT NULL,
+ created_at TIMESTAMP NOT NULL DEFAULT NOW(),
+ updated_at TIMESTAMP NOT NULL DEFAULT NOW()
+);
+
+-- migrate:down
+DROP TABLE users;
+```
+
+### Configure Bolt
+
+Create a `bolt.toml` file:
+
+```toml
+[database]
+dsn = "postgresql://user:password@localhost:5432/mydb?sslmode=disable"
+driver = "postgresql"
+```
+
+### Apply your migration
+
+```bash
+bolt up
+```
+
+## Next Steps
+
+- Follow the complete [Tutorial](tutorial.md) for a detailed walkthrough
+- Check out [How-To Guides](how-to.md) for specific tasks
+- Browse the [Reference](reference.md) for commands and configuration options
+- Read [Explanations](explanation.md) to understand how Bolt works internally
+
+## Getting Help
+
+- Read the [documentation](https://eugenetriguba.srht.site/bolt/)
+- Check the [issue tracker](https://todo.sr.ht/~eugenetriguba/bolt)
+- View the [source code](https://git.sr.ht/~eugenetriguba/bolt)