DEV Community

Cover image for I have created a small anti-depression script
Fyodor
Fyodor

Posted on

I have created a small anti-depression script

I read this wonderful book by Elizabeth Gilbert called Eat, Pray, Love. Insightful, not to say more. And there are these chapters about her fighting with Depression and Loneliness which many of us can relate to (myself included).

Specifically, Elizabeth shares the piece on her journaling, or rather chatting with herself. How it helped her to get out of the pit of despair and kick away the internal demons.

That pushed me to drop a quick script to try to do the same in my terminal (because I'm a developer, or rather because I don't have a notebook around).

And it actually worked. And that helped me. At least today.

So I decided to share it here, as I noticed this new March tag yesterday. Maybe it would be of some use for someone.

I mean, probably that's bloody stupid, both the idea and definitely the code, but for some reason it works. And as the terminal is apparently not the most positive place to be in the world, this script may make it more acceptable sometimes.

Cheers 🤗

Chat with yourself

Getting started

  1. Open your terminal app
  2. Install Node.js (or Bun, or Deno, or whatever JS runtime you prefer) if it's not there
  3. Clone this repo with git
  4. cd chat-with-yourself
  5. Run:
node chat.js
Enter fullscreen mode Exit fullscreen mode

You'll need to enter two names for the chatting persons and start the chat. When you want to stop chatting, enter byebye and the script will stop execution. The resulting chat text will be saved as a markdown file in the root folder. (The generated files are gitignored by default.)

Supports different languages (well, some at least), and emojis 🙂

Inspiration behind the project

Elizabeth Gilbert, Eat, Pray, Love, Chapter 18

Or, rather — here I am. I am in Rome, and I am in trouble. The goons of Depression and Loneliness have barged into my life again, and I just took my last Wellbutrin three days ago. There are more pills in…

Top comments (29)

Collapse
 
valeriavg profile image
Valeria

First of all, not stupid at all! Journaling is a pretty solid mindfulness technique and you made it fun and nerdy (it’s a bloody good thing in my book).

And most importantly: are you okay? You know where to find me if you need some random person to talk to about anything 🙏

Collapse
 
fyodorio profile image
Fyodor

Thanks a lot Valeria, and I truly appreciate asking ❤️ It's grand, unless reading Elizabeth Gilbert is not a sign of something damn serious 😅

Collapse
 
valeriavg profile image
Valeria

Awesome! 🤩 I don’t think so, but I read her too, so better check 😆

Collapse
 
peterwitham profile image
Peter Witham

This is a great idea, and sometimes we need to talk to someone regardless of their reality status (it's a joke). Just letting it all out is the way to go.

I'm glad to hear it helped you, and I'm sure it will help others. We are here for you and all those who need it. We all have times when we need a moment to fall apart and build up again (guilty as charged).

Collapse
 
lotfijb profile image
Lotfi Jebali

i will contact you, i have ideas for this project ;)

Collapse
 
fyodorio profile image
Fyodor

Sure, thanks 👍 I mean, I hope that's not OpenAI integration 🤞😅

Collapse
 
alxwnth profile image
Alex

A beautifully simple concept, I like it!

Collapse
 
lilxyzz profile image
Travis

Thank you for creating, Chat with yourself, @fyodorio! This is an outstanding and powerful tool, in my opinion. I'm sure it will come in handy for me when times are hard. I must have forgotten to comment but I have already sent over a ⭐️

Thank you again!

Collapse
 
fyodorio profile image
Fyodor

Thanks Travis! That's the tool I truly hope nobody will ever need 😅 But... This life...

Collapse
 
mrlinxed profile image
Mr. Linxed

I love it. Thank you for creating this.

Collapse
 
pwd9000 profile image
Marcel.L

This is just amazing!
Had good fun playing! :)

Collapse
 
fyodorio profile image
Fyodor

Thanks, that's really cool, I mean that's exactly the initial purpose of it 😅

Collapse
 
pwd9000 profile image
Marcel.L

This is so good! What a fun way to have started my day! :)

Collapse
 
damnpedrini profile image
Pedrini

I can't wait to see it!

Collapse
 
cadienvan profile image
Michael Di Prisco

If it helped you, it's definitely not stupid at all!

Collapse
 
josunlp profile image
Jonas Pfalzgraf

This lightened my mood today by ALLOT! Things like this keep the spirit of coding alive, thank you for sharing ^^

Collapse
 
fyodorio profile image
Fyodor

Thanks a lot for the kind words 🤗

Collapse
 
hazem_onclcik588 profile image
Hazem Mahmoud

So cool keep going fun us
❤️❤️

Collapse
 
cbid2 profile image
Christine Belzie

Hi @fyodorio! 😊 Thank you so much for creating this tool! It’ll be great way to boost someone’s confidence and mental state at their lowest moments in life.
I noticed that you used the #wecoded tag. This is used for Dev.to’s wecoded program. You can learn more about it here. With this in mind, can you add some information to your post on how your project relates to being a gender minority in tech?

Collapse
 
michaeltharrington profile image
Michael Tharrington

I agree with this! It's a pretty cool post, but I'm not so sure of the tie-in to #wecoded. Could you do more to make this related to we_coded, Fyodor?

Collapse
 
fyodorio profile image
Fyodor

Hi guys @michaeltharrington, @cbid2, thanks for noticing that. I'm pretty aware of the tag meaning and underlying goals of the March support movement for underrepresented and marginalized members of our community. I mentioned that explicitly in the post. And that was my intent, to be honest, to participate in creating the "feeling of support amongst the community". Which (I hope) is emphasized by the story Elizabeth Gilbert (who I mention a lot and quote widely in my repo) tells. I have my own story behide all of that but I'm not ready to tell it just yet, sorry for that. But I genuinely hope this short showcase may be useful for someone under the agenda of the March celebration.

Thread Thread
 
michaeltharrington profile image
Michael Tharrington

Heyo Fyodor!

I appreciate you explaining the connection so clearly to us and thanks for sharing this post in general. I can totally understand where you're coming from and I do think this is a helpful & supportive tool for folks during we_coded! Thanks for the kind explanation and apologies for the hasty read of your post. Rereading now, you are totally right that you point out the connection within the post.

Anywho, hope you keep enjoying DEV and thanks again for sharing this post with us — it's a great fit for we_coded! 🙂

Collapse
 
codingjlu profile image
codingjlu

Just wondering, out of all possible languages to build a CLI, why NodeJS? Almost any other language is easier to use when it comes to a CLI.

Collapse
 
fyodorio profile image
Fyodor

That’s, my friend, a holy-war-starting sentence and I would avoid killing the erzherzog 😅 Can just say I love JS and we don’t choose who (or what) we love, it’s just the destiny…

Collapse
 
codingjlu profile image
codingjlu

I'm a fan of JS, but I'm not sure if using it with CLIs is debatable. What you achieve in maybe 50 lines of JS can be achieved in 10 lines of Python. I guess you really do have that unconditional faithful love. ;)

Collapse
 
dyfet profile image
David Sugar

This is what ai is for ;).

Collapse
 
fyodorio profile image
Fyodor

Try it with AI 😉😬

Collapse
 
dyfet profile image
David Sugar

Given where we are with artificial ignorance today, I also fear this kind of use case. It might say "jump!". When they get the kinks worked out for Bing, it will likely offer recommendations on where to buy rope, too...

Thread Thread
 
fyodorio profile image
Fyodor

That’s my worry as well 👍😄