Leonardo is an AI Coding Agent that builds full stack web apps directly in the browser.
Perfect for MVPs, internal tools, and prototypes. It’s important to save the code that Leonardo generates to your Github account, so that you never lose access to it.
By default, Leonardo will save code changes to the local git repository on the computer he’s running on. But, this doesn’t automatically push the code to Github until you authenticate your Github account, create a repository for the code, and then instruct Leonardo to link the Github repository with the local code project. Then, Leonardo can push local code changes up to Github, which is the most secure way to save your code long-term.
Here’s how to authenticate Leonardo with your Github account.
Step 1: Sign into your Github account.
Step 2: Go to Profile -> Settings -> Developer Settings
Step 3: Click on “Generate new token” -> “Generate new token (classic)”

Step 4: Put in a name that’s easy to remember, I recommend saying it’s for Leonardo and LlamaPress.
Step 5: Select the checkbox on top that says “repo”. This should auto select everything else.

Step 6: Scroll down, and also make sure that you select admin:org
(allows Leonardo to create new repos for you).

Step 6: Copy your personal access token to your clipboard.

Step 7: Open up your application where you can chat with Leonardo

Step 8: Send in the following message to Leonardo.
Can you please authenticate me with github cli? Here is my access token: ghp_9xlk ...
Step 9: Create and link the Github repository to your local code changes.
Ask Leonardo to either create a new repository for you, and then commit your local git changes and push.
OR, create a new repository from your Github, then copy out the URL and ask Leonardo to set it as the origin, and to commit all code and push to that origin.
Step 10:
Link the Github authenticated with the local git.

Leave a Reply