Create a new project
There are several ways to create a new project in Altostra:
- From the Altostra Web Console
- From the Altostra CLI
- From a code editor
When you create a new project, you can decide whether to start fresh, use a template or use an existing project.
Create a project in Altostra Web Console
If you have connected a Git hosting account, such as GitHub or Bitbucket, Altostra automatically creates a private Git repository for new projects and pushes an initial commit.
Create a project
To create a project in the Web Console, go to Projects and click on Create Project, select a template and give your project a name.
Fill in the project name and select a template:
When then project is created, you are presented with the project details
page. You can find the link to the Git repository under the project name.
Clone the project to start working
Now that you have a new project, clone the project from you Git account to a local development environment and start working.
Create a project in Altostra CLI
For more information about the commands below and their options, refer to the Altostra CLI documentation.
Initialize in a new directory
Initialize the project:
# Create new directory
mkdir my-project
cd my-project
alto init
✔ Checking directory
✔ Initializing
The command
alto new
can be used to create a new directory and initialize it.
It accepts the same arguments asalto init
.
Initialize from a template
List the available templates:
alto templates
✔ Getting project templates
Available templates:
* static-website
* simple-crud-service
* scalable-webhook
Then, initialize a new project from a template:
alto init --template static-website
Or, you can omit the template name to interactively select a template from a list:
alto init --template
✔ Listing available templates
? Please select a template to initialize a project (Use arrow keys)
❯ static-website
simple-crud-service
scalable-webhook
Don't forget to register the project.
Create a project in Visual Studio Code
Open the project folder in Visual Studio Code.
Initialize in a new or existing directory
Switch to the Altostra view:
Click on the Initialize Project
button at the top to initialize the project:
Or, use the commands palette in Visual Studio Code (F1 or Cmd+Shift+P):
The project is initialized and the Altostra Designer displays an initial empty design.
Don't forget to register the project.
Initialize from a template
Switch to the Altostra view and click on the desired template in the templates list:
Registering a locally created project with Altostra
Working locally is great for development, but in order to deploy a project it is first needed to be registered with Altostra.
By the CLI
To register your project with Altostra run:
alto import <project repository name>
alto import new-project
✔ Checking user credentials
✔ Working account: Altostra
✔ Importing a project from the repository
Name Created Project type Repository URL
new-project 2/1/2021, 5:11:22 PM altostra https://github.com/Altostra-Labs/new-project
From the Altostra Web Console
Simply commit the project to Git and push it to a repository in your integrated Git provider.
Then, in the Web Console, go to Projects and click on Import Project.
Select the repository from the list and click Import.