Build an open future with us.

Invest in Mycroft and become a community partner.

THEIA IDE skill


#1

THEIA IDE

VS Code experience on your Mycroft device

How to install THEIA IDE skill

  • Install THEIA IDE skill by …
    To get Theai IDE to comile it is needed to encrease the swapsize. This is none by editing the file /etc/dphys-seapfile and setting changing CONF_SWAPSIZE=100 to 2048

to do that ssh into your device and do:

sudo nano /etc/dphys-swapfile

exit by Ctrl+X and save And restart swarpfile

sudo /etc/init.d/dphys-swapfile stop
sudo /etc/init.d/dphys-swapfile start

Install the skill by

mycroft-msm install https://github.com/andlo/theia-ide-skill.git

Skill wil then install THEIA IDE. This takes more than 15 minutes, and will slow your Mycroft device down when compiling node-modules.

When done, there should be a log info saying “Starting THEIA IDE” You can then open a web-browser and gå to http://picroft:3000 if your Mycroft device is picroft. If on a Mark One go to http://mark_1:3000/ You then get access to the THEIA IDE in a workplace located /opt/mycroft/skills.

THEIA IDE skill connects to absolutly no online service.

but If you want, THEIA has a great Github integration.

How to test THEIA IDE Skill

  • Installing and setup
  • Running and access to THEIA http://picroft:3000
  • Therminal and use og mycroft specifik commands
  • Git integration - Pull and push and monitor changes etc.
  • Search throu all workspaceses
  • Python Language server support - formatiing and highlight etc
  • Does you have problems that new files has CRLF and not just LF.

Where feedback on SKILL NAME should be directed a

Feedback will be apriciated here or through Issues on GitHub, or via Mycroft Chat.


#2

Forgot to telle how to remove the skil or reinstall

Delete skill from /opt/mycroft/skills by deleting directory or by

mycroft-msm remove theia-ide-skill

Delete directory /hoem/pi/.mycroft/skills/TheiaIde


#3

great tool for small skill developers very easy to handle. Thank you


#4

Yah it is neat :slight_smile:
I want a easy way to get acces to make skills, so newcommers or people who dosnt have setup thier personal dev envioment to get an easy start in making skills. This is a way to do that.


#5

How to test THEIA IDE Skill

  • Installing and setup
    After changing CONF_SWAPSIZE=100 to 2048 and restart of /etc/init.d/dphys-swapfile my PiCroft slowed totally down, had to reboot the RPI. Afterwards installation went smooth but took really long…
    Should the swapsize configuration stay at 2028 for normal use or can it be changed back to original value?

  • Running and access to THEIA http://picroft:3000
    works! :+1:

  • Therminal and use og mycroft specifik commands
    works! :+1:

  • Git integration - Pull and push and monitor changes etc.
    does not work :confused:, I get errors like GitError: error: option 'porcelain' takes no value usage: git status [options] [--] <pathspec>...

  • Search throu all workspaceses
    search for “mycroft” gives me tons of results - and it this was fast too -woohoo

  • Python Language server support - formatiing and highlight etc
    works! :+1:

  • Does you have problems that new files has CRLF and not just LF.
    not sure how to test it… a new created file is properly shown with less or when opened with nano


#6

Thanks for feedback

The git integration laks the posibility to hold your git username and password. but you should be able to get git to remember
In the terminal ou can type

git config --global credential.helper store

When running this command, the first time you pull or push from the remote repository, you’ll get asked about the username and password.

So do a git pull or push by

git pull

And you will be ask credentials.

After on, for consequent communications with the remote repository you don’t have to provide the username and password.

And then the git integration works

The storage format is a .git-credentials file, stored in plaintext. So it isnt that secure, so be aware.

Also, you can use other helpers for the git config credential.helper , namely memory cache:

git config credential.helper cache <timout>

which takes an optional timeout parameter , determining for how long its deamon should run and the default value of it is 900 seconds (15 minutes).

The CRLF problem yoou can test by

Make a new file test.sh
in that enter

#!/bin/bash
echo this is a test

save it and in the terminal do

chmod +x test.sh
./test.sh

If there is a problem it wil sav error blablabla but see ^M
If there isnt an error you see the text “this is a test”


#7

But did just check on a new install….there is a problem whith CRLF vs LF.

You can copy the .editorconfig file from the skill directory /files to /opt/mycroft/skills

I will add that to the installer.


#8

That is a good question. I am from the old school where it is good practice to have same or dubbel size swap as memmory on small or old systems. And a Rpi is a small system :wink:
I will test how it perform if changing swapsize back to 100.


#9

it can defently not run whith only 100 mb swap…maybe if disabling python linting and language serviceses. Biy I think that is something that is very nice when coding….
I will see what can be done and where to tune.


#10

wow - I changed and loads lesser python language server plugins, and that seems to do good for memoryuse. But swap IS needed, as when mycroft does something like update skills, there isnt enough free mem, and everything stalls and get reall slow.

So I recoment keeping 2048 ar swapsize.

The only downside by that is it takes some space on the SD card.