Step by step to create a README for your Github profile
Tags: markdown, github, readme, python
Published: 2021-01-28 17:45:58

We have been able to create a custom profile for our Github  🐙 account for a while now, creating a repository with our username.

Here is a step by step to create and customize this profile, to obtain a result like the following one:

![result-octocat](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yxsgoq30bp6e1t4ww8n1.png)
 
## Premisses: 

Python should be installed on the computer (it's native on Unix OS)

## Step 1 - Installation

To do so, we'll use an open source CLI tool named [Ritchie](ritchiecli.io). 

It allows the user to create, store and share any kind of automations (**called formulas**), executing them through command lines. 

One of them will provide us with the README.md file we'll use on our Github account.

To install Ritchie:

**Unix**: On the terminal:

```curl -fsSL https://commons-repo.ritchiecli.io/install.sh | bash```

**Windows**: Download the `.msi` from:

https://commons-repo.ritchiecli.io/latest/ritchiecli.msi

## Step 2 - Initialization

Run the following command to initialize Ritchie: 

```rit init```

This command will ask 3 questions:
- If you wants to contribute anonymously to Ritchie metrics.
- If you wants to add the community formulas locally.
- If you wants the default formula execution method to be local or through docker. (Here, choose `LOCAL`)

![Screen Shot 2021-01-28 at 14.43.02](https://dev-to-uploads.s3.amazonaws.com/i/ft8etuot4mselh4lbz34.png) 

## Step 3 - Add a Ritchie formulas repository

To create the README.md for our profile, we need to import the repository containing the formula we plan to use: https://github.com/GuillaumeFalourd/formulas-github

Do to so, execute the command below:

```rit add repo --provider="Github" --name="formulas-github" --repoUrl="https://github.com/GuillaumeFalourd/formulas-github" --priority=1```

## Step 4 - Create the Github profile

If you already have a Github profile repository, do directly to step 4.2.

### Step 4.1 - Create the Github repository

#### Step 4.1.1 - With the Github interface

- Create the repository with your Github username here: https://github.com/new

- Then, clone the Github repository on your computer.

#### Step 4.1.2 - With Ritchie

- Create a Github Token following https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token

- Then execute the following command:
 
```rit github create repo```

![rit github create repo](https://dev-to-uploads.s3.amazonaws.com/i/8k5hm86n095qg2ugsjgu.png)

The repository will be created on the directory where you executed the command above.

### Step 4.2 - Create the README file

- On the terminal, go to the repository you just created:

```cd <username>```

- Then execute the following command:

```rit github create profile```

![formula-command](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cjudaykkncphzaub7cm6.png)
 
This command will overwrite the current README.md file according to the datas you'll inform.

### Step 4.3 - Commit your code

```git add . ; git commit -m "first commit"```

```git push origin main```


## That's it ✅

Your profile is now online on your Github Account.

This README.md file is not very sophisticated yet, but it is evolving through time. 

Here is the first formula code version in Python:

![1-rit-github-create-profile-formula](https://dev-to-uploads.s3.amazonaws.com/i/tli3tr5c64yg6qjsc2yc.png)

And the current version is available here: https://github.com/GuillaumeFalourd/formulas-github/blob/master/github/create/profile/src/formula/formula.py

It is possible to improve this formula to add other features on the file. You can do it manually, or contribute to the repository to improve the template and/or other formulas!

Thank you for reading 🙂