`odo` uses a link:https://devfile.io[_devfile_] to store the configuration of a component and to describe the component's resources such as storage and services. The _odo create_ command generates this file.
== Creating a component
To create a _devfile_ for an existing project, run the `odo create` command with the name and type of your component (for example, `nodejs` or `go`):
[source,terminal]
----
odo create nodejs mynodejs
----
In the example, `nodejs` is the type of the component and `mynodejs` is the name of the component that `odo` creates for you.
[NOTE]
====
For a list of all the supported component types, run the command `odo catalog list components`.
====
If your source code exists outside the current directory, the `--context` flag can be used to specify the path.
For example, if the source for the nodejs component is in a folder called `node-backend` relative to the current working directory, run the command:
You can also run the `odo create` command interactively, to guide you through the steps needed to create a component:
[source,terminal,subs="verbatim,quotes"]
----
$ odo create
? Which devfile component type do you wish to create *go*
? What do you wish to name the new devfile component *go-api*
? What project do you want the devfile component to be created in *default*
Devfile Object Validation
✓ Checking devfile existence [164258ns]
✓ Creating a devfile component from registry: DefaultDevfileRegistry [246051ns]
Validation
✓ Validating if devfile name is correct [92255ns]
? Do you want to download a starter project *Yes*
Starter Project
✓ Downloading starter project go-starter from https://github.com/devfile-samples/devfile-stack-go.git [429ms]
Please use `odo push` command to create the component with source deployed
----
You are prompted to choose the component type, name, and the project for the component. You can also choose whether or not to download a starter project. Once finished, a new `devfile.yaml` file is created in the working directory.
To deploy these resources to your cluster, run the command `odo push`.