You can add Optic to any repository by including an
optic.yml file in its the root directory. This config file specifies which Optic Skills to use when working with your project. Each skill determines how Optic reads and writes a certain type of code.
Here's an example
name: My Project # Used when referencing code from another project parsers: # A list of language parsers to include - es7 skills: # A list of the skills to include - optic:email@example.com - optic:firstname.lastname@example.org - optic:email@example.com exclude: # (optional) list of directories Optic should not index - vendor/
To add Optic to an existing project run:
optic init ? Project Name: Test Project Project file created: /Users/aidancunniffe/Desktop/test-project/optic.yml
You can use the
--presets flag to include popular skills in your new project file.
optic init --presets express rest
Optic must be started from the root directory of an Optic project or one of its decedents. Once you've navigated to a valid working directory you can: