{"title":"Getting Started","description":"","section":"","version":"v1.5","path":"getting-started","canonical_url":"https://amberframework.org/docs/v1.5/getting-started","markdown_url":"https://amberframework.org/docs/v1.5/getting-started.md","inherited":false,"content_markdown":"# Getting Started\n\n## Quick Start\n\nThis quick start guide will help you get a full stack web application running in just a few minutes by leveraging amber’s code generators.\n\nIt will take us just 7 steps. Let’s get started!\n\n![Let&#x2019;s get started!](https://raw.githubusercontent.com/amberframework/site-assets/master/videos/amber-quick-start.gif)\n\n## 1. Install dependencies\n\n{% hint style=\"info\" %}\nIf you already have `crystal`, `amber`, and a database installed, you can [skip this step](#2.-generate-a-new-amber-application).\n{% endhint %}\n\n### 1.1 Install `crystal` and `amber`\n\nInstructions for OS X using Homebrew or MacPorts and Debian/Ubuntu are below. See full installation instructions [here](https://crystal-lang.org/docs/installation/) for RedHat & CentOS, ArchLinux & Derivatives, and more complete instructions.\n\n#### macOS\n\nInstalling Amber with these package managers also installs Crystal.\n\n- Homebrew\n\n  ```text\n  brew tap amberframework/amber\n  brew install amber\n  ```\n\n- MacPorts\n\n  ```text\n  sudo port selfupdate\n  sudo port install amber\n  ```\n\n#### Ubuntu or Debian\n\nFirst install crystal (from the [official install documentation](https://crystal-lang.org/install/on_ubuntu/)):\n\n```text\ncurl -fsSL https://crystal-lang.org/install.sh | sudo bash\n```\n\nThen install Amber \\(from source\\)\n\n**Release note:** Amber `v1.5.0`, published August 1, 2026, is the current stable\nframework release. This page preserves the Amber 1.x generator and application\nshape. Use the [V2 getting-started guide](/docs/v2/getting-started/) when testing\nthe separate Amber CLI and V2 web template.\n\n```text\nsudo apt-get install libreadline-dev libsqlite3-dev libpq-dev libmysqlclient-dev libssl-dev libyaml-dev libpcre3-dev libevent-dev\ngit clone https://github.com/amberframework/amber.git\ncd amber\ngit checkout v1.5.0\nshards install\nmake\nsudo make install\n```\n\nYou can also install Amber with [Linuxbrew](http://linuxbrew.sh/)\n\n```bash\nbrew tap amberframework/amber\nbrew install amber\n```\n\n{% hint style=\"info\" %}\nAbove are the steps for building from source, the dependencies are specific to Ubuntu/Debian. See [full installation instructions](../guides/installation.md) for other Linux Distributions.\n{% endhint %}\n\n### 1.2 Install a database\n\nAmber works with `postgresql` \\(default\\), `mysql`, or `sqlite`.\n\nIf you don’t already have one of these installed, please follow the guides provided by each database maintainer:\n\n* [Postgresql Installation Guides](https://wiki.postgresql.org/wiki/Detailed_installation_guides)\n* [MySQL Installation Guides](https://dev.mysql.com/doc/refman/8.0/en/installing.html)\n* [Tutorial on installing SQLite](https://www.tutorialspoint.com/sqlite/sqlite_installation.htm)\n\n{% hint style=\"info\" %}\nOn OS X any of the databases can be installed with `brew install [database]`\n{% endhint %}\n\n{% hint style=\"info\" %}\nDocker users can opt to use a database container to develop with as well. By default, a new Amber application generates a `docker-compose.yml` that can be used for this purpose.\n{% endhint %}\n\n## 2. Generate a new Amber application\n\nWith all dependencies successfully installed, we can generate a new application with `amber new`\n\nAfter the code for the new application is generated, we will `cd` into the new directory and execute a `shards install`.\n\nThe shards install command may take a little while - it has to download all shard dependencies.\n\n{% hint style=\"info\" %}\nThe default setup will use a postgresql database, use `-d mysql` or `-d sqlite` for mysql and sqlite, respectively.\n{% endhint %}\n\n```text\namber new pet-tracker\ncd pet-tracker\n```\n\n## 3. Generate a resource\n\nWith the skeleton application generated, we can generate our first RESTful resource.\n\nThe `amber generate scaffold` command will help us do this.\n\n{% hint style=\"info\" %}\n`g` is shorthand for `generate`\n{% endhint %}\n\n```text\namber g scaffold Pet name:string breed:string age:integer\n```\n\n## 4. Create and migrate the database\n\nGenerating the application and the scaffolded resource provides the configuration and migration files needed to set up the database.\n\n`amber db` will help us do this, as you will see you can chain the `db` commands together.\n\n```text\namber db create migrate\n```\n\nThis will create a new database and run the migration to create a `pets` table with the specified columns.\n\n## 5. Build the application and run the server\n\nWe can use `amber watch` to both build the binary application and start the server. Additionally, `amber watch` will detect code changes then recompile and restart the application automatically.\n\n```text\namber watch\n```\n\nThe `watch` commands will keep observing for file changes within the project and recompiling the application.\n\n## 6. Use your brand new web application!\n\nOpen any browser and goto [http://localhost:3000](http://localhost:3000) You should see a home page load and “Pets” in the nav bar. If you click on the “Pets” link, you should be able to perform all seven RESTful actions for the “pets” resource.\n\n## 7. Deploy your web application\n\n{% page-ref page=\"../deployment/\" %}\n\n## List of Commands\n\nYou can use these commands to create new awesome applications :-\\)\n\n```text\namber new pet-tracker\ncd pet-tracker\nshards install\namber generate scaffold Pet name:string breed:string age:integer\namber db create migrate\namber watch\n```\n\n## Demo\n\nHere is the Quick Start demo app and the source code is available on [Github](https://github.com/faustinoaq/pet-tracker).\n\n![Quick Start Demo](https://raw.githubusercontent.com/amberframework/site-assets/master/videos/quick-start-demo.gif)\n\n{% page-ref page=\"../guides/\" %}"}